15 using namespace Eigen;
24 params.
addClassDescription(
"Computes axial heat rate (W/m) that goes into the subchannel cells " 25 "or is assigned to the fuel pins, in a square 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 "user provided normalized function of axial heat rate [Unitless]. " 35 "The integral over pin heated length should equal the heated length");
41 _power(getPostprocessorValue(
"power")),
43 _filename(getParam<
std::string>(
"filename")),
44 _axial_heat_rate(getFunction(
"axial_heat_rate"))
65 if (inFile.fail() && !inFile.eof())
69 mooseError(
name(),
" Radial profile file doesn't have correct size : ", (ny - 1) * (nx - 1));
84 auto fpin_power =
_power / sum;
103 for (
unsigned int iz = 1; iz < nz + 1; iz++)
106 auto dz = z_grid[iz] - z_grid[iz - 1];
108 auto z2 = z_grid[iz];
109 auto z1 = z_grid[iz - 1];
110 Point p1(0, 0, z1 - unheated_length_entry);
111 Point p2(0, 0, z2 - unheated_length_entry);
113 if (z2 > unheated_length_entry && z2 <= unheated_length_entry + heated_length)
115 for (
unsigned int i_pin = 0; i_pin < (ny - 1) * (nx - 1); i_pin++)
128 for (
unsigned int i_pin = 0; i_pin < (ny - 1) * (nx - 1); i_pin++)
144 Point p1(0, 0, unheated_length_entry);
153 if (p(2) >= unheated_length_entry && p(2) <= unheated_length_entry + heated_length)
164 if (p(2) >= unheated_length_entry && p(2) <= unheated_length_entry + heated_length)
166 auto heat_rate = 0.0;
SCMQuadPowerIC(const InputParameters ¶ms)
const PostprocessorValue & _power
The total power of the assembly.
registerMooseObject("SubChannelApp", SCMQuadPowerIC)
unsigned int _numberoflines
The number of lines associated with the radial power profile .txt file.
virtual const std::vector< Real > & getZGrid() const
Get axial location of layers.
static InputParameters validParams()
An abstract class for ICs for quadrilateral subchannels.
Eigen::MatrixXd _ref_qprime
Average linear heat rate over the whole pin [W/m].
virtual const std::string & name() const
Real value(const Point &p) override
const QuadSubChannelMesh & _mesh
static InputParameters validParams()
unsigned int getSubchannelIndexFromPoint(const Point &p) const override
Return a subchannel index for a given physical point p
virtual const Real & getHeatedLength() const
Return heated length.
Eigen::MatrixXd _estimate_power
Matrix which will hold the total estimated power of each pin [W].
virtual bool pinMeshExist() const override
Return if Pin Mesh exists or not.
Eigen::MatrixXd _pin_power_correction
The correction that will be applied to the estimated calculation [unitless].
Eigen::MatrixXd _power_dis
matrix that holds the values of the relative pin power
Eigen::MatrixXd _ref_power
Actual pin power [W].
virtual const unsigned int & getNumOfAxialCells() const
Return the number of axial cells.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual const unsigned int & getNy() const
Number of subchannels in the -y direction.
const Function & _axial_heat_rate
void mooseError(Args &&... args) const
unsigned int getPinIndexFromPoint(const Point &p) const override
Return a pin index for a given physical point p
virtual const unsigned int & getNx() const
Number of subchannels in the -x direction.
const ConsoleStream _console
virtual Real value(Real t, const Point &p) const
virtual const std::vector< unsigned int > & getChannelPins(unsigned int i_chan) const override
Return a vector of pin indices for a given channel index.
virtual const Real & getHeatedLengthEntry() const
Return unheated length at entry.
std::string _filename
The name of the radial power profile file.
virtual void initialSetup() override
registerMooseObjectRenamed("SubChannelApp", QuadPowerIC, "06/30/2025 24:00", SCMQuadPowerIC)
Sets the axial heat rate for each pin according to a radial power distribution and a user defined axi...