Merge pull request #3 from openmsr/test

Test
This commit is contained in:
Lorenzo Chierici 2022-08-05 15:55:18 +02:00 committed by GitHub
commit fe2ea10a20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 1532472 additions and 15 deletions

View file

@ -1,10 +1,10 @@
import sys
sys.path.append('/opt/openmc/')
import openmc
import neutronsmaterialmaker as nmm
#import neutronsmaterialmaker as nmm
def define_materials():
# salt = openmc.Material(name="salt", temperature = 903)
#salt = openmc.Material(name="salt", temperature = 903)
# salt.add_nuclide('Li7', 10.9566, 'wo')
# salt.add_element('Be', 6.3492, 'wo')
# salt.add_element('Zr', 11.1013, 'wo')
@ -191,9 +191,9 @@ def define_materials():
bush.name='bush'
#Concrete block
concrete=nmm.Material.from_library('Concrete, Regular')
concrete=concrete.openmc_material
concrete.name="concrete"
#concrete=nmm.Material.from_library('Concrete, Regular')
#concrete=concrete.openmc_material
#concrete.name="concrete"
#Baryte block
baryte = openmc.Material(name="baryte", temperature = 903)
baryte.add_element('Ba',1)
@ -205,10 +205,10 @@ def define_materials():
water.add_element('H',2)
water.add_element('O',1)
water.set_density('g/cm3',0.997)
steel = nmm.Material.from_library('Steel, Carbon')
steel=steel.openmc_material
shield = openmc.Material.mix_materials([water,steel],[0.5,0.5],'wo')
shield.name='waterSteel'
#steel = nmm.Material.from_library('Steel, Carbon')
#steel=steel.openmc_material
#shield = openmc.Material.mix_materials([water,steel],[0.5,0.5],'wo')
#shield.name='waterSteel'
detector = openmc.Material(name = 'water')
detector.add_element('O',76.2,percent_type='wo')
@ -217,6 +217,6 @@ def define_materials():
detector.add_element('N',2.6,percent_type='wo')
detector.set_density('g/cm3',1.0)
mats = openmc.Materials([salt,graphite,inor,helium,inconel,bush,concrete,baryte,shield,detector])
mats = openmc.Materials([salt,graphite,inor,helium,inconel,bush])#,concrete,baryte,shield,detector])
mats.export_to_xml()
return mats

View file

@ -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'

View file

@ -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()

1532453
step_files/msre_simp.step Normal file

File diff suppressed because it is too large Load diff