15 using namespace Eigen;
23 params.
addClassDescription(
"Computes axial power rate, W/m that goes into the inter-wrapper " 24 "cells in a square lattice subchannel arrangement");
26 "power", 0.0,
"The power of all the sub-assemblies that the inter-wrapper wraps around[W]");
27 params.
addParam<std::string>(
"filename",
29 "name of power profile .txt file (should be a single column). It's " 30 "a Radial Power Profile. [UnitLess]");
34 "user provided normalized function of axial heat rate [Unitless]. " 35 "The integral over pin heated length should equal the heated length." 36 "Zero is considered the inlet of the heated length.");
42 _power(getParam<
Real>(
"power")),
44 _filename(getParam<
std::string>(
"filename")),
45 _axial_heat_rate(getFunction(
"axial_heat_rate"))
60 if (
_filename.compare(
"file_was_not_found"))
69 if (inFile.fail() && !inFile.eof())
73 mooseError(
name(),
" Radial profile file doesn't have correct size : ", (ny - 1) * (nx - 1));
81 if (
_filename.compare(
"file_was_not_found"))
96 auto fpin_power =
_power / sum;
116 for (
unsigned int iz = 1; iz < nz + 1; iz++)
119 auto dz = z_grid[iz] - z_grid[iz - 1];
121 auto z2 = z_grid[iz];
122 auto z1 = z_grid[iz - 1];
123 Point p1(0, 0, z1 - unheated_length_entry);
124 Point p2(0, 0, z2 - unheated_length_entry);
126 if (z2 > unheated_length_entry && z2 <= unheated_length_entry + heated_length)
128 for (
unsigned int i_pin = 0; i_pin < (ny - 1) * (nx - 1); i_pin++)
141 for (
unsigned int i_pin = 0; i_pin < (ny - 1) * (nx - 1); i_pin++)
154 Point p1(0, 0, unheated_length_entry);
163 if (p(2) >= unheated_length_entry && p(2) <= unheated_length_entry + heated_length)
175 if (p(2) >= unheated_length_entry && p(2) <= unheated_length_entry + heated_length)
177 auto heat_rate = 0.0;
Eigen::MatrixXd _estimate_power
Matrix which will hold the total estimated power of each fuel assembly [W].
unsigned int _numberoflines
The number of lines associated with the radial power profile .txt file.
Eigen::MatrixXd _power_dis
matrix that holds the values of the relative pin power
virtual const unsigned int & getNumOfAxialCells() const
Return the number of axial cells.
virtual const Real & getHeatedLength() const
Return heated length.
virtual const Real & getHeatedLengthEntry() const
Return unheated length at entry.
QuadInterWrapperPowerIC(const InputParameters ¶ms)
unsigned int getPinIndexFromPoint(const Point &p) const override
Return a pin index for a given physical point p
registerMooseObject("SubChannelApp", QuadInterWrapperPowerIC)
Eigen::MatrixXd _ref_qprime
Average linear heat rate over the inter wrapper assembly [W/m].
virtual bool pinMeshExist() const override
Return if Pin Mesh exists or not.
const Function & _axial_heat_rate
virtual const std::string & name() const
unsigned int getSubchannelIndexFromPoint(const Point &p) const override
Return a inter-wrapper index for a given physical point p
Eigen::MatrixXd _assembly_power_correction
The correction that will be applied to the estimated calculation [unitless].
Eigen::MatrixXd _ref_power
Actual assembly power directly heating the inter-wrapper [W].
virtual const std::vector< unsigned int > & getChannelPins(unsigned int i_chan) const override
Return a vector of pin indices for a given channel index.
static InputParameters validParams()
virtual void initialSetup() override
const QuadInterWrapperMesh & _mesh
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual const unsigned int & getNx() const
number of inter-wrapper channels in the -x direction
virtual const std::vector< Real > & getZGrid() const
Get axial location of layers.
void mooseError(Args &&... args) const
Sets the axial heat rate for each pin according to a radial power distribution and a user defined axi...
const ConsoleStream _console
static InputParameters validParams()
virtual Real value(Real t, const Point &p) const
std::string _filename
The name of the radial power profile file.
virtual const unsigned int & getNy() const
number of inter-wrapper channels in the -y direction
An abstract class for ICs for quadrilateral subchannels.
Real _power
The total power of the assembly.
Real value(const Point &p) override