https://mooseframework.inl.gov
Loading...
Searching...
No Matches
SCMTriDuctMeshGenerator.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
37 void ductCorners(std::vector<Point> & corners, Real flat_to_flat, const Point & center) const;
38
44 void ductCrossSec(std::vector<Point> & cross_sec,
45 const std::vector<Point> & corners,
46 unsigned int nrings,
47 Real pitch) const;
48
53 void ductPoints(std::vector<Point> & points,
54 const std::vector<Point> & cross_sec,
55 const std::vector<Real> & z_layers) const;
56
61 void ductElems(std::vector<std::vector<size_t>> & elem_point_indices,
62 unsigned int n_layers,
63 unsigned int points_per_layer) const;
64
71 void buildDuct(std::unique_ptr<MeshBase> & mesh,
72 std::vector<Node *> & duct_nodes,
73 const std::vector<Point> & points,
74 const std::vector<std::vector<size_t>> & elem_point_indices,
75 SubdomainID block) const;
76
78 std::unique_ptr<MeshBase> & _input;
80 const unsigned int _n_cells;
82 std::vector<Real> _z_grid;
86 const Real _heated_length;
90 const unsigned int _block_id;
92 const Real _pitch;
94 const unsigned int _n_rings;
96 const Real _flat_to_flat;
97};
subdomain_id_type SubdomainID
Point center
const InputParameters & parameters() const
Mesh generator for hexagonal duct.
const unsigned int _block_id
block index
const Real _flat_to_flat
the distance between flat surfaces of the duct facing each other
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.
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.
const unsigned int _n_rings
number of rings of fuel pins
const Real _pitch
Distance between the neighbor fuel pins, pitch.
const Real _unheated_length_exit
unheated length of the fuel Pin at the exit of the assembly
const unsigned int _n_cells
number of axial cells
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.
std::unique_ptr< MeshBase > & _input
Mesh that comes from another generator.
std::unique_ptr< MeshBase > generate() override
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.
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
void ductCorners(std::vector< Point > &corners, Real flat_to_flat, const Point &center) const
Computes the x-y corner coordinates of the duct cross-section.
void ductCrossSec(std::vector< Point > &cross_sec, const std::vector< Point > &corners, unsigned int nrings, Real pitch) const
Generates the points along the duct cross-section sides.
static InputParameters validParams()
std::vector< Real > _z_grid
axial location of nodes
MeshBase & mesh