Commit 5f7ad8b8 authored by Henry Weller's avatar Henry Weller
Browse files

v2f: Added support for fvOptions

parent a7490193
......@@ -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();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment