summaryrefslogtreecommitdiff
path: root/krusty.py
diff options
context:
space:
mode:
authorConnor Moore <connor.moore@psi.ch>2026-07-08 14:38:13 +0200
committerConnor Moore <connor.moore@psi.ch>2026-07-08 14:38:13 +0200
commitb4037e62ff173b5850bb500ad169eb7a7228079f (patch)
tree341a46f3190571b69d437f35f1f69e0d09f0e600 /krusty.py
parent3e72a369b6567702711774ea0deec4fbfe47790a (diff)
Added optional run flag for python script and merlin7 support for bash driver
Diffstat (limited to 'krusty.py')
-rwxr-xr-xkrusty.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/krusty.py b/krusty.py
index 80f9b64..9e0ea06 100755
--- a/krusty.py
+++ b/krusty.py
@@ -18,6 +18,7 @@ cli_parser = argparse.ArgumentParser(
cli_parser.add_argument("-s","--sat-height",default=5.5,type=float,help="Height of wick that is saturated with Na starting at the bottom of the heat pipe (0-45) [cm], default 25.0")
cli_parser.add_argument("-p","--pool-height",default=5.0,type=float,help="Height of Na pool starting at the bottom of the heat pipe (0-45) [cm], default 5.0")
cli_parser.add_argument("-l","--lclrs",default=False,action="store_true",help="Flag for specifying LCLRS accessible cross-sections, default false.")
+cli_parser.add_argument("-r","--run",default=False,action="store_true",help="Whether or not to automatically run OpenMC, default false.")
cli_args = cli_parser.parse_args()
if cli_args.pool_height < 0.0 or cli_args.pool_height > 100.0:
@@ -188,8 +189,8 @@ geo_z_core_top = openmc.ZPlane(z0=25)
geo_z_abs_top = openmc.ZPlane(z0=35.16,boundary_type="vacuum")
geo_z_region = +geo_z_abs_bot & -geo_z_abs_top
-geo_z_hp_sat = openmc.ZPlane(z0=geo_z_abs_bot.z0 + cli_args.sat_height)
-geo_z_hp_pool = openmc.ZPlane(z0=geo_z_abs_bot.z0 + cli_args.pool_height)
+geo_z_hp_sat = openmc.ZPlane(surface_id=416,z0=geo_z_abs_bot.z0 + cli_args.sat_height)
+geo_z_hp_pool = openmc.ZPlane(surface_id=647,z0=geo_z_abs_bot.z0 + cli_args.pool_height)
## Heat Pipes ##
geo_hp_cyl = [openmc.ZCylinder(r=dia/2, x0=0.0, y0=0.0) for dia in [0.8920, 1.0920, 1.270]]
@@ -281,4 +282,4 @@ set_src.space = openmc.stats.CylindricalIndependent(
set_obj.export_to_xml()
# Run!
-openmc.run()
+openmc.run() if cli_args.run else None