From 66b7a1dd313be1115fac39acc63aa004926f0ec7 Mon Sep 17 00:00:00 2001 From: church89 Date: Fri, 5 Aug 2022 15:48:40 +0200 Subject: [PATCH] fixed material definition --- scripts/msre_geometry_plot.py | 9 ++++++--- scripts/msre_neutron_flux.py | 5 +++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/scripts/msre_geometry_plot.py b/scripts/msre_geometry_plot.py index 35a43c6..6b4eaec 100644 --- a/scripts/msre_geometry_plot.py +++ b/scripts/msre_geometry_plot.py @@ -7,7 +7,7 @@ from materials import * ############################################################################### #geometry -h5m_filepath = './h5m_files/msre.h5m' +h5m_filepath = '../h5m_files/msre_simp_cubit/msre_simp_1e-2.h5m' graveyard = openmc.Sphere(r=10000,boundary_type='vacuum') cad_univ = openmc.DAGMCUniverse(filename=h5m_filepath,auto_geom_ids=True) cad_cell = openmc.Cell(region=-graveyard,fill=cad_univ) @@ -17,7 +17,8 @@ geometry=openmc.Geometry(root) geometry.export_to_xml() # materials -mats = openmc.Materials([salt,BeO,inconel,insulation,coolant,helium,stainless,boron]) +mats = define_materials() +#mats = openmc.Materials([salt,BeO,inconel,insulation,coolant,helium,stainless,boron]) mats.export_to_xml() #plotting geometry @@ -29,19 +30,21 @@ y_width = 300 #xy plot p1 = openmc.Plot() p1.width = (x_width,y_width) +p1.origin = (0,0,100) p1.pixels = (1000, 1000) p1.color_by = 'material' #xz plot (split plane) p2 = openmc.Plot() p2.basis = 'xz' -#p2.origin = (0,5,0) +p2.origin = (0,0,130) p2.width = (x_width,y_width) p2.pixels = (1000, 1000) p2.color_by = 'material' p3 = openmc.Plot() p3.basis = 'yz' +p3.origin = (0,0,130) p3.width = (x_width,y_width) p3.pixels = (1000, 1000) p3.color_by = 'material' diff --git a/scripts/msre_neutron_flux.py b/scripts/msre_neutron_flux.py index 1ccef68..8bcc2ae 100644 --- a/scripts/msre_neutron_flux.py +++ b/scripts/msre_neutron_flux.py @@ -7,7 +7,7 @@ from materials import * ############################################################################### #Geometry -h5m_filepath = 'h5m_files/msre.h5m' +h5m_filepath = '../h5m_files/msre_simp_cubit/msre_simp_1e-2.h5m' graveyard = openmc.Sphere(r=10000,boundary_type='vacuum') cad_univ = openmc.DAGMCUniverse(filename=h5m_filepath,auto_geom_ids=True) cad_cell = openmc.Cell(region=-graveyard,fill=cad_univ) @@ -17,7 +17,8 @@ geometry=openmc.Geometry(root) geometry.export_to_xml() #materials -mats = openmc.Materials([salt,BeO,inconel,insulation,coolant,helium,stainless,boron,blanket,shield]) +mats=define_materials() +#mats = openmc.Materials([salt,BeO,inconel,insulation,coolant,helium,stainless,boron,blanket,shield]) mats.export_to_xml() settings = openmc.Settings()