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
SCMQuadVisualizationAssemblyMeshGenerator Class Reference

Mesh generator that builds a 3D visualization mesh representing quadrilateral subchannels and pins. More...

#include <SCMQuadVisualizationAssemblyMeshGenerator.h>

Inheritance diagram for SCMQuadVisualizationAssemblyMeshGenerator:
[legend]

Public Types

typedef DataFileName DataFileParameterType
 

Public Member Functions

 SCMQuadVisualizationAssemblyMeshGenerator (const InputParameters &parameters)
 
virtual 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

EChannelType getSubchannelType (unsigned int index) const
 returns the type of the subchannel given the index
 
void generatePin (std::unique_ptr< MeshBase > &mesh_base, const Point &center)
 Generate one detailed fuel pin volume centered at the supplied point.
 
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

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
 
std::vector< Real > _z_grid
 axial location of nodes
 
const Real _pitch
 Distance between the neighbor fuel pins, pitch.
 
const Real _pin_diameter
 fuel Pin diameter
 
const unsigned int _n_cells
 Number of cells in the axial direction.
 
const unsigned int _nx
 Number of subchannels in the x direction.
 
const unsigned int _ny
 Number of subchannels in the y direction.
 
unsigned int _n_channels
 Total number of subchannels.
 
const Real _side_gap
 The side gap, not to be confused with the gap between pins, this refers to the gap next to the duct or else the distance between the subchannel centroid to the duct wall.
 
const unsigned int _num_sectors
 Number of azimuthal sectors used to discretize each circular pin cross section.
 
const unsigned int _subchannel_block_id
 Subchannel subdomain ID.
 
const unsigned int _pin_block_id
 Pin subdomain ID.
 
std::vector< EChannelType > _subch_type
 Subchannel type.
 
std::vector< std::vector< Real > > _subchannel_position
 x,y coordinates of the subchannel centroids
 
dof_id_type _elem_id
 Counter for element numbering.
 
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 that builds a 3D visualization mesh representing quadrilateral subchannels and pins.

Definition at line 19 of file SCMQuadVisualizationAssemblyMeshGenerator.h.

Constructor & Destructor Documentation

◆ SCMQuadVisualizationAssemblyMeshGenerator()

SCMQuadVisualizationAssemblyMeshGenerator::SCMQuadVisualizationAssemblyMeshGenerator ( const InputParameters &  parameters)

Definition at line 72 of file SCMQuadVisualizationAssemblyMeshGenerator.C.

75 _unheated_length_entry(getParam<Real>("unheated_length_entry")),
76 _heated_length(getParam<Real>("heated_length")),
77 _unheated_length_exit(getParam<Real>("unheated_length_exit")),
78 _pitch(getParam<Real>("pitch")),
79 _pin_diameter(getParam<Real>("pin_diameter")),
80 _n_cells(getParam<unsigned int>("n_cells")),
81 _nx(getParam<unsigned int>("nx")),
82 _ny(getParam<unsigned int>("ny")),
83 _n_channels(0),
84 _side_gap(getParam<Real>("side_gap")),
85 _num_sectors(getParam<unsigned int>("num_sectors")),
86 _subchannel_block_id(getParam<unsigned int>("subchannel_block_id")),
87 _pin_block_id(getParam<unsigned int>("pin_block_id")),
88 _elem_id(0)
89{
91
92 if (_n_cells == 0)
93 paramError("n_cells", "The number of axial cells must be greater than zero");
94
95 if (L <= 0.0)
96 mooseError("Total bundle length must be greater than zero");
97
98 if (_nx == 0 || _ny == 0)
99 mooseError("The number of subchannels must be greater than zero in each direction");
100
101 if (_nx < 2 && _ny < 2)
102 mooseError("The number of subchannels cannot be less than 2 in both directions. "
103 "Smallest assembly allowed is either 2X1 or 1X2.");
104
105 _n_channels = _nx * _ny;
106
107 // Outer duct size, read by SCMQuadCoreMeshGenerator to check that assemblies placed in a core
108 // do not overlap. The duct wall is pitch / 2 + side_gap from the outer subchannel centroids.
109 declareMeshProperty<Real>("duct_size_x", (_nx - 1) * _pitch + 2.0 * _side_gap);
110 declareMeshProperty<Real>("duct_size_y", (_ny - 1) * _pitch + 2.0 * _side_gap);
111
112 const Real dz = L / _n_cells;
113 for (unsigned int i = 0; i < _n_cells + 1; i++)
114 _z_grid.push_back(dz * i);
115
117 for (unsigned int i = 0; i < _n_channels; i++)
118 {
119 _subchannel_position[i].reserve(3);
120 for (unsigned int j = 0; j < 3; j++)
121 _subchannel_position.at(i).push_back(0.0);
122 }
123
124 _subch_type.resize(_n_channels);
125 for (unsigned int iy = 0; iy < _ny; iy++)
126 for (unsigned int ix = 0; ix < _nx; ix++)
127 {
128 const unsigned int i_ch = _nx * iy + ix;
129 const bool is_corner = (ix == 0 && iy == 0) || (ix == _nx - 1 && iy == 0) ||
130 (ix == 0 && iy == _ny - 1) || (ix == _nx - 1 && iy == _ny - 1);
131 const bool is_edge = (ix == 0 || iy == 0 || ix == _nx - 1 || iy == _ny - 1);
132
133 if (is_corner)
135 else if (is_edge)
137 else
139
140 // Set the subchannel positions so that the center of the assembly is the zero point.
141 const Real offset_x = (_nx - 1) * _pitch / 2.0;
142 const Real offset_y = (_ny - 1) * _pitch / 2.0;
143 _subchannel_position[i_ch][0] = _pitch * ix - offset_x;
144 _subchannel_position[i_ch][1] = _pitch * iy - offset_y;
145 }
146}
const InputParameters & parameters() const
void paramError(const std::string &param, Args... args) const
void mooseError(Args &&... args) const
std::vector< std::vector< Real > > _subchannel_position
x,y coordinates of the subchannel centroids
const unsigned int _ny
Number of subchannels in the y direction.
const Real _unheated_length_exit
unheated length of the fuel Pin at the exit of the assembly
const Real _pitch
Distance between the neighbor fuel pins, pitch.
const unsigned int _nx
Number of subchannels in the x direction.
const Real _side_gap
The side gap, not to be confused with the gap between pins, this refers to the gap next to the duct o...
const Real _unheated_length_entry
unheated length of the fuel Pin at the entry of the assembly
const unsigned int _n_cells
Number of cells in the axial direction.
const unsigned int _num_sectors
Number of azimuthal sectors used to discretize each circular pin cross section.
const unsigned int _subchannel_block_id
Subchannel subdomain ID.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

