ENH: adding non-uniform rho to incompressible two-phase turbulent models

1) PhaseIncompressibleTurbulenceModel class was changed to use
   uniform alpha and non-uniform rho templates. This fits the need
   of incompressible two phase turbulence models.

2) A new type DPMIncompressibleTurbulenceModel was created for
   non-uniform alpha and uniform rho. It is  used in single phase flows
   in DPM solvers where alpha represents the volumen occupancy.

3) A new type incompressibleRhoTurbulenceModel  was created where
   non-uniform rho is allowed.

4) A new base templated turbulent class for two-phase VOF named
   VoFphaseTurbulentTransportModel was implemented which is created
   templating on PhaseIncompressibleTurbulenceModel and
   incompressibleRhoTurbulenceModel

5) In order to make the chnage to rho based VOF turbulence a help
   class was added incompressibleInterPhaseTransportModel templated
   on the mixing.
This commit is contained in:
Sergio Ferraris
2020-12-16 17:57:45 +00:00
committed by Andrew Heather
parent dbaed65d75
commit 3db12bbdef
33 changed files with 1452 additions and 47 deletions

View File

@ -0,0 +1,186 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
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 "DPMIncompressibleTurbulenceModel.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class TransportModel>
Foam::DPMIncompressibleTurbulenceModel<TransportModel>::
DPMIncompressibleTurbulenceModel
(
const word& type,
const volScalarField& alpha,
const geometricOneField& rho,
const volVectorField& U,
const surfaceScalarField& alphaRhoPhi,
const surfaceScalarField& phi,
const TransportModel& transportModel,
const word& propertiesName
)
:
TurbulenceModel
<
volScalarField,
geometricOneField,
incompressibleTurbulenceModel,
TransportModel
>
(
alpha,
rho,
U,
alphaRhoPhi,
phi,
transportModel,
propertiesName
)
{}
// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
template<class TransportModel>
Foam::autoPtr<Foam::DPMIncompressibleTurbulenceModel<TransportModel>>
Foam::DPMIncompressibleTurbulenceModel<TransportModel>::New
(
const volScalarField& alpha,
const volVectorField& U,
const surfaceScalarField& alphaRhoPhi,
const surfaceScalarField& phi,
const TransportModel& transportModel,
const word& propertiesName
)
{
return autoPtr<DPMIncompressibleTurbulenceModel>
(
static_cast<DPMIncompressibleTurbulenceModel*>(
TurbulenceModel
<
volScalarField,
geometricOneField,
incompressibleTurbulenceModel,
TransportModel
>::New
(
alpha,
geometricOneField(),
U,
alphaRhoPhi,
phi,
transportModel,
propertiesName
).ptr())
);
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class TransportModel>
Foam::tmp<Foam::volScalarField>
Foam::DPMIncompressibleTurbulenceModel<TransportModel>::pPrime() const
{
return tmp<volScalarField>::New
(
IOobject
(
IOobject::groupName("pPrime", this->alphaRhoPhi_.group()),
this->runTime_.timeName(),
this->mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
this->mesh_,
dimensionedScalar(dimPressure, Zero)
);
}
template<class TransportModel>
Foam::tmp<Foam::surfaceScalarField>
Foam::DPMIncompressibleTurbulenceModel<TransportModel>::pPrimef() const
{
return tmp<surfaceScalarField>::New
(
IOobject
(
IOobject::groupName("pPrimef", this->alphaRhoPhi_.group()),
this->runTime_.timeName(),
this->mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
this->mesh_,
dimensionedScalar(dimPressure, Zero)
);
}
template<class TransportModel>
Foam::tmp<Foam::volSymmTensorField>
Foam::DPMIncompressibleTurbulenceModel<TransportModel>::devReff() const
{
return devRhoReff();
}
template<class TransportModel>
Foam::tmp<Foam::fvVectorMatrix>
Foam::DPMIncompressibleTurbulenceModel<TransportModel>::divDevReff
(
volVectorField& U
) const
{
return divDevRhoReff(U);
}
template<class TransportModel>
Foam::tmp<Foam::volSymmTensorField>
Foam::DPMIncompressibleTurbulenceModel<TransportModel>::devRhoReff() const
{
NotImplemented;
return devReff();
}
template<class TransportModel>
Foam::tmp<Foam::fvVectorMatrix>
Foam::DPMIncompressibleTurbulenceModel<TransportModel>::divDevRhoReff
(
volVectorField& U
) const
{
NotImplemented;
return divDevReff(U);
}
// ************************************************************************* //

View File

@ -0,0 +1,144 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
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::DPMIncompressibleTurbulenceModel
Description
Templated abstract base class for volumen occupancy incompressible
turbulence models.
SourceFiles
DPMIncompressibleTurbulenceModel.C
\*---------------------------------------------------------------------------*/
#ifndef DPMIncompressibleTurbulenceModel_H
#define DPMIncompressibleTurbulenceModel_H
#include "TurbulenceModel.H"
#include "incompressibleTurbulenceModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class DPMIncompressibleTurbulenceModel Declaration
\*---------------------------------------------------------------------------*/
template<class TransportModel>
class DPMIncompressibleTurbulenceModel
:
public TurbulenceModel
<
volScalarField,
geometricOneField,
incompressibleTurbulenceModel,
TransportModel
>
{
public:
typedef volScalarField alphaField;
typedef geometricOneField rhoField;
typedef TransportModel transportModel;
// Constructors
//- Construct
DPMIncompressibleTurbulenceModel
(
const word& type,
const alphaField& alpha,
const geometricOneField& rho,
const volVectorField& U,
const surfaceScalarField& alphaRhoPhi,
const surfaceScalarField& phi,
const TransportModel& transportModel,
const word& propertiesName
);
// Selectors
//- Return a reference to the selected turbulence model
static autoPtr<DPMIncompressibleTurbulenceModel> New
(
const alphaField& alpha,
const volVectorField& U,
const surfaceScalarField& alphaRhoPhi,
const surfaceScalarField& phi,
const TransportModel& transportModel,
const word& propertiesName = turbulenceModel::propertiesName
);
//- Destructor
virtual ~DPMIncompressibleTurbulenceModel() = default;
// Member Functions
//- Return the phase-pressure'
// (derivative of phase-pressure w.r.t. phase-fraction)
virtual tmp<volScalarField> pPrime() const;
//- Return the face-phase-pressure'
// (derivative of phase-pressure w.r.t. phase-fraction)
virtual tmp<surfaceScalarField> pPrimef() const;
//- Return the effective stress tensor
virtual tmp<volSymmTensorField> devReff() const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
//- Return the effective stress tensor
virtual tmp<volSymmTensorField> devRhoReff() const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
#include "DPMIncompressibleTurbulenceModel.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2013-2016 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -25,7 +25,7 @@ License
\*---------------------------------------------------------------------------*/
#include "PhaseIncompressibleTurbulenceModel.H"
#include "DPMIncompressibleTurbulenceModel.H"
#include "singlePhaseTransportModel.H"
#include "addToRunTimeSelectionTable.H"
#include "makeTurbulenceModel.H"
@ -41,7 +41,7 @@ defineTurbulenceModelTypes
volScalarField,
geometricOneField,
incompressibleTurbulenceModel,
PhaseIncompressibleTurbulenceModel,
DPMIncompressibleTurbulenceModel,
singlePhaseTransportModel
);
@ -50,21 +50,21 @@ makeBaseTurbulenceModel
volScalarField,
geometricOneField,
incompressibleTurbulenceModel,
PhaseIncompressibleTurbulenceModel,
DPMIncompressibleTurbulenceModel,
singlePhaseTransportModel
);
#define makeLaminarModel(Type) \
makeTemplatedTurbulenceModel \
(singlePhaseTransportModelPhaseIncompressibleTurbulenceModel, laminar, Type)
(singlePhaseTransportModelDPMIncompressibleTurbulenceModel, laminar, Type)
#define makeRASModel(Type) \
makeTemplatedTurbulenceModel \
(singlePhaseTransportModelPhaseIncompressibleTurbulenceModel, RAS, Type)
(singlePhaseTransportModelDPMIncompressibleTurbulenceModel, RAS, Type)
#define makeLESModel(Type) \
makeTemplatedTurbulenceModel \
(singlePhaseTransportModelPhaseIncompressibleTurbulenceModel, LES, Type)
(singlePhaseTransportModelDPMIncompressibleTurbulenceModel, LES, Type)
#include "Stokes.H"
makeLaminarModel(Stokes);

View File

@ -1,5 +1,7 @@
EXE_INC = \
-I../VoF \
-I$(LIB_SRC)/phaseSystemModels/twoPhaseInter/incompressibleInterPhaseTransportModel/lnInclude \
-I$(LIB_SRC)/phaseSystemModels/twoPhaseInter/VoFphaseIncompressibleTurbulenceModels/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
@ -10,6 +12,7 @@ EXE_INC = \
-I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/phaseIncompressible/lnInclude \
-I$(LIB_SRC)/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude
EXE_LIBS = \
@ -23,4 +26,6 @@ EXE_LIBS = \
-limmiscibleIncompressibleTwoPhaseMixture \
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lwaveModels
-lwaveModels \
-lVoFphaseTurbulentTransportModels \
-lincompressibleInterPhaseTransportModels

View File

@ -4,7 +4,7 @@
(
fvm::ddt(rho, U) + fvm::div(rhoPhi, U)
+ MRF.DDt(rho, U)
+ turbulence->divDevRhoReff(rho, U)
+ turbulence.divDevRhoReff(rho, U)
==
fvOptions(rho, U)
);

View File

@ -70,13 +70,8 @@ surfaceScalarField rhoPhi
fvc::interpolate(rho)*phi
);
// Construct incompressible turbulence model
autoPtr<incompressible::turbulenceModel> turbulence
(
incompressible::turbulenceModel::New(U, phi, mixture)
);
incompressibleInterPhaseTransportModel<immiscibleIncompressibleTwoPhaseMixture>
turbulence(rho, U, phi, rhoPhi, mixture);
#include "readGravitationalAcceleration.H"
#include "readhRef.H"

View File

@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -45,6 +46,7 @@ Description
#include "CrankNicolsonDdtScheme.H"
#include "subCycle.H"
#include "immiscibleIncompressibleTwoPhaseMixture.H"
#include "incompressibleInterPhaseTransportModel.H"
#include "turbulentTransportModel.H"
#include "pimpleControl.H"
#include "fvOptions.H"
@ -76,8 +78,6 @@ int main(int argc, char *argv[])
#include "initCorrectPhi.H"
#include "createUfIfPresent.H"
turbulence->validate();
if (!LTS)
{
#include "CourantNo.H"
@ -168,7 +168,7 @@ int main(int argc, char *argv[])
if (pimple.turbCorr())
{
turbulence->correct();
turbulence.correct();
}
}

View File

@ -1,5 +1,7 @@
EXE_INC = \
-I../VoF \
-I$(LIB_SRC)/phaseSystemModels/twoPhaseInter/incompressibleInterPhaseTransportModel/lnInclude \
-I$(LIB_SRC)/phaseSystemModels/twoPhaseInter/VoFphaseIncompressibleTurbulenceModels/lnInclude \
-I../interFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/surfMesh/lnInclude \
@ -14,6 +16,7 @@ EXE_INC = \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/phaseIncompressible/lnInclude \
-I$(LIB_SRC)/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude
EXE_LIBS = \
@ -29,4 +32,6 @@ EXE_LIBS = \
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lwaveModels \
-lgeometricVoF
-lgeometricVoF \
-lVoFphaseTurbulentTransportModels \
-lincompressibleInterPhaseTransportModels

View File

@ -71,11 +71,8 @@ surfaceScalarField rhoPhi
);
// Construct incompressible turbulence model
autoPtr<incompressible::turbulenceModel> turbulence
(
incompressible::turbulenceModel::New(U, phi, mixture)
);
incompressibleInterPhaseTransportModel<immiscibleIncompressibleTwoPhaseMixture>
turbulence(rho, U, phi, rhoPhi, mixture);
#include "readGravitationalAcceleration.H"

