https://mooseframework.inl.gov
Loading...
Searching...
No Matches
AssemblyMeshGenerator.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
13
19{
20public:
22
24
25 std::unique_ptr<MeshBase> generate() override;
26
27 std::unique_ptr<CSG::CSGBase> generateCSG() override;
28
29protected:
37 const CSG::CSGLattice & assembly_lattice,
38 const std::vector<std::reference_wrapper<const CSG::CSGSurface>> & surfaces_by_axial_region,
39 CSG::CSGBase & csg_obj);
40
52 const std::string & name_prefix,
53 const std::vector<std::reference_wrapper<const CSG::CSGSurface>> & surfaces_by_axial_region,
54 const std::vector<subdomain_id_type> & region_ids,
55 CSG::CSGBase & csg_obj);
56
57 // Delete outermost mesh interval of assembly and replace with triangulated mesh with fixed number
58 // of nodes at outer boundary
60
61 // Define metadata associated with AssemblyMeshGenerator
62 void generateMetadata();
63
65 const std::vector<MeshGeneratorName> _inputs;
66
68 const subdomain_id_type _assembly_type;
69
71 const std::vector<std::vector<unsigned int>> _pattern;
72
74 const std::vector<Real> _duct_sizes;
75
77 const unsigned int _background_intervals;
78
80 const std::vector<unsigned int> _duct_intervals;
81
83 std::vector<subdomain_id_type> _background_region_id;
84
86 std::vector<std::vector<subdomain_id_type>> _duct_region_ids;
87
90
93
95 std::vector<std::string> _background_block_name;
96
98 std::vector<std::vector<std::string>> _duct_block_names;
99
101 const bool _extrude;
102
104 std::string _geom_type;
105
107 unsigned int _mesh_dimensions;
108
110 std::vector<Real> _axial_boundaries;
111
113 std::vector<subdomain_id_type> _peripheral_region_ids;
114
116 std::map<subdomain_id_type, std::vector<std::vector<subdomain_id_type>>> _pin_region_id_map;
117
119 std::map<subdomain_id_type, std::vector<std::vector<std::string>>> _pin_block_name_map;
120
122 boundary_id_type _assembly_boundary_id;
123
126
129 std::unique_ptr<MeshBase> * _build_mesh;
130
132 std::vector<std::unique_ptr<CSG::CSGBase> *> _input_csg_bases;
133};
Mesh generator for defining a reactor assembly using a Cartesian or hexagonal lattice with the option...
const unsigned int _background_intervals
The number of divisions in the mesh outside of the pins and inside of the ducts.
std::vector< std::vector< subdomain_id_type > > _duct_region_ids
2-D vector (axial outer indexing, radial inner indexing) used to set the "region_id" extra-element in...
std::vector< std::unique_ptr< CSG::CSGBase > * > _input_csg_bases
List of pointers to all CSG bases created by input mesh generators.
const CSG::CSGUniverse & createDuctFillUniverse(const std::string &name_prefix, const std::vector< std::reference_wrapper< const CSG::CSGSurface > > &surfaces_by_axial_region, const std::vector< subdomain_id_type > &region_ids, CSG::CSGBase &csg_obj)
Create fill universe for ducted regions.
std::string _geom_type
The type of geometry that is being described (Square or Hex, declared in the ReactorMeshParams object...
std::map< subdomain_id_type, std::vector< std::vector< subdomain_id_type > > > _pin_region_id_map
A mapping from pin-type IDs to region IDs used when assigning region IDs during the pin stitching sta...
boundary_id_type _assembly_boundary_id
The ID of the assembly outer boundary, equal to the assembly type ID + 2000.
std::vector< std::string > _background_block_name
Optional vector used to set the block names of the assembly background elements.
const bool _extrude
Whether this mesh should be extruded to 3-D, making it the final structure in the reactor mesh.
std::unique_ptr< MeshBase > generate() override
const std::vector< MeshGeneratorName > _inputs
The names of the pins that compose the Assembly.
static InputParameters validParams()
std::vector< Real > _axial_boundaries
The heights of the axial regions that are stored on the ReactorMeshParams object.
bool _has_duct_block_names
Whether block names for assembly duct elements have been provided by user.
std::unique_ptr< CSG::CSGBase > generateCSG() override
std::vector< subdomain_id_type > _background_region_id
Vector used to set the "region_id" extra-element integer of the assembly background elements.
BoundaryName _assembly_boundary_name
The name of the assembly outer boundary, equal to the concatenation of "outer_assembly_" and the asse...
const std::vector< Real > _duct_sizes
The inner apothem of any ducts around the assembly.
std::map< subdomain_id_type, std::vector< std::vector< std::string > > > _pin_block_name_map
A mapping from pin-type IDs to block names used when assigning block names during the pin stitching s...
const std::vector< unsigned int > _duct_intervals
The number of divisions in the meshes of the ducts.
std::unique_ptr< MeshBase > * _build_mesh
The final mesh that is generated by the subgenerators; This mesh is generated by the subgenerators wi...
const subdomain_id_type _assembly_type
The id number for the type of the assembly.
unsigned int _mesh_dimensions
The number of dimensions the mesh is ultimately going to have (2 or 3, declared in the ReactorMeshPar...
std::vector< subdomain_id_type > _peripheral_region_ids
The region ids of peripheral regions in the 2D mesh. This includes the assembly background region and...
std::vector< std::vector< std::string > > _duct_block_names
Optional 2-D vector (axial outer indexing, radial inner indexing) used to set the block names of the ...
bool _has_background_block_name
Whether block names for assembly background elements have been provided by user.
void setAssemblyLatticeOuter(const CSG::CSGLattice &assembly_lattice, const std::vector< std::reference_wrapper< const CSG::CSGSurface > > &surfaces_by_axial_region, CSG::CSGBase &csg_obj)
Create CSG cell with lattice fill for region within first duct boundary.
const std::vector< std::vector< unsigned int > > _pattern
The 2D pin-by-pin layout of the assembly mapping indices into _inputs.
const InputParameters & parameters() const
A base class that contains common members for Reactor Geometry Mesh Builder mesh generators.