https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
SCMTriDuctMeshGenerator Class Reference

Mesh generator for hexagonal duct. More...

#include <SCMTriDuctMeshGenerator.h>

Inheritance diagram for SCMTriDuctMeshGenerator:
[legend]

Public Types

typedef DataFileName DataFileParameterType
 

Public Member Functions

 SCMTriDuctMeshGenerator (const InputParameters &parameters)
 
std::unique_ptr< MeshBase > generate () override
 
std::unique_ptr< CSG::CSGBase > generateInternalCSG ()
 
std::unique_ptr< MeshBase > generateInternal ()
 
const std::set< MeshGeneratorName > & getRequestedMeshGenerators () const
 
const std::set< MeshGeneratorName > & getRequestedMeshGeneratorsForSub () const
 
void addParentMeshGenerator (const MeshGenerator &mg, const AddParentChildKey)
 
void addChildMeshGenerator (const MeshGenerator &mg, const AddParentChildKey)
 
const std::set< const MeshGenerator *, Comparator > & getParentMeshGenerators () const
 
const std::set< const MeshGenerator *, Comparator > & getChildMeshGenerators () const
 
const std::set< const MeshGenerator *, Comparator > & getSubMeshGenerators () const
 
bool isParentMeshGenerator (const MeshGeneratorName &name, const bool direct=true) const
 
bool isChildMeshGenerator (const MeshGeneratorName &name, const bool direct=true) const
 
bool isNullMeshName (const MeshGeneratorName &name) const
 
bool hasSaveMesh () const
 
bool hasOutput () const
 
const std::string & getSavedMeshName () const
 
bool hasGenerateData () const
 
bool hasGenerateCSG () const
 
bool isDataOnly () const
 
virtual bool enabled () const
 
std::shared_ptr< MooseObject > getSharedPtr ()
 
std::shared_ptr< const MooseObject > getSharedPtr () const
 
bool isKokkosObject () const
 
MooseApp & getMooseApp () const
 
const std::string & type () const
 
const std::string & name () const
 
std::string typeAndName () const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
MooseObjectName uniqueName () const
 
const InputParameters & parameters () const
 
const hit::Node * getHitNode () const
 
bool hasBase () const
 
const std::string & getBase () const
 
