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");
40 params.
addParam<VectorValue<Real>>(
"gravity",
"Gravity vector in 2D/3D flow mesh system");
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),
58 _p_branch_var_number(_has_pbranch ? coupledScalar(
"p_branch") :
libMesh::invalid_uint),
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");
103 Real viscous_part = (porosity > 0.99)
109 return p_part + conv_part + viscous_part;
129 Real viscous_part = (porosity > 0.99)
134 return conv_part + viscous_part;
registerMooseObject("NavierStokesApp", INSFEFluidMomentumBC)
registerMooseObjectRenamed("NavierStokesApp", MDFluidMomentumBC, "02/01/2024 00:00", INSFEFluidMomentumBC)
virtual Real value(Real t, const Point &p) const
This class couples together all the variables for the 3D fluid equations to allow them to be used in ...
const VariableValue & _w_vel
static InputParameters validParams()
const MaterialProperty< Real > & _rho
const VariableValue & _v_vel
const VariableValue & _u_vel
const VariableValue & _pressure
const VariableValue & _porosity
unsigned mapVarNumber(unsigned var)
Specifies flow of momentum out of a boundary.
virtual Real computeQpJacobian() override
RealVectorValue _vec_g
Gravity vector.
unsigned int _p_branch_var_number
The var number of the branch pressure.
const bool _conservative_form
Whether conservative form to be used for the convection term.
const MaterialProperty< Real > & _mu
Fluid dynamic viscosity.
INSFEFluidMomentumBC(const InputParameters ¶meters)
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.
bool _has_pbranch
Whether a (SAM) branch component is connected.
virtual Real computeQpResidual() override
const VariableValue & _rho_branch
The fluid density of the connected branch component.
static InputParameters validParams()
const MaterialProperty< Real > & _mu_t
Turbulent viscosity.
const bool _has_vbc
Whether boundary velocity is specified.
const Function * _v_fn
The function that specifies the boundary velocity.
const bool _has_pbc
Whether boundary pressure is specified.
const unsigned _component
The component (x=0, y=1, z=2) of the momentum equation this kernel is applied.
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
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.
const MooseArray< Point > & _q_point
const VariablePhiGradient & _grad_phi
const VariableGradient & _grad_u
const VariablePhiValue & _phi
const MooseArray< Point > & _normals
const VariableTestValue & _test
const std::string & name() const
void mooseError(Args &&... args) const
bool isParamValid(const std::string &name) const
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...