Building Core Configurations

With an assembly library in hand, the next step is to define how those separate components come together to form a working reactor. This involves defining a core layout, loading irradiation facilities, configuring control structures, and specifying the rest of the reactor systems.

The neutronics model is defined using the core.model_builder.ModelBuilder interface, which is essentially a large data object, exposing all the parameters required to construct a working model.

Note

Fixed full core configurations are usually constructed within the in configuration application input, which facilitates interaction with the model through the command line interface.

Using your assembly library

You can access your assembly archive by importing the assemblies container from the local model package:

from ..model import assemblies

All the assemblies in your assembly archive can be accessed through attributes of this container. The attribute used to construct an assembly type has the same name as the name you specified in the build script. For example, to create an instance of an assembly type called ‘MY_REACTOR_assembly_type_1’:

asm = assemblies.MY_REACTOR_assembly_type_1()

Note

Spaces and - characters used when naming your assembly type in the build script will be replaced with an _ character.

Attention

The assemblies structure only collects assembly archives. Thus, only assemblies with an existing archive will be available. To construct an assembly instance without an archive, import its build module instead:

form ..model import my_assembly

a1 = my_assembly.build()

Note that certain features (e.g. visualization) will not work correctly without an assembly archive.

On assembly types, assembly names and instances

The assemblies structure lists all base assembly types. The following will construct two instances of the same base type:

asm = assemblies.MY_REACTOR_assembly_type_1

i1 = asm()
i2 = asm()

As far as the system is concerned, i1 and i2 are two different assemblies of the same base type. In particular, they carry unique and separates states, so that modifying one will not affect the other. Thus, assembly instances are not necessarily defined by a string tag. In the rapyds system, string tags are only required when adding or retrieving assemblies from an inventory. Since this can, at times, be a bit confusing, it is recommended that you also give assembly instances unique names (whenever possible):

asm = assemblies.MY_REACTOR_assembly_type_1

i1 = asm(name='instance_1')
i2 = asm(name='instance_2')

Modifying assembly instances

Once you have an assembly instance, it can be modified by loading facilities, re-orientating it using transformations, or changing its state.

Loading facilities

Use the assembly’s load_facility method to change the state of configured facilities:

re = assemblies.MY_REACTOR_hollow_reflector()
sample = assemblies.MY_REACTOR_some_irradiation_sample()

re.load_facility('irradiation-position', sample)

Note

The model.assembly_facility_load_maps parameter can be used to do bulk loading for the entire core. This is the recommended method if you want to load unique instances of assemblies into different positions. Intra-assembly control structures can also be configured using the model.intra_assembly_control_map, and model.intra_assembly_control_facility parameters.

Setting state

You can also modify the (material) state of any assembly instance using the set_state method:

import core.state

i1.set_state(core.state.fuel_temperature(566 * units.K))

Note

Changing the state for all assemblies in the core is achieved by modifying the model.state parameter. Channel specific states can be set with the model.state_map parameter.

Adding transformations

Change the orientation of your assembly by adding transformations. For example:

import core.geometry

i1.add_transformation(core.geometry.reflection('y'))

Note

The model.transformation_map parameter can be used to specify transformations for channels in the core map.

Building the model

This section lists all the model parameters used to define your core configuration.

Configuration meta data

model.facility_description

Description of the facility this model represents. This parameter simply collects the following sub-parameters:

model.facility_description.site

: string

= 'CORE'

Description of the facility this configuration belongs to. The following values are understood and handled by the system:

  • ‘CORE’

  • ‘POOL’

  • ‘VAULT’

Note

Additional site names must be configured with the facility manager.

model.facility_description.unit

: string

= 'Unknown'

Name of the particular unit at model.facility_description.site this model is based on.

model.facility_description.name

: string

= 'Unknown'

Full facility name.

model.facility_description.reactor_type

: string

= 'MTR'

Reactor type. Currently, only the following tags are recognized:

MTR

Material Testing Reactor

PWR

Pressurized Water Reactor

BWR

Boiling Water Reactor

Note

This is required by certain target codes to set default physics options.

model.facility_description.design_power

: power

= 1 MW

Design (nominal) power.

model.facility_description.design_pressure

: pressure

= 1 atmosphere

Nominal coolant temperature.

model.facility_description.design_coolant_mass_flow = 0 kg/s

The average nominal coolant mass flow rate.

model.facility_description.design_inlet_temperature

: temperature

= 20 degC

The nominal inlet temperature.

model.design_coolant_flow_direction

: 'UP' or 'DOWN'

The coolant flow direction.

Attention

This parameter must be set in order for thermal feedback models to work correctly.

Example:

model.facility_description.site = 'CORE'
model.facility_description.reactor_type = 'MTR'
model.facility_description.design_power = 5 * units.MW
model.name

: string

Name used to identify this model configuration.

model.description

: string

Optional description of the model configuration.