reactingEulerFoam: Updated handling of thermal diffusivity to support Prandtl number and thermal wall-functions

This commit is contained in:
Henry Weller
2015-10-22 22:44:59 +01:00
parent 3b9a90f249
commit 0741dc5b34
21 changed files with 137 additions and 63 deletions

View File

@ -25,7 +25,7 @@ License
#include "Burns.H" #include "Burns.H"
#include "phasePair.H" #include "phasePair.H"
#include "PhaseCompressibleTurbulenceModel.H" #include "phaseCompressibleTurbulenceModel.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "dragModel.H" #include "dragModel.H"

View File

@ -25,7 +25,7 @@ License
#include "Gosman.H" #include "Gosman.H"
#include "phasePair.H" #include "phasePair.H"
#include "PhaseCompressibleTurbulenceModel.H" #include "phaseCompressibleTurbulenceModel.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "dragModel.H" #include "dragModel.H"

View File

@ -25,7 +25,7 @@ License
#include "LopezDeBertodano.H" #include "LopezDeBertodano.H"
#include "phasePair.H" #include "phasePair.H"
#include "PhaseCompressibleTurbulenceModel.H" #include "phaseCompressibleTurbulenceModel.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //

View File

@ -25,7 +25,7 @@ License
#include "constantTurbulentDispersionCoefficient.H" #include "constantTurbulentDispersionCoefficient.H"
#include "phasePair.H" #include "phasePair.H"
#include "PhaseCompressibleTurbulenceModel.H" #include "phaseCompressibleTurbulenceModel.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //

View File

@ -88,10 +88,7 @@ Foam::AnisothermalPhaseModel<BasePhaseModel>::heEqn()
const volScalarField& contErr(this->continuityError()); const volScalarField& contErr(this->continuityError());
const volScalarField alphaEff const volScalarField alphaEff(this->turbulence().alphaEff());
(
this->thermo_->alphaEff(this->turbulence().mut())
);
volScalarField& he = this->thermo_->he(); volScalarField& he = this->thermo_->he();

View File

