19 params.
addClassDescription(
"Computes the turbulent viscosity for the mixing length model.");
21 params.
addCoupledVar(
"v",
"The velocity in the y direction.");
22 params.
addCoupledVar(
"w",
"The velocity in the z direction.");
30 _dim(_subproblem.
mesh().dimension()),
32 _v_var(params.isParamValid(
"v")
35 _w_var(params.isParamValid(
"w")
38 _mixing_len(coupledValue(
"mixing_length"))
41 paramError(
"u",
"the u velocity must be an INSFVVelocityVariable.");
45 "In two or more dimensions, the v velocity must be supplied and it must be an " 46 "INSFVVelocityVariable.");
50 "In three-dimensions, the w velocity must be supplied and it must be an " 51 "INSFVVelocityVariable.");
57 constexpr
Real offset = 1e-15;
62 ADReal symmetric_strain_tensor_norm = 2.0 * Utility::pow<2>(grad_u(0));
66 symmetric_strain_tensor_norm +=
67 2.0 * Utility::pow<2>(grad_v(1)) + Utility::pow<2>(grad_v(0) + grad_u(1));
71 symmetric_strain_tensor_norm += 2.0 * Utility::pow<2>(grad_w(2)) +
72 Utility::pow<2>(grad_u(2) + grad_w(0)) +
73 Utility::pow<2>(grad_v(2) + grad_w(1));
77 symmetric_strain_tensor_norm = std::sqrt(symmetric_strain_tensor_norm + offset);
83 return eddy_diff.value();
const VariableValue & _mixing_len
Turbulent eddy mixing length.
registerMooseObject("NavierStokesApp", INSFVMixingLengthTurbulentViscosityAux)
Moose::StateArg determineState() const
const INSFVVelocityVariable *const _v_var
y-velocity
DualNumber< Real, DNDerivativeType, true > ADReal
const INSFVVelocityVariable *const _w_var
z-velocity
static InputParameters validParams()
virtual Real computeValue()
INSFVMixingLengthTurbulentViscosityAux(const InputParameters ¶meters)
void paramError(const std::string ¶m, Args... args) const
const INSFVVelocityVariable *const _u_var
x-velocity
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const unsigned int _dim
the dimension of the simulation
const Elem *const & _current_elem
static InputParameters validParams()
const VectorValue< ADReal > & adGradSln(const Elem *const elem, const StateArg &time, bool correct_skewness=false) const override