24 params.
addClassDescription(
"Computes axial heat rate (W/m) assigned to the fuel pins in a square "
25 "lattice arrangement");
28 "power",
"The postprocessor or Real to use for the total power of the subassembly [W]");
30 "filename",
"name of radial power profile .txt file (should be a single column) [UnitLess].");
34 "Axial shape of the heat rate as a function of the distance from the start of the "
35 "heated section [Unitless]. Its magnitude does not matter because each pin is "
36 "rescaled to its assigned power");
42 _power(getPostprocessorValue(
"power")),
44 _filename(getParam<
std::string>(
"filename")),
45 _axial_heat_rate(getFunction(
"axial_heat_rate"))
70 if (inFile.fail() && !inFile.eof())
74 mooseError(
name(),
" Radial profile file doesn't have correct size : ", n_pins);
98 "The 'execute_on' parameter of the power postprocessor must include 'initial'");
112 auto fpin_power =
_power / sum;
120 for (
unsigned int iz = 1; iz < nz + 1; iz++)
123 auto z2 = z_grid[iz];
124 auto z1 = z_grid[iz - 1];
125 if (MooseUtils::absoluteFuzzyGreaterThan(z2, unheated_length_entry) &&
126 MooseUtils::absoluteFuzzyLessThan(z1, unheated_length_entry + heated_length))
129 for (
unsigned int i_pin = 0; i_pin < n_pins; i_pin++)
133 const Point shift(0, 0, unheated_length_entry);
141 if (MooseUtils::absoluteFuzzyGreaterThan(z2, unheated_length_entry) &&
142 MooseUtils::absoluteFuzzyLessThan(z1, unheated_length_entry))
148 if (MooseUtils::absoluteFuzzyGreaterThan(z2, unheated_length_entry + heated_length) &&
149 MooseUtils::absoluteFuzzyLessThan(z1, unheated_length_entry + heated_length))
161 auto total_power = 0.0;
162 for (
unsigned int i_pin = 0; i_pin < n_pins; i_pin++)
172 _console <<
"###########################################" << std::endl;
173 _console <<
"Total power estimation by IC kernel before correction: " << total_power <<
" [W] "
183 Point p1(0, 0, unheated_length_entry);
187 if (MooseUtils::absoluteFuzzyGreaterEqual(
p(2), unheated_length_entry) &&
188 MooseUtils::absoluteFuzzyLessEqual(
p(2), unheated_length_entry + heated_length))
const ExecFlagType EXEC_INITIAL
registerMooseObject("SubChannelApp", SCMQuadPowerIC)
const ConsoleStream _console
virtual Real value(Real t, const Point &p) const
const std::string & name() const
void paramError(const std::string ¶m, Args... args) const
void mooseError(Args &&... args) const
bool isDefaultPostprocessorValue(const std::string ¶m_name, const unsigned int index=0) const
An abstract class for ICs for quadrilateral subchannels.
const QuadSubChannelMesh & _mesh
static InputParameters validParams()
unsigned int getPinIndexFromPoint(const Point &p) const override
Return a pin index for a given physical point p
unsigned int getNumOfPins() const override
Return the number of pins.
Node * getPinNode(unsigned int i_pin, unsigned int iz) const override
Get the pin mesh node for a given pin index and elevation index.
Sets the axial heat rate for each pin according to a radial power distribution and a user defined axi...
Eigen::MatrixXd _pin_power_correction
The correction that will be applied to the estimated calculation [unitless].
const Function & _axial_heat_rate
unsigned int _numberoflines
The number of lines associated with the radial power profile .txt file.
Real value(const Point &p) override
Eigen::MatrixXd _power_dis
Matrix that holds the relative pin power.
virtual void initialSetup() override
Eigen::MatrixXd _ref_power
Actual pin power [W].
static InputParameters validParams()
const PostprocessorValue & _power
The total power of the assembly.
Eigen::MatrixXd _estimate_power
Matrix which will hold the total estimated power of each pin [W].
SCMQuadPowerIC(const InputParameters ¶ms)
std::string _filename
The name of the radial power profile file.
Eigen::MatrixXd _ref_qprime
Average linear heat rate over the whole pin [W/m].
virtual const Real & getHeatedLength() const
Return heated length.
virtual const Real & getHeatedLengthEntry() const
Return unheated length at entry.
virtual const std::vector< Real > & getZGrid() const
Get axial location of layers.
bool pinMeshExist() const
Return if Pin Mesh exists or not.
virtual unsigned int getNumOfAxialCells() const
Return the number of axial cells.
const UserObjectBase & getUserObjectBase(const std::string ¶m_name, bool is_dependency=true) const
processor_id_type processor_id() const