20 params.
addClassDescription(
"Computes linear power rate (W/m) that goes into interwrapper cells " 21 "in a triangular subchannel lattice");
22 params.
addParam<
Real>(
"power", 0.0,
"The total heating power [W]");
23 params.
addParam<std::string>(
"filename",
25 "name of power profile .txt file (should be a single column). It's " 26 "a Radial Power Profile. [UnitLess]");
27 params.
addParam<FunctionName>(
"axial_heat_rate",
29 "user provided normalized function of axial heat rate [Unitless]. " 30 "The integral over pin length should equal the heated length");
36 _power(getParam<
Real>(
"power")),
38 _filename(getParam<
std::string>(
"filename")),
39 _axial_heat_rate(getFunction(
"axial_heat_rate"))
48 for (
unsigned int i = 0; i < n_assemblies; i++)
54 if (
_filename.compare(
"file_was_not_found"))
67 if (inFile.fail() && !inFile.eof())
71 mooseError(
name(),
": Radial profile file doesn't have correct size: ", n_assemblies);
85 for (
unsigned int i = 0; i < n_assemblies; i++)
90 auto fpin_power =
_power / sum;
92 for (
unsigned int i = 0; i < n_assemblies; i++)
100 for (
unsigned int i = 0; i < n_assemblies; i++)
117 for (
unsigned int iz = 1; iz < nz + 1; iz++)
120 auto dz = z_grid[iz] - z_grid[iz - 1];
122 auto z2 = z_grid[iz];
123 auto z1 = z_grid[iz - 1];
124 Point p1(0, 0, z1 - unheated_length_entry);
125 Point p2(0, 0, z2 - unheated_length_entry);
128 if (z2 > unheated_length_entry && z2 <= unheated_length_entry + heated_length)
130 for (
unsigned int i_pin = 0; i_pin < n_assemblies; i_pin++)
139 for (
unsigned int i_pin = 0; i_pin < n_assemblies; i_pin++)
154 Point p1(0, 0, unheated_length_entry);
158 if (p(2) >= unheated_length_entry && p(2) <= unheated_length_entry + heated_length)
162 for (
unsigned int j = 0;
j < 3;
j++)
172 for (
unsigned int j = 0;
j < 2;
j++)
TriInterWrapperPowerIC(const InputParameters ¶ms)
An abstract class for ICs for hexagonal fuel assemblies.
std::vector< Real > _ref_qprime
average linear heat rate over the whole pin in W/m
virtual const unsigned int & getNumOfAxialCells() const
Return the number of axial cells.
virtual EChannelType getSubchannelType(unsigned int index) const override
Return the type of the inter-wrapper for given inter-wrapper index.
Real value(const Point &p) override
virtual const Real & getHeatedLength() const
Return heated length.
virtual const Real & getHeatedLengthEntry() const
Return unheated length at entry.
registerMooseObject("SubChannelApp", TriInterWrapperPowerIC)
static InputParameters validParams()
std::vector< Real > _ref_power
actual pin power in W
virtual const unsigned int & getNumOfAssemblies() const override
Return the number of assemblies.
std::string _filename
pin power distribution file name
virtual const std::string & name() const
static InputParameters validParams()
unsigned int _numberoflines
number of lines
std::vector< Real > _pin_power_correction
its the correction that will be applied to the estimated calculation [unitless]
virtual const unsigned int & getPinIndex(const unsigned int channel_idx, const unsigned int neighbor_idx)
Return Pin index given inter_wrapper index and local neighbor index.
std::vector< Real > _estimate_power
its a vector which will hold the total estimated power of each pin [W]
TriInterWrapperMesh & _mesh
Real _power
total power of the fuel assembly
Sets the axial heat rate for each pin according to a radial power distribution and a user defined axi...
std::vector< Real > _power_dis
pin power distribution from the input file given in "_filename"
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual unsigned int getSubchannelIndexFromPoint(const Point &p) const override
Return a inter-wrapper index for a given physical point p
virtual const std::vector< Real > & getZGrid() const
Get axial location of layers.
void mooseError(Args &&... args) const
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
virtual Real value(Real t, const Point &p) const
const Function & _axial_heat_rate
normalized axial power distribution
virtual void initialSetup() override