Member Function Documentation

◆ generate()

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

Implements MeshGenerator.

Definition at line 192 of file SCMQuadVisualizationAssemblyMeshGenerator.C.

193{
194 auto mesh_base = buildMeshBaseObject();
195 BoundaryInfo & boundary_info = mesh_base->get_boundary_info();
196 mesh_base->set_spatial_dimension(3);
197
198 // Define the resolution (the number of points used to represent a circle). This must be
199 // divisible by 4.
200 const unsigned int n_pins = (_nx - 1) * (_ny - 1);
201
202 const unsigned int theta_res = 16;
203 // Compute the number of points needed to represent one quarter of a circle.
204 const unsigned int points_per_quad = theta_res / 4 + 1;
205
206 // Compute the points needed to represent one axial cross-flow of a subchannel. For the center
207 // subchannel there is one center point plus the points from 4 intersecting circles. For the
208 // corner subchannel there is one center point plus the points from 1 intersecting circle plus 3
209 // corners. For the side subchannel there is one center point plus the points from 2 intersecting
210 // circles plus 2 corners.
211 const unsigned int points_per_center = points_per_quad * 4 + 1;
212 const unsigned int points_per_corner = points_per_quad * 1 + 1 + 3;
213 const unsigned int points_per_side = points_per_quad * 2 + 1 + 2;
214
215 // Compute the number of Prism6 elements which combine to create each subchannel cross-section.
216 const unsigned int elems_per_center = theta_res + 4;
217 const unsigned int elems_per_corner = theta_res / 4 + 4;
218 const unsigned int elems_per_side = theta_res / 2 + 4;
219
220 // Specify the number and type of subchannels.
221 unsigned int n_center, n_side, n_corner;
222 if (_n_channels == 2)
223 {
224 n_corner = 0;
225 n_side = _n_channels;
226 n_center = _n_channels - n_side - n_corner;
227 }
228 else if (_n_channels > 2 && (_ny == 1 || _nx == 1))
229 {
230 n_corner = 0;
231 n_side = 2;
232 n_center = _n_channels - n_side - n_corner;
233 }
234 else
235 {
236 n_corner = 4;
237 n_side = 2 * (_ny - 2) + 2 * (_nx - 2);
238 n_center = _n_channels - n_side - n_corner;
239 }
240
241 const unsigned int points_per_level =
242 n_corner * points_per_corner + n_side * points_per_side + n_center * points_per_center;
243 const unsigned int elems_per_level =
244 n_corner * elems_per_corner + n_side * elems_per_side + n_center * elems_per_center;
245
246 // Pin centers are generated for 2x2 and larger quad assemblies.
247 std::vector<Point> pin_centers;
248 if (n_pins > 0)
250
251 const unsigned int pin_points =
252 n_pins > 0 ? (_n_cells + 1) * (_num_sectors + 1) * pin_centers.size() : 0;
253 const unsigned int pin_elems = n_pins > 0 ? _n_cells * _num_sectors * pin_centers.size() : 0;
254
255 mesh_base->reserve_nodes(points_per_level * (_n_cells + 1) + pin_points);
256 mesh_base->reserve_elem(elems_per_level * _n_cells + pin_elems);
257
258 // Build an array of points arranged in a circle on the xy-plane. The last and first node overlap.
259 const Real radius = _pin_diameter / 2.0;
260 std::array<Point, theta_res + 1> circle_points;
261 {
262 Real theta = 0;
263 for (unsigned int i = 0; i < theta_res + 1; i++)
264 {
265 circle_points[i](0) = radius * std::cos(theta);
266 circle_points[i](1) = radius * std::sin(theta);
267 theta += 2 * M_PI / theta_res;
268 }
269 }
270
271 // Define "quadrant center" reference points. These will be the centers of the 4 circles that
272 // represent the fuel pins. These centers are offset slightly so that in the final mesh, there is
273 // a tiny gap between neighboring subchannel cells. That allows us to easily map a solution to
274 // this detailed mesh with a nearest-neighbor search.
275 const Real shrink_factor = 0.99999;
276 std::array<Point, 4> quadrant_centers;
277 quadrant_centers[0] = Point(_pitch * 0.5 * shrink_factor, _pitch * 0.5 * shrink_factor, 0);
278 quadrant_centers[1] = Point(-_pitch * 0.5 * shrink_factor, _pitch * 0.5 * shrink_factor, 0);
279 quadrant_centers[2] = Point(-_pitch * 0.5 * shrink_factor, -_pitch * 0.5 * shrink_factor, 0);
280 quadrant_centers[3] = Point(_pitch * 0.5 * shrink_factor, -_pitch * 0.5 * shrink_factor, 0);
281
282 const unsigned int m = theta_res / 4;
283 // Build an array of points that represent a cross-section of a center subchannel cell. The points
284 // are ordered in this fashion:
285 // 4 3
286 // 6 5 2 1
287 // 0
288 // 7 8 * *
289 // 9 *
290 std::array<Point, points_per_center> center_points;
291 {
292 unsigned int start;
293 for (unsigned int i = 0; i < 4; i++)
294 {
295 if (i == 0)
296 start = 3 * m;
297 if (i == 1)
298 start = 4 * m;
299 if (i == 2)
300 start = 1 * m;
301 if (i == 3)
302 start = 2 * m;
303 for (unsigned int ii = 0; ii < points_per_quad; ii++)
304 {
305 auto c_pt = circle_points[start - ii];
306 center_points[i * points_per_quad + ii + 1] = quadrant_centers[i] + c_pt;
307 }
308 }
309 }
310
311 // Build an array of points that represent a cross-section of a top left corner subchannel cell.
312 // The points are ordered in this fashion:
313 // 5 4
314 //
315 // 0
316 // 2 3
317 // 6 1
318 std::array<Point, points_per_corner> tl_corner_points;
319 {
320 for (unsigned int ii = 0; ii < points_per_quad; ii++)
321 {
322 auto c_pt = circle_points[2 * m - ii];
323 tl_corner_points[ii + 1] = quadrant_centers[3] + c_pt;
324 }
325 tl_corner_points[points_per_quad + 1] = Point(_pitch * 0.5 * shrink_factor, _side_gap, 0);
326 tl_corner_points[points_per_quad + 2] = Point(-_side_gap, _side_gap, 0);
327 tl_corner_points[points_per_quad + 3] = Point(-_side_gap, -_pitch * 0.5 * shrink_factor, 0);
328 }
329
330 // Build an array of points that represent a cross-section of a top right corner subchannel cell.
331 // The points are ordered in this fashion:
332 // 6 5
333 //
334 // 0
335 // 1 2
336 // 3 4
337 std::array<Point, points_per_corner> tr_corner_points;
338 {
339 for (unsigned int ii = 0; ii < points_per_quad; ii++)
340 {
341 auto c_pt = circle_points[m - ii];
342 tr_corner_points[ii + 1] = quadrant_centers[2] + c_pt;
343 }
344 tr_corner_points[points_per_quad + 1] = Point(_side_gap, -_pitch * 0.5 * shrink_factor, 0);
345 tr_corner_points[points_per_quad + 2] = Point(_side_gap, _side_gap, 0);
346 tr_corner_points[points_per_quad + 3] = Point(-_pitch * 0.5 * shrink_factor, _side_gap, 0);
347 }
348
349 // Build an array of points that represent a cross-section of a bottom left corner subchannel
350 // cell. The points are ordered in this fashion:
351 // 4 3
352 // 2 1
353 // 0
354 //
355 // 5 6
356 std::array<Point, points_per_corner> bl_corner_points;
357 {
358 for (unsigned int ii = 0; ii < points_per_quad; ii++)
359 {
360 auto c_pt = circle_points[3 * m - ii];
361 bl_corner_points[ii + 1] = quadrant_centers[0] + c_pt;
362 }
363 bl_corner_points[points_per_quad + 1] = Point(-_side_gap, _pitch * 0.5 * shrink_factor, 0);
364 bl_corner_points[points_per_quad + 2] = Point(-_side_gap, -_side_gap, 0);
365 bl_corner_points[points_per_quad + 3] = Point(_pitch * 0.5 * shrink_factor, -_side_gap, 0);
366 }
367
368 // Build an array of points that represent a cross-section of a bottom right corner subchannel
369 // cell. The points are ordered in this fashion:
370 // 1 6
371 // 3 2
372 // 0
373 //
374 // 4 5
375 std::array<Point, points_per_corner> br_corner_points;
376 {
377 for (unsigned int ii = 0; ii < points_per_quad; ii++)
378 {
379 auto c_pt = circle_points[4 * m - ii];
380 br_corner_points[ii + 1] = quadrant_centers[1] + c_pt;
381 }
382 br_corner_points[points_per_quad + 1] = Point(-_pitch * 0.5 * shrink_factor, -_side_gap, 0);
383 br_corner_points[points_per_quad + 2] = Point(_side_gap, -_side_gap, 0);
384 br_corner_points[points_per_quad + 3] = Point(_side_gap, _pitch * 0.5 * shrink_factor, 0);
385 }
386
387 // Build an array of points that represent a cross-section of a top side subchannel cell. The
388 // points are ordered in this fashion:
389 // 8 7
390 //
391 // 0
392 // 1 2 5 6
393 // 3 4
394 std::array<Point, points_per_side> top_points;
395 {
396 for (unsigned int ii = 0; ii < points_per_quad; ii++)
397 {
398 auto c_pt = circle_points[m - ii];
399 top_points[ii + 1] = quadrant_centers[2] + c_pt;
400 }
401 for (unsigned int ii = 0; ii < points_per_quad; ii++)
402 {
403 auto c_pt = circle_points[2 * m - ii];
404 top_points[points_per_quad + ii + 1] = quadrant_centers[3] + c_pt;
405 }
406 top_points[2 * points_per_quad + 1] = Point(_pitch * 0.5 * shrink_factor, _side_gap, 0);
407 top_points[2 * points_per_quad + 2] = Point(-_pitch * 0.5 * shrink_factor, _side_gap, 0);
408 }
409
410 // Build an array of points that represent a cross-section of a left side subchannel cell. The
411 // points are ordered in this fashion:
412 // 7 6
413 // 5 4
414 // 0
415 // 2 3
416 // 8 1
417 std::array<Point, points_per_side> left_points;
418 {
419 for (unsigned int ii = 0; ii < points_per_quad; ii++)
420 {
421 auto c_pt = circle_points[2 * m - ii];
422 left_points[ii + 1] = quadrant_centers[3] + c_pt;
423 }
424 for (unsigned int ii = 0; ii < points_per_quad; ii++)
425 {
426 auto c_pt = circle_points[3 * m - ii];
427 left_points[points_per_quad + ii + 1] = quadrant_centers[0] + c_pt;
428 }
429 left_points[2 * points_per_quad + 1] = Point(-_side_gap, _pitch * 0.5 * shrink_factor, 0);
430 left_points[2 * points_per_quad + 2] = Point(-_side_gap, -_pitch * 0.5 * shrink_factor, 0);
431 }
432
433 // Build an array of points that represent a cross-section of a bottom side subchannel cell. The
434 // points are ordered in this fashion:
435 // 4 3
436 // 6 5 2 1
437 // 0
438 //
439 // 7 8
440 std::array<Point, points_per_side> bottom_points;
441 {
442 for (unsigned int ii = 0; ii < points_per_quad; ii++)
443 {
444 auto c_pt = circle_points[3 * m - ii];
445 bottom_points[ii + 1] = quadrant_centers[0] + c_pt;
446 }
447 for (unsigned int ii = 0; ii < points_per_quad; ii++)
448 {
449 auto c_pt = circle_points[4 * m - ii];
450 bottom_points[points_per_quad + ii + 1] = quadrant_centers[1] + c_pt;
451 }
452 bottom_points[2 * points_per_quad + 1] = Point(-_pitch * 0.5 * shrink_factor, -_side_gap, 0);
453 bottom_points[2 * points_per_quad + 2] = Point(_pitch * 0.5 * shrink_factor, -_side_gap, 0);
454 }
455
456 // Build an array of points that represent a cross-section of a right side subchannel cell. The
457 // points are ordered in this fashion:
458 // 1 8
459 // 3 2
460 // 0
461 // 4 5
462 // 6 7
463 std::array<Point, points_per_side> right_points;
464 {
465 for (unsigned int ii = 0; ii < points_per_quad; ii++)
466 {
467 auto c_pt = circle_points[4 * m - ii];
468 right_points[ii + 1] = quadrant_centers[1] + c_pt;
469 }
470 for (unsigned int ii = 0; ii < points_per_quad; ii++)
471 {
472 auto c_pt = circle_points[m - ii];
473 right_points[points_per_quad + ii + 1] = quadrant_centers[2] + c_pt;
474 }
475 right_points[2 * points_per_quad + 1] = Point(_side_gap, -_pitch * 0.5 * shrink_factor, 0);
476 right_points[2 * points_per_quad + 2] = Point(_side_gap, _pitch * 0.5 * shrink_factor, 0);
477 }
478
479 if (_n_channels == 2)
480 {
481 // Special handling for the smallest line meshes, which contain only side subchannels.
482 unsigned int node_id = 0;
483 const Real offset_x = (_nx - 1) * _pitch / 2.0;
484 const Real offset_y = (_ny - 1) * _pitch / 2.0;
485 for (unsigned int iy = 0; iy < _ny; iy++)
486 {
487 Point y0 = {0, _pitch * iy - offset_y, 0};
488 for (unsigned int ix = 0; ix < _nx; ix++)
489 {
490 Point x0 = {_pitch * ix - offset_x, 0, 0};
491 for (auto z : _z_grid)
492 {
493 Point z0{0, 0, z};
494 if (_nx == 1 && iy == 0) // vertical orientation
495 for (unsigned int i = 0; i < points_per_side; i++)
496 mesh_base->add_point(bottom_points[i] + x0 + y0 + z0, node_id++);
497 if (_nx == 1 && iy == 1) // vertical orientation
498 for (unsigned int i = 0; i < points_per_side; i++)
499 mesh_base->add_point(top_points[i] + x0 + y0 + z0, node_id++);
500 if (_ny == 1 && ix == 0) // horizontal orientation
501 for (unsigned int i = 0; i < points_per_side; i++)
502 mesh_base->add_point(left_points[i] + x0 + y0 + z0, node_id++);
503 if (_ny == 1 && ix == 1) // horizontal orientation
504 for (unsigned int i = 0; i < points_per_side; i++)
505 mesh_base->add_point(right_points[i] + x0 + y0 + z0, node_id++);
506 }
507 }
508 }
509 }
510 else if (_n_channels > 2 && (_ny == 1 || _nx == 1))
511 {
512 // Line meshes larger than 2 channels have two side subchannels and center subchannels between
513 // them.
514 unsigned int node_id = 0;
515 const Real offset_x = (_nx - 1) * _pitch / 2.0;
516 const Real offset_y = (_ny - 1) * _pitch / 2.0;
517 for (unsigned int iy = 0; iy < _ny; iy++)
518 {
519 Point y0 = {0, _pitch * iy - offset_y, 0};
520 for (unsigned int ix = 0; ix < _nx; ix++)
521 {
522 Point x0 = {_pitch * ix - offset_x, 0, 0};
523 for (auto z : _z_grid)
524 {
525 Point z0{0, 0, z};
526 if (_nx == 1)
527 {
528 if (iy == 0)
529 for (unsigned int i = 0; i < points_per_side; i++)
530 mesh_base->add_point(bottom_points[i] + x0 + y0 + z0, node_id++);
531 else if (iy == _ny - 1)
532 for (unsigned int i = 0; i < points_per_side; i++)
533 mesh_base->add_point(top_points[i] + x0 + y0 + z0, node_id++);
534 else
535 for (unsigned int i = 0; i < points_per_center; i++)
536 mesh_base->add_point(center_points[i] + x0 + y0 + z0, node_id++);
537 }
538 else if (_ny == 1)
539 {
540 if (ix == 0)
541 for (unsigned int i = 0; i < points_per_side; i++)
542 mesh_base->add_point(left_points[i] + x0 + y0 + z0, node_id++);
543 else if (ix == _nx - 1)
544 for (unsigned int i = 0; i < points_per_side; i++)
545 mesh_base->add_point(right_points[i] + x0 + y0 + z0, node_id++);
546 else
547 for (unsigned int i = 0; i < points_per_center; i++)
548 mesh_base->add_point(center_points[i] + x0 + y0 + z0, node_id++);
549 }
550 }
551 }
552 }
553 }
554 else
555 {
556 // General 2D quad assemblies contain corner, side, and center subchannels.
557 unsigned int node_id = 0;
558 const Real offset_x = (_nx - 1) * _pitch / 2.0;
559 const Real offset_y = (_ny - 1) * _pitch / 2.0;
560 for (unsigned int iy = 0; iy < _ny; iy++)
561 {
562 Point y0 = {0, _pitch * iy - offset_y, 0};
563 for (unsigned int ix = 0; ix < _nx; ix++)
564 {
565 Point x0 = {_pitch * ix - offset_x, 0, 0};
566 if (ix == 0 && iy == 0) // Bottom Left corner
567 for (auto z : _z_grid)
568 {
569 Point z0{0, 0, z};
570 for (unsigned int i = 0; i < points_per_corner; i++)
571 mesh_base->add_point(bl_corner_points[i] + x0 + y0 + z0, node_id++);
572 }
573 else if (ix == _nx - 1 && iy == 0) // Bottom right corner
574 for (auto z : _z_grid)
575 {
576 Point z0{0, 0, z};
577 for (unsigned int i = 0; i < points_per_corner; i++)
578 mesh_base->add_point(br_corner_points[i] + x0 + y0 + z0, node_id++);
579 }
580 else if (ix == 0 && iy == _ny - 1) // top Left corner
581 for (auto z : _z_grid)
582 {
583 Point z0{0, 0, z};
584 for (unsigned int i = 0; i < points_per_corner; i++)
585 mesh_base->add_point(tl_corner_points[i] + x0 + y0 + z0, node_id++);
586 }
587 else if (ix == _nx - 1 && iy == _ny - 1) // top right corner
588 for (auto z : _z_grid)
589 {
590 Point z0{0, 0, z};
591 for (unsigned int i = 0; i < points_per_corner; i++)
592 mesh_base->add_point(tr_corner_points[i] + x0 + y0 + z0, node_id++);
593 }
594 else if (ix == 0 && (iy != _ny - 1 || iy != 0)) // left side
595 for (auto z : _z_grid)
596 {
597 Point z0{0, 0, z};
598 for (unsigned int i = 0; i < points_per_side; i++)
599 mesh_base->add_point(left_points[i] + x0 + y0 + z0, node_id++);
600 }
601 else if (ix == _nx - 1 && (iy != _ny - 1 || iy != 0)) // right side
602 for (auto z : _z_grid)
603 {
604 Point z0{0, 0, z};
605 for (unsigned int i = 0; i < points_per_side; i++)
606 mesh_base->add_point(right_points[i] + x0 + y0 + z0, node_id++);
607 }
608 else if (iy == 0 && (ix != _nx - 1 || ix != 0)) // bottom side
609 for (auto z : _z_grid)
610 {
611 Point z0{0, 0, z};
612 for (unsigned int i = 0; i < points_per_side; i++)
613 mesh_base->add_point(bottom_points[i] + x0 + y0 + z0, node_id++);
614 }
615 else if (iy == _ny - 1 && (ix != _nx - 1 || ix != 0)) // top side
616 for (auto z : _z_grid)
617 {
618 Point z0{0, 0, z};
619 for (unsigned int i = 0; i < points_per_side; i++)
620 mesh_base->add_point(top_points[i] + x0 + y0 + z0, node_id++);
621 }
622 else // center
623 for (auto z : _z_grid)
624 {
625 Point z0{0, 0, z};
626 for (unsigned int i = 0; i < points_per_center; i++)
627 mesh_base->add_point(center_points[i] + x0 + y0 + z0, node_id++);
628 }
629 }
630 }
631 }
632
633 if (_n_channels == 2)
634 {
635 // Build elements for the smallest line meshes.
636 for (unsigned int iy = 0; iy < _ny; iy++)
637 for (unsigned int ix = 0; ix < _nx; ix++)
638 {
639 const unsigned int i_ch = _nx * iy + ix;
640 for (unsigned int iz = 0; iz < _n_cells; iz++)
641 for (unsigned int i = 0; i < elems_per_side; i++)
642 {
643 Elem * elem = mesh_base->add_elem(std::make_unique<Prism6>());
644 elem->subdomain_id() = _subchannel_block_id;
645 elem->set_id(_elem_id++);
646 // index of the central node at base of cell
647 const unsigned int indx1 =
648 iz * points_per_side + points_per_side * (_n_cells + 1) * i_ch;
649 const unsigned int indx2 =
650 (iz + 1) * points_per_side + points_per_side * (_n_cells + 1) * i_ch;
651 const unsigned int elems_per_channel = elems_per_side;
652 elem->set_node(0, mesh_base->node_ptr(indx1));
653 elem->set_node(1, mesh_base->node_ptr(indx1 + i + 1));
654 elem->set_node(2,
655 i != elems_per_channel - 1 ? mesh_base->node_ptr(indx1 + i + 2)
656 : mesh_base->node_ptr(indx1 + 1));
657 elem->set_node(3, mesh_base->node_ptr(indx2));
658 elem->set_node(4, mesh_base->node_ptr(indx2 + i + 1));
659 elem->set_node(5,
660 i != elems_per_channel - 1 ? mesh_base->node_ptr(indx2 + i + 2)
661 : mesh_base->node_ptr(indx2 + 1));
662
663 if (iz == 0)
664 boundary_info.add_side(elem, 0, 0);
665 if (iz == _n_cells - 1)
666 boundary_info.add_side(elem, 4, 1);
667 }
668 }
669 }
670 else if (_n_channels > 2 && (_ny == 1 || _nx == 1))
671 {
672 // Build elements for 1xN and Nx1 line meshes.
673 unsigned int number_of_corner = 0;
674 unsigned int number_of_side = 0;
675 unsigned int number_of_center = 0;
676 unsigned int elems_per_channel = 0;
677 unsigned int points_per_channel = 0;
678 for (unsigned int iy = 0; iy < _ny; iy++)
679 for (unsigned int ix = 0; ix < _nx; ix++)
680 {
681 const unsigned int i_ch = _nx * iy + ix;
682 const auto subch_type = getSubchannelType(i_ch);
683 if (subch_type == EChannelType::CORNER)
684 {
685 number_of_side++;
686 elems_per_channel = elems_per_side;
687 points_per_channel = points_per_side;
688 }
689 else if (subch_type == EChannelType::EDGE)
690 {
691 number_of_center++;
692 elems_per_channel = elems_per_center;
693 points_per_channel = points_per_center;
694 }
695
696 for (unsigned int iz = 0; iz < _n_cells; iz++)
697 {
698 const unsigned int elapsed_points =
699 number_of_corner * points_per_corner * (_n_cells + 1) +
700 number_of_side * points_per_side * (_n_cells + 1) +
701 number_of_center * points_per_center * (_n_cells + 1) -
702 points_per_channel * (_n_cells + 1);
703 // index of the central node at base of cell
704 const unsigned int indx1 = iz * points_per_channel + elapsed_points;
705 const unsigned int indx2 = (iz + 1) * points_per_channel + elapsed_points;
706
707 for (unsigned int i = 0; i < elems_per_channel; i++)
708 {
709 Elem * elem = mesh_base->add_elem(std::make_unique<Prism6>());
710 elem->subdomain_id() = _subchannel_block_id;
711 elem->set_id(_elem_id++);
712 elem->set_node(0, mesh_base->node_ptr(indx1));
713 elem->set_node(1, mesh_base->node_ptr(indx1 + i + 1));
714 elem->set_node(2,
715 i != elems_per_channel - 1 ? mesh_base->node_ptr(indx1 + i + 2)
716 : mesh_base->node_ptr(indx1 + 1));
717 elem->set_node(3, mesh_base->node_ptr(indx2));
718 elem->set_node(4, mesh_base->node_ptr(indx2 + i + 1));
719 elem->set_node(5,
720 i != elems_per_channel - 1 ? mesh_base->node_ptr(indx2 + i + 2)
721 : mesh_base->node_ptr(indx2 + 1));
722
723 if (iz == 0)
724 boundary_info.add_side(elem, 0, 0);
725 if (iz == _n_cells - 1)
726 boundary_info.add_side(elem, 4, 1);
727 }
728 }
729 }
730 }
731 else
732 {
733 // Build elements for general 2D quad assemblies.
734 unsigned int number_of_corner = 0;
735 unsigned int number_of_side = 0;
736 unsigned int number_of_center = 0;
737 unsigned int elems_per_channel = 0;
738 unsigned int points_per_channel = 0;
739 for (unsigned int iy = 0; iy < _ny; iy++)
740 for (unsigned int ix = 0; ix < _nx; ix++)
741 {
742 const unsigned int i_ch = _nx * iy + ix;
743 const auto subch_type = getSubchannelType(i_ch);
744 if (subch_type == EChannelType::CORNER)
745 {
746 number_of_corner++;
747 elems_per_channel = elems_per_corner;
748 points_per_channel = points_per_corner;
749 }
750 else if (subch_type == EChannelType::EDGE)
751 {
752 number_of_side++;
753 elems_per_channel = elems_per_side;
754 points_per_channel = points_per_side;
755 }
756 else
757 {
758 number_of_center++;
759 elems_per_channel = elems_per_center;
760 points_per_channel = points_per_center;
761 }
762
763 for (unsigned int iz = 0; iz < _n_cells; iz++)
764 {
765 const unsigned int elapsed_points =
766 number_of_corner * points_per_corner * (_n_cells + 1) +
767 number_of_side * points_per_side * (_n_cells + 1) +
768 number_of_center * points_per_center * (_n_cells + 1) -
769 points_per_channel * (_n_cells + 1);
770 // index of the central node at base of cell
771 const unsigned int indx1 = iz * points_per_channel + elapsed_points;
772 const unsigned int indx2 = (iz + 1) * points_per_channel + elapsed_points;
773
774 for (unsigned int i = 0; i < elems_per_channel; i++)
775 {
776 Elem * elem = mesh_base->add_elem(std::make_unique<Prism6>());
777 elem->subdomain_id() = _subchannel_block_id;
778 elem->set_id(_elem_id++);
779 elem->set_node(0, mesh_base->node_ptr(indx1));
780 elem->set_node(1, mesh_base->node_ptr(indx1 + i + 1));
781 elem->set_node(2,
782 i != elems_per_channel - 1 ? mesh_base->node_ptr(indx1 + i + 2)
783 : mesh_base->node_ptr(indx1 + 1));
784 elem->set_node(3, mesh_base->node_ptr(indx2));
785 elem->set_node(4, mesh_base->node_ptr(indx2 + i + 1));
786 elem->set_node(5,
787 i != elems_per_channel - 1 ? mesh_base->node_ptr(indx2 + i + 2)
788 : mesh_base->node_ptr(indx2 + 1));
789
790 if (iz == 0)
791 boundary_info.add_side(elem, 0, 0);
792 if (iz == _n_cells - 1)
793 boundary_info.add_side(elem, 4, 1);
794 }
795 }
796 }
797 }
798
799 if (n_pins > 0)
800 for (auto & ctr : pin_centers)
801 generatePin(mesh_base, ctr);
802
803 boundary_info.sideset_name(0) = "inlet";
804 boundary_info.sideset_name(1) = "outlet";
805 mesh_base->set_subdomain_name(_subchannel_block_id, "subchannel", true);
806 if (n_pins > 0)
807 mesh_base->set_subdomain_name(_pin_block_id, "fuel_pins", true);
808 mesh_base->prepare_for_use();
809
810 return mesh_base;
811}
std::unique_ptr< MeshBase > buildMeshBaseObject(unsigned int dim=libMesh::invalid_uint)
static void generatePinCenters(unsigned int nx, unsigned int ny, Real pitch, Real elev, std::vector< Point > &pin_centers)
Generate pin centers.
EChannelType getSubchannelType(unsigned int index) const
returns the type of the subchannel given the index
void generatePin(std::unique_ptr< MeshBase > &mesh_base, const Point &center)
Generate one detailed fuel pin volume centered at the supplied point.
const Real radius

