17 #include "libmesh/system.h" 27 "Calculates an absolute overall inlet-mass-flow-rate weighted difference, of a chosen " 28 "variable, for the whole subchannel assembly, from inlet to outlet");
29 params.
addRequiredParam<AuxVariableName>(
"variable",
"Variable you want the delta of");
36 _variable(getParam<AuxVariableName>(
"variable")),
49 auto mass_flow_in = 0.0;
50 auto sum_Delta_mass_flow_in = 0.0;
51 for (
unsigned int i_ch = 0; i_ch < n_channels; i_ch++)
55 mass_flow_in += mdot_soln(node_in);
56 auto Delta =
abs(Soln(node_in) - Soln(node_out));
57 sum_Delta_mass_flow_in += Delta * mdot_soln(node_in);
60 _value = sum_Delta_mass_flow_in / mass_flow_in;
MetaPhysicL::DualNumber< V, D, asd > abs(const MetaPhysicL::DualNumber< V, D, asd > &a)
virtual const unsigned int & getNumOfChannels() const =0
Return the number of channels per layer.
virtual void execute() override
SubChannelDelta(const InputParameters ¶ms)
AuxVariableName const & _variable
variable name
const SubChannelMesh & _mesh
geometric information
Provide a simple RAII interface for linear lagrange solution variables.
virtual const MooseVariableFieldBase & getVariable(const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) const override
virtual Node * getChannelNode(unsigned int i_chan, unsigned iz) const =0
Get the subchannel mesh node for a given channel index and elevation index.
static InputParameters validParams()
Calculates the overall change of a chosen variable between the inlet and outlet of the subchannel ass...
static InputParameters validParams()
const T & getConstMesh(const MooseMesh &mesh)
function to cast const mesh
registerMooseObject("SubChannelApp", SubChannelDelta)
virtual const unsigned int & getNumOfAxialCells() const
Return the number of axial cells.
Real _value
value we want to calculate
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
FEProblemBase & _fe_problem
Base class for subchannel meshes.
virtual Real getValue() const override