-
Notifications
You must be signed in to change notification settings - Fork 0
/
1_create_dagmc_geometry.py
46 lines (41 loc) · 1.51 KB
/
1_create_dagmc_geometry.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import paramak
# makes a mode of a reactor with a rotation angle of 360 and default parameters elsewhere
# Link to a full list of parameters https://paramak.readthedocs.io/en/main/examples.html#flfsystemcodereactor
my_reactor = paramak.FlfSystemCodeReactor(
rotation_angle=360,
inner_blanket_radius=100.0,
blanket_thickness=70.0,
blanket_height=500.0,
lower_blanket_thickness=50.0,
upper_blanket_thickness=40.0,
blanket_vv_gap=20.0,
upper_vv_thickness=10.0,
vv_thickness=10.0,
lower_vv_thickness=10.0,
)
# creates a dagmc h5m file of the geometry with material tags automatically assigned
# exports the mesh in several sizes.
for mesh_size in [100, 10]:
# makes a DAGMC with tags suitable for OpenMC and no graveyard
my_reactor.export_dagmc_h5m(
filename=f"dagmc_{mesh_size}_openmc.h5m",
min_mesh_size=mesh_size,
max_mesh_size=mesh_size,
)
# makes the DAGMC geometry with tags suitable for Shift and with a graveyard
my_reactor.graveyard_size = 1400 # manually sets the graveyard size, centered around 0,0,0
my_reactor.export_dagmc_h5m(
filename=f"dagmc_{mesh_size}_shift.h5m",
tags=[
"1", # blanket
"2", # vacuum_vessel
"3", # upper_blanket
"4", # lower_blanket
"5", # lower_vacuum_vessel
"6", # upper_vacuum_vessel
"graveyard"
],
include_graveyard=True,
min_mesh_size=mesh_size,
max_mesh_size=mesh_size,
)