https://mooseframework.inl.gov
SCMTriAssemblyMeshGenerator.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 
20 {
21 public:
23 
24  std::unique_ptr<MeshBase> generate() override;
25 
26 protected:
28  void buildPinMesh(MeshBase & mesh_base);
29 
37  const unsigned int _subchannel_block_id;
39  const unsigned int _pin_block_id;
41  std::vector<Real> _z_grid;
43  std::vector<std::vector<Real>> _k_grid;
45  const std::vector<Real> & _spacer_z;
47  const std::vector<Real> & _spacer_k;
49  const std::vector<Real> _z_blockage;
51  const std::vector<unsigned int> _index_blockage;
53  const std::vector<Real> _reduction_blockage;
55  const std::vector<Real> _k_blockage;
57  const Real _pitch;
59  const Real & _kij;
63  const unsigned int _n_cells;
65  const unsigned int _n_rings;
67  unsigned int _n_channels;
71  const Real _dwire;
73  const Real _hwire;
76 
78  std::vector<std::vector<Node *>> _nodes;
80  std::vector<std::vector<Node *>> _pin_nodes;
82  std::vector<std::pair<unsigned int, unsigned int>> _gap_to_chan_map;
84  std::vector<std::pair<unsigned int, unsigned int>> _gap_to_pin_map;
86  std::vector<std::vector<unsigned int>> _chan_to_gap_map;
91  std::vector<std::vector<Real>> _sign_id_crossflow_map;
93  std::vector<std::vector<Real>> _gij_map;
95  std::vector<std::vector<Real>> _subchannel_position;
97  std::vector<Point> _pin_position;
99  std::vector<std::vector<Real>> _pins_in_rings;
101  std::vector<std::vector<unsigned int>> _chan_to_pin_map;
103  std::vector<std::vector<unsigned int>> _pin_to_chan_map;
105  unsigned int _npins;
107  unsigned int _n_gaps;
109  std::vector<EChannelType> _subch_type;
111  std::vector<EChannelType> _gap_type;
113  std::vector<std::pair<unsigned int, unsigned int>> _gap_pairs_sf;
115  std::vector<std::pair<unsigned int, unsigned int>> _chan_pairs_sf;
116 
117 public:
118  static InputParameters validParams();
119 };
SCMTriAssemblyMeshGenerator(const InputParameters &parameters)
const Real _flat_to_flat
the distance between flat surfaces of the duct facing each other
const std::vector< Real > & _spacer_k
form loss coefficient of the spacers
const unsigned int _subchannel_block_id
subchannel block index
std::vector< std::vector< unsigned int > > _chan_to_gap_map
stores the gaps that forms each subchannel
const std::vector< Real > & _spacer_z
axial location of the spacers
std::vector< std::pair< unsigned int, unsigned int > > _chan_pairs_sf
sweeping flow model channel pairs to specify directional edge flow
const InputParameters & parameters() const
std::vector< std::vector< Real > > _pins_in_rings
fuel pins that are belonging to each ring
const Real _unheated_length_entry
unheated length of the fuel Pin at the entry of the assembly
const unsigned int _n_rings
number of rings of fuel pins
std::vector< std::vector< unsigned int > > _chan_to_pin_map
stores the fuel pins belonging to each subchannel
std::vector< EChannelType > _subch_type
subchannel type
std::vector< std::vector< unsigned int > > _pin_to_chan_map
stores the map from pins to channels
void buildPinMesh(MeshBase &mesh_base)
Build the 1D pin elements and append them to the subchannel mesh.
const std::vector< Real > _z_blockage
axial location of blockage (inlet, outlet) [m]
const Real _hwire
wire lead length
const Real _pitch
Distance between the neighbor fuel pins, pitch.
const std::vector< unsigned int > _index_blockage
index of subchannels affected by blockage
const unsigned int _n_cells
number of axial cells
const std::vector< Real > _reduction_blockage
area reduction of subchannels affected by blockage
unsigned int _n_channels
number of subchannels
std::vector< std::vector< Real > > _sign_id_crossflow_map
Defines the global cross-flow direction -1 or 1 for each subchannel and for all gaps that are belongi...
std::vector< EChannelType > _gap_type
gap type
const Real _duct_to_pin_gap
the gap thickness between the duct and peripheral fuel pins
std::unique_ptr< MeshBase > generate() override
const unsigned int _pin_block_id
pin block index
const std::vector< Real > _k_blockage
form loss coefficient of subchannels affected by blockage
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< std::vector< Real > > _gij_map
gap size
const Real _unheated_length_exit
unheated length of the fuel Pin at the exit of the assembly
std::vector< Real > _z_grid
axial location of nodes
std::vector< std::vector< Node * > > _pin_nodes
pin nodes
Mesh generator that builds a mesh of 1D lines representing subchannels and pins in a triangular assem...
const Real _pin_diameter
fuel Pin diameter
std::vector< std::pair< unsigned int, unsigned int > > _gap_to_chan_map
stores the channel pairs for each gap
std::vector< std::vector< Node * > > _nodes
nodes
const Real & _kij
Lateral form loss coefficient.
std::vector< Point > _pin_position
x,y coordinates of the fuel pins
static InputParameters validParams()
unsigned int _n_gaps
number of gaps
std::vector< std::vector< Real > > _subchannel_position
x,y coordinates of the subchannel centroids
std::vector< std::pair< unsigned int, unsigned int > > _gap_pairs_sf
sweeping flow model gap pairs per channel to specify directional edge flow
const Real _heated_length
heated length of the fuel Pin
std::vector< std::pair< unsigned int, unsigned int > > _gap_to_pin_map
stores the fuel pin pairs for each gap each gap
unsigned int _npins
number of fuel pins
std::vector< std::vector< Real > > _k_grid
axial form loss coefficient per computational cell