mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
TurbulenceModels/phaseIncompressible/LES: Three new LES SGS models for two-phase flow
This commit is contained in:
237
src/TurbulenceModels/phaseIncompressible/LES/Niceno/NicenoKEqn.C
Normal file
237
src/TurbulenceModels/phaseIncompressible/LES/Niceno/NicenoKEqn.C
Normal file
@ -0,0 +1,237 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "NicenoKEqn.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "twoPhaseSystem.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace LESModels
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
NicenoKEqn<BasicTurbulenceModel>::NicenoKEqn
|
||||||
|
(
|
||||||
|
const alphaField& alpha,
|
||||||
|
const rhoField& rho,
|
||||||
|
const volVectorField& U,
|
||||||
|
const surfaceScalarField& alphaPhi,
|
||||||
|
const surfaceScalarField& phi,
|
||||||
|
const transportModel& transport,
|
||||||
|
const word& propertiesName,
|
||||||
|
const word& type
|
||||||
|
)
|
||||||
|
:
|
||||||
|
kEqn<BasicTurbulenceModel>
|
||||||
|
(
|
||||||
|
alpha,
|
||||||
|
rho,
|
||||||
|
U,
|
||||||
|
alphaPhi,
|
||||||
|
phi,
|
||||||
|
transport,
|
||||||
|
propertiesName,
|
||||||
|
type
|
||||||
|
),
|
||||||
|
|
||||||
|
gasTurbulencePtr_(NULL),
|
||||||
|
|
||||||
|
alphaInversion_
|
||||||
|
(
|
||||||
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
(
|
||||||
|
"alphaInversion",
|
||||||
|
this->coeffDict_,
|
||||||
|
0.3
|
||||||
|
)
|
||||||
|
),
|
||||||
|
|
||||||
|
Cp_
|
||||||
|
(
|
||||||
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
(
|
||||||
|
"Cp",
|
||||||
|
this->coeffDict_,
|
||||||
|
this->Ck_.value()
|
||||||
|
)
|
||||||
|
),
|
||||||
|
|
||||||
|
Cmub_
|
||||||
|
(
|
||||||
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
(
|
||||||
|
"Cmub",
|
||||||
|
this->coeffDict_,
|
||||||
|
0.6
|
||||||
|
)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
if (type == typeName)
|
||||||
|
{
|
||||||
|
correctNut();
|
||||||
|
this->printCoeffs(type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
bool NicenoKEqn<BasicTurbulenceModel>::read()
|
||||||
|
{
|
||||||
|
if (kEqn<BasicTurbulenceModel>::read())
|
||||||
|
{
|
||||||
|
alphaInversion_.readIfPresent(this->coeffDict());
|
||||||
|
Cp_.readIfPresent(this->coeffDict());
|
||||||
|
Cmub_.readIfPresent(this->coeffDict());
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
const PhaseIncompressibleTurbulenceModel
|
||||||
|
<
|
||||||
|
typename BasicTurbulenceModel::transportModel
|
||||||
|
>&
|
||||||
|
NicenoKEqn<BasicTurbulenceModel>::gasTurbulence() const
|
||||||
|
{
|
||||||
|
if (!gasTurbulencePtr_)
|
||||||
|
{
|
||||||
|
const volVectorField& U = this->U_;
|
||||||
|
|
||||||
|
const transportModel& liquid = this->transport();
|
||||||
|
const twoPhaseSystem& fluid = liquid.fluid();
|
||||||
|
const transportModel& gas = fluid.otherPhase(liquid);
|
||||||
|
|
||||||
|
gasTurbulencePtr_ =
|
||||||
|
&U.db()
|
||||||
|
.lookupObject<PhaseIncompressibleTurbulenceModel<transportModel> >
|
||||||
|
(
|
||||||
|
IOobject::groupName
|
||||||
|
(
|
||||||
|
turbulenceModel::propertiesName,
|
||||||
|
gas.name()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return *gasTurbulencePtr_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
void NicenoKEqn<BasicTurbulenceModel>::correctNut()
|
||||||
|
{
|
||||||
|
const PhaseIncompressibleTurbulenceModel<transportModel>& gasTurbulence =
|
||||||
|
this->gasTurbulence();
|
||||||
|
|
||||||
|
this->nut_ =
|
||||||
|
this->Ck_*sqrt(this->k_)*this->delta()
|
||||||
|
+ Cmub_*gasTurbulence.transport().d()*gasTurbulence.alpha()
|
||||||
|
*(mag(this->U_ - gasTurbulence.U()));
|
||||||
|
|
||||||
|
this->nut_.correctBoundaryConditions();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
tmp<volScalarField> NicenoKEqn<BasicTurbulenceModel>::bubbleG() const
|
||||||
|
{
|
||||||
|
const PhaseIncompressibleTurbulenceModel<transportModel>& gasTurbulence =
|
||||||
|
this->gasTurbulence();
|
||||||
|
|
||||||
|
const transportModel& liquid = this->transport();
|
||||||
|
const twoPhaseSystem& fluid = liquid.fluid();
|
||||||
|
const transportModel& gas = fluid.otherPhase(liquid);
|
||||||
|
|
||||||
|
volScalarField magUr(mag(this->U_ - gasTurbulence.U()));
|
||||||
|
|
||||||
|
tmp<volScalarField> bubbleG
|
||||||
|
(
|
||||||
|
Cp_*gas*sqr(magUr)*fluid.drag(gas).K(magUr)/liquid.rho()
|
||||||
|
);
|
||||||
|
|
||||||
|
return bubbleG;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
tmp<volScalarField>
|
||||||
|
NicenoKEqn<BasicTurbulenceModel>::phaseTransferCoeff() const
|
||||||
|
{
|
||||||
|
const volVectorField& U = this->U_;
|
||||||
|
const alphaField& alpha = this->alpha_;
|
||||||
|
const rhoField& rho = this->rho_;
|
||||||
|
|
||||||
|
const turbulenceModel& gasTurbulence = this->gasTurbulence();
|
||||||
|
|
||||||
|
return
|
||||||
|
(
|
||||||
|
max(alphaInversion_ - alpha, 0.0)
|
||||||
|
*rho
|
||||||
|
*min
|
||||||
|
(
|
||||||
|
this->Ce_*sqrt(gasTurbulence.k())/this->delta(),
|
||||||
|
1.0/U.time().deltaT()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
tmp<fvScalarMatrix> NicenoKEqn<BasicTurbulenceModel>::kSource() const
|
||||||
|
{
|
||||||
|
const alphaField& alpha = this->alpha_;
|
||||||
|
const rhoField& rho = this->rho_;
|
||||||
|
|
||||||
|
const PhaseIncompressibleTurbulenceModel<transportModel>& gasTurbulence =
|
||||||
|
this->gasTurbulence();
|
||||||
|
|
||||||
|
const volScalarField phaseTransferCoeff(this->phaseTransferCoeff());
|
||||||
|
|
||||||
|
return
|
||||||
|
alpha*rho*bubbleG()
|
||||||
|
+ phaseTransferCoeff*gasTurbulence.k()
|
||||||
|
- fvm::Sp(phaseTransferCoeff, this->k_);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace LESModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
177
src/TurbulenceModels/phaseIncompressible/LES/Niceno/NicenoKEqn.H
Normal file
177
src/TurbulenceModels/phaseIncompressible/LES/Niceno/NicenoKEqn.H
Normal file
@ -0,0 +1,177 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::LESModels::NicenoKEqn
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpLESTurbulence
|
||||||
|
|
||||||
|
Description
|
||||||
|
One-equation SGS model for the continuous phase in a two-phase system
|
||||||
|
including bubble-generated turbulence.
|
||||||
|
|
||||||
|
Reference:
|
||||||
|
\verbatim
|
||||||
|
"One-equation sub-grid scale (SGS) modelling for Euler-Euler
|
||||||
|
large eddy simulation (EELES) of dispersed bubbly flow"
|
||||||
|
B. Niceno,
|
||||||
|
M.T. Dhotre,
|
||||||
|
N.G. Dee
|
||||||
|
Chemical Engineering Science 63 (2008) pp. 3923-3931.
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
The default model coefficients correspond to the following:
|
||||||
|
\verbatim
|
||||||
|
NicenoKEqnCoeffs
|
||||||
|
{
|
||||||
|
Ck 0.094;
|
||||||
|
Ce 1.048;
|
||||||
|
alphaInversion 0.3;
|
||||||
|
Cp Ck;
|
||||||
|
Cmub 0.6;
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
NicenoKEqn.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef NicenoKEqn_H
|
||||||
|
#define NicenoKEqn_H
|
||||||
|
|
||||||
|
#include "kEqn.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace LESModels
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class NicenoKEqn Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
class NicenoKEqn
|
||||||
|
:
|
||||||
|
public kEqn<BasicTurbulenceModel>
|
||||||
|
{
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
mutable const PhaseIncompressibleTurbulenceModel
|
||||||
|
<
|
||||||
|
typename BasicTurbulenceModel::transportModel
|
||||||
|
> *gasTurbulencePtr_;
|
||||||
|
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Return the turbulence model for the gas phase
|
||||||
|
const PhaseIncompressibleTurbulenceModel
|
||||||
|
<
|
||||||
|
typename BasicTurbulenceModel::transportModel
|
||||||
|
>&
|
||||||
|
gasTurbulence() const;
|
||||||
|
|
||||||
|
// Disallow default bitwise copy construct and assignment
|
||||||
|
NicenoKEqn(const NicenoKEqn&);
|
||||||
|
NicenoKEqn& operator=(const NicenoKEqn&);
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
// Protected data
|
||||||
|
|
||||||
|
// Model coefficients
|
||||||
|
|
||||||
|
dimensionedScalar alphaInversion_;
|
||||||
|
dimensionedScalar Cp_;
|
||||||
|
dimensionedScalar Cmub_;
|
||||||
|
|
||||||
|
|
||||||
|
// Protected Member Functions
|
||||||
|
|
||||||
|
virtual void correctNut();
|
||||||
|
tmp<volScalarField> bubbleG() const;
|
||||||
|
tmp<volScalarField> phaseTransferCoeff() const;
|
||||||
|
virtual tmp<fvScalarMatrix> kSource() const;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
typedef typename BasicTurbulenceModel::alphaField alphaField;
|
||||||
|
typedef typename BasicTurbulenceModel::rhoField rhoField;
|
||||||
|
typedef typename BasicTurbulenceModel::transportModel transportModel;
|
||||||
|
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("NicenoKEqn");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from components
|
||||||
|
NicenoKEqn
|
||||||
|
(
|
||||||
|
const alphaField& alpha,
|
||||||
|
const rhoField& rho,
|
||||||
|
const volVectorField& U,
|
||||||
|
const surfaceScalarField& alphaPhi,
|
||||||
|
const surfaceScalarField& phi,
|
||||||
|
const transportModel& transport,
|
||||||
|
const word& propertiesName = turbulenceModel::propertiesName,
|
||||||
|
const word& type = typeName
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~NicenoKEqn()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Read model coefficients if they have changed
|
||||||
|
virtual bool read();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace LESModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
# include "NicenoKEqn.C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,153 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "SmagorinskyZhang.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace LESModels
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
SmagorinskyZhang<BasicTurbulenceModel>::SmagorinskyZhang
|
||||||
|
(
|
||||||
|
const alphaField& alpha,
|
||||||
|
const rhoField& rho,
|
||||||
|
const volVectorField& U,
|
||||||
|
const surfaceScalarField& alphaPhi,
|
||||||
|
const surfaceScalarField& phi,
|
||||||
|
const transportModel& transport,
|
||||||
|
const word& propertiesName,
|
||||||
|
const word& type
|
||||||
|
)
|
||||||
|
:
|
||||||
|
Smagorinsky<BasicTurbulenceModel>
|
||||||
|
(
|
||||||
|
alpha,
|
||||||
|
rho,
|
||||||
|
U,
|
||||||
|
alphaPhi,
|
||||||
|
phi,
|
||||||
|
transport,
|
||||||
|
propertiesName,
|
||||||
|
type
|
||||||
|
),
|
||||||
|
|
||||||
|
gasTurbulencePtr_(NULL),
|
||||||
|
|
||||||
|
Cmub_
|
||||||
|
(
|
||||||
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
(
|
||||||
|
"Cmub",
|
||||||
|
this->coeffDict_,
|
||||||
|
0.6
|
||||||
|
)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
if (type == typeName)
|
||||||
|
{
|
||||||
|
correctNut();
|
||||||
|
this->printCoeffs(type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
bool SmagorinskyZhang<BasicTurbulenceModel>::read()
|
||||||
|
{
|
||||||
|
if (Smagorinsky<BasicTurbulenceModel>::read())
|
||||||
|
{
|
||||||
|
Cmub_.readIfPresent(this->coeffDict());
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
const PhaseIncompressibleTurbulenceModel
|
||||||
|
<
|
||||||
|
typename BasicTurbulenceModel::transportModel
|
||||||
|
>&
|
||||||
|
SmagorinskyZhang<BasicTurbulenceModel>::gasTurbulence() const
|
||||||
|
{
|
||||||
|
if (!gasTurbulencePtr_)
|
||||||
|
{
|
||||||
|
const volVectorField& U = this->U_;
|
||||||
|
|
||||||
|
const transportModel& liquid = this->transport();
|
||||||
|
const twoPhaseSystem& fluid = liquid.fluid();
|
||||||
|
const transportModel& gas = fluid.otherPhase(liquid);
|
||||||
|
|
||||||
|
gasTurbulencePtr_ =
|
||||||
|
&U.db()
|
||||||
|
.lookupObject<PhaseIncompressibleTurbulenceModel<transportModel> >
|
||||||
|
(
|
||||||
|
IOobject::groupName
|
||||||
|
(
|
||||||
|
turbulenceModel::propertiesName,
|
||||||
|
gas.name()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return *gasTurbulencePtr_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
void SmagorinskyZhang<BasicTurbulenceModel>::correctNut()
|
||||||
|
{
|
||||||
|
const PhaseIncompressibleTurbulenceModel<transportModel>& gasTurbulence =
|
||||||
|
this->gasTurbulence();
|
||||||
|
|
||||||
|
volScalarField k(this->k(fvc::grad(this->U_)));
|
||||||
|
|
||||||
|
this->nut_ =
|
||||||
|
this->Ck_*sqrt(k)*this->delta()
|
||||||
|
+ Cmub_*gasTurbulence.transport().d()*gasTurbulence.alpha()
|
||||||
|
*(mag(this->U_ - gasTurbulence.U()));
|
||||||
|
|
||||||
|
this->nut_.correctBoundaryConditions();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace LESModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,170 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::LESModels::SmagorinskyZhang
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpLESTurbulence
|
||||||
|
|
||||||
|
Description
|
||||||
|
The Smagorinsky SGS model including bubble-generated turbulence
|
||||||
|
|
||||||
|
Reference:
|
||||||
|
\verbatim
|
||||||
|
"Numerical simulation of the dynamic flow behavior in a bubble column:
|
||||||
|
A study of closures for turbulence and interface forces"
|
||||||
|
D. Zhang,
|
||||||
|
N.G. Deen,
|
||||||
|
J.A.M. Kuipers,
|
||||||
|
Chemical Engineering Science 61 (2006) pp 7593-7608.
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
The default model coefficients correspond to the following:
|
||||||
|
\verbatim
|
||||||
|
SmagorinskyZhangCoeffs
|
||||||
|
{
|
||||||
|
Ck 0.094;
|
||||||
|
Ce 1.048;
|
||||||
|
Cmub 0.6;
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
SmagorinskyZhang.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef SmagorinskyZhang_H
|
||||||
|
#define SmagorinskyZhang_H
|
||||||
|
|
||||||
|
#include "LESModel.H"
|
||||||
|
#include "eddyViscosity.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace LESModels
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class SmagorinskyZhang Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
class SmagorinskyZhang
|
||||||
|
:
|
||||||
|
public Smagorinsky<BasicTurbulenceModel>
|
||||||
|
{
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
mutable const PhaseIncompressibleTurbulenceModel
|
||||||
|
<
|
||||||
|
typename BasicTurbulenceModel::transportModel
|
||||||
|
> *gasTurbulencePtr_;
|
||||||
|
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Return the turbulence model for the gas phase
|
||||||
|
const PhaseIncompressibleTurbulenceModel
|
||||||
|
<
|
||||||
|
typename BasicTurbulenceModel::transportModel
|
||||||
|
>&
|
||||||
|
gasTurbulence() const;
|
||||||
|
|
||||||
|
// Disallow default bitwise copy construct and assignment
|
||||||
|
SmagorinskyZhang(const SmagorinskyZhang&);
|
||||||
|
SmagorinskyZhang& operator=(const SmagorinskyZhang&);
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
// Protected data
|
||||||
|
|
||||||
|
// Model coefficients
|
||||||
|
|
||||||
|
dimensionedScalar Cmub_;
|
||||||
|
|
||||||
|
|
||||||
|
// Protected Member Functions
|
||||||
|
|
||||||
|
virtual void correctNut();
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
typedef typename BasicTurbulenceModel::alphaField alphaField;
|
||||||
|
typedef typename BasicTurbulenceModel::rhoField rhoField;
|
||||||
|
typedef typename BasicTurbulenceModel::transportModel transportModel;
|
||||||
|
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("SmagorinskyZhang");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from components
|
||||||
|
SmagorinskyZhang
|
||||||
|
(
|
||||||
|
const alphaField& alpha,
|
||||||
|
const rhoField& rho,
|
||||||
|
const volVectorField& U,
|
||||||
|
const surfaceScalarField& alphaPhi,
|
||||||
|
const surfaceScalarField& phi,
|
||||||
|
const transportModel& transport,
|
||||||
|
const word& propertiesName = turbulenceModel::propertiesName,
|
||||||
|
const word& type = typeName
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~SmagorinskyZhang()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Read model coefficients if they have changed
|
||||||
|
virtual bool read();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace LESModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
# include "SmagorinskyZhang.C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,169 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "continuousGasKEqn.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace LESModels
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
continuousGasKEqn<BasicTurbulenceModel>::continuousGasKEqn
|
||||||
|
(
|
||||||
|
const alphaField& alpha,
|
||||||
|
const rhoField& rho,
|
||||||
|
const volVectorField& U,
|
||||||
|
const surfaceScalarField& alphaPhi,
|
||||||
|
const surfaceScalarField& phi,
|
||||||
|
const transportModel& transport,
|
||||||
|
const word& propertiesName,
|
||||||
|
const word& type
|
||||||
|
)
|
||||||
|
:
|
||||||
|
kEqn<BasicTurbulenceModel>
|
||||||
|
(
|
||||||
|
alpha,
|
||||||
|
rho,
|
||||||
|
U,
|
||||||
|
alphaPhi,
|
||||||
|
phi,
|
||||||
|
transport,
|
||||||
|
propertiesName,
|
||||||
|
type
|
||||||
|
),
|
||||||
|
|
||||||
|
liquidTurbulencePtr_(NULL),
|
||||||
|
|
||||||
|
alphaInversion_
|
||||||
|
(
|
||||||
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
(
|
||||||
|
"alphaInversion",
|
||||||
|
this->coeffDict_,
|
||||||
|
0.7
|
||||||
|
)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
if (type == typeName)
|
||||||
|
{
|
||||||
|
kEqn<BasicTurbulenceModel>::correctNut();
|
||||||
|
this->printCoeffs(type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
bool continuousGasKEqn<BasicTurbulenceModel>::read()
|
||||||
|
{
|
||||||
|
if (kEqn<BasicTurbulenceModel>::read())
|
||||||
|
{
|
||||||
|
alphaInversion_.readIfPresent(this->coeffDict());
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
const turbulenceModel&
|
||||||
|
continuousGasKEqn<BasicTurbulenceModel>::liquidTurbulence() const
|
||||||
|
{
|
||||||
|
if (!liquidTurbulencePtr_)
|
||||||
|
{
|
||||||
|
const volVectorField& U = this->U_;
|
||||||
|
|
||||||
|
const transportModel& gas = this->transport();
|
||||||
|
const twoPhaseSystem& fluid = gas.fluid();
|
||||||
|
const transportModel& liquid = fluid.otherPhase(gas);
|
||||||
|
|
||||||
|
liquidTurbulencePtr_ =
|
||||||
|
&U.db().lookupObject<turbulenceModel>
|
||||||
|
(
|
||||||
|
IOobject::groupName
|
||||||
|
(
|
||||||
|
turbulenceModel::propertiesName,
|
||||||
|
liquid.name()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return *liquidTurbulencePtr_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
tmp<volScalarField>
|
||||||
|
continuousGasKEqn<BasicTurbulenceModel>::phaseTransferCoeff() const
|
||||||
|
{
|
||||||
|
const volVectorField& U = this->U_;
|
||||||
|
const alphaField& alpha = this->alpha_;
|
||||||
|
const rhoField& rho = this->rho_;
|
||||||
|
|
||||||
|
const turbulenceModel& liquidTurbulence = this->liquidTurbulence();
|
||||||
|
|
||||||
|
return
|
||||||
|
(
|
||||||
|
max(alphaInversion_ - alpha, 0.0)
|
||||||
|
*rho
|
||||||
|
*min
|
||||||
|
(
|
||||||
|
this->Ce_*sqrt(liquidTurbulence.k())/this->delta(),
|
||||||
|
1.0/U.time().deltaT()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
tmp<fvScalarMatrix>
|
||||||
|
continuousGasKEqn<BasicTurbulenceModel>::kSource() const
|
||||||
|
{
|
||||||
|
const turbulenceModel& liquidTurbulence = this->liquidTurbulence();
|
||||||
|
const volScalarField phaseTransferCoeff(this->phaseTransferCoeff());
|
||||||
|
|
||||||
|
return
|
||||||
|
phaseTransferCoeff*liquidTurbulence.k()
|
||||||
|
- fvm::Sp(phaseTransferCoeff, this->k_);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace LESModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,162 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::LESModels::continuousGasKEqn
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpLESTurbulence
|
||||||
|
|
||||||
|
Description
|
||||||
|
One-equation SGS model for the gas-phase in a two-phase system
|
||||||
|
supporting phase-inversion.
|
||||||
|
|
||||||
|
In the limit that the gas-phase fraction approaches zero a contribution from
|
||||||
|
the other phase is blended into the k-equation up to the phase-fraction of
|
||||||
|
alphaInversion at which point phase-inversion is considered to have occurred
|
||||||
|
and the model reverts to the pure single-phase form.
|
||||||
|
|
||||||
|
This model is unpublished and is provided as a stable numerical framework
|
||||||
|
on which a more physical model may be built.
|
||||||
|
|
||||||
|
The default model coefficients correspond to the following:
|
||||||
|
\verbatim
|
||||||
|
continuousKEqnCoeffs
|
||||||
|
{
|
||||||
|
Ck 0.094;
|
||||||
|
Ce 1.048;
|
||||||
|
alphaInversion 0.7;
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
continuousGasKEqn.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef continuousGasKEqn_H
|
||||||
|
#define continuousGasKEqn_H
|
||||||
|
|
||||||
|
#include "kEqn.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace LESModels
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class continuousGasKEqn Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
class continuousGasKEqn
|
||||||
|
:
|
||||||
|
public kEqn<BasicTurbulenceModel>
|
||||||
|
{
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
mutable const turbulenceModel *liquidTurbulencePtr_;
|
||||||
|
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
// Disallow default bitwise copy construct and assignment
|
||||||
|
continuousGasKEqn(const continuousGasKEqn&);
|
||||||
|
continuousGasKEqn& operator=(const continuousGasKEqn&);
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
// Protected data
|
||||||
|
|
||||||
|
// Model coefficients
|
||||||
|
|
||||||
|
dimensionedScalar alphaInversion_;
|
||||||
|
|
||||||
|
|
||||||
|
// Protected Member Functions
|
||||||
|
|
||||||
|
//- Return the turbulence model for the liquid phase
|
||||||
|
const turbulenceModel& liquidTurbulence() const;
|
||||||
|
|
||||||
|
tmp<volScalarField> phaseTransferCoeff() const;
|
||||||
|
virtual tmp<fvScalarMatrix> kSource() const;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
typedef typename BasicTurbulenceModel::alphaField alphaField;
|
||||||
|
typedef typename BasicTurbulenceModel::rhoField rhoField;
|
||||||
|
typedef typename BasicTurbulenceModel::transportModel transportModel;
|
||||||
|
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("continuousGasKEqn");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from components
|
||||||
|
continuousGasKEqn
|
||||||
|
(
|
||||||
|
const alphaField& alpha,
|
||||||
|
const rhoField& rho,
|
||||||
|
const volVectorField& U,
|
||||||
|
const surfaceScalarField& alphaPhi,
|
||||||
|
const surfaceScalarField& phi,
|
||||||
|
const transportModel& transport,
|
||||||
|
const word& propertiesName = turbulenceModel::propertiesName,
|
||||||
|
const word& type = typeName
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~continuousGasKEqn()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Read model coefficients if they have changed
|
||||||
|
virtual bool read();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace LESModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
# include "continuousGasKEqn.C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
Reference in New Issue
Block a user