23 "Computes axial power rate (W/m) assigned to the fuel pins in a quadrilateral lattice "
26 "power",
"The postprocessor or Real to use for the total power of the subassembly [W]");
28 "filename",
"name of radial power profile .txt file (should be a single column) [UnitLess].");
32 "Axial shape of the heat rate as a function of the distance from the start of the "
33 "heated section [Unitless]. Its magnitude does not matter because each pin is "
34 "rescaled to its assigned power");
36 "verbose",
false,
"Print the per-pin power correction every time it is computed");
43 _power(getPostprocessorValue(
"power")),
45 _filename(getParam<
std::string>(
"filename")),
46 _axial_heat_rate(getFunction(
"axial_heat_rate")),
47 _verbose(getParam<bool>(
"verbose"))
70 if (inFile.fail() && !inFile.eof())
74 mooseError(
name(),
" Radial profile file doesn't have correct size : ", n_pins);
100 "The power postprocessor does not execute on every execute_on flag of this "
101 "object, so q_prime may use a lagged power");
102 if (power_pp.getParam<
bool>(
"force_postaux"))
104 "The power postprocessor sets force_postaux, so it executes after this object "
105 "and q_prime uses a lagged power");
132 for (
unsigned int iz = 1; iz < nz + 1; iz++)
135 auto z2 = z_grid[iz];
136 auto z1 = z_grid[iz - 1];
137 if (MooseUtils::absoluteFuzzyGreaterThan(z2, unheated_length_entry) &&
138 MooseUtils::absoluteFuzzyLessThan(z1, unheated_length_entry + heated_length))
141 for (
unsigned int i_pin = 0; i_pin < n_pins; i_pin++)
145 const Point shift(0, 0, unheated_length_entry);
154 if (MooseUtils::absoluteFuzzyGreaterThan(z2, unheated_length_entry) &&
155 MooseUtils::absoluteFuzzyLessThan(z1, unheated_length_entry))
161 if (MooseUtils::absoluteFuzzyGreaterThan(z2, unheated_length_entry + heated_length) &&
162 MooseUtils::absoluteFuzzyLessThan(z1, unheated_length_entry + heated_length))
176 Eigen::MatrixXd correction = Eigen::MatrixXd::Zero(n_pins, 1);
177 for (
const auto i_pin : make_range(n_pins))
180 _console <<
"###########################################" << std::endl;
181 _console <<
"Aux Power correction vector :\n" << correction <<
" \n";
191 Point p1(0, 0, unheated_length_entry);
195 if (MooseUtils::absoluteFuzzyGreaterEqual(
p(2), unheated_length_entry) &&
196 MooseUtils::absoluteFuzzyLessEqual(
p(2), unheated_length_entry + heated_length))
registerMooseObject("SubChannelApp", SCMQuadPowerAux)
const Node *const & _current_node
static InputParameters validParams()
const ConsoleStream _console
virtual Real value(Real t, const Point &p) const
void paramWarning(const std::string ¶m, Args... args) const
const std::string & name() const
void mooseError(Args &&... args) const
bool isDefaultPostprocessorValue(const std::string ¶m_name, const unsigned int index=0) const
Creates the mesh of subchannels in a quadrilateral lattice.
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...
virtual void initialSetup() override
SCMQuadPowerAux(const InputParameters ¶ms)
const PostprocessorValue & _power
The total power of the assembly.
virtual Real computeValue() override
Eigen::MatrixXd _power_dis
Matrix that holds the relative pin power.
const bool _verbose
Whether to print the per-pin power correction every time it is computed.
const QuadSubChannelMesh & _quadMesh
std::string _filename
The name of the radial power profile file.
unsigned int _numberoflines
The number of lines associated with the radial power profile .txt file.
static InputParameters validParams()
Eigen::MatrixXd _shape_integral
Trapezoidal integral of the axial power shape over each pin on the SCM axial grid [m].
void computeShapeIntegral()
Compute the trapezoidal integral of the axial power shape over each pin.
virtual void timestepSetup() override
const Function & _axial_heat_rate
const ExecFlagEnum & getExecuteOnEnum() const
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