Coupled calculations

This application mode is used to calculate coupled neutronic/thermal-hydraulic solutions, making use of the existing critical-case and core_thermal_hydraulics applications as underlying constituents for the coupling application. As such, any codes supported by these applications should be acceptable candidates for selection in performed such coupled calculations. A caveat to this generality is the requirement that the recipes and templates for relevant target codes are indeed aware of the multi-physics input and output blocks.

Note

The Coupling application is in fact a Rapyds Chain Application, which simply runs a series of Rapyds applications in series until set criteria are met.

Typical Use Cases

  1. Calculate a converged steady-state neutronic/thermal-hydraulic solution

  2. Obtain a detailed distribution of power, temperature (fuel, clad and coolant) as well as coolant density distributions throughout the core.

  3. Determine the reactivity feedback effects at a given power level.

  4. Developed detailed steady-state solutions as initial condition for transient analysis

Additional Input Parameters

In the following cpl denotes a coupling parameter set, created as follows:

import applications.coupling as app

cpl = app.parameters()

The application accepts the standard model, working_directory, project_name and time_stamp parameters, as well as a set of coupling specific parameters described. In addition, a standard set of critical-case and core_thermal_hydraulics parameters are also provided.

With regard to the coupling specific parameters, the following are required:

cpl.transfer

Define the method and granularity of the data exchange between neutronics and thermal-hydraulics. This is specified in terms of a dictionary with two component.

Parameters:
  • neutronics_to_thermal_hydraulics (str) – Scope of power data transfer to thermal-hydraulics.

  • thermal_hydraulics_to_neutronics (str) – Scope of temperature/density distribution information transfer to neutronics.

The entries in the dictionary for each of the directional flows can either be:

  1. core: full core information is transferred to a single run of the destination application

  2. per_filter: the destination application will be run multiple times, with assemblies grouped as per filters defined in the filters card.

    parameters.transfer = {'neutronics_to_thermal_hydraulics': 'per_filter',
                           'thermal_hydraulics_to_neutronics': 'core'}
    
cpl.filters

Define the grouping to be applied to assemblies (in terms of a list of assembly names via regular expressions), to be applied to the transfer parameter. This is specified as a list of individual filters:

parameters.filters = [re.compile(r"EF\d+L"), re.compile(r"C\d+L")]
cpl.set_critical_case(critical_parameters)

Define the parameter pack for the neutronic critical case application.

Parameters:

critical_parameters (parameter_pack) – Pointer to the critical-case parameter pack to be used for the neutronics

cpl.set_core_thermal_hydraulics(core_thermal_hydraulics_parameters)

Define the parameter pack for the neutronic critical case application.

Parameters:

core_thermal_hydraulics_parameters (parameter_pack) – Pointer to the core_thermal_hydraulics parameter pack to be used for the neutronics

cpl.set_iterations(num_iterations)

Define the total number of iterations - one iteration refers to a set of one neutronic and one thermal-hydraulic iteration. All specified iterations will be run.

Parameters:

num_iterations (int) – number of iterations to run

Note

The neutronic and thermal-hydraulic parameter packs must each specify the target_mode parameter.

Command Line Usage

This application supports all the standard application modes and options as described in General Application Command Line Interface (CLI).

Typical command line usage

oscar5 MY_REACTOR.projects.coupling_input run --force

After output processing, full res files for each iteration would be available in the working directory structure. In addition, upon completion of the post mode, the set of k-eff values for each iteration is printed out.

Examples

The following example will calculate .

"""
Coupling test

"""
from applications.coupling import *
from core import *
from ..model import thermal_hydraulic_assembly_data, assemblies
from ..configurations.base_hot_core import model
import sys
import applications.critical_case as critical_case
import applications.core_thermal_hydraulic as core_thermal_hydraulic
import re
import core.state
from material_library.moderators import LightWater


parameters.project_name = 'coupling_demo'
parameters.working_directory = utilities.path_relative_to(__file__, 'DEMO_COUPLING')
parameters.model = model
parameters.time_stamp = '10-10-2011 00:37:20'

parameters.model.inventory_manager.inventory = utilities.path_relative_to(__file__, '../SAFARI_1_inventory_demo')
parameters.cycle_name = 'C1109-1'
parameters.target_mode = 'MGRAC'
parameters.transfer = {'neutronics_to_thermal_hydraulics': 'per_filter',
                       'thermal_hydraulics_to_neutronics': 'core'}
parameters.filters = [re.compile(r"EF\d+L"), re.compile(r"C\d+L")]
# ======================================================================================================================
# Additional neutronic Application parameters
neutronic_parameters = critical_case.CriticalCase.Parameters()
neutronic_parameters.time_stamp = parameters.time_stamp
neutronic_parameters.model = model
neutronic_parameters.power = 20 * units.MW
neutronic_parameters.model.state[core.state.fuel_temperature] = 60 * units.degC
neutronic_parameters.model.state[core.state.moderator_temperature] = 40 * units.degC
neutronic_parameters.model.state[core.state.moderator_density] = LightWater.density_at(40 * units.degC,
                                                                  1.8 * units.bars)
