18 params.
addParam<
Real>(
"scaling_factor", 1,
"To scale the mass flux");
20 params.
addParam<PostprocessorName>(
"velocity_pp",
"Postprocessor with the inlet velocity norm");
24 "The direction of the flow at the boundary. This is mainly used for cases when an inlet " 25 "angle needs to be defined with respect to the normal and when a boundary is defined on an " 26 "internal face where the normal can point in both directions. Use positive mass flux and " 27 "velocity magnitude if the flux aligns with this direction vector.");
31 params.
addParam<PostprocessorName>(
"mdot_pp",
"Postprocessor with the inlet mass flow rate");
32 params.
addParam<PostprocessorName>(
"area_pp",
"Inlet area as a postprocessor");
41 _scaling_factor(getParam<
Real>(
"scaling_factor")),
42 _velocity_pp(isParamValid(
"velocity_pp") ? &getPostprocessorValue(
"velocity_pp") : nullptr),
43 _mdot_pp(isParamValid(
"mdot_pp") ? &getPostprocessorValue(
"mdot_pp") : nullptr),
44 _area_pp(isParamValid(
"area_pp") ? &getPostprocessorValue(
"area_pp") : nullptr),
46 _direction(getParam<Point>(
"direction")),
47 _direction_specified_by_user(params.isParamSetByUser(
"direction")),
53 paramError(
"direction",
"The direction should be a unit vector with a tolerance of 1e-6!");
57 mooseWarning(
"If setting the mass flow rate directly, no need for inlet velocity");
60 mooseError(
"In two or more dimensions, the y-component of the velocity must be supplied.");
62 mooseError(
"In three dimensions, the z-component of the velocity must be supplied.");
75 mooseError(
"Either mdot_pp or velocity_pp need to be provided OR this function must be " 76 "overridden in derived classes if other input parameter combinations are valid. " 77 "Neither mdot_pp nor velocity_pp are provided.");
88 v(1) = (*_vel_y)(boundary_face, state);
90 v(2) = (*_vel_z)(boundary_face, state);
101 const ADReal cos_angle = std::abs(incoming_vector *
_normal);
110 const ADReal cos_angle = std::abs(incoming_vector *
_normal);
virtual MooseMesh & mesh()=0
void checkForInternalDirection() const
check for improper use on an internal face, e.g.
const PostprocessorValue *const _velocity_pp
Postprocessor with the inlet velocity.
const PostprocessorValue *const _mdot_pp
Postprocessor with the inlet mass flow rate.
const bool _direction_specified_by_user
Flag to store if the flow direction is specified by the user.
const Moose::Functor< ADReal > & _rho
Fluid density functor.
bool absoluteFuzzyEqual(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
ADRealVectorValue varVelocity(const Moose::StateArg &state) const
returns the velocity vector (vel_x, vel_y, vel_z)
static InputParameters validParams()
const Point _direction
The direction in which the flow is entering/leaving the domain.
static const std::string velocity_z
ADReal inflowMassFlux(const Moose::StateArg &state) const
computes the inflow massflux
static const std::string density
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 const std::string velocity_x
DualNumber< Real, DNDerivativeType, true > ADReal
void mooseWarning(Args &&... args) const
const Moose::Functor< ADReal > *const _vel_y
ADReal inflowSpeed(const Moose::StateArg &state) const
computes the inflow speed
static InputParameters validParams()
void jacobianSetup() override
virtual unsigned int dimension() const
const PostprocessorValue *const _area_pp
Postprocessor with the inlet area.
ADRealVectorValue _normal
static const std::string velocity_y
void paramError(const std::string ¶m, Args... args) const
const Moose::Functor< ADReal > *const _vel_z
virtual bool isInflow() const
true if a boundary is an inflow boundary, false if outflow
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string v
const Moose::Functor< ADReal > & _vel_x
Velocity components.
void mooseError(Args &&... args) const
void residualSetup() override
in residual and jacobian setup we check if the area is zero
virtual void jacobianSetup()
virtual void residualSetup()
A parent class for INSFV flow boundary conditions.
static InputParameters validParams()
WCNSFVFluxBCBase(const InputParameters ¶ms)