23 params.
addParam<
bool>(
"conservative_form",
false,
"Whether the conservative form is used");
25 "p_int_by_parts",
false,
"Whether integration by parts is applied to the pressure term");
26 params.
addRequiredParam<
unsigned>(
"component",
"0,1,or 2 for x-, y-, or z- direction");
27 params.
addParam<FunctionName>(
"p_fn",
"Pressure function with time at the boundary");
28 params.
addParam<FunctionName>(
"v_fn",
"Velocity function with time at the boundary");
38 params.
addCoupledVar(
"p_branch",
"Coupled scalar branch pressure");
39 params.
addCoupledVar(
"rho_branch",
"Coupled scalar branch density for gravity head calculation");
41 params.
addParam<Point>(
"branch_center",
"Position of branch center in 2D/3D flow mesh system");
47 _conservative_form(getParam<bool>(
"conservative_form")),
48 _p_int_by_parts(getParam<bool>(
"p_int_by_parts")),
49 _component(getParam<unsigned>(
"component")),
50 _mu(getMaterialProperty<
Real>(
"dynamic_viscosity")),
51 _mu_t(getMaterialProperty<
Real>(
"turbulence_viscosity")),
52 _has_pbc(parameters.isParamValid(
"p_fn")),
53 _has_vbc(parameters.isParamValid(
"v_fn")),
54 _p_fn(_has_pbc ? &getFunction(
"p_fn") : nullptr),
55 _v_fn(_has_vbc ? &getFunction(
"v_fn") : nullptr),
56 _has_pbranch(parameters.isParamValid(
"p_branch")),
57 _p_branch(_has_pbranch ? coupledScalarValue(
"p_branch") : _zero),
59 _rho_branch(_has_pbranch ? coupledScalarValue(
"rho_branch") : _zero)
62 mooseError(
"Pressure and velocity cannot be BOTH specified in INSFEFluidMomentumBC.");
66 "Pressure function and branch pressure cannot be BOTH specified in INSFEFluidMomentumBC.");
74 ": this boundary is coupled to a volume branch, ",
75 "please provide 'gravity' vector and 'branch_center' for gravity head calculation.");
77 _vec_g = getParam<VectorValue<Real>>(
"gravity");
109 return p_part + conv_part + viscous_part;
134 return conv_part + viscous_part;
const VariableValue & _u_vel
const VariableTestValue & _test
const VariableValue & _porosity
const bool _conservative_form
Whether conservative form to be used for the convection term.
const unsigned int invalid_uint
const MooseArray< Point > & _normals
const bool _has_pbc
Whether boundary pressure is specified.
RealVectorValue _vec_g
Gravity vector.
const MaterialProperty< Real > & _mu_t
Turbulent viscosity.
const unsigned _component
The component (x=0, y=1, z=2) of the momentum equation this kernel is applied.
unsigned int _p_branch_var_number
The var number of the branch pressure.
virtual Real computeQpResidual() override
const VariableGradient & _grad_u
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
bool _has_pbranch
Whether a (SAM) branch component is connected.
unsigned mapVarNumber(unsigned var)
static InputParameters validParams()
const VariablePhiValue & _phi
virtual const std::string & name() const
const bool _has_vbc
Whether boundary velocity is specified.
const VariablePhiGradient & _grad_phi
bool isParamValid(const std::string &name) const
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
static InputParameters validParams()
This class couples together all the variables for the 3D fluid equations to allow them to be used in ...
const VariableValue & _v_vel
const MooseArray< Point > & _q_point
static const std::string porosity
registerMooseObjectRenamed("NavierStokesApp", MDFluidMomentumBC, "02/01/2024 00:00", INSFEFluidMomentumBC)
const VariableValue & _p_branch
The pressure of the connected branch component.
const bool _p_int_by_parts
Whether integration by parts to be used for the pressure gradient term.
Specifies flow of momentum out of a boundary.
const VariableValue & _pressure
Point _branch_center
The location of the center (a reference point) of the connected branch.
const Function * _p_fn
The function that specifies the boundary pressure.
const MaterialProperty< Real > & _mu
Fluid dynamic viscosity.
const VariableValue & _rho_branch
The fluid density of the connected branch component.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Function * _v_fn
The function that specifies the boundary velocity.
const MaterialProperty< Real > & _rho
INSFEFluidMomentumBC(const InputParameters ¶meters)
void mooseError(Args &&... args) const
virtual Real value(Real t, const Point &p) const
virtual Real computeQpJacobian() override
registerMooseObject("NavierStokesApp", INSFEFluidMomentumBC)
const VariableValue & _w_vel