Mesh Script

Overview

To ease generation of LWR fuel meshes, a mesh script is available. The script relies on CUBIT (Sandia National Laboratories, 2008).

Run the Main Script

The mesh script is at bison/tools/UO2/. The main script (mesh_script.sh) is run from the shell command line. This script invokes the Python meshing script (mesh_script.py) and passes it an input file named mesh_script_input.py by default. Run the script with


./mesh_script.sh [-c -d -l] [-p path to mesh_script.py] [-i mesh_script_input.py] [-o output file name]
  • the -c flag will cause the script to check whether CUBIT can be loaded,

  • the -d flag results in the deletion of the CUBIT journal file when the script completes,

  • the -l flag will generate a log file (otherwise messages will go to the terminal),

  • the -p flag, which is rarely used, tells the script where to find the mesh\_script.py file,

  • the -i flag is used to supply a mesh script input file, and

  • the -o flag is used to specify the name of the output Exodus file.

The main script generates an exodus file, with QUAD elements in 2D and HEX elements in 3D.

Mesh Architecture

Figure 1 provides an overview of the architecture of a fuel rod. A fuel rod is composed of a clad, a stack of pellets, and optionally a liner extruded on the inner surface of the clad. Each component of this architecture corresponds to a different block in the Bison input and mesh files. In the mesh input file, you refer to each block through a specific dictionary to create it. In the Exodus file, blocks are numbered, and a name is provided for each of them.

The pellets contained in a fuel rod can have different geometries. There is a block for each geometry, in the input file as well as in the Exodus file.

Figure 1: Overview of the architecture of a fuel rod

Mesh Script Input File Review

Pellet Type

This dictionary defines a pellet geometry and the quantity of the corresponding pellets. To refer to a parameter within the mesh script dictionary, you must know its key (the quoted string between brackets).


# Pellet Type 1

Pellet1= {}
Pellet1['type'] = 'discrete'
Pellet1['quantity'] = 5
Pellet1['mesh_density'] = 'medium'
Pellet1['outer_radius'] = 0.0041
Pellet1['inner_radius'] = 0
Pellet1['height'] = 2 * 5.93e-3
Pellet1['dish_spherical_radius'] = 1.01542e-2
Pellet1['dish_depth'] = 3e-4
Pellet1['chamfer_width'] = 5.0e-4
Pellet1['chamfer_height'] = 1.6e-4
  • 'type' Type _string_. Must be 'discrete' or 'smeared'. From a geometric point of view, a smeared pellet is a rectangle. Two consecutive smeared pellets have their top and bottom surfaces merged.

  • 'quantity' Type _int_. Number of pellets created with this geometry.

  • 'mesh_density' Type _string_.

  • 'outer_radius' Type _float_. Outer radius of the pellet.

  • 'inner_radius' Type _float_. Inner radius of the pellet.

  • 'height' Type _float_. Pellet height.

  • 'dish_spherical_radius' Type _float_. Spherical radius of the dishing. Needed only if type is 'discrete'.

  • 'dish_depth' Type _float_. Depth of the dishing. Needed only if type is 'discrete'.

  • 'chamfer_width' Type _float_. Radial chamfer length in RZ coordinates. Must be zero for a non-chamfered pellet. Needed only if type is 'discrete'.

  • 'chamfer_height' Type _float_. Axial chamfer length in RZ coordinates. Must be zero for a non-chamfered pellet. Needed only if type is 'discrete'. If either chamfer_width or chamfer_height is zero, both must be zero.

Pellet Collection


pellets = [Pellet1, Pellet2, Pellet3]

This is a list of the pellets that make up the pellet stack. The geometries are ordered from the bottom to the top of the stack. A pellet type block must be present in this list to be created.

Stack Options


# Stack options

