Stabilised the models by forcing the production of k and epsilon to be positive

even when the dot-product of the Reynolds stress and the gradient of velocity is
negative.  Currently this is done by taking the magnitude, another alternative
would be to take only the positive part.
This commit is contained in:
henry
2009-02-15 21:43:06 +00:00
parent f266f17adf
commit 6206a2e1a5
4 changed files with 12 additions and 8 deletions

View File

@ -337,7 +337,7 @@ void LRR::correct()
RASModel::correct(); RASModel::correct();
volSymmTensorField P = -twoSymm(R_ & fvc::grad(U_)); 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 // Update espsilon and G at the wall
epsilon_.boundaryField().updateCoeffs(); epsilon_.boundaryField().updateCoeffs();
@ -376,7 +376,7 @@ void LRR::correct()
{ {
label faceCelli = curPatch.faceCells()[facei]; label faceCelli = curPatch.faceCells()[facei];
P[faceCelli] 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);
} }
} }
} }

View File

@ -367,7 +367,7 @@ void LaunderGibsonRSTM::correct()
} }
volSymmTensorField P = -twoSymm(R_ & fvc::grad(U_)); 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 // Update espsilon and G at the wall
epsilon_.boundaryField().updateCoeffs(); epsilon_.boundaryField().updateCoeffs();
@ -406,7 +406,7 @@ void LaunderGibsonRSTM::correct()
{ {
label faceCelli = curPatch.faceCells()[facei]; label faceCelli = curPatch.faceCells()[facei];
P[faceCelli] *= 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);
} }
} }
} }

View File

@ -297,7 +297,7 @@ void LRR::correct()
} }
volSymmTensorField P = -twoSymm(R_ & fvc::grad(U_)); 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 // Update espsilon and G at the wall
epsilon_.boundaryField().updateCoeffs(); epsilon_.boundaryField().updateCoeffs();
@ -307,6 +307,7 @@ void LRR::correct()
( (
fvm::ddt(epsilon_) fvm::ddt(epsilon_)
+ fvm::div(phi_, epsilon_) + fvm::div(phi_, epsilon_)
- fvm::Sp(fvc::div(phi_), epsilon_)
//- fvm::laplacian(Ceps*(K/epsilon_)*R, epsilon_) //- fvm::laplacian(Ceps*(K/epsilon_)*R, epsilon_)
- fvm::laplacian(DepsilonEff(), epsilon_) - fvm::laplacian(DepsilonEff(), epsilon_)
== ==
@ -336,7 +337,7 @@ void LRR::correct()
{ {
label faceCelli = curPatch.faceCells()[facei]; label faceCelli = curPatch.faceCells()[facei];
P[faceCelli] 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::ddt(R_)
+ fvm::div(phi_, R_) + fvm::div(phi_, R_)
- fvm::Sp(fvc::div(phi_), R_)
//- fvm::laplacian(Cs*(k_/epsilon_)*R_, R_) //- fvm::laplacian(Cs*(k_/epsilon_)*R_, R_)
- fvm::laplacian(DREff(), R_) - fvm::laplacian(DREff(), R_)
+ fvm::Sp(Clrr1_*epsilon_/k_, R_) + fvm::Sp(Clrr1_*epsilon_/k_, R_)

View File

@ -329,7 +329,7 @@ void LaunderGibsonRSTM::correct()
} }
volSymmTensorField P = -twoSymm(R_ & fvc::grad(U_)); 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 // Update espsilon and G at the wall
epsilon_.boundaryField().updateCoeffs(); epsilon_.boundaryField().updateCoeffs();
@ -339,6 +339,7 @@ void LaunderGibsonRSTM::correct()
( (
fvm::ddt(epsilon_) fvm::ddt(epsilon_)
+ fvm::div(phi_, epsilon_) + fvm::div(phi_, epsilon_)
- fvm::Sp(fvc::div(phi_), epsilon_)
//- fvm::laplacian(Ceps*(k_/epsilon_)*R_, epsilon_) //- fvm::laplacian(Ceps*(k_/epsilon_)*R_, epsilon_)
- fvm::laplacian(DepsilonEff(), epsilon_) - fvm::laplacian(DepsilonEff(), epsilon_)
== ==
@ -368,7 +369,7 @@ void LaunderGibsonRSTM::correct()
{ {
label faceCelli = curPatch.faceCells()[facei]; label faceCelli = curPatch.faceCells()[facei];
P[faceCelli] *= 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::ddt(R_)
+ fvm::div(phi_, R_) + fvm::div(phi_, R_)
- fvm::Sp(fvc::div(phi_), R_)
//- fvm::laplacian(Cs*(k_/epsilon_)*R_, R_) //- fvm::laplacian(Cs*(k_/epsilon_)*R_, R_)
- fvm::laplacian(DREff(), R_) - fvm::laplacian(DREff(), R_)
+ fvm::Sp(Clg1_*epsilon_/k_, R_) + fvm::Sp(Clg1_*epsilon_/k_, R_)