https://mooseframework.inl.gov
Loading...
Searching...
No Matches
SCMQuadDuctMeshGenerator.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
12#include "MeshGenerator.h"
13
18{
19public:
22 std::unique_ptr<MeshBase> generate() override;
23
24protected:
30 size_t
31 ductPointIndex(unsigned int points_per_layer, unsigned int layer, unsigned int point) const;
32
38 void
39 ductCorners(std::vector<Point> & corners, Real half_x, Real half_y, const Point & center) const;
40
47 void ductCrossSec(std::vector<Point> & cross_sec,
48 unsigned int nx,
49 unsigned int ny,
50 Real pitch,
51 Real side_gap) const;
52
57 void ductPoints(std::vector<Point> & points,
58 const std::vector<Point> & cross_sec,
59 const std::vector<Real> & z_layers) const;
60
65 void ductElems(std::vector<std::vector<size_t>> & elem_point_indices,
66 unsigned int n_layers,
67 unsigned int points_per_layer) const;
68
75 void buildDuct(std::unique_ptr<MeshBase> & mesh,
76 std::vector<Node *> & duct_nodes,
77 const std::vector<Point> & points,
78 const std::vector<std::vector<size_t>> & elem_point_indices,
79 SubdomainID block) const;
80
82 std::unique_ptr<MeshBase> & _input;
84 const unsigned int _n_cells;
86 std::vector<Real> _z_grid;
88 const Real _heated_length;
91 const unsigned int _block_id;
93 const Real _pitch;
94 const unsigned int _nx;
95 const unsigned int _ny;
96 const Real _side_gap;
97};
Point center
const InputParameters & parameters() const
Mesh generator for a square/rectangular duct around a square-lattice subassembly.
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 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 ductCorners(std::vector< Point > &corners, Real half_x, Real half_y, const Point &center) const
Computes the x-y corner coordinates of a rectangular duct cross-section.
void ductCrossSec(std::vector< Point > &cross_sec, unsigned int nx, unsigned int ny, Real pitch, Real side_gap) const
Generates the points along the rectangular duct cross-section boundary.
std::unique_ptr< MeshBase > generate() override
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.
std::unique_ptr< MeshBase > & _input
Mesh that comes from another generator.
const unsigned int _n_cells
number of axial cells
const Real _pitch
lattice geometry
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.
const unsigned int _block_id
block index
std::vector< Real > _z_grid
axial location of nodes
static InputParameters validParams()
MeshBase & mesh