@ -25,7 +25,7 @@ License
#include "MovingPhaseModel.H" #include "MovingPhaseModel.H"
#include "phaseSystem.H" #include "phaseSystem.H"
#include "PhaseCompressibleTurbulenceModel.H" #include "phaseCompressibleTurbulenceModel.H"
#include "fixedValueFvPatchFields.H" #include "fixedValueFvPatchFields.H"
#include "slipFvPatchFields.H" #include "slipFvPatchFields.H"
#include "partialSlipFvPatchFields.H" #include "partialSlipFvPatchFields.H"
@ -176,7 +176,7 @@ Foam::MovingPhaseModel<BasePhaseModel>::MovingPhaseModel
), ),
turbulence_ turbulence_
( (
PhaseCompressibleTurbulenceModel<phaseModel>::New phaseCompressibleTurbulenceModel::New
( (
*this, *this,
this->thermo().rho(), this->thermo().rho(),
@ -374,7 +374,7 @@ Foam::MovingPhaseModel<BasePhaseModel>::alphaRhoPhi()
template<class BasePhaseModel> template<class BasePhaseModel>
const Foam::PhaseCompressibleTurbulenceModel<Foam::phaseModel>& const Foam::phaseCompressibleTurbulenceModel&
Foam::MovingPhaseModel<BasePhaseModel>::turbulence() const Foam::MovingPhaseModel<BasePhaseModel>::turbulence() const
{ {
return turbulence_; return turbulence_;

View File

@ -47,15 +47,13 @@ SourceFiles
#define MovingPhaseModel_H #define MovingPhaseModel_H
#include "phaseModel.H" #include "phaseModel.H"
#include "phaseCompressibleTurbulenceModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
template<class TransportModel>
class PhaseCompressibleTurbulenceModel;
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class phaseModel Declaration Class phaseModel Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -83,7 +81,7 @@ class MovingPhaseModel
volVectorField DUDt_; volVectorField DUDt_;
//- Turbulence model //- Turbulence model
autoPtr<PhaseCompressibleTurbulenceModel<phaseModel> > turbulence_; autoPtr<phaseCompressibleTurbulenceModel> turbulence_;
//- Continuity error //- Continuity error
volScalarField continuityError_; volScalarField continuityError_;
@ -178,8 +176,7 @@ public:
// Turbulence // Turbulence
//- Return the turbulence model //- Return the turbulence model
virtual const PhaseCompressibleTurbulenceModel<phaseModel>& virtual const phaseCompressibleTurbulenceModel& turbulence() const;
turbulence() const;
}; };

View File

@ -0,0 +1,52 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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/>.
Typedef
Foam::phaseCompressibleTurbulenceModel
Description
Typedef for phaseCompressibleTurbulenceModel
\*---------------------------------------------------------------------------*/
#ifndef phaseCompressibleTurbulenceModel_H
#define phaseCompressibleTurbulenceModel_H
#include "phaseCompressibleTurbulenceModelFwd.H"
#include "PhaseCompressibleTurbulenceModel.H"
#include "ThermalDiffusivity.H"
#include "phaseModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef ThermalDiffusivity<PhaseCompressibleTurbulenceModel<phaseModel> >
phaseCompressibleTurbulenceModel;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,55 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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/>.
Typedef
Foam::phaseCompressibleTurbulenceModel
Description
Forward declaration of typedef for phaseCompressibleTurbulenceModel
\*---------------------------------------------------------------------------*/
#ifndef phaseCompressibleTurbulenceModelFwd_H
#define phaseCompressibleTurbulenceModelFwd_H
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class phaseModel;
template<class TransportModel>
class PhaseCompressibleTurbulenceModel;
template<class BasicTurbulenceModel>
class ThermalDiffusivity;
typedef ThermalDiffusivity<PhaseCompressibleTurbulenceModel<phaseModel> >
phaseCompressibleTurbulenceModel;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -38,6 +38,7 @@ SourceFiles
#include "surfaceFields.H" #include "surfaceFields.H"
#include "fvMatricesFwd.H" #include "fvMatricesFwd.H"
#include "rhoThermo.H" #include "rhoThermo.H"
#include "phaseCompressibleTurbulenceModelFwd.H"
#include "runTimeSelectionTables.H" #include "runTimeSelectionTables.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -48,9 +49,6 @@ namespace Foam
class phaseSystem; class phaseSystem;
class diameterModel; class diameterModel;
template<class TransportModel>
class PhaseCompressibleTurbulenceModel;
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class phaseModel Declaration Class phaseModel Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -342,7 +340,7 @@ public:
// Turbulence // Turbulence
//- Return the turbulence model //- Return the turbulence model
virtual const PhaseCompressibleTurbulenceModel<phaseModel>& virtual const phaseCompressibleTurbulenceModel&
turbulence() const = 0; turbulence() const = 0;
}; };

View File

@ -23,15 +23,10 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "PhaseCompressibleTurbulenceModel.H" #include "phaseCompressibleTurbulenceModel.H"
#include "phaseModel.H"
#include "multiphaseSystem.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "makeTurbulenceModel.H" #include "makeTurbulenceModel.H"
#include "ThermalDiffusivity.H"
#include "EddyDiffusivity.H"
#include "laminar.H" #include "laminar.H"
#include "RASModel.H" #include "RASModel.H"
#include "LESModel.H" #include "LESModel.H"

View File

@ -35,7 +35,7 @@ Description
#include "fvCFD.H" #include "fvCFD.H"
#include "twoPhaseSystem.H" #include "twoPhaseSystem.H"
#include "PhaseCompressibleTurbulenceModel.H" #include "phaseCompressibleTurbulenceModel.H"
#include "fixedFluxPressureFvPatchScalarField.H" #include "fixedFluxPressureFvPatchScalarField.H"
#include "pimpleControl.H" #include "pimpleControl.H"
#include "localEulerDdtScheme.H" #include "localEulerDdtScheme.H"

View File

@ -43,10 +43,7 @@ Foam::RASModels::kineticTheoryModel::kineticTheoryModel
: :
eddyViscosity eddyViscosity
< <
RASModel<EddyDiffusivity<ThermalDiffusivity RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel> >
<
PhaseCompressibleTurbulenceModel<phaseModel>
> > >
> >
( (
type, type,
@ -189,10 +186,7 @@ bool Foam::RASModels::kineticTheoryModel::read()
( (
eddyViscosity eddyViscosity
< <
RASModel<EddyDiffusivity<ThermalDiffusivity RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel> >
<
PhaseCompressibleTurbulenceModel<phaseModel>
> > >
>::read() >::read()
) )
{ {

View File

@ -47,8 +47,7 @@ SourceFiles
#include "RASModel.H" #include "RASModel.H"
#include "eddyViscosity.H" #include "eddyViscosity.H"
#include "PhaseCompressibleTurbulenceModel.H" #include "phaseCompressibleTurbulenceModel.H"
#include "ThermalDiffusivity.H"
#include "EddyDiffusivity.H" #include "EddyDiffusivity.H"
#include "phaseModel.H" #include "phaseModel.H"
#include "dragModel.H" #include "dragModel.H"
@ -74,10 +73,7 @@ class kineticTheoryModel
: :
public eddyViscosity public eddyViscosity
< <
RASModel<EddyDiffusivity<ThermalDiffusivity RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel> >
<
PhaseCompressibleTurbulenceModel<phaseModel>
> > >
> >
{ {
// Private data // Private data

View File

@ -23,15 +23,10 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "PhaseCompressibleTurbulenceModel.H" #include "phaseCompressibleTurbulenceModel.H"
#include "phaseModel.H"
#include "twoPhaseSystem.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "makeTurbulenceModel.H" #include "makeTurbulenceModel.H"
#include "ThermalDiffusivity.H"
#include "EddyDiffusivity.H"
#include "laminar.H" #include "laminar.H"
#include "RASModel.H" #include "RASModel.H"
#include "LESModel.H" #include "LESModel.H"

View File

@ -42,10 +42,7 @@ Foam::RASModels::phasePressureModel::phasePressureModel
: :
eddyViscosity eddyViscosity
< <
RASModel<EddyDiffusivity<ThermalDiffusivity RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel> >
<
PhaseCompressibleTurbulenceModel<phaseModel>
> > >
> >
( (
type, type,
@ -93,10 +90,7 @@ bool Foam::RASModels::phasePressureModel::read()
( (
eddyViscosity eddyViscosity
< <
RASModel<EddyDiffusivity<ThermalDiffusivity RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel> >
<
PhaseCompressibleTurbulenceModel<phaseModel>
> > >
>::read() >::read()
) )
{ {

View File

@ -53,8 +53,7 @@ SourceFiles
#include "RASModel.H" #include "RASModel.H"
#include "eddyViscosity.H" #include "eddyViscosity.H"
#include "PhaseCompressibleTurbulenceModel.H" #include "phaseCompressibleTurbulenceModel.H"
#include "ThermalDiffusivity.H"
#include "EddyDiffusivity.H" #include "EddyDiffusivity.H"
#include "phaseModel.H" #include "phaseModel.H"
@ -73,10 +72,7 @@ class phasePressureModel
: :
public eddyViscosity public eddyViscosity
< <
RASModel<EddyDiffusivity<ThermalDiffusivity RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel> >
<
PhaseCompressibleTurbulenceModel<phaseModel>
> > >
> >
{ {
// Private data // Private data

View File

@ -25,7 +25,7 @@ License
#include "IATEsource.H" #include "IATEsource.H"
#include "fvMatrix.H" #include "fvMatrix.H"
#include "PhaseCompressibleTurbulenceModel.H" #include "phaseCompressibleTurbulenceModel.H"
#include "uniformDimensionedFields.H" #include "uniformDimensionedFields.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //

View File

@ -63,6 +63,7 @@ Foam::ThermalDiffusivity<BasicTurbulenceModel>::New
const alphaField& alpha, const alphaField& alpha,
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& alphaRhoPhi,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const transportModel& transport, const transportModel& transport,
const word& propertiesName const word& propertiesName
@ -76,6 +77,7 @@ Foam::ThermalDiffusivity<BasicTurbulenceModel>::New
alpha, alpha,
rho, rho,
U, U,
alphaRhoPhi,
phi, phi,
transport, transport,
propertiesName propertiesName

View File

@ -82,6 +82,7 @@ public:
const alphaField& alpha, const alphaField& alpha,
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& alphaRhoPhi,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const transportModel& trasportModel, const transportModel& trasportModel,
const word& propertiesName = turbulenceModel::propertiesName const word& propertiesName = turbulenceModel::propertiesName

View File

@ -23,6 +23,8 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "EddyDiffusivity.H"
#define makeBaseTurbulenceModel( \ #define makeBaseTurbulenceModel( \
Alpha, Rho, baseModel, BaseModel, TDModel, Transport) \ Alpha, Rho, baseModel, BaseModel, TDModel, Transport) \
\ \