24 "Computes the volumetric flow rate of an advected quantity through a sideset.");
30 "The advected variable quantity of which to study the flow; useful for " 31 "finite element simulations");
32 params.
addParam<MooseFunctorName>(
"advected_mat_prop",
34 "The advected material property of which to study the flow; " 35 "useful for finite element simulations");
36 params.
addParam<MooseFunctorName>(
"advected_quantity",
37 "The quantity to advect. This is the canonical parameter to " 38 "set the advected quantity when finite volume is being used.");
40 params.addParam<UserObjectName>(
"rhie_chow_user_object",
"The rhie-chow user-object");
41 params.addParam<
bool>(
"subtract_mesh_velocity",
42 "To subtract the velocity of the potentially moving mesh. Defaults to true " 43 "if a displaced problem exists, else false.");
49 _vel_x(coupledValue(
"vel_x")),
50 _vel_y(coupledValue(
"vel_y")),
51 _vel_z(coupledValue(
"vel_z")),
52 _advected_variable_supplied(parameters.isParamSetByUser(
"advected_variable")),
53 _advected_variable(coupledValue(
"advected_variable")),
54 _advected_mat_prop_supplied(parameters.isParamSetByUser(
"advected_mat_prop")),
55 _advected_material_property(getFunctor<
ADReal>(
"advected_mat_prop")),
56 _adv_quant(isParamValid(
"advected_quantity") ? &getFunctor<
ADReal>(
"advected_quantity")
58 _rc_uo(isParamValid(
"rhie_chow_user_object")
61 _subtract_mesh_velocity(isParamValid(
"subtract_mesh_velocity")
62 ? getParam<bool>(
"subtract_mesh_velocity")
63 : _fe_problem.haveDisplaced())
67 mooseError(
"VolumetricFlowRatePostprocessor should be provided either an advected variable " 68 "or an advected material property");
72 mooseWarning(
"Advected quantity interpolation methods are currently unavailable for " 73 "advected material properties.");
78 checkFunctorSupportsSideIntegration<ADReal>(
"advected_mat_prop",
_qp_integration);
80 checkFunctorSupportsSideIntegration<ADReal>(
"advected_quantity",
_qp_integration);
85 mooseError(
"We were instructed to use finite volume, but no Rhie-Chow user object is " 86 "supplied. Please make sure to set the 'rhie_chow_user_object' parameter");
88 mooseError(
"We were instructed to use finite volume, but no 'advected_quantity' parameter is " 96 "Rhie Chow user object does not support subtracting the mesh velocity");
99 "subtract_mesh_velocity",
100 "No displaced problem, thus the mesh velocity is 0 and does not need to be subtracted");
109 !rc_base->segregated())
130 ") has been detected to be internal to the flow domain.\n" 131 "Volumetric flow rates cannot be computed on internal flow boundaries on INITIAL");
145 mooseAssert(fi,
"We should have a face info in " +
name());
146 mooseAssert(
_adv_quant,
"We should have an advected quantity in " +
name());
153 const bool correct_skewness =
157 "Advected quantity should be defined on one side of the face!");
169 return face_flux * adv_quant_face;
bool setInterpolationMethods(const MooseObject &obj, Moose::FV::InterpMethod &advected_interp_method, Moose::FV::InterpMethod &velocity_interp_method)
Sets the advection and velocity interpolation methods.
Moose::FV::InterpMethod _advected_interp_method
The interpolation method to use for the advected quantity.
const bool _subtract_mesh_velocity
If the velocity of the potentially moving mesh should be subtracted or not.
const VariableValue & _vel_z
bool haveDisplaced() const override final
static InputParameters validParams()
InputParameters interpolationParameters()
Moose::StateArg determineState() const
virtual bool isFV() const
const std::string & getBoundaryName(BoundaryID boundary_id)
VolumetricFlowRate(const InputParameters ¶meters)
const MooseArray< Point > & _q_point
virtual void ghostADataOnBoundary(const BoundaryID)
makes sure coefficient data gets communicated on both sides of a given boundary.
registerMooseObject("NavierStokesApp", VolumetricFlowRate)
Real computeFaceInfoIntegral(const FaceInfo *fi) override
virtual const std::string & name() const
void mooseWarning(Args &&... args) const
LimiterType limiterType(InterpMethod interp_method)
const Elem * neighborPtr() const
static InputParameters validParams()
const ExecFlagEnum & getExecuteOnEnum() const
const VariableValue & _vel_y
const RhieChowFaceFluxProvider *const _rc_uo
The Rhie-Chow interpolation user object.
const Moose::Functor< ADReal > *const _adv_quant
The functor representing the advected quantity for finite volume.
const Moose::Functor< ADReal > & _advected_material_property
Material property storing the advected quantity; used for finite elements.
void paramError(const std::string ¶m, Args... args) const
This postprocessor computes the volumetric flow rate through a boundary, internal or external to the ...
virtual bool supportMeshVelocity() const
Returns whether the UO can support mesh velocity advection.
const VariableValue & _advected_variable
Variable storing the advected quantity; used for finite elements.
const Elem * elemPtr() const
const bool _advected_mat_prop_supplied
Whether an advected material property was supplied in the input.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Moose::FV::InterpMethod _velocity_interp_method
The interpolation method to use for the velocity.
void meshChanged() override
FEProblemBase & _fe_problem
const QBase *const & _qrule
const MooseArray< Point > & _normals
void mooseError(Args &&... args) const
const bool _advected_variable_supplied
Whether an advected variable was supplied in the input.
const InputParameters & parameters() const
const VariableValue & _vel_x
Velocity components.
const Elem *const & _current_elem
virtual Real getVolumetricFaceFlux(const Moose::FV::InterpMethod m, const FaceInfo &fi, const Moose::StateArg &time, const THREAD_ID tid, bool subtract_mesh_velocity) const =0
Retrieve the volumetric face flux, will not include derivatives.
void initialSetup() override
Currently only requests some boundary data from the RhieChow interpolator.
Real computeQpIntegral() override
virtual const std::set< BoundaryID > & boundaryIDs() const
bool isBoundaryFullyExternalToSubdomains(BoundaryID bid, const std::set< SubdomainID > &blk_group) const
const MooseVariableFieldBase * getFieldVar(const std::string &var_name, unsigned int comp) const
const ExecFlagType EXEC_INITIAL