const T & getParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const T * queryParam (const std::string &name) const
 
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 
T getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &name) const
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void paramError (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramInfo (const std::string &param, Args... args) const
 
std::string messagePrefix (const bool hit_prefix=true) const
 
std::string errorPrefix (const std::string &) const
 
void mooseError (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecatedNoTrace (Args &&... args) const
 
void mooseInfo (Args &&... args) const
 
void callMooseError (std::string msg, const bool with_prefix, const hit::Node *node=nullptr, const bool show_trace=true) const
 
std::string getDataFileName (const std::string &param) const
 
std::string getDataFileNameByName (const std::string &relative_path) const
 
std::string getDataFilePath (const std::string &relative_path) const
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 

Static Public Member Functions

static InputParameters validParams ()
 
static bool hasGenerateData (const InputParameters &params)
 
static bool hasGenerateCSG (const InputParameters &params)
 
static void callMooseError (MooseApp *const app, const InputParameters &params, std::string msg, const bool with_prefix, const hit::Node *node, const bool show_trace=true)
 
static void setHasGenerateData (InputParameters &params)
 
static void setHasGenerateCSG (InputParameters &params)
 

Public Attributes

 usingCombinedWarningSolutionWarnings
 
const ConsoleStream _console
 

Static Public Attributes

static const std::string data_only_param
 
static const std::string type_param
 
static const std::string name_param
 
static const std::string unique_name_param
 
static const std::string app_param
 
static const std::string moose_base_param
 
static const std::string kokkos_object_param
 
static constexpr auto SYSTEM
 
static constexpr auto NAME
 

Protected Member Functions

size_t ductPointIndex (unsigned int points_per_layer, unsigned int layer, unsigned int point) const
 Maps a duct cross-section point and axial layer to a linear point index.
 
void ductCorners (std::vector< Point > &corners, Real flat_to_flat, const Point &center) const
 Computes the x-y corner coordinates of the duct cross-section.
 
void ductCrossSec (std::vector< Point > &cross_sec, const std::vector< Point > &corners, unsigned int nrings, Real pitch) const
 Generates the points along the duct cross-section sides.
 
void ductPoints (std::vector< Point > &points, const std::vector< Point > &cross_sec, const std::vector< Real > &z_layers) const
 Computes all 3D point locations used to construct the duct mesh.
 
void ductElems (std::vector< std::vector< size_t > > &elem_point_indices, unsigned int n_layers, unsigned int points_per_layer) const
 Determines element connectivity for the duct mesh.
 
void buildDuct (std::unique_ptr< MeshBase > &mesh, std::vector< Node * > &duct_nodes, const std::vector< Point > &points, const std::vector< std::vector< size_t > > &elem_point_indices, SubdomainID block) const
 Builds duct mesh nodes and elements and inserts them into the mesh.
 
virtual void generateData ()
 
virtual std::unique_ptr< CSG::CSGBase > generateCSG ()
 
T & copyMeshProperty (const std::string &target_data_name, const std::string &source_data_name, const std::string &source_mesh)
 
T & copyMeshProperty (const std::string &source_data_name, const std::string &source_mesh)
 
std::unique_ptr< MeshBase > & getMesh (const std::string &param_name, const bool allow_invalid=false)
 
std::vector< std::unique_ptr< MeshBase > * > getMeshes (const std::string &param_name)
 
std::unique_ptr< MeshBase > & getMeshByName (const MeshGeneratorName &mesh_generator_name)
 
std::vector< std::unique_ptr< MeshBase > * > getMeshesByName (const std::vector< MeshGeneratorName > &mesh_generator_names)
 
std::unique_ptr< CSG::CSGBase > & getCSGBase (const std::string &param_name)
 
std::unique_ptr< CSG::CSGBase > & getCSGBaseByName (const MeshGeneratorName &mesh_generator_name)
 
std::vector< std::unique_ptr< CSG::CSGBase > * > getCSGBases (const std::string &param_name)
 
std::vector< std::unique_ptr< CSG::CSGBase > * > getCSGBasesByName (const std::vector< MeshGeneratorName > &mesh_generator_names)
 
void declareMeshForSub (const std::string &param_name)
 
void declareMeshesForSub (const std::string &param_name)
 
void declareMeshForSubByName (const MeshGeneratorName &mesh_generator_name)
 
void declareMeshesForSubByName (const std::vector< MeshGeneratorName > &mesh_generator_names)
 
std::unique_ptr< MeshBase > buildMeshBaseObject (unsigned int dim=libMesh::invalid_uint)
 
std::unique_ptr< ReplicatedMesh > buildReplicatedMesh (unsigned int dim=libMesh::invalid_uint)
 
std::unique_ptr< DistributedMesh > buildDistributedMesh (unsigned int dim=libMesh::invalid_uint)
 
void addMeshSubgenerator (const std::string &type, const std::string &name, Ts... extra_input_parameters)
 
void addMeshSubgenerator (const std::string &type, const std::string &name, InputParameters params)
 
void declareNullMeshName (const MeshGeneratorName &name)
 
void flagInvalidSolutionInternal (const InvalidSolutionID invalid_solution_id) const
 
InvalidSolutionID registerInvalidSolutionInternal (const std::string &message, const bool warning) const
 
const T & getMeshProperty (const std::string &data_name, const std::string &prefix)
 
const T & getMeshProperty (const std::string &data_name)
 
bool hasMeshProperty (const std::string &data_name, const std::string &prefix) const
 
bool hasMeshProperty (const std::string &data_name, const std::string &prefix) const
 
bool hasMeshProperty (const std::string &data_name) const
 
bool hasMeshProperty (const std::string &data_name) const
 
std::string meshPropertyName (const std::string &data_name) const
 
T & declareMeshProperty (const std::string &data_name, Args &&... args)
 
T & declareMeshProperty (const std::string &data_name, const T &data_value)
 
T & declareMeshProperty (const std::string &data_name, Args &&... args)
 
T & declareMeshProperty (const std::string &data_name, const T &data_value)
 
T & setMeshProperty (const std::string &data_name, Args &&... args)
 
T & setMeshProperty (const std::string &data_name, const T &data_value)
 
T & setMeshProperty (const std::string &data_name, Args &&... args)
 
T & setMeshProperty (const std::string &data_name, const T &data_value)
 

Static Protected Member Functions

static std::string meshPropertyName (const std::string &data_name, const std::string &prefix)
 

Protected Attributes

std::unique_ptr< MeshBase > & _input
 Mesh that comes from another generator.
 
const unsigned int _n_cells
 number of axial cells
 
std::vector< Real > _z_grid
 axial location of nodes
 
const Real _unheated_length_entry
 unheated length of the fuel Pin at the entry of the assembly
 
const Real _heated_length
 heated length of the fuel Pin
 
const Real _unheated_length_exit
 unheated length of the fuel Pin at the exit of the assembly
 
const unsigned int _block_id
 block index
 
const Real _pitch
 Distance between the neighbor fuel pins, pitch.
 
const unsigned int _n_rings
 number of rings of fuel pins
 
const Real _flat_to_flat
 the distance between flat surfaces of the duct facing each other
 
MooseMesh *const _mesh
 
const bool & _enabled
 
MooseApp & _app
 
Factory & _factory
 
ActionFactory & _action_factory
 
const std::string & _type
 
const std::string & _name
 
const InputParameters & _pars
 
const Parallel::Communicator & _communicator
 

Private Member Functions

virtual std::string meshPropertyPrefix (const std::string &) const override final
 
void checkGetMesh (const MeshGeneratorName &mesh_generator_name, const std::string &param_name) const
 
const MeshGeneratorName * getMeshGeneratorNameFromParam (const std::string &param_name, const bool allow_invalid) const
 
const std::vector< MeshGeneratorName > & getMeshGeneratorNamesFromParam (const std::string &param_name) const
 
RestartableDataValue & setMeshPropertyHelper (const std::string &data_name)
 
bool suppressInfo () const
 
const RestartableDataValue & getMeshPropertyInternal (const std::string &data_name, const std::string &prefix) const
 
void mooseErrorInternal (Args &&... args) const
 

Static Private Member Functions

static const hit::Node * getHitNode (const InputParameters &params)
 
static std::string messagePrefix (const InputParameters &params, const bool hit_prefix)
 

Private Attributes

std::set< MeshGeneratorName > _requested_mesh_generators
 
std::set< MeshGeneratorName > _requested_mesh_generators_for_sub
 
std::vector< std::pair< std::string, std::unique_ptr< MeshBase > * > > _requested_meshes
 
std::vector< std::pair< std::string, std::unique_ptr< CSG::CSGBase > * > > _requested_csg_bases
 
std::unique_ptr< MeshBase > _null_mesh
 
std::unique_ptr< CSG::CSGBase > _null_csg_base
 
std::set< const MeshGenerator *, Comparator > _parent_mesh_generators
 
std::set< const MeshGenerator *, Comparator > _child_mesh_generators
 
std::set< const MeshGenerator *, Comparator > _sub_mesh_generators
 
std::set< std::string > _null_mesh_names
 
const std::string & _save_with_name
 
const bool _data_only
 
const ParallelParamObject & _parent
 
const MooseBase & _si_moose_base
 
const FEProblemBase * _si_problem
 
MooseApp & _meta_data_app
 
const MooseObject *const _meta_data_object
 

Detailed Description

Mesh generator for hexagonal duct.

Definition at line 17 of file SCMTriDuctMeshGenerator.h.

Constructor & Destructor Documentation

◆ SCMTriDuctMeshGenerator()

SCMTriDuctMeshGenerator::SCMTriDuctMeshGenerator ( const InputParameters &  parameters)

Definition at line 37 of file SCMTriDuctMeshGenerator.C.

38 : MeshGenerator(params),
39 _input(getMesh("input")),
40 _n_cells(getParam<unsigned int>("n_cells")),
41 _unheated_length_entry(getParam<Real>("unheated_length_entry")),
42 _heated_length(getParam<Real>("heated_length")),
43 _unheated_length_exit(getParam<Real>("unheated_length_exit")),
44 _block_id(getParam<unsigned int>("block_id")),
45 _pitch(getParam<Real>("pitch")),
46 _n_rings(getParam<unsigned int>("nrings")),
47 _flat_to_flat(getParam<Real>("flat_to_flat"))
48{
51
52 // Read by SCMTriCoreMeshGenerator to check that assemblies placed in a core do not overlap
53 declareMeshProperty<Real>("flat_to_flat", _flat_to_flat);
54 // Read by the SCM core mesh generators to warn about assemblies without a duct mesh
55 declareMeshProperty<bool>("duct_mesh", true);
56}
std::unique_ptr< MeshBase > & getMesh(const std::string &param_name, const bool allow_invalid=false)
const unsigned int _block_id
block index
const Real _flat_to_flat
the distance between flat surfaces of the duct facing each other
const unsigned int _n_rings
number of rings of fuel pins
const Real _pitch
Distance between the neighbor fuel pins, pitch.
const Real _unheated_length_exit
unheated length of the fuel Pin at the exit of the assembly
const unsigned int _n_cells
number of axial cells
std::unique_ptr< MeshBase > & _input
Mesh that comes from another generator.
const Real _unheated_length_entry
unheated length of the fuel Pin at the entry of the assembly
const Real _heated_length
heated length of the fuel Pin
std::vector< Real > _z_grid
axial location of nodes
static void generateZGrid(Real unheated_length_entry, Real heated_length, Real unheated_length_exit, unsigned int n_cells, std::vector< Real > &z_grid)
Generate the spacing in z-direction using heated and unteaded lengths.

Member Function Documentation

◆ buildDuct()

void SCMTriDuctMeshGenerator::buildDuct ( std::unique_ptr< MeshBase > &  mesh,
std::vector< Node * > &  duct_nodes,
const std::vector< Point > &  points,
const std::vector< std::vector< size_t > > &  elem_point_indices,
SubdomainID  block 
) const
protected

Builds duct mesh nodes and elements and inserts them into the mesh.

Parameters
meshMesh object to which duct elements and nodes are added
duct_nodesOutput vector of created duct nodes
pointsPoint coordinates generated by ductPoints
elem_point_indicesElement connectivity generated by ductElems
blockSubdomain ID assigned to the duct elements

Definition at line 190 of file SCMTriDuctMeshGenerator.C.

195{
196 // Create mesh nodes for all duct points and keep a local index -> Node* map
197 duct_nodes.clear();
198 duct_nodes.reserve(points.size());
199 for (const auto & p : points)
200 duct_nodes.push_back(mesh->add_point(p));
201
202 // Create QUAD4 surface elements using libMesh factory style
203 for (const auto & elem_indices : elem_point_indices)
204 {
205 mooseAssert(elem_indices.size() == 4,
206 "Expected 4 node indices per element when building QUAD4 elements.");
207
208 auto elem = Elem::build(ElemType::QUAD4);
209 elem->subdomain_id() = block;
210
211 // Set the 4 nodes of the QUAD4
212 for (unsigned int i = 0; i < 4; ++i)
213 {
214 const auto idx = elem_indices[i];
215 mooseAssert(idx < duct_nodes.size(), "Element node index out of range.");
216 elem->set_node(i, duct_nodes[idx]);
217 }
218
219 // Hand ownership to the mesh
220 mesh->add_elem(elem.release());
221 }
222}
const Real p
MeshBase & mesh
unsigned int idx(const ElemType type, const unsigned int nx, const unsigned int i, const unsigned int j)

Referenced by generate().

◆ ductCorners()

void SCMTriDuctMeshGenerator::ductCorners ( std::vector< Point > &  corners,
Real  flat_to_flat,
const Point &  center 
) const
protected

Computes the x-y corner coordinates of the duct cross-section.

Parameters
cornersOutput vector containing the duct corner points
flat_to_flatFlat-to-flat distance of the duct
centerCenter point of the duct cross-section

Definition at line 86 of file SCMTriDuctMeshGenerator.C.

89{
90 corners.resize(TriSubChannelMesh::N_CORNERS);
91 Real r_corner = flat_to_flat / 2. / std::cos(libMesh::pi / 6.);
92 for (size_t i = 0; i < TriSubChannelMesh::N_CORNERS; i++)
93 {
94 Real theta = i * libMesh::pi / 3.;
95 Point corner = {r_corner * std::cos(theta), r_corner * std::sin(theta)};
96 corners[i] = center + corner;
97 }
98}
Point center
static const unsigned int N_CORNERS
number of corners in the duct x-sec
const Real pi
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

Referenced by generate().

◆ ductCrossSec()

void SCMTriDuctMeshGenerator::ductCrossSec ( std::vector< Point > &  cross_sec,
const std::vector< Point > &  corners,
unsigned int  nrings,
Real  pitch 
) const
protected

Generates the points along the duct cross-section sides.

Parameters
cross_secOutput vector of cross-section boundary points
cornersCorner points defining the duct geometry
nringsNumber of rings of the assembly. (Rings of pins around central pin)
pitchSpacing between adjacent pins/subchannel centroids

Definition at line 101 of file SCMTriDuctMeshGenerator.C.

105{
106 cross_sec.clear();
107
108 if (pitch <= 0.0)
109 mooseError("The 'pitch' must be > 0.");
110
111 if (nrings < 2)
112 mooseError("The 'nrings' must be >= 2.");
113
114 // Side length of the regular hexagon (distance between adjacent corners)
115 const Real side_length = (corners[0] - corners[1]).norm();
116
117 // start_offset = (hexagon_side - (nrings - 2)*pitch) / 2
118 const Real start_offset = 0.5 * (side_length - (nrings - 2) * pitch);
119
120 // If this is negative, the requested layout cannot fit.
121 if (start_offset < 0.0)
122 mooseError("SCMTriDuctMeshGenerator: computed start_offset is negative (",
123 start_offset,
124 "). Check 'nrings', 'pitch', and duct side length.");
125
126 for (size_t i = 0; i < corners.size(); i++)
127 {
128 const Point left = corners[i];
129 const Point right = corners[(i + 1) % corners.size()];
130
131 // Always include the left corner
132 cross_sec.push_back(left);
133
134 // Unit direction along this side
135 const Point direc = (right - left).unit();
136
137 // Add exactly (nrings - 1) points after the left corner
138 // at start_offset + k*pitch, k = 0..(nrings-2)
139 for (const auto k : make_range(nrings - 1))
140 {
141 const Real offset_from_corner = start_offset + k * pitch;
142 cross_sec.push_back(left + direc * offset_from_corner);
143 }
144 }
145}
void mooseError(Args &&... args) const
LIBMESH_DEVICE_INLINE auto norm(const T &a)
IntRange< T > make_range(T beg, T end)

Referenced by generate().

◆ ductElems()

void SCMTriDuctMeshGenerator::ductElems ( std::vector< std::vector< size_t > > &  elem_point_indices,
unsigned int  n_layers,
unsigned int  points_per_layer 
) const
protected

Determines element connectivity for the duct mesh.

Parameters
elem_point_indicesOutput element connectivity defined by point indices
n_layersNumber of axial layers in the duct mesh
points_per_layerNumber of points per cross-section layer

Definition at line 168 of file SCMTriDuctMeshGenerator.C.

171{
172 elem_point_indices.clear();
173 for (unsigned int i = 0; i < n_layers - 1; i++)
174 {
175 unsigned int bottom = i;
176 unsigned int top = i + 1;
177 for (unsigned int j = 0; j < points_per_layer; j++)
178 {
179 unsigned int left = j;
180 unsigned int right = (j + 1) % points_per_layer;
181 elem_point_indices.push_back({ductPointIndex(points_per_layer, bottom, left),
182 ductPointIndex(points_per_layer, bottom, right),
183 ductPointIndex(points_per_layer, top, right),
184 ductPointIndex(points_per_layer, top, left)});
185 }
186 }
187}
size_t ductPointIndex(unsigned int points_per_layer, unsigned int layer, unsigned int point) const
Maps a duct cross-section point and axial layer to a linear point index.

Referenced by generate().

◆ ductPointIndex()

size_t SCMTriDuctMeshGenerator::ductPointIndex ( unsigned int  points_per_layer,
unsigned int  layer,
unsigned int  point 
) const
protected

Maps a duct cross-section point and axial layer to a linear point index.

Parameters
points_per_layerNumber of points in each duct cross-section layer
layerAxial (z-direction) layer index
pointIndex of the point within the cross-section
Returns
Index into the flattened points vector used by ductPoints

Definition at line 148 of file SCMTriDuctMeshGenerator.C.

151{
152 return layer * points_per_layer + point;
153}

Referenced by ductElems(), and ductPoints().

◆ ductPoints()

void SCMTriDuctMeshGenerator::ductPoints ( std::vector< Point > &  points,
const std::vector< Point > &  cross_sec,
const std::vector< Real > &  z_layers 
) const
protected

Computes all 3D point locations used to construct the duct mesh.

Parameters
pointsOutput vector of 3D point locations
cross_secCross-section boundary points
z_layersAxial (z-direction) layer coordinates

Definition at line 156 of file SCMTriDuctMeshGenerator.C.

159{
160 points.resize(cross_sec.size() * z_layers.size());
161 for (size_t i = 0; i < z_layers.size(); i++)
162 for (size_t j = 0; j < cross_sec.size(); j++)
163 points[ductPointIndex(cross_sec.size(), i, j)] =
164 Point(cross_sec[j](0), cross_sec[j](1), z_layers[i]);
165}

Referenced by generate().

◆ generate()

std::unique_ptr< MeshBase > SCMTriDuctMeshGenerator::generate ( )
overridevirtual

Implements MeshGenerator.

Definition at line 59 of file SCMTriDuctMeshGenerator.C.

60{
61 std::unique_ptr<MeshBase> mesh_base = std::move(_input);
62 mesh_base->set_mesh_dimension(3);
63
64 std::vector<Point> corners;
65 ductCorners(corners, _flat_to_flat, Point(0, 0, 0));
66 std::vector<Point> cross_sec;
67 ductCrossSec(cross_sec, corners, _n_rings, _pitch);
68 std::vector<Point> points;
69 ductPoints(points, cross_sec, _z_grid);
70 std::vector<std::vector<size_t>> elem_point_indices;
71 ductElems(elem_point_indices, _z_grid.size(), cross_sec.size());
72 std::vector<Node *> duct_nodes;
73 buildDuct(mesh_base, duct_nodes, points, elem_point_indices, _block_id);
74 mesh_base->set_subdomain_name(_block_id, name(), true);
75
76 mesh_base->prepare_for_use();
77
78 auto & sch_mesh = cast_ref<TriSubChannelMesh &>(*_mesh);
79 sch_mesh.setChannelToDuctMaps(duct_nodes);
80 sch_mesh._duct_mesh_exist = true;
81
82 return mesh_base;
83}
MooseMesh *const _mesh
const std::string & name() const
void ductPoints(std::vector< Point > &points, const std::vector< Point > &cross_sec, const std::vector< Real > &z_layers) const
Computes all 3D point locations used to construct the duct mesh.
void ductElems(std::vector< std::vector< size_t > > &elem_point_indices, unsigned int n_layers, unsigned int points_per_layer) const
Determines element connectivity for the duct mesh.
void buildDuct(std::unique_ptr< MeshBase > &mesh, std::vector< Node * > &duct_nodes, const std::vector< Point > &points, const std::vector< std::vector< size_t > > &elem_point_indices, SubdomainID block) const
Builds duct mesh nodes and elements and inserts them into the mesh.
void ductCorners(std::vector< Point > &corners, Real flat_to_flat, const Point &center) const
Computes the x-y corner coordinates of the duct cross-section.
void ductCrossSec(std::vector< Point > &cross_sec, const std::vector< Point > &corners, unsigned int nrings, Real pitch) const
Generates the points along the duct cross-section sides.

◆ validParams()

InputParameters SCMTriDuctMeshGenerator::validParams ( )
static

Definition at line 19 of file SCMTriDuctMeshGenerator.C.

20{
23 "Creates a mesh of 2D duct cells around a triangular lattice subassembly");
24 params.addRequiredParam<MeshGeneratorName>("input", "The corresponding subchannel mesh");
25 params.addParam<unsigned int>("block_id", 2, "Domain Index");
26 params.addRequiredParam<unsigned int>("n_cells", "The number of cells in the axial direction");
27 params.addParam<Real>("unheated_length_entry", 0.0, "Unheated length at entry [m]");
28 params.addRequiredParam<Real>("heated_length", "Heated length [m]");
29 params.addParam<Real>("unheated_length_exit", 0.0, "Unheated length at exit [m]");
30 params.addRequiredParam<Real>("pitch", "Pitch is the distance between adjacent pins [m]");
31 params.addRequiredParam<unsigned int>("nrings", "Number of fuel Pin rings in the assembly [-]");
32 params.addRequiredParam<Real>("flat_to_flat",
33 "Flat to flat distance for the hexagonal assembly [m]");
34 return params;
35}
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()

Member Data Documentation

◆ _block_id

const unsigned int SCMTriDuctMeshGenerator::_block_id
protected

block index

Definition at line 90 of file SCMTriDuctMeshGenerator.h.

Referenced by generate().

◆ _flat_to_flat

const Real SCMTriDuctMeshGenerator::_flat_to_flat
protected

the distance between flat surfaces of the duct facing each other

Definition at line 96 of file SCMTriDuctMeshGenerator.h.

Referenced by generate(), and SCMTriDuctMeshGenerator().

◆ _heated_length

const Real SCMTriDuctMeshGenerator::_heated_length
protected

heated length of the fuel Pin

Definition at line 86 of file SCMTriDuctMeshGenerator.h.

Referenced by SCMTriDuctMeshGenerator().

◆ _input

std::unique_ptr<MeshBase>& SCMTriDuctMeshGenerator::_input
protected

Mesh that comes from another generator.

Definition at line 78 of file SCMTriDuctMeshGenerator.h.

Referenced by generate().

◆ _n_cells

const unsigned int SCMTriDuctMeshGenerator::_n_cells
protected

number of axial cells

Definition at line 80 of file SCMTriDuctMeshGenerator.h.

Referenced by SCMTriDuctMeshGenerator().

◆ _n_rings

const unsigned int SCMTriDuctMeshGenerator::_n_rings
protected

number of rings of fuel pins

Definition at line 94 of file SCMTriDuctMeshGenerator.h.

Referenced by generate().

◆ _pitch

const Real SCMTriDuctMeshGenerator::_pitch
protected

Distance between the neighbor fuel pins, pitch.

Definition at line 92 of file SCMTriDuctMeshGenerator.h.

Referenced by generate().

◆ _unheated_length_entry

const Real SCMTriDuctMeshGenerator::_unheated_length_entry
protected

unheated length of the fuel Pin at the entry of the assembly

Definition at line 84 of file SCMTriDuctMeshGenerator.h.

Referenced by SCMTriDuctMeshGenerator().

◆ _unheated_length_exit

const Real SCMTriDuctMeshGenerator::_unheated_length_exit
protected

unheated length of the fuel Pin at the exit of the assembly

Definition at line 88 of file SCMTriDuctMeshGenerator.h.

Referenced by SCMTriDuctMeshGenerator().

◆ _z_grid

std::vector<Real> SCMTriDuctMeshGenerator::_z_grid
protected

axial location of nodes

Definition at line 82 of file SCMTriDuctMeshGenerator.h.

Referenced by generate(), and SCMTriDuctMeshGenerator().


The documentation for this class was generated from the following files: