Skip to content
Permalink
Browse files

kOmega: Added support for k and omega sources in derived models

Updated sources to use internal fields.
  • Loading branch information...
Henry Weller
Henry Weller committed Jan 10, 2019
1 parent 66c26af commit f5d684b0343f4121e9f09769a4f919e74dff4d2d
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -195,13 +195,16 @@ void kOmega<BasicTurbulenceModel>::correct()

eddyViscosity<RASModel<BasicTurbulenceModel>>::correct();

volScalarField divU(fvc::div(fvc::absolute(this->phi(), U)));
volScalarField::Internal divU
(
fvc::div(fvc::absolute(this->phi(), U))().v()
);

tmp<volTensorField> tgradU = fvc::grad(U);
volScalarField G
volScalarField::Internal G
(
this->GName(),
nut*(tgradU() && dev(twoSymm(tgradU())))
nut.v()*(dev(twoSymm(tgradU().v())) && tgradU().v())
);
tgradU.clear();

@@ -215,9 +218,10 @@ void kOmega<BasicTurbulenceModel>::correct()
+ fvm::div(alphaRhoPhi, omega_)
- fvm::laplacian(alpha*rho*DomegaEff(), omega_)
==
gamma_*alpha*rho*G*omega_/k_
- fvm::SuSp(((2.0/3.0)*gamma_)*alpha*rho*divU, omega_)
- fvm::Sp(beta_*alpha*rho*omega_, omega_)
gamma_*alpha()*rho()*G*omega_()/k_()
- fvm::SuSp(((2.0/3.0)*gamma_)*alpha()*rho()*divU, omega_)
- fvm::Sp(beta_*alpha()*rho()*omega_(), omega_)
+ omegaSource()
+ fvOptions(alpha, rho, omega_)
);

@@ -236,9 +240,10 @@ void kOmega<BasicTurbulenceModel>::correct()
+ fvm::div(alphaRhoPhi, k_)
- fvm::laplacian(alpha*rho*DkEff(), k_)
==
alpha*rho*G
- fvm::SuSp((2.0/3.0)*alpha*rho*divU, k_)
- fvm::Sp(Cmu_*alpha*rho*omega_, k_)
alpha()*rho()*G
- fvm::SuSp((2.0/3.0)*alpha()*rho()*divU, k_)
- fvm::Sp(Cmu_*alpha()*rho()*omega_(), k_)
+ kSource()
+ fvOptions(alpha, rho, k_)
);

@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -97,6 +97,8 @@ protected:
// Protected Member Functions

virtual void correctNut();
virtual tmp<fvScalarMatrix> kSource() const;
virtual tmp<fvScalarMatrix> omegaSource() const;


public:

0 comments on commit f5d684b

Please sign in to comment.
You can’t perform that action at this time.