◆ generatePin()

void SCMQuadVisualizationAssemblyMeshGenerator::generatePin ( std::unique_ptr< MeshBase > &  mesh_base,
const Point &  center 
)
protected

Generate one detailed fuel pin volume centered at the supplied point.

Definition at line 149 of file SCMQuadVisualizationAssemblyMeshGenerator.C.

151{
152 const Real dalpha = 360. / _num_sectors;
153 const Real radius = _pin_diameter / 2.;
154
155 // Add a center node and radial boundary nodes on each axial level so each pin is discretized into
156 // triangular prism sectors.
157 std::vector<std::vector<Node *>> nodes;
158 nodes.resize(_n_cells + 1);
159 for (unsigned int k = 0; k < _n_cells + 1; k++)
160 {
161 const Real elev = _z_grid[k];
162 nodes[k].push_back(mesh_base->add_point(Point(center(0), center(1), elev)));
163 Real alpha = 0.;
164 for (unsigned int i = 0; i < _num_sectors; i++, alpha += dalpha)
165 {
166 const Real dx = radius * std::cos(alpha * M_PI / 180.);
167 const Real dy = radius * std::sin(alpha * M_PI / 180.);
168 nodes[k].push_back(mesh_base->add_point(Point(center(0) + dx, center(1) + dy, elev)));
169 }
170 }
171
172 // Add the pin volume elements, linking matching radial sectors between adjacent axial levels.
173 for (unsigned int k = 0; k < _n_cells; k++)
174 for (unsigned int i = 0; i < _num_sectors; i++)
175 {
176 Elem * elem = mesh_base->add_elem(std::make_unique<Prism6>());
177 elem->subdomain_id() = _pin_block_id;
178 elem->set_id(_elem_id++);
179 const unsigned int ctr_idx = 0;
180 const unsigned int idx1 = (i % _num_sectors) + 1;
181 const unsigned int idx2 = ((i + 1) % _num_sectors) + 1;
182 elem->set_node(0, nodes[k][ctr_idx]);
183 elem->set_node(1, nodes[k][idx1]);
184 elem->set_node(2, nodes[k][idx2]);
185 elem->set_node(3, nodes[k + 1][ctr_idx]);
186 elem->set_node(4, nodes[k + 1][idx1]);
187 elem->set_node(5, nodes[k + 1][idx2]);
188 }
189}
Point center

