From cf51874c283d38f8fb6b658669979988ed545326 Mon Sep 17 00:00:00 2001 From: Henry Weller <http://cfd.direct> Date: Thu, 3 Dec 2015 13:11:49 +0000 Subject: [PATCH] v2f: Added support for fvOptions --- .../turbulenceModels/RAS/v2f/v2f.C | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C b/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C index 4a76ee1870..df1597cba3 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C @@ -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(); -- GitLab