62 const scalar faceFlux,
70 vector gradfV = phiN - phiP;
71 scalar gradf = gradfV & gradfV;
77 gradcf = gradfV & (d & gradcP);
81 gradcf = gradfV & (d & gradcN);
84 if (
mag(gradf) >= 1000*
mag(gradcf))
86 return 1 - 0.5*1000*
sign(gradcf)*
sign(gradf);
90 return 1 - 0.5*gradf/gradcf;
97 const scalar faceFlux,
105 vector gradfV = phiN - phiP;
106 scalar gradf = gradfV & gradfV;
112 gradcf = gradfV & (d & gradcP);
116 gradcf = gradfV & (d & gradcN);
119 if (
mag(gradcf) >= 1000*
mag(gradf))
121 return 2*1000*
sign(gradcf)*
sign(gradf) - 1;
125 return 2*(gradcf/gradf) - 1;
dimensionedScalar sign(const dimensionedScalar &ds)
scalar r(const scalar faceFlux, const vector &phiP, const vector &phiN, const tensor &gradcP, const tensor &gradcN, const vector &d) const
scalar phict(const scalar faceFlux, const vector &phiP, const vector &phiN, const tensor &gradcP, const tensor &gradcN, const vector &d) const
dimensioned< scalar > mag(const dimensioned< Type > &)