Referenced by generate().

◆ getSubchannelType()

EChannelType SCMQuadVisualizationAssemblyMeshGenerator::getSubchannelType ( unsigned int  index) const
inlineprotected

returns the type of the subchannel given the index

Definition at line 27 of file SCMQuadVisualizationAssemblyMeshGenerator.h.

27{ return _subch_type[index]; }

Referenced by generate().

◆ validParams()

InputParameters SCMQuadVisualizationAssemblyMeshGenerator::validParams ( )
static

Definition at line 43 of file SCMQuadVisualizationAssemblyMeshGenerator.C.

44{
47 "Creates a 3D visualization mesh of subchannels and fuel pins in a square lattice "
48 "arrangement");
49 params.addRequiredParam<Real>("pitch", "Pitch [m]");
50 params.addRequiredParam<Real>("pin_diameter", "Rod diameter [m]");
51 params.addParam<Real>("unheated_length_entry", 0.0, "Unheated length at entry [m]");
52 params.addRequiredParam<Real>("heated_length", "Heated length [m]");
53 params.addParam<Real>("unheated_length_exit", 0.0, "Unheated length at exit [m]");
54 params.addRequiredParam<unsigned int>("n_cells", "The number of cells in the axial direction");
55 params.addRequiredParam<unsigned int>("nx", "Number of channels in the x direction [-]");
56 params.addRequiredParam<unsigned int>("ny", "Number of channels in the y direction [-]");
57 params.addRequiredParam<Real>(
58 "side_gap",
59 "The side gap, not to be confused with the gap between pins, this refers to the gap "
60 "next to the duct or else the distance between the subchannel centroid to the duct wall."
61 "distance(edge pin center, duct wall) = pitch / 2 + side_gap [m]");
62 params.addRangeCheckedParam<unsigned int>("num_sectors",
63 16,
64 "num_sectors>=4",
65 "Number of azimuthal sectors used to discretize each "
66 "circular pin cross section.");
67 params.addParam<unsigned int>("subchannel_block_id", 0, "Subchannel block id.");
68 params.addParam<unsigned int>("pin_block_id", 1, "Fuel pin block id.");
69 return params;
70}
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)
void addRangeCheckedParam(const std::string &name, const T &value, const std::string &parsed_function, const std::string &doc_string)
static InputParameters validParams()