View File

@ -10,6 +10,7 @@
Copyright (C) 2017 OpenCFD Ltd.
Copyright (C) 2018 Johan Roenby
Copyright (C) 2019-2020 DLR
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -59,7 +60,7 @@ Description
#include "CrankNicolsonDdtScheme.H"
#include "subCycle.H"
#include "immiscibleIncompressibleTwoPhaseMixture.H"
#include "turbulentTransportModel.H"
#include "incompressibleInterPhaseTransportModel.H"
#include "pimpleControl.H"
#include "fvOptions.H"
#include "CorrectPhi.H"
@ -91,8 +92,6 @@ int main(int argc, char *argv[])
#include "initCorrectPhi.H"
#include "createUfIfPresent.H"
turbulence->validate();
#include "CourantNo.H"
#include "setInitialDeltaT.H"
@ -181,7 +180,7 @@ int main(int argc, char *argv[])
if (pimple.turbCorr())
{
turbulence->correct();
turbulence.correct();
}
}

View File

@ -1,4 +1,5 @@
incompressibleTurbulenceModel.C
incompressibleRhoTurbulenceModel.C
turbulentTransportModels/turbulentTransportModels.C

View File

@ -0,0 +1,103 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
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 "incompressibleRhoTurbulenceModel.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(incompressibleRhoTurbulenceModel, 0);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::incompressibleRhoTurbulenceModel::incompressibleRhoTurbulenceModel
(
const volScalarField& rho,
const volVectorField& U,
const surfaceScalarField& alphaRhoPhi,
const surfaceScalarField& phi,
const word& propertiesName
)
:
turbulenceModel
(
U,
alphaRhoPhi,
phi,
propertiesName
),
rho_(rho)
{}
Foam::tmp<Foam::volScalarField>
Foam::incompressibleRhoTurbulenceModel::mu() const
{
return rho_*nu();
}
Foam::tmp<Foam::scalarField>
Foam::incompressibleRhoTurbulenceModel::mu(const label patchi) const
{
return rho_.boundaryField()[patchi]*nu(patchi);
}
Foam::tmp<Foam::volScalarField>
Foam::incompressibleRhoTurbulenceModel::mut() const
{
return rho_*nut();
}
Foam::tmp<Foam::scalarField>
Foam::incompressibleRhoTurbulenceModel::mut(const label patchi) const
{
return rho_.boundaryField()[patchi]*nut(patchi);
}
Foam::tmp<Foam::volScalarField>
Foam::incompressibleRhoTurbulenceModel::muEff() const
{
return rho_*nuEff();
}
Foam::tmp<Foam::scalarField>
Foam::incompressibleRhoTurbulenceModel::muEff(const label patchi) const
{
return rho_.boundaryField()[patchi]*nuEff(patchi);
}
// ************************************************************************* //

