22 params.
addParam<Real>(
"scaling_factor", 1,
"To scale the velocity");
26 params.
addParam<PostprocessorName>(
"velocity_pp",
"Postprocessor with the inlet velocity");
29 params.
addParam<PostprocessorName>(
"mdot_pp",
"Postprocessor with the inlet mass flow rate");
31 params.
addParam<PostprocessorName>(
"area_pp",
"Inlet area as a postprocessor");
39 _scaling_factor(getParam<Real>(
"scaling_factor")),
40 _velocity_pp(isParamValid(
"velocity_pp") ? &getPostprocessorValue(
"velocity_pp") : nullptr),
41 _mdot_pp(isParamValid(
"mdot_pp") ? &getPostprocessorValue(
"mdot_pp") : nullptr),
42 _area_pp(isParamValid(
"area_pp") ? &getPostprocessorValue(
"area_pp") : nullptr),
43 _rho(isParamValid(
NS::density) ? &getFunctor<
ADReal>(
NS::density) : nullptr)
48 "The variable argument to WCNSFVInletVelocityBC must be of type INSFVVelocityVariable");
52 mooseWarning(
"If setting the velocity directly, no need for inlet mass flow rate or area");
56 mooseError(
"Mass flow rate, area and density should be provided if velocity is not");
63 if (MooseUtils::absoluteFuzzyEqual(*
_area_pp, 0))
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("NavierStokesApp", WCNSFVInletVelocityBC)
MooseVariableFV< Real > & _var
Moose::FaceArg singleSidedFaceArg(const FaceInfo *fi=nullptr, Moose::FV::LimiterType limiter_type=Moose::FV::LimiterType::CentralDifference, bool correct_skewness=false, const Moose::StateArg *state_limiter=nullptr) const
static InputParameters validParams()
A parent class for INSFV flow boundary conditions.
static InputParameters validParams()
void paramError(const std::string ¶m, Args... args) const
void mooseError(Args &&... args) const
void mooseWarning(Args &&... args) const
Dirichlet boundary conditions for the velocity, set from either a velocity postprocessor or a mass fl...
static InputParameters validParams()
WCNSFVInletVelocityBC(const InputParameters ¶ms)
ADReal boundaryValue(const FaceInfo &fi, const Moose::StateArg &state) const override
const PostprocessorValue *const _mdot_pp
Postprocessor with the inlet mass flow rate.
const PostprocessorValue *const _area_pp
Postprocessor with the inlet area.
const PostprocessorValue *const _velocity_pp
Postprocessor with the inlet velocity.
const Moose::Functor< ADReal > *const _rho
Fluid density functor.
const Real _scaling_factor
Scaling factor.
static const std::string density