Member Data Documentation

◆ _elem_id

dof_id_type SCMQuadVisualizationAssemblyMeshGenerator::_elem_id
protected

Counter for element numbering.

Definition at line 69 of file SCMQuadVisualizationAssemblyMeshGenerator.h.

Referenced by generate(), and generatePin().

◆ _heated_length

const Real SCMQuadVisualizationAssemblyMeshGenerator::_heated_length
protected

heated length of the fuel Pin

Definition at line 35 of file SCMQuadVisualizationAssemblyMeshGenerator.h.

Referenced by SCMQuadVisualizationAssemblyMeshGenerator().

◆ _n_cells

const unsigned int SCMQuadVisualizationAssemblyMeshGenerator::_n_cells
protected

Number of cells in the axial direction.

Definition at line 45 of file SCMQuadVisualizationAssemblyMeshGenerator.h.

Referenced by generate(), generatePin(), and SCMQuadVisualizationAssemblyMeshGenerator().

◆ _n_channels

unsigned int SCMQuadVisualizationAssemblyMeshGenerator::_n_channels
protected

Total number of subchannels.

Definition at line 51 of file SCMQuadVisualizationAssemblyMeshGenerator.h.

Referenced by generate(), and SCMQuadVisualizationAssemblyMeshGenerator().