pellet_stack = {}
pellet_stack['interface_merge'] = 'point'
pellet_stack['higher_order'] = False
pellet_stack['angle'] = 0
  • 'interface_merge' Type _string_. Control type of merging between pellets. Options are: 'point' or 'no'. __Note that any other string results in pellets that are not merged.__ The table below shows what the keywords do for different scenarios. 'vertex' means that the pellets are merged at their common vertex which is the closest from the centerline. In 2D, 'curve' means that the pellets are merged at their common curve. In 3D, 'curve' means that the pellets are merged at the curve generated by the corresponding merged vertex in 2D RZ geometry.

    2D discrete2D smeared3D discrete
    'point'vertexcurvecurve
    'no'not mergednot mergednot merged

  • 'higher_order' Type _boolean_. Control order of mesh elements. The table below shows the order of generated elements for the given arguments.

    FalseTrue
    2DQUAD4QUAD8
    3DHEX8HEX27

  • 'angle' Type _int_. Between 0 and 360. Angle of revolution of the pellet stack. If 0, creates a 2D fuel rod. If greater than 0, creates a 3D fuel rod.

Clad


clad = {}
clad['mesh_density'] = 'medium'
clad['gap_width'] = 8e-5
clad['bot_gap_height'] = 1e-3
clad['top_gap_height'] = 1.67e-3
clad['clad_thickness'] = 5.6e-4
clad['top_bot_clad_height'] = 2.24e-3
clad['plenum_fuel_ratio'] = 0.045
clad['with_liner'] = False
clad['liner_width'] = 5e-5
  • 'mesh_density' Type _string_. CAUTION: the mesh density of the clad is related to the mesh density of the pellets which use the _same_ mesh dictionary as the clad.

  • 'gap_width' Type _float_. Radial width of the gap between the fuel and the clad (or the liner).

  • 'bot_gap_height' Type _float_. Axial gap height between bottom of fuel and the cladding.

  • 'top_gap_height' Type _float_. Axial gap height between top of fuel and the cladding. Either this or 'plenum_fuel ratio' must be given.

  • 'clad_thickness' Type _float_. Thickness of the sleeve of the clad.

  • 'top_bot_clad_height' Type _float_. Height of the bottom and of the top of the clad.

  • 'plenum_fuel_ratio' Type _float_. Ratio of the axial gas height to the fuel height inside the cladding. Either this or 'top_gap_height' must be given.

  • 'with_liner' Type _boolean_. Whether to include a liner.

  • 'liner_width' Type _float_. Liner width.

Meshing Parameters


# Parameters of mesh density 'coarse'

coarse = {}
coarse['pellet_r_interval'] = 6
coarse['pellet_z_interval'] = 2
coarse['pellet_dish_interval'] = 3
coarse['pellet_flat_top_interval'] = 2
coarse['pellet_chamfer_interval'] = 1
coarse['pellet_slices_interval'] = 4
coarse['clad_radial_interval'] = 3
coarse['clad_sleeve_scale_factor'] = 4
coarse['cap_radial_interval'] = 6
coarse['cap_vertical_interval'] = 3
coarse['pellet_angular_interval'] = 6
coarse['clad_angular_interval'] =12

The user defines a dictionary containing the mesh parameters. The user can specify the name of this dictionary as long as the name is consistent with the names defined in the pellet type blocks for mesh_density. pellet_r_interval and pellet_z_interval are used only with smeared pellet meshes. The figures below explain the other parameters.

Figure 2: Pellet. Dashed lines represent RZ axes.

Figure 3: Clad. Represented in RZ.

The angular intervals are for 3D geometries and correspond to the created arcs of circle. Note that to have a nice mesh, you may want to have the same number of intervals on the diameter of the fuel rod and on this arc of circle.

Output File Review

Figure 1 summarizes names and number of the blocks in the exodus file. Figure 4 summarizes the numbering for the sidesets and nodesets.

Figure 4: Sidesets, nodesets, and block ids in the exodus file

Things to Know

Main Script

The main script is written in python v2.5. It is organized in classes: Pellet, PelletStack, Clad, Liner and FuelRod. The link between the input file and the main is assured by three functions. A first function is charged to pick read the input file. A second function checks that the syntax of the input file makes sense for the main script. The third function creates the mesh based on the input file.

Error Messages

__AttributeError__ Caused by a missing class in the input file.

__KeyError__ Often is caused by a wrong key in the input file. The main script should check that the keys entered in the input file are valid and specify which key is not valid if it occurs.

Other errors should be accompanied by a descriptive message. Contact the developers if the error message is not helpful.

References

  1. Sandia National Laboratories. CUBIT: geometry and mesh generation toolkit. http://cubit.sandia.gov, 2008.[BibTeX]