https://mooseframework.inl.gov
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 {
19 public:
21 
22  std::unique_ptr<MeshBase> generate() override;
23 
24 protected:
30  size_t
31  ductPointIndex(unsigned int points_per_layer, unsigned int layer, unsigned int point) const;
32 
36  void ductCorners(std::vector<Point> & corners, Real flat_to_flat, const Point & center) const;
37 
42  void ductXsec(std::vector<Point> & xsec,
43  const std::vector<Point> & corners,
44  unsigned int nrings,
45  Real pitch,
46  Real flat_to_flat) const;
47 
52  void ductPoints(std::vector<Point> & points,
53  const std::vector<Point> & xsec,
54  const std::vector<Real> & z_layers) const;
55 
63  void ductElems(std::vector<std::vector<size_t>> & elem_point_indices,
64  unsigned int n_layers,
65  unsigned int points_per_layer) const;
66 
72  void buildDuct(std::unique_ptr<MeshBase> & mesh,
73  std::vector<Node *> & duct_nodes,
74  const std::vector<Point> & points,
75  const std::vector<std::vector<size_t>> & elem_point_indices,
76  SubdomainID block) const;
77 
79  std::unique_ptr<MeshBase> & _input;
81  const unsigned int _n_cells;
83  std::vector<Real> _z_grid;
91  const unsigned int _block_id;
93  const Real _pitch;
95  const unsigned int _n_rings;
98 
99 public:
100  static InputParameters validParams();
101 };
void ductElems(std::vector< std::vector< size_t >> &elem_point_indices, unsigned int n_layers, unsigned int points_per_layer) const
Calculates the groups of points/nodes that comprise each element in the duct mesh.
const Real _unheated_length_entry
unheated length of the fuel Pin at the entry of the assembly
MeshBase & mesh
std::unique_ptr< MeshBase > generate() override
const Real _flat_to_flat
the distance between flat surfaces of the duct facing each other
const Real _unheated_length_exit
unheated length of the fuel Pin at the exit of the assembly
static InputParameters validParams()
const unsigned int _n_cells
number of axial cells
static const std::string pitch
const unsigned int _block_id
block index
std::unique_ptr< MeshBase > & _input
Mesh that comes from another generator.
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
buildDuct generates and adds mesh node and element objects to the given mesh corresponding to the giv...
const Real _pitch
Distance between the neighbor fuel pins, pitch.
const unsigned int _n_rings
number of rings of fuel pins
void ductPoints(std::vector< Point > &points, const std::vector< Point > &xsec, const std::vector< Real > &z_layers) const
Calculates all the point/node positions that will be used to form elements making the duct...
SCMTriDuctMeshGenerator(const InputParameters &parameters)
void ductCorners(std::vector< Point > &corners, Real flat_to_flat, const Point &center) const
calculate the x-y coordinates of the corner points for the duct cross section.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< Real > _z_grid
axial location of nodes
const InputParameters & parameters() const
size_t ductPointIndex(unsigned int points_per_layer, unsigned int layer, unsigned int point) const
Returns an index into the vector of point/node positions used/generated by ductPoints.
const Real _heated_length
heated length of the fuel Pin
static const std::string center
Definition: NS.h:28
void ductXsec(std::vector< Point > &xsec, const std::vector< Point > &corners, unsigned int nrings, Real pitch, Real flat_to_flat) const
calcultes the points around the duct cross section boundary (perpendicular to z axis) using assembly ...
Mesh generator for hexagonal duct.