◆ _num_sectors

const unsigned int SCMQuadVisualizationAssemblyMeshGenerator::_num_sectors
protected

Number of azimuthal sectors used to discretize each circular pin cross section.

Definition at line 59 of file SCMQuadVisualizationAssemblyMeshGenerator.h.

Referenced by generate(), and generatePin().

◆ _nx

const unsigned int SCMQuadVisualizationAssemblyMeshGenerator::_nx
protected

Number of subchannels in the x direction.

Definition at line 47 of file SCMQuadVisualizationAssemblyMeshGenerator.h.

Referenced by generate(), and SCMQuadVisualizationAssemblyMeshGenerator().

◆ _ny

const unsigned int SCMQuadVisualizationAssemblyMeshGenerator::_ny
protected

Number of subchannels in the y direction.

Definition at line 49 of file SCMQuadVisualizationAssemblyMeshGenerator.h.

Referenced by generate(), and SCMQuadVisualizationAssemblyMeshGenerator().

◆ _pin_block_id

const unsigned int SCMQuadVisualizationAssemblyMeshGenerator::_pin_block_id
protected

Pin subdomain ID.

Definition at line 63 of file SCMQuadVisualizationAssemblyMeshGenerator.h.

Referenced by generate(), and generatePin().

◆ _pin_diameter

