diff options
Diffstat (limited to 'hpmr.py')
| -rwxr-xr-x | hpmr.py | 35 |
1 files changed, 18 insertions, 17 deletions
@@ -234,6 +234,8 @@ mat_kernel_vwh = openmc.Material.mix_materials( percent_type="vo", name="VWH kernel" ) +mat_kernel_vwh.add_s_alpha_beta("c_Graphite") +mat_list.append(mat_kernel_vwh) # Simple VWH mat_triso_vwh = openmc.Material.mix_materials( @@ -242,30 +244,28 @@ mat_triso_vwh = openmc.Material.mix_materials( percent_type="vo", name="VWH Homogenized TRISO Compact" ) +mat_triso_vwh.add_s_alpha_beta("c_Graphite") +mat_list.append(mat_triso_vwh) # RPT Homogenization -mat_triso_rpt = openmc.Material.mix_materials( - materials=[mat_triso_uco, mat_triso_buffer, mat_triso_pyc1, mat_triso_sic, mat_triso_pyc2, mat_graphite_matrix], - fracs=geo_rpt_fracs, - percent_type="vo", - name="RPT Homogenized TRISO Compact" - ) +if cli_args.technique=="rpt": # There is a minimum viable radius for RPT, so only calculate this if needed to aovid errors + mat_triso_rpt = openmc.Material.mix_materials( + materials=[mat_triso_uco, mat_triso_buffer, mat_triso_pyc1, mat_triso_sic, mat_triso_pyc2, mat_graphite_matrix], + fracs=geo_rpt_fracs, + percent_type="vo", + name="RPT Homogenized TRISO Compact" + ) + mat_triso_rpt.add_s_alpha_beta("c_Graphite") +else: + mat_triso_rpt = openmc.Material(name="PLACEHOLDER//DO NOT USE") + mat_triso_rpt.add_nuclide("U235",1.0) + mat_triso_rpt.set_density("g/cc",100.0) +mat_list.append(mat_triso_rpt) # Restore TSL for other materials for mat, tsl_list in mat_tsl_saved.items(): mat._sab = tsl_list -# Add TSL for new materials -mat_kernel_vwh.add_s_alpha_beta("c_Graphite") -mat_triso_vwh.add_s_alpha_beta("c_Graphite") -mat_triso_rpt.add_s_alpha_beta("c_Graphite") - -# Add new materials to global list -mat_list.append(mat_kernel_vwh) -mat_list.append(mat_triso_vwh) -mat_list.append(mat_triso_rpt) -materials = openmc.Materials(mat_list) - # RRPT transformation geo_rrpt_r_out = math.sqrt(4*geo_n_triso*geo_triso_spheres[4].r**3/(6*geo_constant_height) + cli_args.radius**2) geo_rrpt_region = +openmc.ZCylinder(r=cli_args.radius,x0=0.0,y0=0.0) & -openmc.ZCylinder(r=geo_rrpt_r_out,x0=0.0,y0=0.0) \ @@ -374,6 +374,7 @@ set_entropy_mesh.dimension=(30,30,30) settings.entropy_mesh=set_entropy_mesh ## Export ## +materials = openmc.Materials(mat_list) materials.export_to_xml() geometry.export_to_xml() settings.export_to_xml() |
