Dear community:
The values of pi correspond to the components of the strain rate tensor. However, why is pi2 added twice in the three-dimensional case? Shouldn’t pi2 represent the 𝜎yy component,thank you bro!
​
template <typename CELL, typename PINEQNORMSQR, typename V=typename CELL::value_t>
void computePiNeqNormSqr(CELL& cell, PINEQNORMSQR& piNeqNormSqr) const any_platform
{
V rho, u[DESCRIPTOR::d], pi[util::TensorVal<DESCRIPTOR>::n] { };
computeRhoU(cell, rho, u);
STRESS().template compute<type>(cell, rho, u, pi);
piNeqNormSqr = pi[0]*pi[0] + 2.*pi[1]*pi[1] + pi[2]*pi[2];
if constexpr (util::TensorVal<DESCRIPTOR>::n == 6) {
piNeqNormSqr += pi[2]*pi[2] + pi[3]*pi[3] + 2.*pi[4]*pi[4] +pi[5]*pi[5];
}
}