mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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_)
|
||||
|
||||
@ -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_)
|
||||
|
||||
Reference in New Issue
Block a user