OpenMCMeshGenerator

A class that generates a mesh from an available OpenMC regular mesh.

Description

This mesh generator is used to create a mirror mesh from a regular mesh in OpenMC loaded at runtime.

The OpenMC mesh used by OpenMCMeshGenerator is identified via the mesh_id parameter and must correspond to the valid ID number of a regular mesh in the OpenMC model. The path to the folder containing the OpenMC model can be declared using the xml_directory parameter.

OpenMCMeshGenerator retrieves the coordinates of the lower left and upper right corners of the OpenMC regular mesh and divides them by a user-defined scaling factor (defaulting to 1) declared via the scaling parameter. The number of cells in the mesh in each dimension is also directly retrieved from OpenMC. When OpenMCMeshGenerator is used in conjunction with an OpenMCCellAverageProblem, the scaling factors for both objects must be identical to guarantee unit consistency. An error is raised if this is not the case. Additionally, if multiple OpenMCMeshGenerator objects are declared, the scaling factor must be the same for all instances or an error will be raised.

commentnote:OpenMC initialization

OpenMCMeshGenerator depends on an initialized state of OpenMC obtained from an OpenMCInitAction.

When multiple objects that depend on OpenMCInitAction are declared, if values for the xml_directory parameter are not identical, an error is raised as OpenMC can only be initialized with one model at a time.

Example

Here is an example showing how to set up an OpenMCMeshGenerator from a regular mesh declared with an ID of 1 in the OpenMC model:

[Mesh<<<{"href": "../../syntax/Mesh/index.html"}>>>]
  [openmc_mesh]
    type = OpenMCMeshGenerator<<<{"description": "A class that generates a mesh from an available OpenMC regular mesh.", "href": "OpenMCMeshGenerator.html"}>>>
    mesh_id<<<{"description": "The id of the OpenMC mesh that this class should provide to Cardinal."}>>> = 1
    scaling<<<{"description": "Scaling factor used to scale the OpenMC mesh dimensions for the creation of the mesh; OpenMC always uses units of centimeters. Setting 'scaling = 100' means that the [Mesh] created will have units of meters, for example."}>>> = 10.0
  []
[]
(test/tests/meshgenerators/openmc_mesh_generator/openmc_mesh_scaling.i)

In this example, a scaling factor of 10 is used. This means that the dimensions retrieved from OpenMC will be divided by 10 to construct the mesh on the Cardinal side (since OpenMC always uses units of centimeters, this means that the Cardinal mesh would have units of decimeters).

Input Parameters

  • mesh_idThe id of the OpenMC mesh that this class should provide to Cardinal.

    C++ Type:unsigned int

    Controllable:No

    Description:The id of the OpenMC mesh that this class should provide to Cardinal.

Required Parameters

  • scaling1Scaling factor used to scale the OpenMC mesh dimensions for the creation of the mesh; OpenMC always uses units of centimeters. Setting 'scaling = 100' means that the [Mesh] created will have units of meters, for example.

    Default:1

    C++ Type:Real

    Unit:(no unit assumed)

    Range:scaling > 0.0

    Controllable:No

    Description:Scaling factor used to scale the OpenMC mesh dimensions for the creation of the mesh; OpenMC always uses units of centimeters. Setting 'scaling = 100' means that the [Mesh] created will have units of meters, for example.

  • xml_directory./The directory in which to look for OpenMC XML files.

    Default:./

    C++ Type:FileName

    Controllable:No

    Description:The directory in which to look for OpenMC XML files.

Optional Parameters

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Set the enabled status of the MooseObject.

  • save_with_nameKeep the mesh from this mesh generator in memory with the name specified

    C++ Type:std::string

    Controllable:No

    Description:Keep the mesh from this mesh generator in memory with the name specified

Advanced Parameters

  • nemesisFalseWhether or not to output the mesh file in the nemesisformat (only if output = true)

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Whether or not to output the mesh file in the nemesisformat (only if output = true)

  • outputFalseWhether or not to output the mesh file after generating the mesh

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Whether or not to output the mesh file after generating the mesh

  • show_infoFalseWhether or not to show mesh info after generating the mesh (bounding box, element types, sidesets, nodesets, subdomains, etc)

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Whether or not to show mesh info after generating the mesh (bounding box, element types, sidesets, nodesets, subdomains, etc)

Debugging Parameters

Input Files