22 "Computes axial power rate (W/m) assigned to the fuel pins in a triangular lattice "
25 "power",
"The postprocessor or Real to use for the total power of the subassembly [W]");
27 "filename",
"name of radial power profile .txt file (should be a single column) [UnitLess].");
28 params.
addParam<FunctionName>(
"axial_heat_rate",
30 "user provided normalized function of axial heat rate [Unitless]. "
31 "The integral over pin length should equal the heated length");
38 _power(getPostprocessorValue(
"power")),
40 _filename(getParam<
std::string>(
"filename")),
41 _axial_heat_rate(getFunction(
"axial_heat_rate"))
65 if (inFile.fail() && !inFile.eof())
69 mooseError(
name(),
": Radial profile file doesn't have correct size: ", n_pins);
91 auto fpin_power =
_power / sum;
104 for (
unsigned int iz = 1; iz < nz + 1; iz++)
107 auto z2 = z_grid[iz];
108 auto z1 = z_grid[iz - 1];
109 Point p1(0, 0, z1 - unheated_length_entry);
110 Point p2(0, 0, z2 - unheated_length_entry);
113 if (MooseUtils::absoluteFuzzyGreaterThan(z2, unheated_length_entry) &&
114 MooseUtils::absoluteFuzzyLessThan(z1, unheated_length_entry + heated_length))
117 for (
unsigned int i_pin = 0; i_pin < n_pins; i_pin++)
123 if (MooseUtils::absoluteFuzzyGreaterThan(z2, unheated_length_entry) &&
124 MooseUtils::absoluteFuzzyLessThan(z1, unheated_length_entry))
130 if (MooseUtils::absoluteFuzzyGreaterThan(z2, unheated_length_entry + heated_length) &&
131 MooseUtils::absoluteFuzzyLessThan(z1, unheated_length_entry + heated_length))
143 auto total_power = 0.0;
144 for (
unsigned int i_pin = 0; i_pin < n_pins; i_pin++)
154 _console <<
"###########################################" << std::endl;
155 _console <<
"Total power estimation by Aux kernel before correction: " << total_power <<
" [W] "
166 Point p1(0, 0, unheated_length_entry);
170 if (MooseUtils::absoluteFuzzyGreaterEqual(
p(2), unheated_length_entry) &&
171 MooseUtils::absoluteFuzzyLessEqual(
p(2), unheated_length_entry + heated_length))
registerMooseObject("SubChannelApp", SCMTriPowerAux)
const Node *const & _current_node
static InputParameters validParams()
const ConsoleStream _console
virtual Real value(Real t, const Point &p) const
const std::string & name() const
void mooseError(Args &&... args) const
Sets the axial heat rate for each pin according to a radial power distribution and a user defined axi...
virtual void initialSetup() override
static InputParameters validParams()
Eigen::MatrixXd _ref_power
Actual pin power [W].
SCMTriPowerAux(const InputParameters ¶ms)
const PostprocessorValue & _power
The total power of the assembly.
unsigned int _numberoflines
The number of lines associated with the radial power profile .txt file.
virtual Real computeValue() override
std::string _filename
The name of the radial power profile file.
Eigen::MatrixXd _power_dis
matrix that holds the values of the relative pin power
Eigen::MatrixXd _ref_qprime
Average linear heat rate over the whole pin [W/m].
const Function & _axial_heat_rate
Eigen::MatrixXd _estimate_power
Matrix which will hold the total estimated power of each pin [W].
const TriSubChannelMesh & _triMesh
Eigen::MatrixXd _pin_power_correction
The correction that will be applied to the estimated calculation [unitless].
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.
Mesh class for triangular, edge and corner subchannels for hexagonal lattice fuel assemblies.
unsigned int getNumOfPins() const override
Return the number of pins.
unsigned int getPinIndexFromPoint(const Point &p) const override
Return a pin index for a given physical point p
processor_id_type processor_id() const