diff options
| -rwxr-xr-x | hpmr.py | 70 |
1 files changed, 57 insertions, 13 deletions
@@ -7,21 +7,20 @@ import sys import time import string import numpy as np +import warnings +# HP-MR Model in OpenMC +# C.Moore, <connor.moore@psi.ch> ############ HLPER FUNCTIONS ############ -def rot(base: openmc.Universe, angle: float = 0.0) -> openmc.Cell: +def rot(base: openmc.Universe, angle: float = 0.0) -> openmc.Universe: # Take the cells from the existing universe and create a new rotated universe new_cell = openmc.Cell(fill=base) new_cell.rotation=(0.0,0.0,angle) new_cell.name = f"Control Drum Cell, Rotated {angle} deg" return openmc.Universe(name=base.name + f" Rotated {angle} deg", cells=[new_cell]) - -# HP-MR Model in OpenMC -# C.Moore, <connor.moore@psi.ch> - ############ COMMAND LINE ARGUMENTS ############ cli_parser = argparse.ArgumentParser( prog="HP-RM TRISO Homogenization Study", @@ -37,11 +36,19 @@ cli_parser.add_argument("-d","--drums-in",default=False,action="store_true",help cli_parser.add_argument("-p","--packing",default=False,action="store_true",help="Flag for specifying if packing information should be read from file") cli_parser.add_argument("-e","--execute",default=False,action="store_true",help="Flag for automatically running OpenMC, default false.") cli_parser.add_argument("--triso-lattice",default=False,action="store_true",help="Flag for enabling TRISO lattice domain decomposition in the compact, default false.") +cli_parser.add_argument("--model-hp",default=False,action="store_true",help="Flag for enabling heat pipe modelling of pool/saturation heights, default false.") +cli_parser.add_argument("--pool-height",default=15.0,type=float,help="Heap pipe pooling height [cm]. Requires z_height=80.0, default 15.0, range (0,160)") +cli_parser.add_argument("--sat-height",default=80.0,type=float,help="Heap pipe wick saturation height [cm]. Requires z_height=80.0, default 80.0, range (0,160)") cli_args = cli_parser.parse_args() if cli_args.lclrs: openmc.config["cross_sections"] = "/libs/endfb81_official/cross_sections.xml" +# Sanity check +if cli_args.model_hp and cli_args.z_height!=80: + warnings.warn("Warning: ignoring --model-hp flag as the slice height is not full-core.", RuntimeWarning) + + ############ INTPUT-OUTPUT MAPPING ############ with open(sys.argv[0], "rb") as file: contents = file.read() @@ -64,6 +71,7 @@ print("="*52) mat_list = [] mat_temp_global = 700.0 mat_temp_fuel = 1000.0 +mat_pipe_porosity = 0.70 ## 100s - Matrix Graphite ## mat_graphite_matrix = openmc.Material(100,name="Graphite Matrix (between pins)") @@ -373,7 +381,6 @@ mat_pipe_inner_region.temperature = mat_temp_global mat_pipe_inner_region.set_density("atom/b-cm",0.08324) mat_list.append(mat_pipe_inner_region) - mat_pipe_he_gap_smear = openmc.Material(407,name="Heat Pipe He Gap SS316 Smear") mat_pipe_he_gap_smear.add_nuclide('He4',5.629e-6) mat_pipe_he_gap_smear.add_nuclide('C12',1.287e-4) @@ -410,6 +417,27 @@ mat_pipe_he_gap_smear.temperature = mat_temp_global mat_pipe_he_gap_smear.set_density("atom/b-cm",0.06771) mat_list.append(mat_pipe_he_gap_smear) +# Smeared heat pipe wick materials +mat_pipe_wick_sat = openmc.Material.mix_materials( + material_id=408, + materials=[mat_pipe_ss316, mat_pipe_k_liquid], + fracs=[1-mat_pipe_porosity, mat_pipe_porosity], + percent_type="vo", + name="Heat Pipe Wick (Saturated)", + temperature=mat_temp_global + ) +mat_list.append(mat_pipe_wick_sat) + +mat_pipe_wick_unsat = openmc.Material.mix_materials( + material_id=409, + materials=[mat_pipe_ss316, mat_pipe_k_gas], + fracs=[1-mat_pipe_porosity, mat_pipe_porosity], + percent_type="vo", + name="Heat Pipe Wick (Unsaturated)", + temperature=mat_temp_global + ) +mat_list.append(mat_pipe_wick_unsat) + ## 500 - Core-level details ## mat_core_be_reflector = openmc.Material(500,name="Core Beryllium Reflector") @@ -607,14 +635,30 @@ geo_dyn_universe = geo_homo_map[cli_args.technique] ## Heat Pipe ## geo_pipe_cylinders = [openmc.ZCylinder(r=rad, x0=0.0, y0=0.0) for rad in [0.80, 0.90, 0.97, 1.05, 1.07]] -geo_pipe_cells = [openmc.Cell(name="Heat Pipe K Gas",fill=mat_pipe_k_gas,region=-geo_pipe_cylinders[0]), - openmc.Cell(name="Heat Pipe Wick",fill=mat_pipe_wick_smear,region=+geo_pipe_cylinders[0]&-geo_pipe_cylinders[1]), - openmc.Cell(name="Heat Pipe K Layer",fill=mat_pipe_k_liquid,region=+geo_pipe_cylinders[1]&-geo_pipe_cylinders[2]), - openmc.Cell(name="Heat Pipe SS316 Envelope",fill=mat_pipe_ss316,region=+geo_pipe_cylinders[2]&-geo_pipe_cylinders[3]), - openmc.Cell(name="Heat Pipe Helium Gap",fill=mat_pipe_he_gap_smear,region=+geo_pipe_cylinders[3]&-geo_pipe_cylinders[4]), - openmc.Cell(name="Heat Pipe Graphite Matrix",fill=mat_graphite_matrix,region=+geo_pipe_cylinders[4])] -geo_pipe_universe = openmc.Universe(name="Heat Pipe Universe",cells=geo_pipe_cells) +# Dynamic for if HP is being studied or not +if cli_args.model_hp: + geo_pipe_z_pool = openmc.ZPlane(z0=cli_args.pool_height-80) + geo_pipe_z_wick = openmc.ZPlane(z0=cli_args.sat_height-80) + geo_pipe_cells = [openmc.Cell(name="Heat Pipe inner K Gas",fill=mat_pipe_k_gas,region=-geo_pipe_cylinders[0]&+geo_pipe_z_pool), + openmc.Cell(name="Heat Pipe inner K Liquid",fill=mat_pipe_k_liquid,region=-geo_pipe_cylinders[0]&-geo_pipe_z_pool), + openmc.Cell(name="Heat Pipe Saturated Wick",fill=mat_pipe_wick_sat,region=+geo_pipe_cylinders[0]&-geo_pipe_cylinders[1]&-geo_pipe_z_wick), + openmc.Cell(name="Heat Pipe Unsaturated Wick",fill=mat_pipe_wick_unsat,region=+geo_pipe_cylinders[0]&-geo_pipe_cylinders[1]&+geo_pipe_z_wick), + openmc.Cell(name="Heat Pipe Outer K Gas",fill=mat_pipe_k_gas,region=+geo_pipe_cylinders[1]&-geo_pipe_cylinders[2]&+geo_pipe_z_pool), + openmc.Cell(name="Heat Pipe Outer K Liquid",fill=mat_pipe_k_liquid,region=+geo_pipe_cylinders[1]&-geo_pipe_cylinders[2]&-geo_pipe_z_pool), + openmc.Cell(name="Heat Pipe SS316 Envelope",fill=mat_pipe_ss316,region=+geo_pipe_cylinders[2]&-geo_pipe_cylinders[3]), + openmc.Cell(name="Heat Pipe Helium Gap",fill=mat_pipe_helium,region=+geo_pipe_cylinders[3]&-geo_pipe_cylinders[4]), + openmc.Cell(name="Heat Pipe Graphite Matrix",fill=mat_graphite_matrix,region=+geo_pipe_cylinders[4])] +else: + geo_pipe_cells = [openmc.Cell(name="Heat Pipe K Gas",fill=mat_pipe_k_gas,region=-geo_pipe_cylinders[0]), + openmc.Cell(name="Heat Pipe Wick",fill=mat_pipe_wick_smear,region=+geo_pipe_cylinders[0]&-geo_pipe_cylinders[1]), + openmc.Cell(name="Heat Pipe K Layer",fill=mat_pipe_k_liquid,region=+geo_pipe_cylinders[1]&-geo_pipe_cylinders[2]), + openmc.Cell(name="Heat Pipe SS316 Envelope",fill=mat_pipe_ss316,region=+geo_pipe_cylinders[2]&-geo_pipe_cylinders[3]), + openmc.Cell(name="Heat Pipe Helium Gap",fill=mat_pipe_he_gap_smear,region=+geo_pipe_cylinders[3]&-geo_pipe_cylinders[4]), + openmc.Cell(name="Heat Pipe Graphite Matrix",fill=mat_graphite_matrix,region=+geo_pipe_cylinders[4])] + +# Assign to a universe +geo_pipe_universe = openmc.Universe(name="Heat Pipe Universe",cells=geo_pipe_cells) ## Moderator Pin ## geo_mod_cylinders = [openmc.ZCylinder(r=rad, x0=0.0, y0=0.0) for rad in [0.825, 0.875, 0.900, 0.920]] |
