32 Real dtau(
unsigned k,
unsigned ell,
unsigned m);
58 mooseError(
"Error, 0 <= k,ell <= 2 violated!");
68 const Real rho = _data._rho[_data._qp];
69 const Real rho2 = rho * rho;
70 const Real phij = _data._phi[_data._j][_data._qp];
72 const Real mu = _data._dynamic_viscosity[_data._qp];
76 _data._rho_u[_data._qp], _data._rho_v[_data._qp], _data._rho_w[_data._qp]);
78 const Real divU = _data._grad_rho_u[_data._qp](0) + _data._grad_rho_v[_data._qp](1) +
79 _data._grad_rho_w[_data._qp](2);
82 std::vector<RealVectorValue> gradU(3);
83 gradU[0] = _data._grad_rho_u[_data._qp];
84 gradU[1] = _data._grad_rho_v[_data._qp];
85 gradU[2] = _data._grad_rho_w[_data._qp];
88 const RealVectorValue & grad_phij = _data._grad_phi[_data._j][_data._qp];
95 const Real term1 = 2.0 / rho2 * (U(
k) * grad_rho(ell) + U(ell) * grad_rho(
k)) * phij;
96 const Real term2 = -1.0 / rho *
97 ((gradU[
k](ell) + gradU[ell](
k)) * phij +
98 (U(
k) * grad_phij(ell) + U(ell) * grad_phij(
k)));
105 term3 = -4.0 / 3.0 / rho2 * (U * grad_rho) * phij;
106 term4 = 2.0 / 3.0 / rho * (U * grad_phij + divU * phij);
110 return nu * (term1 + term2 + term3 + term4);
120 const unsigned m_local = m - 1;
123 const Real delta_km = (
k == m_local ? 1.0 : 0.0);
124 const Real delta_ellm = (ell == m_local ? 1.0 : 0.0);
125 const Real delta_kell = (
k == ell ? 1.0 : 0.0);
129 delta_km * (grad_phij(ell) - (phij / rho) * grad_rho(ell)) +
130 delta_ellm * (grad_phij(
k) - (phij / rho) * grad_rho(
k)) -
131 (2. / 3.) * delta_kell * (grad_phij(m_local) - (phij / rho) * grad_rho(m_local)));
Class outside the Moose hierarchy that contains common functionality for computing derivatives of the...
void mooseError(Args &&... args)
Real dtau(unsigned k, unsigned ell, unsigned m)
The primary interface for computing viscous stress tensor derivatives.
const std::vector< double > x
static const std::string mu
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
NSViscStressTensorDerivs(T &x)
static const std::string k