neutronic_parameters.model.state[core.state.flow_velocity] = 5.5 * units.m / units.s
neutronic_parameters.model.set_banks(control.travel_distance(43.0 * units.cm))
neutronic_parameters.model.fueled_primitive_powers = (6, 8)
neutronic_parameters.power_mesh_intersection_templates = utilities.path_relative_to(__file__, 'DEMO_CRITICAL_CASE\\MGRAC\\C1109-1.res')
neutronic_parameters.target_mode = 'MGRAC'
c3 = assemblies.SAFARI_1_Homogenized_Mo99(name='Mo99C3')
e3 = assemblies.SAFARI_1_Homogenized_Mo99(name='Mo99E3')
g3 = assemblies.SAFARI_1_Homogenized_Mo99(name='Mo99G3')

b6 = assemblies.SAFARI_1_Homogenized_Mo99(name='Mo99B6')

b8 = assemblies.SAFARI_1_Homogenized_Mo99(name='Mo99B8')
d8 = assemblies.SAFARI_1_Homogenized_Mo99(name='Mo99D8')
f8 = assemblies.SAFARI_1_Homogenized_Mo99(name='Mo99F8')
f6 = assemblies.SAFARI_1_Homogenized_IPR(name='IPRRF6')
d6 = assemblies.SAFARI_1_Homogenized_IPR(name='IPRRD6')

rig_map = \
[[0,    1,   2,        3,         4,        5,        6,       7,        8,     9],
 ['A',  _,   _,        _,        _,         _,        _,       _,        _,     _],
 ['B',  _,   _,        _,        _,         _,       b6,       _,       b8,     _],
 ['C',  _,   _,       c3,        _,         _,        _,       _,        _,     _],
 ['D',  _,   _,        _,        _,         _,       d6,       _,       d8,     _],
 ['E',  _,   _,       e3,        _,         _,        _,       _,        _,     _],
 ['F',  _,   _,        _,        _,         _,       f6,       _,       f8,     _],
 ['G',  _,   _,       g3,        _,         _,        _,       _,        _,     _],
 ['H',  _,   _,        _,        _,         _,        _,       _,        _,     _]]

neutronic_parameters.model.add_assembly_facility_load_map('Irradiation-position', rig_map)

parameters.set_critical_case(neutronic_parameters)

# Thermal-hydraulic application parameters
thermal_hydraulic_parameters = core_thermal_hydraulic.CoreThermalHydraulicParameters()
thermal_hydraulic_parameters.model = model
thermal_hydraulic_parameters.model_scope = 'assemblies'
thermal_hydraulic_parameters.time_stamp = parameters.time_stamp
thermal_hydraulic_parameters.model.facility_description.design_coolant_flow_direction = 'DOWNWARDS'
thermal_hydraulic_parameters.single_phase_heat_transfer_model = 'DittusBoelter'
thermal_hydraulic_parameters.critical_heat_flux_model = 'MirshakDurantTowell'
thermal_hydraulic_parameters.pressure_drop = 0.069 * units.MPa
thermal_hydraulic_parameters.inlet_pressure = 194 * units.kPa
thermal_hydraulic_parameters.power_fraction_to_clad = 0.0
thermal_hydraulic_parameters.power_fraction_to_coolant = 0.0
thermal_hydraulic_parameters.axial_power_shapes = 'Striped'  # HotPlate or Striped
thermal_hydraulic_parameters.flow_mode = 'Flow'  #Pressure or Flow
thermal_hydraulic_parameters.thermal_data_sets = thermal_hydraulic_assembly_data.thermal_data_sets
thermal_hydraulic_parameters.thermal_data_sets['SAFARI-1-LEU-fuel-follower']['PinMeshPadding'] = 3
thermal_hydraulic_parameters.thermal_data_sets['SAFARI-1-LEU-fuel']['PinMeshCrossPadding'] = 1
thermal_hydraulic_parameters.thermal_data_sets['SAFARI-1-LEU-fuel-follower']['PinMeshCrossPadding'] = 1

thermal_hydraulic_parameters.hot_channel_factors = \
{
'BulkCoolant'   : 1.0,
'Film'          : 1.0,
'HeatFlux'      : 1.0,
'HeatedDiameter': 1.0,
'Velocity'      : 1.0
}
thermal_hydraulic_parameters.target_mode = 'PLTEMP'
parameters.set_core_thermal_hydraulics(thermal_hydraulic_parameters)

parameters.set_iterations(4)

if __name__ == '__main__':
    sys.path.insert(0, 'C:\\oscar5\\rapyds_plugins\\pltemp')
    main()