run_filename = run_base_name + '.json' inp = json.load(open(os.path.join(base_path, run_filename))) if 'minc' in inp['mesh']: num_levels = len(inp['mesh']['minc']['geometry']['matrix']['volume']) else: num_levels = 0 AUTOUGH2_result[run_name] = T2ModelResult("AUTOUGH2", results_filename, geo_filename = t2geo_filename, fieldname_map = AUTOUGH2_FIELDMAP, ordering_map = minc_level_map(num_levels)) minc_1d_test.addTestComp(run_index, "AUTOUGH2", FieldWithinTolTC(fieldsToTest = test_fields, defFieldTol = 2.e-3, expected = AUTOUGH2_result[run_name], testOutputIndex = -1)) jrunner = SimpleJobRunner(mpi = mpi) testResult, mResults = minc_1d_test.runTest(jrunner, createReports = True) x = [col.centre[0] for col in geo.columnlist] n = geo.num_columns for field_name in plot_fields: scale = field_scale[field_name] unit = field_unit[field_name] for run_index, run_name in enumerate(run_names): result = minc_1d_test.mSuite.resultsList[run_index] var = result.getFieldAtOutputIndex(field_name, -1) / scale if run_index == 0: title = 'Single porosity' else: title = 'MINC (' + run_name + ' m)' plt.plot(x, var[:n], '-', label = 'Waiwera ' + title) var = AUTOUGH2_result[run_name].getFieldAtOutputIndex(field_name, -1) / scale
problem4_test.addTestComp( run_index, "AUTOUGH2 source", HistoryWithinTolTC(fieldsToTest=test_source_fields, defFieldTol=5.e-3, expected=AUTOUGH2_result, testSourceIndex=source_index)) problem4_test.addTestComp( run_index, ref_sim + " source", HistoryWithinTolTC(fieldsToTest=test_source_fields, defFieldTol=1.e-2, expected=ref_source_result, testSourceIndex=source_index, orthogonalError=True)) jrunner = SimpleJobRunner(mpi=True) testResult, mResults = problem4_test.runTest(jrunner, createReports=True) # plots: scale = { "Pressure": 1.e6, "Temperature": 1., "Liquid saturation": 1., "Enthalpy": 1.e3 } unit = { "Pressure": "MPa", "Temperature": "$^{\circ}$C", "Liquid saturation": "", "Enthalpy": "kJ/kg" }