mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
v2f: Added support for fvOptions
This commit is contained in:
@ -24,6 +24,7 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "v2f.H"
|
||||
#include "fvOptions.H"
|
||||
#include "bound.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -56,6 +57,7 @@ void v2f<BasicTurbulenceModel>::correctNut()
|
||||
{
|
||||
this->nut_ = min(CmuKEps_*sqr(k_)/epsilon_, this->Cmu_*v2_*Ts());
|
||||
this->nut_.correctBoundaryConditions();
|
||||
fv::options::New(this->mesh_).correct(this->nut_);
|
||||
|
||||
BasicTurbulenceModel::correctNut();
|
||||
}
|
||||
@ -284,6 +286,7 @@ void v2f<BasicTurbulenceModel>::correct()
|
||||
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
||||
const volVectorField& U = this->U_;
|
||||
volScalarField& nut = this->nut_;
|
||||
fv::options& fvOptions(fv::options::New(this->mesh_));
|
||||
|
||||
eddyViscosity<RASModel<BasicTurbulenceModel> >::correct();
|
||||
|
||||
@ -323,13 +326,14 @@ void v2f<BasicTurbulenceModel>::correct()
|
||||
Ceps1*alpha*rho*G/Ts
|
||||
- fvm::SuSp(((2.0/3.0)*Ceps1 + Ceps3_)*alpha*rho*divU, epsilon_)
|
||||
- fvm::Sp(Ceps2_*alpha*rho/Ts, epsilon_)
|
||||
+ fvOptions(alpha, rho, epsilon_)
|
||||
);
|
||||
|
||||
epsEqn().relax();
|
||||
|
||||
fvOptions.constrain(epsEqn());
|
||||
epsEqn().boundaryManipulate(epsilon_.boundaryField());
|
||||
|
||||
solve(epsEqn);
|
||||
fvOptions.correct(epsilon_);
|
||||
bound(epsilon_, this->epsilonMin_);
|
||||
|
||||
|
||||
@ -343,10 +347,13 @@ void v2f<BasicTurbulenceModel>::correct()
|
||||
alpha*rho*G
|
||||
- fvm::SuSp((2.0/3.0)*alpha*rho*divU, k_)
|
||||
- fvm::Sp(alpha*rho*epsilon_/k_, k_)
|
||||
+ fvOptions(alpha, rho, k_)
|
||||
);
|
||||
|
||||
kEqn().relax();
|
||||
fvOptions.constrain(kEqn());
|
||||
solve(kEqn);
|
||||
fvOptions.correct(k_);
|
||||
bound(k_, this->kMin_);
|
||||
|
||||
|
||||
@ -357,10 +364,13 @@ void v2f<BasicTurbulenceModel>::correct()
|
||||
==
|
||||
- fvm::Sp(1.0/L2, f_)
|
||||
- 1.0/L2/k_*(v2fAlpha - C2_*G)
|
||||
+ fvOptions(alpha, rho, f_)
|
||||
);
|
||||
|
||||
fEqn().relax();
|
||||
fvOptions.constrain(fEqn());
|
||||
solve(fEqn);
|
||||
fvOptions.correct(f_);
|
||||
bound(f_, fMin_);
|
||||
|
||||
|
||||
@ -373,10 +383,13 @@ void v2f<BasicTurbulenceModel>::correct()
|
||||
==
|
||||
alpha*rho*min(k_*f_, C2_*G - v2fAlpha)
|
||||
- fvm::Sp(N*alpha*rho*epsilon_/k_, v2_)
|
||||
+ fvOptions(alpha, rho, v2_)
|
||||
);
|
||||
|
||||
v2Eqn().relax();
|
||||
fvOptions.constrain(v2Eqn());
|
||||
solve(v2Eqn);
|
||||
fvOptions.correct(v2_);
|
||||
bound(v2_, v2Min_);
|
||||
|
||||
correctNut();
|
||||
|
||||
Reference in New Issue
Block a user