const Real SCMQuadVisualizationAssemblyMeshGenerator::_pin_diameter
protected

fuel Pin diameter

Definition at line 43 of file SCMQuadVisualizationAssemblyMeshGenerator.h.

Referenced by generate(), and generatePin().

◆ _pitch

const Real SCMQuadVisualizationAssemblyMeshGenerator::_pitch
protected

Distance between the neighbor fuel pins, pitch.

Definition at line 41 of file SCMQuadVisualizationAssemblyMeshGenerator.h.

Referenced by generate(), and SCMQuadVisualizationAssemblyMeshGenerator().

◆ _side_gap

const Real SCMQuadVisualizationAssemblyMeshGenerator::_side_gap
protected

The side gap, not to be confused with the gap between pins, this refers to the gap next to the duct or else the distance between the subchannel centroid to the duct wall.

distance(edge pin center, duct wall) = pitch / 2 + side_gap [m].

Definition at line 57 of file SCMQuadVisualizationAssemblyMeshGenerator.h.

Referenced by generate(), and SCMQuadVisualizationAssemblyMeshGenerator().

◆ _subch_type

std::vector<EChannelType> SCMQuadVisualizationAssemblyMeshGenerator::_subch_type
protected

◆ _subchannel_block_id

const unsigned int SCMQuadVisualizationAssemblyMeshGenerator::_subchannel_block_id
protected