View File

@ -0,0 +1,155 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
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::incompressibleRhoTurbulenceModel
Description
Abstract base class for turbulence models (RAS, LES and laminar).
SourceFiles
incompressibleRhoTurbulenceModel.C
\*---------------------------------------------------------------------------*/
#ifndef incompressibleRhoTurbulenceModel_H
#define incompressibleRhoTurbulenceModel_H
#include "turbulenceModel.H"
#include "geometricOneField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// Forward declarations
class fvMesh;
/*---------------------------------------------------------------------------*\
Class incompressibleRhoTurbulenceModel Declaration
\*---------------------------------------------------------------------------*/
class incompressibleRhoTurbulenceModel
:
public turbulenceModel
{
protected:
// Protected data
//- Pointer to actual rho
const volScalarField& rho_;
// Protected member functions
//- ***HGW Temporary function to be removed when the run-time selectable
// thermal transport layer is complete
virtual void correctNut()
{}
private:
// Private Member Functions
//- No copy construct
incompressibleRhoTurbulenceModel
(
const incompressibleRhoTurbulenceModel&
) = delete;
//- No copy assignment
void operator=(const incompressibleRhoTurbulenceModel&) = delete;
public:
//- Runtime type information
TypeName("incompressibleRhoTurbulenceModel");
// Constructors
//- Construct from components
incompressibleRhoTurbulenceModel
(
const volScalarField& rho,
const volVectorField& U,
const surfaceScalarField& alphaRhoPhi,
const surfaceScalarField& phi,
const word& propertiesName
);
//- Destructor
virtual ~incompressibleRhoTurbulenceModel() = default;
// Member Functions
// Access functipons
//- Return rho
//- Return the laminar dynamic viscosity
virtual tmp<volScalarField> mu() const;
//- Return the laminar dynamic viscosity on patch
virtual tmp<scalarField> mu(const label patchi) const;
//- Return the turbulence dynamic viscosity
virtual tmp<volScalarField> mut() const;
//- Return the turbulence dynamic viscosity on patch
virtual tmp<scalarField> mut(const label patchi) const;
//- Return the effective dynamic viscosity
virtual tmp<volScalarField> muEff() const;
//- Return the effective dynamic viscosity on patch
virtual tmp<scalarField> muEff(const label patchi) const;
//- Return the effective stress tensor including the laminar stress
virtual tmp<volSymmTensorField> devReff() const = 0;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const = 0;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -112,6 +112,11 @@ public:
// Member Functions
// Access functipons
//- Return rho
//- Return the laminar dynamic viscosity
virtual tmp<volScalarField> mu() const;

View File

@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2013-2017 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -34,8 +35,8 @@ Foam::PhaseIncompressibleTurbulenceModel<TransportModel>::
PhaseIncompressibleTurbulenceModel
(
const word& type,
const volScalarField& alpha,
const geometricOneField& rho,
const geometricOneField& alpha,
const volScalarField& rho,
const volVectorField& U,
const surfaceScalarField& alphaRhoPhi,
const surfaceScalarField& phi,
@ -45,9 +46,9 @@ PhaseIncompressibleTurbulenceModel
:
TurbulenceModel
<
volScalarField,
geometricOneField,
incompressibleTurbulenceModel,
volScalarField,
incompressibleRhoTurbulenceModel,
TransportModel
>
(
@ -68,7 +69,7 @@ template<class TransportModel>
Foam::autoPtr<Foam::PhaseIncompressibleTurbulenceModel<TransportModel>>
Foam::PhaseIncompressibleTurbulenceModel<TransportModel>::New
(
const volScalarField& alpha,
const volScalarField& rho,
const volVectorField& U,
const surfaceScalarField& alphaRhoPhi,
const surfaceScalarField& phi,
@ -81,14 +82,14 @@ Foam::PhaseIncompressibleTurbulenceModel<TransportModel>::New
static_cast<PhaseIncompressibleTurbulenceModel*>(
TurbulenceModel
<
volScalarField,
geometricOneField,
incompressibleTurbulenceModel,
volScalarField,
incompressibleRhoTurbulenceModel,
TransportModel
>::New
(
alpha,
geometricOneField(),
rho,
U,
alphaRhoPhi,
phi,

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2013-2016 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -40,7 +40,7 @@ SourceFiles
#define PhaseIncompressibleTurbulenceModel_H
#include "TurbulenceModel.H"
#include "incompressibleTurbulenceModel.H"
#include "incompressibleRhoTurbulenceModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -56,17 +56,17 @@ class PhaseIncompressibleTurbulenceModel
:
public TurbulenceModel
<
volScalarField,
geometricOneField,
incompressibleTurbulenceModel,
volScalarField,
incompressibleRhoTurbulenceModel,
TransportModel
>
{
public:
typedef volScalarField alphaField;
typedef geometricOneField rhoField;
typedef volScalarField rhoField;
typedef geometricOneField alphaField;
typedef TransportModel transportModel;
@ -77,7 +77,7 @@ public:
(
const word& type,
const alphaField& alpha,
const geometricOneField& rho,
const rhoField& rho,
const volVectorField& U,
const surfaceScalarField& alphaRhoPhi,
const surfaceScalarField& phi,
@ -91,7 +91,7 @@ public:
//- Return a reference to the selected turbulence model
static autoPtr<PhaseIncompressibleTurbulenceModel> New
(
const alphaField& alpha,
const rhoField& rho,
const volVectorField& U,
const surfaceScalarField& alphaRhoPhi,
const surfaceScalarField& phi,

View File

@ -7,5 +7,6 @@ multiphaseInter/Allwmake $targetType $*
multiphaseEuler/Allwmake $targetType $*
reactingEuler/Allwmake $targetType $*
twoPhaseEuler/Allwmake $targetType $*
twoPhaseInter/Allwmake $targetType $*
#------------------------------------------------------------------------------

View File

@ -0,0 +1,8 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
#------------------------------------------------------------------------------
wclean libso VoFphaseIncompressibleTurbulenceModels
wclean libso incompressibleInterPhaseTransportModel
#------------------------------------------------------------------------------

View File

@ -0,0 +1,8 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/wmake/scripts/AllwmakeParseArguments
#------------------------------------------------------------------------------
wmake $targetType VoFphaseIncompressibleTurbulenceModels
wmake $targetType incompressibleInterPhaseTransportModel
#------------------------------------------------------------------------------

View File

@ -0,0 +1,3 @@
VoFphaseTurbulentTransportModels.C
LIB = $(FOAM_LIBBIN)/libVoFphaseTurbulentTransportModels

View File

@ -0,0 +1,15 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/phaseIncompressible/lnInclude
LIB_LIBS = \
-lfiniteVolume \
-lmeshTools \
-lfluidThermophysicalModels \
-lspecie \
-lincompressibleTransportModels \
-lturbulenceModels

View File

@ -0,0 +1,63 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
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 "VoFphaseTurbulentTransportModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace incompressible
{
template<class BasicCompressibleTurbulenceModel>
autoPtr<BasicCompressibleTurbulenceModel> New
(
const volScalarField& rho,
const volVectorField& U,
const surfaceScalarField& alphaRhoPhi,
const surfaceScalarField& phi,
const typename BasicCompressibleTurbulenceModel::transportModel&
transport,
const word& propertiesName
)
{
return BasicCompressibleTurbulenceModel::New
(
geometricOneField(),
rho,
U,
alphaRhoPhi,
phi,
transport,
propertiesName
);
}
}
}
// ************************************************************************* //

View File

@ -0,0 +1,97 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
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/>.
Typedef
Foam::incompressible::turbulenceModel
Typedef
Foam::incompressible::RASModel
Typedef
Foam::incompressible::LESModel
Description
Typedefs for turbulence, RAS and LES models for incompressible flow
based on the standard laminar transport package. Density is explicity
referenced to consider the isothermal variable-density effect, as
described in:
\verbatim
Fan, W. & Anglart, H. (2020).
varRhoTurbVOF: A new set of volume of fluid solvers for turbulent
isothermal multiphase flows in OpenFOAM.
Computer Physics Communications, 247, 106876
\endverbatim
VoFphaseTurbulentTransportModel.H
SourceFiles
VoFphaseTurbulentTransportModel.C
VoFphaseTurbulentTransportModels.C
\*---------------------------------------------------------------------------*/
#ifndef VoFphaseTurbulentTransportModel_H
#define VoFphaseTurbulentTransportModel_H
#include "PhaseIncompressibleTurbulenceModel.H"
#include "laminarModel.H"
#include "RASModel.H"
#include "LESModel.H"
#include "incompressible/transportModel/transportModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace incompressible
{
typedef PhaseIncompressibleTurbulenceModel<transportModel>
phaseIncompressibleTurbulenceModel;
template<class BasicCompressibleTurbulenceModel>
autoPtr<BasicCompressibleTurbulenceModel> New
(
const volScalarField& rho,
const volVectorField& U,
const surfaceScalarField& alphaRhoPhi,
const surfaceScalarField& phi,
const typename BasicCompressibleTurbulenceModel::transportModel&
transport,
const word& propertiesName = turbulenceModel::propertiesName
);
}
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
#include "VoFphaseTurbulentTransportModel.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,132 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
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 "VoFphaseTurbulentTransportModels.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makeBaseTurbulenceModel
(
geometricOneField,
volScalarField,
incompressibleRhoTurbulenceModel,
PhaseIncompressibleTurbulenceModel,
transportModel
);
// -------------------------------------------------------------------------- //
// Laminar models
// -------------------------------------------------------------------------- //
#include "Stokes.H"
makeLaminarModel(Stokes);
#include "Maxwell.H"
makeLaminarModel(Maxwell);
// -------------------------------------------------------------------------- //
// RAS models
// -------------------------------------------------------------------------- //
#include "SpalartAllmaras.H"
makeRASModel(SpalartAllmaras);
#include "kEpsilon.H"
makeRASModel(kEpsilon);
#include "RNGkEpsilon.H"
makeRASModel(RNGkEpsilon);
#include "realizableKE.H"
makeRASModel(realizableKE);
#include "LaunderSharmaKE.H"
makeRASModel(LaunderSharmaKE);
#include "kOmega.H"
makeRASModel(kOmega);
#include "kOmegaSST.H"
makeRASModel(kOmegaSST);
#include "kOmegaSSTSAS.H"
makeRASModel(kOmegaSSTSAS);
#include "kOmegaSSTLM.H"
makeRASModel(kOmegaSSTLM);
#include "LRR.H"
makeRASModel(LRR);
#include "SSG.H"
makeRASModel(SSG);
// -------------------------------------------------------------------------- //
// LES models
// -------------------------------------------------------------------------- //
#include "Smagorinsky.H"
makeLESModel(Smagorinsky);
#include "WALE.H"
makeLESModel(WALE);
#include "kEqn.H"
makeLESModel(kEqn);
#include "dynamicKEqn.H"
makeLESModel(dynamicKEqn);
#include "dynamicLagrangian.H"
makeLESModel(dynamicLagrangian);
#include "SpalartAllmarasDES.H"
makeLESModel(SpalartAllmarasDES);
#include "SpalartAllmarasDDES.H"
makeLESModel(SpalartAllmarasDDES);
#include "SpalartAllmarasIDDES.H"
makeLESModel(SpalartAllmarasIDDES);
#include "DeardorffDiffStress.H"
makeLESModel(DeardorffDiffStress);
#include "kOmegaSSTDES.H"
makeLESModel(kOmegaSSTDES);
#include "kOmegaSSTDDES.H"
makeLESModel(kOmegaSSTDDES);
#include "kOmegaSSTIDDES.H"
makeLESModel(kOmegaSSTIDDES);
// ************************************************************************* //

View File

@ -0,0 +1,61 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
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 "PhaseIncompressibleTurbulenceModel.H"
#include "incompressible/transportModel/transportModel.H"
#include "addToRunTimeSelectionTable.H"
#include "makeTurbulenceModel.H"
#include "laminarModel.H"
#include "RASModel.H"
#include "LESModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makeTurbulenceModelTypes
(
geometricOneField,
volScalarField,
incompressibleRhoTurbulenceModel,
PhaseIncompressibleTurbulenceModel,
transportModel
);
#define makeLaminarModel(Type) \
makeTemplatedTurbulenceModel \
(transportModelPhaseIncompressibleTurbulenceModel, laminar, Type)
#define makeRASModel(Type) \
makeTemplatedTurbulenceModel \
(transportModelPhaseIncompressibleTurbulenceModel, RAS, Type)
#define makeLESModel(Type) \
makeTemplatedTurbulenceModel \
(transportModelPhaseIncompressibleTurbulenceModel, LES, Type)
// ************************************************************************* //

View File

@ -0,0 +1,3 @@
incompressibleInterPhaseTransportModels.C
LIB = $(FOAM_LIBBIN)/libincompressibleInterPhaseTransportModels

View File

@ -0,0 +1,20 @@
EXE_INC = \
-I../VoFphaseIncompressibleTurbulenceModels/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude\
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude\
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/phaseIncompressible/lnInclude
LIB_LIBS = \
-lfiniteVolume \
-lmeshTools \
-lfluidThermophysicalModels \
-lspecie \
-lincompressibleTransportModels \
-lturbulenceModels

View File

@ -0,0 +1,147 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
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 "incompressibleInterPhaseTransportModel.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Mixture>
Foam::incompressibleInterPhaseTransportModel<Mixture>::
incompressibleInterPhaseTransportModel
(
const volScalarField& rho,
const volVectorField& U,
const surfaceScalarField& phi,
const surfaceScalarField& rhoPhi,
const Mixture& mixture
)
:
rhoType_(rhoType::UNIFORM),
phi_(phi),
rhoPhi_(rhoPhi)
{
{
IOdictionary turbulenceProperties
(
IOobject
(
turbulenceModel::propertiesName,
U.time().constant(),
U.db(),
IOobject::MUST_READ,
IOobject::NO_WRITE
)
);
if (turbulenceProperties.found("density"))
{
const word densityMethod
(
turbulenceProperties.getWord("density")
);
if (densityMethod == "variable")
{
rhoType_ = rhoType::VARIABLE;
}
else if (densityMethod == "uniform")
{
rhoType_ = rhoType::UNIFORM;
}
else
{
FatalErrorInFunction
<< "The rho type provided is not correct " << nl
<< " Available types are : " << nl
<< " variable or uniform. " << nl
<< nl << exit(FatalError);
}
}
}
if (rhoType_ == rhoType::VARIABLE)
{
rhoIncTurbulence_ =
(
incompressible::phaseIncompressibleTurbulenceModel::New
(
rho,
U,
rhoPhi,
phi,
mixture
)
);
}
else
{
incTurbulence_ = incompressible::turbulenceModel::New
(
U,
phi,
mixture
);
incTurbulence_->validate();
}
}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
template<class Mixture>
Foam::tmp<Foam::fvVectorMatrix>
Foam::incompressibleInterPhaseTransportModel<Mixture>::divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const
{
if (rhoType_ == rhoType::VARIABLE)
{
return rhoIncTurbulence_->divDevRhoReff(U);
}
else
{
return incTurbulence_->divDevRhoReff(rho, U);
}
}
template<class Mixture>
void Foam::incompressibleInterPhaseTransportModel<Mixture>::correct()
{
if (rhoType_ == rhoType::VARIABLE)
{
rhoIncTurbulence_->correct();
}
else
{
incTurbulence_->correct();
}
}
// ************************************************************************* //

View File

@ -0,0 +1,153 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
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::incompressibleInterPhaseTransportModel
Description
Transport model selection class for the incompressibleInterFoam family of
solvers.
By default the standard mixture transport modelling approach is used in
which a single momentum stress model (laminar, non-Newtonian, LES or RAS) is
constructed for the mixture. However if the \c simulationType in
constant/turbulenceProperties is set to \c twoPhaseTransport the alternative
Euler-Euler two-phase transport modelling approach is used in which separate
stress models (laminar, non-Newtonian, LES or RAS) are instantiated for each
of the two phases allowing for different modeling for the phases.
SourceFiles
incompressibleInterPhaseTransportModel.C
\*---------------------------------------------------------------------------*/
#ifndef incompressibleInterPhaseTransportModel_H
#define incompressibleInterPhaseTransportModel_H
#include "turbulentTransportModel.H"
#include "VoFphaseTurbulentTransportModel.H"
#include "demandDrivenEntry.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class incompressibleInterPhaseTransportModel Declaration
\*---------------------------------------------------------------------------*/
template<class Mixture>
class incompressibleInterPhaseTransportModel
{
// Private data
//- Enum to select uniform or variable rho transport modelling
enum rhoType
{
UNIFORM,
VARIABLE
};
//- Rho type
label rhoType_;
//- Mixture volumetric flux
const surfaceScalarField& phi_;
//- Mixture mass flux
const surfaceScalarField& rhoPhi_;
//- Mixture incompressible turbulence with constant rho
autoPtr<incompressible::turbulenceModel> incTurbulence_;
//- Mixture incompressible turbulence with variable rho
autoPtr<incompressible::phaseIncompressibleTurbulenceModel>
rhoIncTurbulence_;
// Private Member Functions
//- No copy construct
incompressibleInterPhaseTransportModel
(
const incompressibleInterPhaseTransportModel&
) = delete;
//- No copy assignment
void operator=(const incompressibleInterPhaseTransportModel&) = delete;
public:
TypeName("incompressibleInterPhaseTransportModel");
// Constructors
//- Construct from components
incompressibleInterPhaseTransportModel
(
const volScalarField& rho,
const volVectorField& U,
const surfaceScalarField& phi,
const surfaceScalarField& rhoPhi,
const Mixture&
);
//- Destructor
virtual ~incompressibleInterPhaseTransportModel() = default;
// Member Functions
//- Return the effective momentum stress divergence
tmp<fvVectorMatrix> divDevRhoReff
(
const volScalarField& rho,
volVectorField& U
) const;
//- Correct the phase or mixture transport models
void correct();
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
#include "incompressibleInterPhaseTransportModel.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,41 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
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 "incompressibleInterPhaseTransportModels.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
defineTemplateTypeNameWithName
(
incompImmiscibleTwoPhaseMixture,
"immiscibleTwoPhaseMixture"
);
}
// ************************************************************************* //

View File

@ -0,0 +1,55 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
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/>.
\*---------------------------------------------------------------------------*/
#ifndef incompressibleInterPhaseTransportModels_H
#define incompressibleInterPhaseTransportModels_H
#include "incompressibleInterPhaseTransportModel.H"
#include "immiscibleIncompressibleTwoPhaseMixture.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
typedef
incompressibleInterPhaseTransportModel
<
immiscibleIncompressibleTwoPhaseMixture
> incompImmiscibleTwoPhaseMixture;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -17,6 +17,8 @@ FoamFile
simulationType RAS;
density variable;
RAS
{
RASModel kEpsilon;

View File

@ -30,8 +30,8 @@ divSchemes
div(rhoPhi,U) Gauss linearUpwind grad(U);
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss linear;
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div(rhoPhi,k) Gauss upwind;
div(rhoPhi,epsilon) Gauss upwind;
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
}