https://mooseframework.inl.gov
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 {
20 public:
22 
24 
25  std::unique_ptr<MeshBase> generate() override;
26 
27  std::unique_ptr<CSG::CSGBase> generateCSG() override;
28 
29 protected:
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 
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 
123 
126 
129  std::unique_ptr<MeshBase> * _build_mesh;
130 
132  std::vector<std::unique_ptr<CSG::CSGBase> *> _input_csg_bases;
133 };
bool _has_duct_block_names
Whether block names for assembly duct elements have been provided by user.
const unsigned int _background_intervals
The number of divisions in the mesh outside of the pins and inside of the ducts.
static const std::string assembly_lattice
const subdomain_id_type _assembly_type
The id number for the type of the assembly.
std::unique_ptr< MeshBase > generate() override
const InputParameters & parameters() const
const std::vector< Real > _duct_sizes
The inner apothem of any ducts around the assembly.
bool _has_background_block_name
Whether block names for assembly background elements have been provided by user.
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::unique_ptr< MeshBase > * _build_mesh
The final mesh that is generated by the subgenerators; This mesh is generated by the subgenerators wi...
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...
static InputParameters validParams()
std::vector< subdomain_id_type > _background_region_id
Vector used to set the "region_id" extra-element integer of the assembly background elements...
std::vector< std::unique_ptr< CSG::CSGBase > * > _input_csg_bases
List of pointers to all CSG bases created by input mesh generators.
std::unique_ptr< CSG::CSGBase > generateCSG() override
int8_t boundary_id_type
const std::vector< unsigned int > _duct_intervals
The number of divisions in the meshes of the ducts.
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 ...
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.
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...
const std::vector< std::vector< unsigned int > > _pattern
The 2D pin-by-pin layout of the assembly mapping indices into _inputs.
std::string _geom_type
The type of geometry that is being described (Square or Hex, declared in the ReactorMeshParams object...
AssemblyMeshGenerator(const InputParameters &parameters)
boundary_id_type _assembly_boundary_id
The ID of the assembly outer boundary, equal to the assembly type ID + 2000.
const std::vector< MeshGeneratorName > _inputs
The names of the pins that compose the Assembly.
A base class that contains common members for Reactor Geometry Mesh Builder mesh generators.
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.
std::vector< std::string > _background_block_name
Optional vector used to set the block names of the assembly background elements.
std::vector< Real > _axial_boundaries
The heights of the axial regions that are stored on the ReactorMeshParams object. ...
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 bool _extrude
Whether this mesh should be extruded to 3-D, making it the final structure in the reactor mesh...
BoundaryName _assembly_boundary_name
The name of the assembly outer boundary, equal to the concatenation of "outer_assembly_" and the asse...
Mesh generator for defining a reactor assembly using a Cartesian or hexagonal lattice with the option...