-
Notifications
You must be signed in to change notification settings - Fork 3
Regions
Each run has at least one region with an associated material. The "Region" function takes two arguments. The first argument is the region name. The second is the keyword for the type of region: FUEL, MODERATOR, or INFINITE. Examples for the region input are given below for each case.
In the infinite homogeneous case, there is only one region, and so the input is simple. The region is initialized and the material is set per the example below from infinite.py.
py_printf('INFO', 'Initializing fuel-moderator mix region...')
# Define region
region_mix = Region('infinite medium', INFINITE)
region_mix.setMaterial(mix)
Regions for the homogeneous case are a bit more complex. In this case, a pin cell, fuel and moderator regions are both specified. The code recognizes three special keywords for the second argument: INFINITE, MODERATOR, and FUEL. For each region the proper keyword must be used, and materials set as in the example above. As shown in the example, fuel radius and pitch must be set for both regions so each region volume can be computed independently. These functions take in the fuel radius and pitch in units of cm.
py_printf('INFO', 'Initializing fuel and moderator regions...')
# Define moderator region
radius_fuel = 2.0
pitch = 1.0
region_mod = Region('moderator', MODERATOR)
region_mod.setMaterial(moderator)
region_mod.setFuelRadius(radius_fuel)
region_mod.setPitch(pitch)
# Define fuel region
region_fuel = Region('fuel', FUEL)
region_fuel.setMaterial(fuel)
region_fuel.setFuelRadius(radius_fuel)
region_fuel.setPitch(pitch)
And, as always, it is encouraged to use the "py_printf" function to log messages.