17#include "libmesh/system.h"
27 "variable on a z-plane at a user defined height over all subchannels");
28 params.
addRequiredParam<AuxVariableName>(
"variable",
"Variable you want the mean of");
36 _variable(getParam<AuxVariableName>(
"variable")),
37 _height(getParam<Real>(
"height")),
57 Real sum_sol_mass_flow = 0.0;
62 const auto solution = Soln.interpolate(node_in, node_out,
_weight);
63 const auto mdot = mdot_soln.interpolate(node_in, node_out,
_weight);
65 sum_sol_mass_flow += solution * mdot;
registerMooseObject("SubChannelApp", SCMPlanarMean)
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
static InputParameters validParams()
void paramError(const std::string ¶m, Args... args) const
Calculates a mass flow averaged mean of a subchannel variable on a plane.
Real _weight
linear interpolation weight of the height within the axial cell
const Real & _height
axial location [m]
const SubChannelMesh & _mesh
geometric information
virtual void execute() override
AuxVariableName const & _variable
name of variable
SCMPlanarMean(const InputParameters ¶ms)
Real _mean_value
average value we want to calculate
virtual Real getValue() const override
unsigned int _iz
axial cell containing the height
virtual void finalize() override
static InputParameters validParams()
Provide a simple RAII interface for linear lagrange solution variables.
Base class for subchannel meshes.
virtual unsigned int getNumOfChannels() const =0
Return the number of channels per layer.
virtual const std::vector< Real > & getZGrid() const
Get axial location of layers.
std::pair< unsigned int, Real > getAxialInterpolation(Real z) const
Get the axial cell containing height z and the linear interpolation weight within it.
virtual Node * getChannelNode(unsigned int i_chan, unsigned int iz) const =0
Get the subchannel mesh node for a given channel index and elevation index.
void broadcast(T &data, const unsigned int root_id=0, const bool identical_sizes=false) const
FEProblemBase & _fe_problem
const Parallel::Communicator & _communicator
processor_id_type processor_id() const