https://mooseframework.inl.gov
SCMQuadAssemblyMeshGenerator.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 "QuadSubChannelMesh.h"
14 
20 {
21 public:
23 
25 
26  virtual std::unique_ptr<MeshBase> generate() override;
27 
28 protected:
30  void initializeChannelData();
32  void buildSubchannelMesh(MeshBase & mesh_base, BoundaryInfo & boundary_info);
34  void buildPinMesh(MeshBase & mesh_base);
36  void transferMetadata(QuadSubChannelMesh & sch_mesh);
37 
38 protected:
45 
47  std::vector<Real> _spacer_z;
49  std::vector<Real> _spacer_k;
51  std::vector<Real> _z_blockage;
53  std::vector<unsigned int> _index_blockage;
55  std::vector<Real> _reduction_blockage;
57  std::vector<Real> _k_blockage;
58 
66  unsigned int _n_cells;
68  unsigned int _nx;
70  unsigned int _ny;
72  unsigned int _n_channels;
74  unsigned int _n_gaps;
76  unsigned int _n_pins;
83 
85  unsigned int _subchannel_block_id;
87  unsigned int _pin_block_id;
88 
90  std::vector<Real> _z_grid;
92  std::vector<std::vector<Real>> _k_grid;
93 
95  std::vector<std::vector<Node *>> _nodes;
97  std::vector<std::vector<Node *>> _pin_nodes;
99  std::vector<std::vector<Node *>> _gapnodes;
100 
102  std::vector<std::pair<unsigned int, unsigned int>> _gap_to_chan_map;
104  std::vector<std::pair<unsigned int, unsigned int>> _gap_to_pin_map;
106  std::vector<std::vector<unsigned int>> _chan_to_gap_map;
108  std::vector<std::vector<unsigned int>> _chan_to_pin_map;
110  std::vector<std::vector<unsigned int>> _pin_to_chan_map;
112  std::vector<std::vector<Real>> _sign_id_crossflow_map;
114  std::vector<std::vector<Real>> _gij_map;
116  std::vector<std::vector<Real>> _subchannel_position;
118  std::vector<EChannelType> _subch_type;
119 };
std::vector< std::vector< unsigned int > > _chan_to_pin_map
stores the fuel pins belonging to each subchannel
Real _unheated_length_entry
unheated length of the fuel Pin at the entry of the assembly
std::vector< std::vector< Node * > > _nodes
channel nodes
Real _heated_length
heated length of the fuel Pin
Real _kij
lateral form loss coefficient
void buildPinMesh(MeshBase &mesh_base)
Build the 1D pin elements for assemblies with pins.
std::vector< std::vector< Real > > _k_grid
axial form loss coefficient per computational cell
std::vector< std::vector< Node * > > _pin_nodes
pin nodes
unsigned int _n_pins
number of pins
Real _unheated_length_exit
unheated length of the fuel Pin at the exit of the assembly
std::vector< std::vector< unsigned int > > _pin_to_chan_map
stores the map from pins to channels
unsigned int _ny
number of subchannels in the y direction
std::vector< std::vector< Real > > _gij_map
gap size
Creates the mesh of subchannels in a quadrilateral lattice.
SCMQuadAssemblyMeshGenerator(const InputParameters &params)
void transferMetadata(QuadSubChannelMesh &sch_mesh)
Move generated mesh metadata into the concrete QuadSubChannelMesh object.
unsigned int _nx
number of subchannels in the x direction
std::vector< unsigned int > _index_blockage
index of subchannels affected by blockage
std::vector< Real > _spacer_k
form loss coefficient of the spacers
unsigned int _n_channels
total number of subchannels
unsigned int _subchannel_block_id
subchannel block index
std::vector< Real > _spacer_z
axial location of the spacers
void buildSubchannelMesh(MeshBase &mesh_base, BoundaryInfo &boundary_info)
Build the 1D subchannel elements and inlet/outlet boundaries.
void initializeChannelData()
Build subchannel, gap, pin, and cross-flow maps used by QuadSubChannelMesh.
std::vector< Real > _k_blockage
form loss coefficient of subchannels affected by blockage
std::vector< Real > _z_grid
axial location of nodes
virtual std::unique_ptr< MeshBase > generate() override
std::vector< std::vector< Real > > _sign_id_crossflow_map
matrix used to give local sign to crossflow quantities
unsigned int _n_gaps
number of gaps per layer
std::vector< std::vector< Node * > > _gapnodes
gap nodes
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< std::pair< unsigned int, unsigned int > > _gap_to_pin_map
stores the fuel pin pairs for each gap
Mesh generator that builds a mesh of 1D lines representing subchannels and pins in a quadrilateral as...
Real _pitch
distance between neighbor fuel pins, pitch
Real _side_gap
The side gap, not to be confused with the gap between pins, this refers to the gap next to the duct o...
std::vector< std::vector< Real > > _subchannel_position
x,y coordinates of the subchannel centroids
std::vector< Real > _reduction_blockage
area reduction of subchannels affected by blockage
unsigned int _n_cells
number of axial cells
std::vector< std::pair< unsigned int, unsigned int > > _gap_to_chan_map
stores the channel pairs for each gap
unsigned int _pin_block_id
pin block index
std::vector< Real > _z_blockage
axial location of blockage (inlet, outlet) [m]
std::vector< EChannelType > _subch_type
subchannel type
std::vector< std::vector< unsigned int > > _chan_to_gap_map
stores the gaps that form each subchannel