22 "Places square-lattice subchannel assembly meshes on a rectangular core lattice. Each "
23 "assembly keeps its own subdomains and boundaries; assemblies are not connected.");
26 "The SCMQuadAssemblyMeshGenerator, SCMQuadDuctMeshGenerator, or "
27 "SCMQuadVisualizationAssemblyMeshGenerator meshes that can be placed in the core");
30 "Rectangular core pattern of indices into 'inputs', using the row syntax of "
31 "PatternedCartesianMeshGenerator; -1 marks an empty position. All rows must have the same "
32 "length. The first row is placed at +y and the entries of a row are placed from -x to +x.");
41 paramError(
"pattern",
"The pattern must contain at least one row.");
43 const auto n_columns =
_pattern[0].size();
45 paramError(
"pattern",
"Row 0 is empty; every row must contain at least one entry.");
46 for (
const auto i : index_range(
_pattern))
54 " entries; all rows of a rectangular pattern must have the ",
56 " entries of the first row.");
59 for (
const auto j : index_range(
_pattern[i]))
68 paramError(
"pattern",
"The pattern must contain at least one assembly.");
76 if (!hasMeshProperty<Real>(
"duct_size_x", input_name) ||
77 !hasMeshProperty<Real>(
"duct_size_y", input_name))
81 "' does not provide 'duct_size_x' and 'duct_size_y' metadata. Inputs must be "
82 "SCMQuadAssemblyMeshGenerator, SCMQuadDuctMeshGenerator, or "
83 "SCMQuadVisualizationAssemblyMeshGenerator objects.");
84 _duct_size.emplace_back(getMeshProperty<Real>(
"duct_size_x", input_name),
85 getMeshProperty<Real>(
"duct_size_y", input_name));
91 const unsigned int input_b,
92 const Point & offset)
const
101 return MooseUtils::absoluteFuzzyLessThan(std::abs(offset(0)), half_x,
tol) &&
102 MooseUtils::absoluteFuzzyLessThan(std::abs(offset(1)), half_y,
tol);
const std::vector< double > y
const std::vector< double > x
registerMooseObject("SubChannelApp", SCMQuadCoreMeshGenerator)
void paramError(const std::string ¶m, Args... args) const
Base class for mesh generators that place SCM assembly meshes on a core lattice and merge them into o...
const Real _assembly_pitch
Center-to-center distance between neighboring assembly positions [m].
static InputParameters validParams()
const std::vector< std::vector< int > > & _pattern
Core pattern of indices into the inputs; -1 marks an empty position.
std::vector< std::pair< unsigned int, Point > > _assemblies
Placed assemblies in pattern order: (index into the inputs, x-y center of the assembly)
void addAssembly(int entry, const Point ¢er)
Check that a pattern entry is -1 or a valid input index and, if it is an index, place that input at c...
const std::vector< MeshGeneratorName > & _input_names
Names of the input SCM 1D assembly, duct, or 3D visualization assembly mesh generators.
Places square-lattice SCM assembly meshes on a rectangular core lattice and merges them into one mesh...
bool overlap(unsigned int input_a, unsigned int input_b, const Point &offset) const override
Whether the ducts of two inputs overlap when their centers are offset apart.
SCMQuadCoreMeshGenerator(const InputParameters ¶meters)
void readAssemblySizes() override
Read the duct size metadata of every input.
std::vector< std::pair< Real, Real > > _duct_size
Outer duct width (x) and height (y) of each input [m].
static InputParameters validParams()
static constexpr Real TOLERANCE