20 "incompressible navier stokes equations which can then be assembled "
21 "together in child classes.");
29 "gravity", RealVectorValue(0, 0, 0),
"Direction of the gravity vector");
31 params.
addParam<MaterialPropertyName>(
"mu_name",
"mu",
"The name of the dynamic viscosity");
32 params.
addParam<MaterialPropertyName>(
"rho_name",
"rho",
"The name of the density");
34 params.
addParam<Real>(
"alpha", 1.,
"Multiplicative factor on the stabilization parameter tau.");
36 "laplace",
true,
"Whether the viscous term of the momentum equations is in laplace form.");
37 params.
addParam<
bool>(
"convective_term",
true,
"Whether to include the convective term.");
38 params.
addParam<
bool>(
"transient_term",
40 "Whether there should be a transient term in the momentum residuals.");
46 "Whether we are applying a Picard strategy in which case we will linearize "
47 "the nonlinear convective term.");
54 _second_phi(_assembly.secondPhi()),
57 _u_vel(coupledValue(
"u")),
58 _v_vel(coupledValue(
"v")),
59 _w_vel(coupledValue(
"w")),
60 _p(coupledValue(
NS::pressure)),
62 _picard(getParam<bool>(
"picard")),
63 _u_vel_previous_nl(_picard ? &coupledValuePreviousNL(
"u") : nullptr),
64 _v_vel_previous_nl(_picard ? &coupledValuePreviousNL(
"v") : nullptr),
65 _w_vel_previous_nl(_picard ? &coupledValuePreviousNL(
"w") : nullptr),
68 _grad_u_vel(coupledGradient(
"u")),
69 _grad_v_vel(coupledGradient(
"v")),
70 _grad_w_vel(coupledGradient(
"w")),
71 _grad_p(coupledGradient(
NS::pressure)),
74 _second_u_vel(coupledSecond(
"u")),
75 _second_v_vel(coupledSecond(
"v")),
76 _second_w_vel(coupledSecond(
"w")),
79 _u_vel_dot(_is_transient ? coupledDot(
"u") : _zero),
80 _v_vel_dot(_is_transient ? coupledDot(
"v") : _zero),
81 _w_vel_dot(_is_transient ? coupledDot(
"w") : _zero),
84 _d_u_vel_dot_du(_is_transient ? coupledDotDu(
"u") : _zero),
85 _d_v_vel_dot_dv(_is_transient ? coupledDotDu(
"v") : _zero),
86 _d_w_vel_dot_dw(_is_transient ? coupledDotDu(
"w") : _zero),
89 _u_vel_var_number(coupled(
"u")),
90 _v_vel_var_number(coupled(
"v")),
91 _w_vel_var_number(coupled(
"w")),
92 _p_var_number(coupled(
NS::pressure)),
94 _gravity(getParam<RealVectorValue>(
"gravity")),
97 _mu(getMaterialProperty<Real>(
"mu_name")),
98 _rho(getMaterialProperty<Real>(
"rho_name")),
100 _alpha(getParam<Real>(
"alpha")),
101 _laplace(getParam<bool>(
"laplace")),
102 _convective_term(getParam<bool>(
"convective_term")),
103 _transient_term(getParam<bool>(
"transient_term")),
106 _disps_provided(isParamValid(
"disp_x")),
107 _disp_x_dot(isParamValid(
"disp_x") ? coupledDot(
"disp_x") : _zero),
108 _disp_y_dot(isParamValid(
"disp_y") ? coupledDot(
"disp_y") : _zero),
109 _disp_z_dot(isParamValid(
"disp_z") ? coupledDot(
"disp_z") : _zero),
111 _rz_radial_coord(_mesh.getAxisymmetricRadialCoord())
115 "Picard is not currently supported for ALE-type simulations in which we subtract "
116 "the mesh velocity from the velocity variables");
149 RealVectorValue convective_term;
152 return convective_term;
157 RealVectorValue d_U_d_comp(0, 0, 0);
165 return convective_term;
187 RealVectorValue viscous_term(0, 0, 0);
196 RealVectorValue viscous_term(0, 0, 0);
199 for (
unsigned i = 0; i < 3; i++)
327 return _alpha / std::sqrt(transient_part + (2. * U.norm() / h) * (2. * U.norm() / h) +
328 9. * (4. * nu / (h * h)) * (4. * nu / (h * h)));
338 if (nu < std::numeric_limits<Real>::epsilon())
342 Real alpha = U.norm() * h / (2 * nu);
343 xi = 1. / std::tanh(alpha) - 1. / alpha;
345 return h / (2 * U.norm()) *
xi;
356 std::pow(transient_part + (2. * U.norm() / h) * (2. * U.norm() / h) +
357 9. * (4. * nu / (h * h)) * (4. * nu / (h * h)),
359 2. * (2. * U.norm() / h) * 2. / h * U(comp) *
_phi[
_j][
_qp] /
360 (U.norm() + std::numeric_limits<double>::epsilon());
374 RealVectorValue rz_term;
378 "We expect X or Y as the possible radial coordinate");
391 RealVectorValue add_jac;
408 ret += -
_mu[
_qp] * grad_r_vel / r;
const VariableValue & _zero
virtual RealVectorValue gravityTerm()
const VariableValue & _disp_z_dot
Time derivative of the z-displacement, mesh velocity in the z-direction.
virtual Real dWeakPressureDPressure()
const VariableGradient & _grad_w_vel
virtual RealVectorValue weakViscousTermLaplace(unsigned comp)
const VariablePhiSecond & _second_phi
second derivatives of the shape function
const VariableValue & _w_vel
const VariableValue & _disp_y_dot
Time derivative of the y-displacement, mesh velocity in the y-direction.
const VariableSecond & _second_u_vel
const MaterialProperty< Real > & _mu
virtual RealVectorValue dStrongPressureDPressure()
const VariableGradient & _grad_u_vel
virtual RealVectorValue dTimeDerivativeDUComp(unsigned comp)
virtual RealVectorValue dWeakViscDUCompTraction()
INSBase(const InputParameters ¶meters)
virtual RealVectorValue timeDerivativeTerm()
virtual RealVectorValue strongPressureTerm()
const VariableGradient & _grad_p
const VariableValue & _d_v_vel_dot_dv
const VariableValue *const _w_vel_previous_nl
RealVectorValue strongViscousTermTractionRZ() const
Computes the additional RZ terms for the Traction form of the strong viscous term.
const unsigned int _rz_radial_coord
The radial coordinate index for RZ coordinate systems.
const VariableValue & _w_vel_dot
static InputParameters validParams()
const VariableGradient & _grad_v_vel
virtual RealVectorValue dStrongViscDUCompLaplace(unsigned comp)
virtual Real tauNodal()
Provides tau which yields superconvergence for 1D advection-diffusion.
const VariableValue & _disp_x_dot
Time derivative of the x-displacement, mesh velocity in the x-direction.
const VariableSecond & _second_w_vel
const MaterialProperty< Real > & _rho
RealVectorValue strongViscousTermLaplaceRZ() const
Computes the additional RZ terms for the Laplace form of the strong viscous term.
virtual RealVectorValue strongViscousTermTraction()
const VariableValue *const _u_vel_previous_nl
virtual RealVectorValue weakViscousTermTraction(unsigned comp)
virtual RealVectorValue dStrongViscDUCompTraction(unsigned comp)
const VariableValue & _u_vel
RealVectorValue dStrongViscDUCompTractionRZ(const unsigned int comp) const
Computes the Jacobian for the additional RZ terms for the Traction form of the strong viscous term fo...
const VariableValue & _d_w_vel_dot_dw
const VariableValue & _v_vel
virtual Real dTauDUComp(unsigned comp)
virtual Real weakPressureTerm()
virtual RealVectorValue dConvecDUComp(unsigned comp)
virtual RealVectorValue dWeakViscDUCompLaplace()
const VariableSecond & _second_v_vel
const VariableValue & _u_vel_dot
virtual RealVectorValue convectiveTerm()
virtual RealVectorValue strongViscousTermLaplace()
const VariableValue *const _v_vel_previous_nl
const bool _disps_provided
Whether displacements are provided.
const VariableValue & _v_vel_dot
RealVectorValue relativeVelocity() const
Compute the velocity.
const VariableValue & _d_u_vel_dot_du
RealVectorValue dStrongViscDUCompLaplaceRZ(const unsigned int comp) const
Computes the Jacobian for the additional RZ terms for the Laplace form of the strong viscous term for...
const MooseArray< Point > & _q_point
const Elem *const & _current_elem
const VariablePhiValue & _phi
static InputParameters validParams()
const VariablePhiGradient & _grad_phi
void paramError(const std::string ¶m, Args... args) const
void mooseError(Args &&... args) const
static const std::string pressure