https://mooseframework.inl.gov
SCMDetailedTriAssemblyMeshGenerator.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 #include "SubChannelEnums.h"
14 
19 {
20 public:
22  virtual std::unique_ptr<MeshBase> generate() override;
23 
24 protected:
26  EChannelType getSubchannelType(unsigned int index) const { return _subch_type[index]; }
28  Point rotatePoint(Point b, Real theta);
30  void generatePin(std::unique_ptr<MeshBase> & mesh_base, const Point & center);
32  Point getPinPosition(unsigned int i) { return _pin_position[i]; }
34  std::vector<Real> getSubchannelPosition(unsigned int i) { return _subchannel_position[i]; }
36  std::vector<unsigned int> getSubChannelPins(unsigned int i) { return _chan_to_pin_map[i]; }
37 
45  std::vector<Real> _z_grid;
47  const Real _pitch;
51  const unsigned int _n_rings;
55  const unsigned int _num_sectors;
57  std::vector<EChannelType> _subch_type;
59  std::vector<Point> _pin_position;
61  std::vector<std::vector<Real>> _subchannel_position;
63  const unsigned int _subchannel_block_id;
65  const unsigned int _pin_block_id;
67  const unsigned int _n_cells;
69  unsigned int _nrods;
71  std::vector<std::vector<unsigned int>> _pins_in_rings;
73  std::map<unsigned int, Real> _orientation_map;
75  unsigned int _n_channels;
77  std::vector<std::vector<unsigned int>> _chan_to_pin_map;
79  const bool _verbose;
82 
83 public:
85 };
const unsigned int _pin_block_id
Pin subdomain ID.
dof_id_type _elem_id
counter for element numbering
std::vector< Point > _pin_position
x,y coordinates of the fuel pins
const unsigned int _num_sectors
Number of azimuthal sectors used to discretize each circular pin cross section.
const unsigned int _n_cells
Number of cells in the axial direction.
const InputParameters & parameters() const
const Real _pitch
Distance between the neighbor fuel pins, pitch.
virtual std::unique_ptr< MeshBase > generate() override
EChannelType getSubchannelType(unsigned int index) const
returns the type of the subchannel given the index
std::vector< std::vector< unsigned int > > _pins_in_rings
fuel pins that are belonging to each ring
const Real _flat_to_flat
Half of gap between adjacent assemblies.
const Real _unheated_length_entry
unheated length of the fuel Pin at the entry of the assembly
std::vector< EChannelType > _subch_type
Subchannel type.
const Real _heated_length
heated length of the fuel Pin
std::vector< Real > getSubchannelPosition(unsigned int i)
returns the position of subchannel given pin index
const unsigned int _subchannel_block_id
Subchannel subdomain ID.
EChannelType
Enum for describing the center, edge and corner subchannels or gap types.
void generatePin(std::unique_ptr< MeshBase > &mesh_base, const Point &center)
Generate one detailed fuel pin volume centered at the supplied point.
const bool _verbose
Flag to print out the detailed mesh assembly and coordinates.
Point rotatePoint(Point b, Real theta)
rotate a point by theta radians about the origin
std::vector< std::vector< Real > > _subchannel_position
x,y coordinates of the subchannels
SCMDetailedTriAssemblyMeshGenerator(const InputParameters &parameters)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Point getPinPosition(unsigned int i)
returns the position of pin given pin index
Mesh generator that builds a 3D mesh representing triangular subchannels and pins.
std::vector< std::vector< unsigned int > > _chan_to_pin_map
stores the fuel pins belonging to each subchannel
std::vector< unsigned int > getSubChannelPins(unsigned int i)
returns the index of neighboring pins given subchannel index
const Real _unheated_length_exit
unheated length of the fuel Pin at the exit of the assembly
const unsigned int _n_rings
Number of rings in the geometry.
static const std::string center
Definition: NS.h:29
std::vector< Real > _z_grid
axial location of nodes
std::map< unsigned int, Real > _orientation_map
map inner and outer rings
uint8_t dof_id_type