reactingEulerFoam: Instantiated PhaseThermophysicalTransportModel on rhoThermo and rhoReactionThermo
Now the PhaseThermophysicalTransportModel in reactingEulerFoam has access to either rhoThermo or rhoReactionThermo depending on the choice of the thermo package and provides necessary to structure to support multi-component diffusion for reacting phases in the future.
This commit is contained in:
@ -25,8 +25,6 @@ License
|
||||
|
||||
#include "MovingPhaseModel.H"
|
||||
#include "phaseSystem.H"
|
||||
#include "phaseCompressibleMomentumTransportModel.H"
|
||||
#include "phaseThermophysicalTransportModel.H"
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
#include "slipFvPatchFields.H"
|
||||
#include "partialSlipFvPatchFields.H"
|
||||
@ -37,8 +35,6 @@ License
|
||||
#include "fvcDdt.H"
|
||||
#include "fvcDiv.H"
|
||||
#include "fvcFlux.H"
|
||||
#include "surfaceInterpolate.H"
|
||||
#include "fvMatrix.H"
|
||||
|
||||
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
|
||||
|
||||
@ -177,7 +173,11 @@ Foam::MovingPhaseModel<BasePhaseModel>::MovingPhaseModel
|
||||
),
|
||||
thermophysicalTransport_
|
||||
(
|
||||
phaseThermophysicalTransportModel::New(turbulence_, this->thermo())
|
||||
PhaseThermophysicalTransportModel
|
||||
<
|
||||
phaseCompressibleMomentumTransportModel,
|
||||
typename BasePhaseModel::thermoModel
|
||||
>::New(turbulence_, this->thermo_)
|
||||
),
|
||||
continuityError_
|
||||
(
|
||||
|
||||
@ -46,7 +46,7 @@ SourceFiles
|
||||
|
||||
#include "phaseModel.H"
|
||||
#include "phaseCompressibleMomentumTransportModel.H"
|
||||
#include "phaseThermophysicalTransportModel.H"
|
||||
#include "PhaseThermophysicalTransportModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -91,7 +91,14 @@ protected:
|
||||
autoPtr<phaseCompressibleMomentumTransportModel> turbulence_;
|
||||
|
||||
//- Thermophysical transport model
|
||||
autoPtr<phaseThermophysicalTransportModel> thermophysicalTransport_;
|
||||
autoPtr
|
||||
<
|
||||
PhaseThermophysicalTransportModel
|
||||
<
|
||||
phaseCompressibleMomentumTransportModel,
|
||||
typename BasePhaseModel::thermoModel
|
||||
>
|
||||
> thermophysicalTransport_;
|
||||
|
||||
//- Continuity error
|
||||
volScalarField continuityError_;
|
||||
|
||||
@ -1,53 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2020 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::phaseThermophysicalTransportModel
|
||||
|
||||
Description
|
||||
Typedef for phaseThermophysicalTransportModel
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef phaseThermophysicalTransportModel_H
|
||||
#define phaseThermophysicalTransportModel_H
|
||||
|
||||
#include "PhaseThermophysicalTransportModel.H"
|
||||
#include "phaseCompressibleMomentumTransportModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
typedef PhaseThermophysicalTransportModel
|
||||
<
|
||||
phaseCompressibleMomentumTransportModel,
|
||||
fluidThermo
|
||||
> phaseThermophysicalTransportModel;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -24,20 +24,12 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "ThermoPhaseModel.H"
|
||||
|
||||
#include "phaseSystem.H"
|
||||
|
||||
#include "fvmDdt.H"
|
||||
#include "fvmDiv.H"
|
||||
#include "fvmSup.H"
|
||||
#include "fvmLaplacian.H"
|
||||
#include "fvcDdt.H"
|
||||
#include "fvcDiv.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class BasePhaseModel, class ThermoType>
|
||||
Foam::ThermoPhaseModel<BasePhaseModel, ThermoType>::ThermoPhaseModel
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
Foam::ThermoPhaseModel<BasePhaseModel, ThermoModel>::ThermoPhaseModel
|
||||
(
|
||||
const phaseSystem& fluid,
|
||||
const word& phaseName,
|
||||
@ -45,7 +37,7 @@ Foam::ThermoPhaseModel<BasePhaseModel, ThermoType>::ThermoPhaseModel
|
||||
)
|
||||
:
|
||||
BasePhaseModel(fluid, phaseName, index),
|
||||
thermo_(ThermoType::New(fluid.mesh(), this->name()))
|
||||
thermo_(ThermoModel::New(fluid.mesh(), this->name()))
|
||||
{
|
||||
thermo_->validate
|
||||
(
|
||||
@ -58,62 +50,62 @@ Foam::ThermoPhaseModel<BasePhaseModel, ThermoType>::ThermoPhaseModel
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class BasePhaseModel, class ThermoType>
|
||||
Foam::ThermoPhaseModel<BasePhaseModel, ThermoType>::~ThermoPhaseModel()
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
Foam::ThermoPhaseModel<BasePhaseModel, ThermoModel>::~ThermoPhaseModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class BasePhaseModel, class ThermoType>
|
||||
bool Foam::ThermoPhaseModel<BasePhaseModel, ThermoType>::incompressible() const
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
bool Foam::ThermoPhaseModel<BasePhaseModel, ThermoModel>::incompressible() const
|
||||
{
|
||||
return thermo_().incompressible();
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel, class ThermoType>
|
||||
bool Foam::ThermoPhaseModel<BasePhaseModel, ThermoType>::isochoric() const
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
bool Foam::ThermoPhaseModel<BasePhaseModel, ThermoModel>::isochoric() const
|
||||
{
|
||||
return thermo_().isochoric();
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel, class ThermoType>
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
const Foam::rhoThermo&
|
||||
Foam::ThermoPhaseModel<BasePhaseModel, ThermoType>::thermo() const
|
||||
Foam::ThermoPhaseModel<BasePhaseModel, ThermoModel>::thermo() const
|
||||
{
|
||||
return thermo_();
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel, class ThermoType>
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
Foam::rhoThermo&
|
||||
Foam::ThermoPhaseModel<BasePhaseModel, ThermoType>::thermoRef()
|
||||
Foam::ThermoPhaseModel<BasePhaseModel, ThermoModel>::thermoRef()
|
||||
{
|
||||
return thermo_();
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel, class ThermoType>
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::ThermoPhaseModel<BasePhaseModel, ThermoType>::rho() const
|
||||
Foam::ThermoPhaseModel<BasePhaseModel, ThermoModel>::rho() const
|
||||
{
|
||||
return thermo_->rho();
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel, class ThermoType>
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::ThermoPhaseModel<BasePhaseModel, ThermoType>::mu() const
|
||||
Foam::ThermoPhaseModel<BasePhaseModel, ThermoModel>::mu() const
|
||||
{
|
||||
return thermo_->mu();
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel, class ThermoType>
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::ThermoPhaseModel<BasePhaseModel, ThermoType>::mu
|
||||
Foam::ThermoPhaseModel<BasePhaseModel, ThermoModel>::mu
|
||||
(
|
||||
const label patchi
|
||||
) const
|
||||
@ -122,17 +114,17 @@ Foam::ThermoPhaseModel<BasePhaseModel, ThermoType>::mu
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel, class ThermoType>
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::ThermoPhaseModel<BasePhaseModel, ThermoType>::nu() const
|
||||
Foam::ThermoPhaseModel<BasePhaseModel, ThermoModel>::nu() const
|
||||
{
|
||||
return thermo_->nu();
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseModel, class ThermoType>
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::ThermoPhaseModel<BasePhaseModel, ThermoType>::nu
|
||||
Foam::ThermoPhaseModel<BasePhaseModel, ThermoModel>::nu
|
||||
(
|
||||
const label patchi
|
||||
) const
|
||||
|
||||
@ -39,8 +39,6 @@ SourceFiles
|
||||
#ifndef ThermoPhaseModel_H
|
||||
#define ThermoPhaseModel_H
|
||||
|
||||
#include "phaseModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
@ -52,7 +50,7 @@ class rhoThermo;
|
||||
Class ThermoPhaseModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class BasePhaseModel, class ThermoType>
|
||||
template<class BasePhaseModel, class ThermoModel>
|
||||
class ThermoPhaseModel
|
||||
:
|
||||
public BasePhaseModel
|
||||
@ -62,11 +60,14 @@ protected:
|
||||
// Protected data
|
||||
|
||||
//- Thermophysical model
|
||||
autoPtr<ThermoType> thermo_;
|
||||
autoPtr<ThermoModel> thermo_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
typedef ThermoModel thermoModel;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
ThermoPhaseModel
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
phaseThermophysicalTransportModels.C
|
||||
rhoReactionPhaseThermophysicalTransportModels.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libphaseReactingTherophysicalTransportModels
|
||||
LIB = $(FOAM_LIBBIN)/libphaseReactingThermophysicalTransportModels
|
||||
|
||||
@ -24,10 +24,9 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "PhaseThermophysicalTransportModel.H"
|
||||
|
||||
#include "phaseCompressibleMomentumTransportModel.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "makeThermophysicalTransportModel.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
#include "laminarThermophysicalTransportModel.H"
|
||||
#include "RASThermophysicalTransportModel.H"
|
||||
@ -39,7 +38,7 @@ makeThermophysicalTransportModelTypes
|
||||
(
|
||||
PhaseThermophysicalTransportModel,
|
||||
phaseCompressibleMomentumTransportModel,
|
||||
fluidThermo
|
||||
rhoThermo
|
||||
);
|
||||
|
||||
|
||||
@ -47,7 +46,7 @@ makeThermophysicalTransportModels
|
||||
(
|
||||
PhaseThermophysicalTransportModel,
|
||||
phaseCompressibleMomentumTransportModel,
|
||||
fluidThermo
|
||||
rhoThermo
|
||||
);
|
||||
|
||||
|
||||
@ -56,7 +55,7 @@ makeThermophysicalTransportModels
|
||||
( \
|
||||
PhaseThermophysicalTransportModel, \
|
||||
phaseCompressibleMomentumTransportModel, \
|
||||
fluidThermo, \
|
||||
rhoThermo, \
|
||||
laminar, \
|
||||
Type \
|
||||
)
|
||||
@ -66,7 +65,7 @@ makeThermophysicalTransportModels
|
||||
( \
|
||||
PhaseThermophysicalTransportModel, \
|
||||
phaseCompressibleMomentumTransportModel, \
|
||||
fluidThermo, \
|
||||
rhoThermo, \
|
||||
SType, \
|
||||
Type \
|
||||
)
|
||||
@ -76,7 +75,7 @@ makeThermophysicalTransportModels
|
||||
( \
|
||||
PhaseThermophysicalTransportModel, \
|
||||
phaseCompressibleMomentumTransportModel, \
|
||||
fluidThermo, \
|
||||
rhoThermo, \
|
||||
RAS, \
|
||||
Type \
|
||||
)
|
||||
@ -86,7 +85,7 @@ makeThermophysicalTransportModels
|
||||
( \
|
||||
PhaseThermophysicalTransportModel, \
|
||||
phaseCompressibleMomentumTransportModel, \
|
||||
fluidThermo, \
|
||||
rhoThermo, \
|
||||
LES, \
|
||||
Type \
|
||||
)
|
||||
|
||||
@ -0,0 +1,119 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2020 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 "PhaseThermophysicalTransportModel.H"
|
||||
#include "phaseCompressibleMomentumTransportModel.H"
|
||||
#include "rhoReactionThermo.H"
|
||||
#include "makeThermophysicalTransportModel.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
#include "laminarThermophysicalTransportModel.H"
|
||||
#include "RASThermophysicalTransportModel.H"
|
||||
#include "LESThermophysicalTransportModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeThermophysicalTransportModelTypes
|
||||
(
|
||||
PhaseThermophysicalTransportModel,
|
||||
phaseCompressibleMomentumTransportModel,
|
||||
rhoReactionThermo
|
||||
);
|
||||
|
||||
|
||||
makeThermophysicalTransportModels
|
||||
(
|
||||
PhaseThermophysicalTransportModel,
|
||||
phaseCompressibleMomentumTransportModel,
|
||||
rhoReactionThermo
|
||||
);
|
||||
|
||||
|
||||
#define makeLaminarThermophysicalTransportModel(Type) \
|
||||
makeThermophysicalTransportModel \
|
||||
( \
|
||||
PhaseThermophysicalTransportModel, \
|
||||
phaseCompressibleMomentumTransportModel, \
|
||||
rhoReactionThermo, \
|
||||
laminar, \
|
||||
Type \
|
||||
)
|
||||
|
||||
#define makeRASLESThermophysicalTransportModel(SType, Type) \
|
||||
makeTurbulenceThermophysicalTransportModel \
|
||||
( \
|
||||
PhaseThermophysicalTransportModel, \
|
||||
phaseCompressibleMomentumTransportModel, \
|
||||
rhoReactionThermo, \
|
||||
SType, \
|
||||
Type \
|
||||
)
|
||||
|
||||
#define makeRASThermophysicalTransportModel(Type) \
|
||||
makeThermophysicalTransportModel \
|
||||
( \
|
||||
PhaseThermophysicalTransportModel, \
|
||||
phaseCompressibleMomentumTransportModel, \
|
||||
rhoReactionThermo, \
|
||||
RAS, \
|
||||
Type \
|
||||
)
|
||||
|
||||
#define makeLESThermophysicalTransportModel(Type) \
|
||||
makeThermophysicalTransportModel \
|
||||
( \
|
||||
PhaseThermophysicalTransportModel, \
|
||||
phaseCompressibleMomentumTransportModel, \
|
||||
rhoReactionThermo, \
|
||||
LES, \
|
||||
Type \
|
||||
)
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Laminar models
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
||||
#include "Fourier.H"
|
||||
makeLaminarThermophysicalTransportModel(Fourier);
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// RAS models
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
||||
#include "eddyDiffusivity.H"
|
||||
makeRASLESThermophysicalTransportModel(RAS, eddyDiffusivity);
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// LES models
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
||||
#include "eddyDiffusivity.H"
|
||||
makeRASLESThermophysicalTransportModel(LES, eddyDiffusivity);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -18,7 +18,7 @@ EXE_LIBS = \
|
||||
-lreactingEulerianInterfacialModels \
|
||||
-lreactingEulerianInterfacialCompositionModels \
|
||||
-lphaseReactingMomentumTransportModels \
|
||||
-lphaseReactingTherophysicalTransportModels \
|
||||
-lphaseReactingThermophysicalTransportModels \
|
||||
-lthermophysicalTransportModels \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
|
||||
@ -18,7 +18,7 @@ EXE_LIBS = \
|
||||
-lreactingEulerianInterfacialModels \
|
||||
-lreactingEulerianInterfacialCompositionModels \
|
||||
-lphaseReactingMomentumTransportModels \
|
||||
-lphaseReactingTherophysicalTransportModels \
|
||||
-lphaseReactingThermophysicalTransportModels \
|
||||
-ltwoPhaseReactingMomentumTransportModels \
|
||||
-lthermophysicalTransportModels \
|
||||
-lfiniteVolume \
|
||||
|
||||
Reference in New Issue
Block a user