TurbulenceModels/.../kOmegaSSTSato: Made multiphase

The kOmegaSSTSata model can now be used in multiphase cases, provided
that there is a single, well defined continuous phase. As previously,
the continuous phase is the phase for which the model is selected (i.e.,
in the constant/turbulenceProperties.<continuous-phase-name>
dictionary).

By default, now, all other moving phases are considered to be dispersed
bubble phases, and the effect of all of them is summed to calculate the
overall bubble induced turbulence.

This behaviour can be overridden by means of a "dispersedPhases" entry,
which takes a list of the phases to be considered dispersed by the
model.

Patch contributed by Timo Niemi, VTT.
This commit is contained in:
Will Bainbridge
2019-12-20 15:06:58 +00:00
parent 89023d2f5d
commit 8ce46619b6
7 changed files with 76 additions and 50 deletions

View File

@ -77,6 +77,9 @@ makeRASModel(kEpsilon);
#include "kOmegaSST.H"
makeRASModel(kOmegaSST);
#include "kOmegaSSTSato.H"
makeRASModel(kOmegaSSTSato);
#include "Smagorinsky.H"
makeLESModel(Smagorinsky);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2014-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2014-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -79,9 +79,6 @@ makeRASModel(kEpsilon);
#include "kOmegaSST.H"
makeRASModel(kOmegaSST);
#include "kOmegaSSTSato.H"
makeRASModel(kOmegaSSTSato);
#include "mixtureKEpsilon.H"
makeRASModel(mixtureKEpsilon);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2014-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2014-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -25,7 +25,8 @@ License
#include "kOmegaSSTSato.H"
#include "fvOptions.H"
#include "twoPhaseSystem.H"
#include "phaseSystem.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -61,7 +62,14 @@ kOmegaSSTSato<BasicTurbulenceModel>::kOmegaSSTSato
type
),
gasTurbulencePtr_(nullptr),
phase_(transport),
hasDispersedPhaseNames_(this->coeffDict_.found("dispersedPhases")),
dispersedPhaseNames_
(
this->coeffDict_.lookupOrDefault("dispersedPhases", hashedWordList())
),
Cmub_
(
@ -97,35 +105,50 @@ bool kOmegaSSTSato<BasicTurbulenceModel>::read()
}
}
template<class BasicTurbulenceModel>
const PhaseCompressibleTurbulenceModel
<
typename BasicTurbulenceModel::transportModel
>&
kOmegaSSTSato<BasicTurbulenceModel>::gasTurbulence() const
UPtrList<const phaseModel>
kOmegaSSTSato<BasicTurbulenceModel>::getDispersedPhases() const
{
if (!gasTurbulencePtr_)
UPtrList<const phaseModel> dispersedPhases;
const phaseSystem& fluid = phase_.fluid();
if (hasDispersedPhaseNames_)
{
const volVectorField& U = this->U_;
dispersedPhases.resize(dispersedPhaseNames_.size());
const transportModel& liquid = this->transport();
const twoPhaseSystem& fluid =
refCast<const twoPhaseSystem>(liquid.fluid());
const transportModel& gas = fluid.otherPhase(liquid);
gasTurbulencePtr_ =
&U.db()
.lookupObject<PhaseCompressibleTurbulenceModel<transportModel>>
forAll(dispersedPhaseNames_, dispersedPhasei)
{
dispersedPhases.set
(
IOobject::groupName
(
turbulenceModel::propertiesName,
gas.name()
)
dispersedPhasei,
&fluid.phases()[dispersedPhaseNames_[dispersedPhasei]]
);
}
}
else
{
dispersedPhases.resize(fluid.movingPhases().size() - 1);
label dispersedPhasei = 0;
forAll(fluid.movingPhases(), movingPhasei)
{
const phaseModel& otherPhase = fluid.movingPhases()[movingPhasei];
if (&otherPhase != &phase_)
{
dispersedPhases.set
(
dispersedPhasei ++,
&otherPhase
);
}
}
}
return *gasTurbulencePtr_;
return dispersedPhases;
}
@ -136,19 +159,22 @@ void kOmegaSSTSato<BasicTurbulenceModel>::correctNut
const volScalarField& F2
)
{
const PhaseCompressibleTurbulenceModel<transportModel>& gasTurbulence =
this->gasTurbulence();
volScalarField yPlus
(
pow(this->betaStar_, 0.25)*this->y_*sqrt(this->k_)/this->nu()
);
this->nut_ =
this->a1_*this->k_/max(this->a1_*this->omega_, this->b1_*F2*sqrt(S2))
+ sqr(1 - exp(-yPlus/16.0))
*Cmub_*gasTurbulence.transport().d()*gasTurbulence.alpha()
*(mag(this->U_ - gasTurbulence.U()));
this->a1_*this->k_/max(this->a1_*this->omega_, this->b1_*F2*sqrt(S2));
UPtrList<const phaseModel> dispersedPhases(getDispersedPhases());
forAllIter(UPtrList<const phaseModel>, dispersedPhases, phaseIter)
{
this->nut_ +=
sqr(1 - exp(-yPlus/16.0))
*Cmub_*phaseIter().d()*phaseIter()
*(mag(this->U_ - phaseIter().U()));
}
this->nut_.correctBoundaryConditions();
fv::options::New(this->mesh_).correct(this->nut_);

View File

@ -54,7 +54,7 @@ Description
Note that this implementation is written in terms of alpha diffusion
coefficients rather than the more traditional sigma (alpha = 1/sigma) so
that the blending can be applied to all coefficuients in a consistent
that the blending can be applied to all coefficients in a consistent
manner. The paper suggests that sigma is blended but this would not be
consistent with the blending of the k-epsilon and k-omega models.
@ -90,9 +90,6 @@ Description
}
\endverbatim
SourceFiles
kOmegaSST.C
SourceFiles
kOmegaSSTSato.C
@ -102,6 +99,8 @@ SourceFiles
#define kOmegaSSTSato_H
#include "kOmegaSST.H"
#include "phaseSystem.H"
#include "hashedWordList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -121,20 +120,19 @@ class kOmegaSSTSato
{
// Private Data
mutable const PhaseCompressibleTurbulenceModel
<
typename BasicTurbulenceModel::transportModel
> *gasTurbulencePtr_;
//- The phase to which the turbulent model is applied to
const phaseModel& phase_;
//- True if a list of dispersed phases is specified in the dictionary
bool hasDispersedPhaseNames_;
//- Optional list of names of dispersed phases
hashedWordList dispersedPhaseNames_;
// Private Member Functions
//- Return the turbulence model for the gas phase
const PhaseCompressibleTurbulenceModel
<
typename BasicTurbulenceModel::transportModel
>&
gasTurbulence() const;
//- Return the dispersed phase models
UPtrList<const phaseModel> getDispersedPhases() const;
protected:

View File

@ -19,7 +19,7 @@ simulationType RAS;
RAS
{
RASModel kOmegaSST;
RASModel kOmegaSSTSato;
turbulence on;
printCoeffs on;

View File

@ -114,6 +114,7 @@ functions
operation sum;
fields ( alphaRhoPhi.gas alphaRhoPhi.gas2 alphaRhoPhi.liquid );
}
#includeFunc writeObjects(d.gas, d.gas2)
}

View File

@ -114,6 +114,7 @@ functions
operation sum;
fields ( alphaRhoPhi.gas alphaRhoPhi.liquid );
}
#includeFunc writeObjects(d.gas)
}