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:
@ -77,6 +77,9 @@ makeRASModel(kEpsilon);
|
|||||||
#include "kOmegaSST.H"
|
#include "kOmegaSST.H"
|
||||||
makeRASModel(kOmegaSST);
|
makeRASModel(kOmegaSST);
|
||||||
|
|
||||||
|
#include "kOmegaSSTSato.H"
|
||||||
|
makeRASModel(kOmegaSSTSato);
|
||||||
|
|
||||||
#include "Smagorinsky.H"
|
#include "Smagorinsky.H"
|
||||||
makeLESModel(Smagorinsky);
|
makeLESModel(Smagorinsky);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2014-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -79,9 +79,6 @@ makeRASModel(kEpsilon);
|
|||||||
#include "kOmegaSST.H"
|
#include "kOmegaSST.H"
|
||||||
makeRASModel(kOmegaSST);
|
makeRASModel(kOmegaSST);
|
||||||
|
|
||||||
#include "kOmegaSSTSato.H"
|
|
||||||
makeRASModel(kOmegaSSTSato);
|
|
||||||
|
|
||||||
#include "mixtureKEpsilon.H"
|
#include "mixtureKEpsilon.H"
|
||||||
makeRASModel(mixtureKEpsilon);
|
makeRASModel(mixtureKEpsilon);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2014-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -25,7 +25,8 @@ License
|
|||||||
|
|
||||||
#include "kOmegaSSTSato.H"
|
#include "kOmegaSSTSato.H"
|
||||||
#include "fvOptions.H"
|
#include "fvOptions.H"
|
||||||
#include "twoPhaseSystem.H"
|
#include "phaseSystem.H"
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -61,7 +62,14 @@ kOmegaSSTSato<BasicTurbulenceModel>::kOmegaSSTSato
|
|||||||
type
|
type
|
||||||
),
|
),
|
||||||
|
|
||||||
gasTurbulencePtr_(nullptr),
|
phase_(transport),
|
||||||
|
|
||||||
|
hasDispersedPhaseNames_(this->coeffDict_.found("dispersedPhases")),
|
||||||
|
|
||||||
|
dispersedPhaseNames_
|
||||||
|
(
|
||||||
|
this->coeffDict_.lookupOrDefault("dispersedPhases", hashedWordList())
|
||||||
|
),
|
||||||
|
|
||||||
Cmub_
|
Cmub_
|
||||||
(
|
(
|
||||||
@ -97,35 +105,50 @@ bool kOmegaSSTSato<BasicTurbulenceModel>::read()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class BasicTurbulenceModel>
|
template<class BasicTurbulenceModel>
|
||||||
const PhaseCompressibleTurbulenceModel
|
UPtrList<const phaseModel>
|
||||||
<
|
kOmegaSSTSato<BasicTurbulenceModel>::getDispersedPhases() const
|
||||||
typename BasicTurbulenceModel::transportModel
|
|
||||||
>&
|
|
||||||
kOmegaSSTSato<BasicTurbulenceModel>::gasTurbulence() 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();
|
forAll(dispersedPhaseNames_, dispersedPhasei)
|
||||||
const twoPhaseSystem& fluid =
|
{
|
||||||
refCast<const twoPhaseSystem>(liquid.fluid());
|
dispersedPhases.set
|
||||||
const transportModel& gas = fluid.otherPhase(liquid);
|
|
||||||
|
|
||||||
gasTurbulencePtr_ =
|
|
||||||
&U.db()
|
|
||||||
.lookupObject<PhaseCompressibleTurbulenceModel<transportModel>>
|
|
||||||
(
|
(
|
||||||
IOobject::groupName
|
dispersedPhasei,
|
||||||
(
|
&fluid.phases()[dispersedPhaseNames_[dispersedPhasei]]
|
||||||
turbulenceModel::propertiesName,
|
|
||||||
gas.name()
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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 volScalarField& F2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const PhaseCompressibleTurbulenceModel<transportModel>& gasTurbulence =
|
|
||||||
this->gasTurbulence();
|
|
||||||
|
|
||||||
volScalarField yPlus
|
volScalarField yPlus
|
||||||
(
|
(
|
||||||
pow(this->betaStar_, 0.25)*this->y_*sqrt(this->k_)/this->nu()
|
pow(this->betaStar_, 0.25)*this->y_*sqrt(this->k_)/this->nu()
|
||||||
);
|
);
|
||||||
|
|
||||||
this->nut_ =
|
this->nut_ =
|
||||||
this->a1_*this->k_/max(this->a1_*this->omega_, this->b1_*F2*sqrt(S2))
|
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()
|
UPtrList<const phaseModel> dispersedPhases(getDispersedPhases());
|
||||||
*(mag(this->U_ - gasTurbulence.U()));
|
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();
|
this->nut_.correctBoundaryConditions();
|
||||||
fv::options::New(this->mesh_).correct(this->nut_);
|
fv::options::New(this->mesh_).correct(this->nut_);
|
||||||
|
|||||||
@ -54,7 +54,7 @@ Description
|
|||||||
|
|
||||||
Note that this implementation is written in terms of alpha diffusion
|
Note that this implementation is written in terms of alpha diffusion
|
||||||
coefficients rather than the more traditional sigma (alpha = 1/sigma) so
|
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
|
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.
|
consistent with the blending of the k-epsilon and k-omega models.
|
||||||
|
|
||||||
@ -90,9 +90,6 @@ Description
|
|||||||
}
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
kOmegaSST.C
|
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
kOmegaSSTSato.C
|
kOmegaSSTSato.C
|
||||||
|
|
||||||
@ -102,6 +99,8 @@ SourceFiles
|
|||||||
#define kOmegaSSTSato_H
|
#define kOmegaSSTSato_H
|
||||||
|
|
||||||
#include "kOmegaSST.H"
|
#include "kOmegaSST.H"
|
||||||
|
#include "phaseSystem.H"
|
||||||
|
#include "hashedWordList.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -121,20 +120,19 @@ class kOmegaSSTSato
|
|||||||
{
|
{
|
||||||
// Private Data
|
// Private Data
|
||||||
|
|
||||||
mutable const PhaseCompressibleTurbulenceModel
|
//- The phase to which the turbulent model is applied to
|
||||||
<
|
const phaseModel& phase_;
|
||||||
typename BasicTurbulenceModel::transportModel
|
|
||||||
> *gasTurbulencePtr_;
|
|
||||||
|
|
||||||
|
//- 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
|
// Private Member Functions
|
||||||
|
|
||||||
//- Return the turbulence model for the gas phase
|
//- Return the dispersed phase models
|
||||||
const PhaseCompressibleTurbulenceModel
|
UPtrList<const phaseModel> getDispersedPhases() const;
|
||||||
<
|
|
||||||
typename BasicTurbulenceModel::transportModel
|
|
||||||
>&
|
|
||||||
gasTurbulence() const;
|
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@ -19,7 +19,7 @@ simulationType RAS;
|
|||||||
|
|
||||||
RAS
|
RAS
|
||||||
{
|
{
|
||||||
RASModel kOmegaSST;
|
RASModel kOmegaSSTSato;
|
||||||
|
|
||||||
turbulence on;
|
turbulence on;
|
||||||
printCoeffs on;
|
printCoeffs on;
|
||||||
|
|||||||
@ -114,6 +114,7 @@ functions
|
|||||||
operation sum;
|
operation sum;
|
||||||
fields ( alphaRhoPhi.gas alphaRhoPhi.gas2 alphaRhoPhi.liquid );
|
fields ( alphaRhoPhi.gas alphaRhoPhi.gas2 alphaRhoPhi.liquid );
|
||||||
}
|
}
|
||||||
|
#includeFunc writeObjects(d.gas, d.gas2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -114,6 +114,7 @@ functions
|
|||||||
operation sum;
|
operation sum;
|
||||||
fields ( alphaRhoPhi.gas alphaRhoPhi.liquid );
|
fields ( alphaRhoPhi.gas alphaRhoPhi.liquid );
|
||||||
}
|
}
|
||||||
|
#includeFunc writeObjects(d.gas)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user