mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
LRR: Added support for fvOptions
This commit is contained in:
@ -24,6 +24,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "LRR.H"
|
#include "LRR.H"
|
||||||
|
#include "fvOptions.H"
|
||||||
#include "wallFvPatch.H"
|
#include "wallFvPatch.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -40,6 +41,7 @@ void LRR<BasicTurbulenceModel>::correctNut()
|
|||||||
{
|
{
|
||||||
this->nut_ = this->Cmu_*sqr(k_)/epsilon_;
|
this->nut_ = this->Cmu_*sqr(k_)/epsilon_;
|
||||||
this->nut_.correctBoundaryConditions();
|
this->nut_.correctBoundaryConditions();
|
||||||
|
fv::options::New(this->mesh_).correct(this->nut_);
|
||||||
|
|
||||||
BasicTurbulenceModel::correctNut();
|
BasicTurbulenceModel::correctNut();
|
||||||
}
|
}
|
||||||
@ -280,6 +282,7 @@ void LRR<BasicTurbulenceModel>::correct()
|
|||||||
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
||||||
const volVectorField& U = this->U_;
|
const volVectorField& U = this->U_;
|
||||||
volSymmTensorField& R = this->R_;
|
volSymmTensorField& R = this->R_;
|
||||||
|
fv::options& fvOptions(fv::options::New(this->mesh_));
|
||||||
|
|
||||||
ReynoldsStress<RASModel<BasicTurbulenceModel> >::correct();
|
ReynoldsStress<RASModel<BasicTurbulenceModel> >::correct();
|
||||||
|
|
||||||
@ -301,13 +304,14 @@ void LRR<BasicTurbulenceModel>::correct()
|
|||||||
==
|
==
|
||||||
Ceps1_*alpha*rho*G*epsilon_/k_
|
Ceps1_*alpha*rho*G*epsilon_/k_
|
||||||
- fvm::Sp(Ceps2_*alpha*rho*epsilon_/k_, epsilon_)
|
- fvm::Sp(Ceps2_*alpha*rho*epsilon_/k_, epsilon_)
|
||||||
|
+ fvOptions(alpha, rho, epsilon_)
|
||||||
);
|
);
|
||||||
|
|
||||||
epsEqn().relax();
|
epsEqn().relax();
|
||||||
|
fvOptions.constrain(epsEqn());
|
||||||
epsEqn().boundaryManipulate(epsilon_.boundaryField());
|
epsEqn().boundaryManipulate(epsilon_.boundaryField());
|
||||||
|
|
||||||
solve(epsEqn);
|
solve(epsEqn);
|
||||||
|
fvOptions.correct(epsilon_);
|
||||||
bound(epsilon_, this->epsilonMin_);
|
bound(epsilon_, this->epsilonMin_);
|
||||||
|
|
||||||
|
|
||||||
@ -344,6 +348,7 @@ void LRR<BasicTurbulenceModel>::correct()
|
|||||||
alpha*rho*P
|
alpha*rho*P
|
||||||
- (2.0/3.0*(1 - C1_)*I)*alpha*rho*epsilon_
|
- (2.0/3.0*(1 - C1_)*I)*alpha*rho*epsilon_
|
||||||
- C2_*alpha*rho*dev(P)
|
- C2_*alpha*rho*dev(P)
|
||||||
|
+ fvOptions(alpha, rho, R)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Optionally add wall-refection term
|
// Optionally add wall-refection term
|
||||||
@ -363,7 +368,9 @@ void LRR<BasicTurbulenceModel>::correct()
|
|||||||
}
|
}
|
||||||
|
|
||||||
REqn().relax();
|
REqn().relax();
|
||||||
|
fvOptions.constrain(REqn());
|
||||||
solve(REqn);
|
solve(REqn);
|
||||||
|
fvOptions.correct(R);
|
||||||
|
|
||||||
this->boundNormalStress(R);
|
this->boundNormalStress(R);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user