Subchannel subdomain ID.

Definition at line 61 of file SCMQuadVisualizationAssemblyMeshGenerator.h.

Referenced by generate().

◆ _subchannel_position

std::vector<std::vector<Real> > SCMQuadVisualizationAssemblyMeshGenerator::_subchannel_position
protected

x,y coordinates of the subchannel centroids

Definition at line 67 of file SCMQuadVisualizationAssemblyMeshGenerator.h.

Referenced by SCMQuadVisualizationAssemblyMeshGenerator().

◆ _unheated_length_entry

const Real SCMQuadVisualizationAssemblyMeshGenerator::_unheated_length_entry
protected

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

Definition at line 33 of file SCMQuadVisualizationAssemblyMeshGenerator.h.

Referenced by SCMQuadVisualizationAssemblyMeshGenerator().

◆ _unheated_length_exit

const Real SCMQuadVisualizationAssemblyMeshGenerator::_unheated_length_exit
protected

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

Definition at line 37 of file SCMQuadVisualizationAssemblyMeshGenerator.h.

Referenced by SCMQuadVisualizationAssemblyMeshGenerator().

◆ _z_grid

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

axial location of nodes

Definition at line 39 of file SCMQuadVisualizationAssemblyMeshGenerator.h.

Referenced by generate(), generatePin(), and SCMQuadVisualizationAssemblyMeshGenerator().


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