From 9efbb40d1594c98f05a2c049e9d3c7c4358c16ef Mon Sep 17 00:00:00 2001 From: LukeLabrie Date: Thu, 28 Jul 2022 11:10:29 +0200 Subject: [PATCH] cleanup --- scripts/msre_geometry_plot.py | 12 ++++++++---- scripts/msre_neutron_flux.py | 21 ++++++++------------- scripts/msre_photon_flux.py | 12 ++++++++---- scripts/step_to_h5m.py | 2 +- 4 files changed, 25 insertions(+), 22 deletions(-) diff --git a/scripts/msre_geometry_plot.py b/scripts/msre_geometry_plot.py index 8dc7ac8..35a43c6 100644 --- a/scripts/msre_geometry_plot.py +++ b/scripts/msre_geometry_plot.py @@ -6,16 +6,20 @@ from materials import * #generate geometry plot of are (all safety rods fully inserted) ############################################################################### +#geometry h5m_filepath = './h5m_files/msre.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) +root=openmc.Universe() +root.add_cells([cad_cell]) +geometry=openmc.Geometry(root) +geometry.export_to_xml() # materials mats = openmc.Materials([salt,BeO,inconel,insulation,coolant,helium,stainless,boron]) mats.export_to_xml() -dag_univ = openmc.DAGMCUniverse(h5m_filepath) -geom = openmc.Geometry(root=dag_univ) -geom.export_to_xml() - #plotting geometry plots = openmc.Plots() diff --git a/scripts/msre_neutron_flux.py b/scripts/msre_neutron_flux.py index 0c25a63..1ccef68 100644 --- a/scripts/msre_neutron_flux.py +++ b/scripts/msre_neutron_flux.py @@ -8,6 +8,13 @@ from materials import * #Geometry h5m_filepath = 'h5m_files/msre.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) +root=openmc.Universe() +root.add_cells([cad_cell]) +geometry=openmc.Geometry(root) +geometry.export_to_xml() #materials mats = openmc.Materials([salt,BeO,inconel,insulation,coolant,helium,stainless,boron,blanket,shield]) @@ -23,19 +30,7 @@ source_area = openmc.stats.Box([-200., -200., -200.],[ 200., 200., 200.],only_ settings.source = openmc.Source(space=source_area) settings.export_to_xml() -#geometry -graveyard=openmc.Sphere(r=10000,boundary_type='vacuum') - -cad_univ = openmc.DAGMCUniverse(filename=h5m_filepath,auto_geom_ids=True,universe_id=996 ) - -cad_cell = openmc.Cell(cell_id=997 , region= -graveyard, fill= cad_univ) - -root = openmc.Universe(universe_id=998) -root.add_cells([cad_cell]) -geometry = openmc.Geometry(root) -geometry.export_to_xml() - - +#tallies tallies = openmc.Tallies() mesh = openmc.RegularMesh() diff --git a/scripts/msre_photon_flux.py b/scripts/msre_photon_flux.py index 16ae6c0..8a301c4 100644 --- a/scripts/msre_photon_flux.py +++ b/scripts/msre_photon_flux.py @@ -8,6 +8,13 @@ from materials import * #Geometry h5m_filepath = 'h5m_files/ARE.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) +root=openmc.Universe() +root.add_cells([cad_cell]) +geometry=openmc.Geometry(root) +geometry.export_to_xml() #materials mats = openmc.Materials([salt,BeO,inconel,insulation,coolant,helium,stainless,boron,blanket,shield]) @@ -23,10 +30,7 @@ source_area = openmc.stats.Box([-200., -200., -200.],[ 200., 200., 200.],only_ settings.source = openmc.Source(space=source_area) settings.export_to_xml() -dag_univ = openmc.DAGMCUniverse(h5m_filepath) -geom = openmc.Geometry(root=dag_univ) -geom.export_to_xml() - +#tallies tallies = openmc.Tallies() # sets up filters for the tallies diff --git a/scripts/step_to_h5m.py b/scripts/step_to_h5m.py index 9a4748c..9409a5f 100644 --- a/scripts/step_to_h5m.py +++ b/scripts/step_to_h5m.py @@ -14,7 +14,7 @@ h5m_out_filepath = os.getcwd() + '/h5m_files/msre.h5m' # mesher config ab.mesher_config['min_mesh_size'] = 0.2 -ab.mesher_config['mesh_algorithm'] = 3 +ab.mesher_config['mesh_algorithm'] = 4 ab.mesher_config['threads'] = 6 #ab.mesher_config['max_mesh_size'] = 1000 #ab.mesher_config['curve_samples'] = 100