https://mooseframework.inl.gov
InterWrapperMesh.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 <vector>
13 #include "MooseMesh.h"
14 #include "SubChannelEnums.h"
15 
20 {
21 public:
23  InterWrapperMesh(const InterWrapperMesh & other_mesh);
24 
28  virtual const std::vector<Real> & getZGrid() const { return _z_grid; }
29 
33  virtual unsigned int getZIndex(const Point & point) const;
34 
38  virtual const std::vector<std::vector<Real>> & getKGrid() const { return _k_grid; }
39 
43  virtual const Real & getKij() const { return _kij; }
44 
48  virtual const unsigned int & getNumOfAxialCells() const { return _n_cells; }
49 
53  virtual Node * getChannelNode(unsigned int i_chan, unsigned iz) const = 0;
54 
58  virtual Node * getPinNode(unsigned int i_pin, unsigned iz) const = 0;
59 
63  virtual const unsigned int & getNumOfChannels() const = 0;
64 
68  virtual bool pinMeshExist() const = 0;
69 
73  virtual bool ductMeshExist() const = 0;
74 
78  virtual const unsigned int & getNumOfGapsPerLayer() const = 0;
79 
83  virtual const unsigned int & getNumOfAssemblies() const = 0;
84 
88  virtual const std::pair<unsigned int, unsigned int> &
89  getGapChannels(unsigned int i_gap) const = 0;
90 
94  virtual const std::vector<unsigned int> & getChannelGaps(unsigned int i_chan) const = 0;
95 
99  virtual const std::vector<unsigned int> & getPinChannels(unsigned int i_pin) const = 0;
100 
104  virtual const std::vector<unsigned int> & getChannelPins(unsigned int i_chan) const = 0;
105 
109  virtual const std::vector<double> & getGapMap() const = 0;
110 
114  virtual const Real & getPitch() const { return _assembly_pitch; }
115 
119  virtual const Real & getSideX() const { return _assembly_side_x; }
120  virtual const Real & getSideY() const { return _assembly_side_y; }
121 
125  virtual const Real & getCrossflowSign(unsigned int i_chan, unsigned int i_local) const = 0;
126 
130  virtual const Real & getHeatedLengthEntry() const { return _unheated_length_entry; }
131 
135  virtual const Real & getHeatedLength() const { return _heated_length; }
136 
140  virtual const Real & getHeatedLengthExit() const { return _unheated_length_exit; }
141 
145  virtual unsigned int getSubchannelIndexFromPoint(const Point & p) const = 0;
146 
147  virtual unsigned int channelIndex(const Point & point) const = 0;
148 
152  virtual unsigned int getPinIndexFromPoint(const Point & p) const = 0;
153 
154  virtual unsigned int pinIndex(const Point & p) const = 0;
155 
159  virtual EChannelType getSubchannelType(unsigned int index) const = 0;
160 
164  virtual Real getGapWidth(unsigned int gap_index) const = 0;
165 
166 protected:
174  std::vector<Real> _z_grid;
176  std::vector<std::vector<Real>> _k_grid;
185  unsigned int _n_cells;
186 
187 public:
188  static InputParameters validParams();
189 
193  static void generateZGrid(Real unheated_length_entry,
194  Real heated_length,
195  Real unheated_length_exit,
196  unsigned int n_cells,
197  std::vector<Real> & z_grid);
198 };
std::vector< Real > _z_grid
axial location of nodes
virtual const std::vector< std::vector< Real > > & getKGrid() const
Get axial cell location and value of loss coefficient.
virtual const std::vector< unsigned int > & getChannelPins(unsigned int i_chan) const =0
Return a vector of pin indices for a given channel index.
virtual unsigned int getSubchannelIndexFromPoint(const Point &p) const =0
Return a inter-wrapper index for a given physical point p
Real _assembly_side_x
Size of assembly sides.
virtual unsigned int getPinIndexFromPoint(const Point &p) const =0
Return a pin index for a given physical point p
static InputParameters validParams()
virtual const unsigned int & getNumOfAxialCells() const
Return the number of axial cells.
Real _unheated_length_entry
unheated length of the fuel Pin at the entry of the assembly
virtual const Real & getSideX() const
Return side lengths of the assembly.
Base class for inter-wrapper meshes.
virtual const Real & getHeatedLength() const
Return heated length.
virtual const std::pair< unsigned int, unsigned int > & getGapChannels(unsigned int i_gap) const =0
Return a pair of inter-wrapper indices for a given gap index.
virtual bool pinMeshExist() const =0
Return if Pin Mesh exists or not.
virtual const Real & getHeatedLengthEntry() const
Return unheated length at entry.
unsigned int _n_cells
number of axial cells
virtual unsigned int pinIndex(const Point &p) const =0
virtual const unsigned int & getNumOfAssemblies() const =0
Return the number of assemblies.
InterWrapperMesh(const InputParameters &parameters)
virtual const std::vector< unsigned int > & getPinChannels(unsigned int i_pin) const =0
Return a vector of channel indices for a given Pin index.
Real _unheated_length_exit
unheated length of the fuel Pin at the exit of the assembly
virtual const Real & getSideY() const
std::vector< std::vector< Real > > _k_grid
axial form loss coefficient per computational cell
Real _heated_length
heated length of the fuel Pin
virtual Node * getPinNode(unsigned int i_pin, unsigned iz) const =0
Get the pin mesh node for a given pin index and elevation index.
virtual const std::vector< double > & getGapMap() const =0
Return a map with gap sizes.
virtual unsigned int getZIndex(const Point &point) const
Get axial index of point.
static void generateZGrid(Real unheated_length_entry, Real heated_length, Real unheated_length_exit, unsigned int n_cells, std::vector< Real > &z_grid)
Generate the spacing in z-direction using heated and unheated lengths.
EChannelType
Enum for describing the center, edge and corner subchannels or gap types.
virtual const unsigned int & getNumOfChannels() const =0
Return the number of channels per layer.
virtual Node * getChannelNode(unsigned int i_chan, unsigned iz) const =0
Get the inter-wrapper mesh node for a given channel index and elevation index.
virtual Real getGapWidth(unsigned int gap_index) const =0
Return gap width for a given gap index.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual const Real & getKij() const
Return lateral loss coefficient.
virtual const std::vector< Real > & getZGrid() const
Get axial location of layers.
const InputParameters & parameters() const
virtual const unsigned int & getNumOfGapsPerLayer() const =0
Return the number of gaps per layer.
virtual unsigned int channelIndex(const Point &point) const =0
virtual const Real & getHeatedLengthExit() const
Return unheated length at exit.
Real _assembly_pitch
Distance between neighboring assemblies.
virtual bool ductMeshExist() const =0
Return if duct Mesh exists or not.
virtual const Real & getPitch() const
Return the pitch between 2 inter-wrappers.
virtual EChannelType getSubchannelType(unsigned int index) const =0
Return the type of the inter-wrapper for given inter-wrapper index.
virtual const std::vector< unsigned int > & getChannelGaps(unsigned int i_chan) const =0
Return a vector of gap indices for a given channel index.
Real _kij
Lateral form loss coefficient.
virtual const Real & getCrossflowSign(unsigned int i_chan, unsigned int i_local) const =0
Return a signs for the cross flow given a inter-wrapper index and local neighbor index.