diff --git a/src/turbulenceModels/compressible/RAS/LRR/LRR.C b/src/turbulenceModels/compressible/RAS/LRR/LRR.C index e0e7c1cccd..6521d8130c 100644 --- a/src/turbulenceModels/compressible/RAS/LRR/LRR.C +++ b/src/turbulenceModels/compressible/RAS/LRR/LRR.C @@ -337,7 +337,7 @@ void LRR::correct() RASModel::correct(); volSymmTensorField P = -twoSymm(R_ & fvc::grad(U_)); - volScalarField G("G", 0.5*tr(P)); + volScalarField G("G", 0.5*mag(tr(P))); // Update espsilon and G at the wall epsilon_.boundaryField().updateCoeffs(); @@ -376,7 +376,7 @@ void LRR::correct() { label faceCelli = curPatch.faceCells()[facei]; P[faceCelli] - *= min(G[faceCelli]/(0.5*tr(P[faceCelli]) + SMALL), 100.0); + *= min(G[faceCelli]/(0.5*mag(tr(P[faceCelli])) + SMALL), 100.0); } } } diff --git a/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C b/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C index 7f7b91a91a..4a9987131f 100644 --- a/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C +++ b/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C @@ -367,7 +367,7 @@ void LaunderGibsonRSTM::correct() } volSymmTensorField P = -twoSymm(R_ & fvc::grad(U_)); - volScalarField G("G", 0.5*tr(P)); + volScalarField G("G", 0.5*mag(tr(P))); // Update espsilon and G at the wall epsilon_.boundaryField().updateCoeffs(); @@ -406,7 +406,7 @@ void LaunderGibsonRSTM::correct() { label faceCelli = curPatch.faceCells()[facei]; P[faceCelli] *= - min(G[faceCelli]/(0.5*tr(P[faceCelli]) + SMALL), 100.0); + min(G[faceCelli]/(0.5*mag(tr(P[faceCelli])) + SMALL), 100.0); } } } diff --git a/src/turbulenceModels/incompressible/RAS/LRR/LRR.C b/src/turbulenceModels/incompressible/RAS/LRR/LRR.C index a0fd4c9ebf..f720a0312d 100644 --- a/src/turbulenceModels/incompressible/RAS/LRR/LRR.C +++ b/src/turbulenceModels/incompressible/RAS/LRR/LRR.C @@ -297,7 +297,7 @@ void LRR::correct() } volSymmTensorField P = -twoSymm(R_ & fvc::grad(U_)); - volScalarField G("G", 0.5*tr(P)); + volScalarField G("G", 0.5*mag(tr(P))); // Update espsilon and G at the wall epsilon_.boundaryField().updateCoeffs(); @@ -307,6 +307,7 @@ void LRR::correct() ( fvm::ddt(epsilon_) + fvm::div(phi_, epsilon_) + - fvm::Sp(fvc::div(phi_), epsilon_) //- fvm::laplacian(Ceps*(K/epsilon_)*R, epsilon_) - fvm::laplacian(DepsilonEff(), epsilon_) == @@ -336,7 +337,7 @@ void LRR::correct() { label faceCelli = curPatch.faceCells()[facei]; P[faceCelli] - *= min(G[faceCelli]/(0.5*tr(P[faceCelli]) + SMALL), 1.0); + *= min(G[faceCelli]/(0.5*mag(tr(P[faceCelli])) + SMALL), 1.0); } } } @@ -346,6 +347,7 @@ void LRR::correct() ( fvm::ddt(R_) + fvm::div(phi_, R_) + - fvm::Sp(fvc::div(phi_), R_) //- fvm::laplacian(Cs*(k_/epsilon_)*R_, R_) - fvm::laplacian(DREff(), R_) + fvm::Sp(Clrr1_*epsilon_/k_, R_) diff --git a/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C b/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C index 48f4c5ab7c..6f130f2a31 100644 --- a/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C +++ b/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C @@ -329,7 +329,7 @@ void LaunderGibsonRSTM::correct() } volSymmTensorField P = -twoSymm(R_ & fvc::grad(U_)); - volScalarField G("G", 0.5*tr(P)); + volScalarField G("G", 0.5*mag(tr(P))); // Update espsilon and G at the wall epsilon_.boundaryField().updateCoeffs(); @@ -339,6 +339,7 @@ void LaunderGibsonRSTM::correct() ( fvm::ddt(epsilon_) + fvm::div(phi_, epsilon_) + - fvm::Sp(fvc::div(phi_), epsilon_) //- fvm::laplacian(Ceps*(k_/epsilon_)*R_, epsilon_) - fvm::laplacian(DepsilonEff(), epsilon_) == @@ -368,7 +369,7 @@ void LaunderGibsonRSTM::correct() { label faceCelli = curPatch.faceCells()[facei]; P[faceCelli] *= - min(G[faceCelli]/(0.5*tr(P[faceCelli]) + SMALL), 1.0); + min(G[faceCelli]/(0.5*mag(tr(P[faceCelli])) + SMALL), 1.0); } } } @@ -379,6 +380,7 @@ void LaunderGibsonRSTM::correct() ( fvm::ddt(R_) + fvm::div(phi_, R_) + - fvm::Sp(fvc::div(phi_), R_) //- fvm::laplacian(Cs*(k_/epsilon_)*R_, R_) - fvm::laplacian(DREff(), R_) + fvm::Sp(Clg1_*epsilon_/k_, R_)