TurbulenceModels: Refactored to transfer all heat and specie transport to the new ThermophysicalTransportModels library

This provides an extensible and run-time selectable framework to support complex
energy and specie transport models, in particular multi-component diffusion.
Currently only the Fourier for laminar and eddyDiffusivity for RAS and LES
turbulent flows are provided but the interface is general and the set of models
will be expanded in the near future.
This commit is contained in:
Henry Weller
2020-04-12 10:35:52 +01:00
parent 25b34809c7
commit 08e686eb18
82 changed files with 245 additions and 975 deletions

View File

@ -54,7 +54,7 @@ PDRkEpsilon::PDRkEpsilon
const word& modelName
)
:
Foam::RASModels::kEpsilon<EddyDiffusivity<compressible::turbulenceModel>>
Foam::RASModels::kEpsilon<compressible::turbulenceModel>
(
geometricOneField(),
rho,

View File

@ -78,13 +78,7 @@ namespace RASModels
class PDRkEpsilon
:
public Foam::RASModels::kEpsilon
<
EddyDiffusivity
<
compressible::turbulenceModel
>
>
public Foam::RASModels::kEpsilon<compressible::turbulenceModel>
{
// Private Data

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -34,14 +34,13 @@ Description
#include "VoFphaseCompressibleTurbulenceModelFwd.H"
#include "PhaseCompressibleTurbulenceModel.H"
#include "ThermalDiffusivity.H"
#include "fluidThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef ThermalDiffusivity<PhaseCompressibleTurbulenceModel<fluidThermo>>
typedef PhaseCompressibleTurbulenceModel<fluidThermo>
VoFphaseCompressibleTurbulenceModel;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -41,10 +41,7 @@ namespace Foam
template<class TransportModel>
class PhaseCompressibleTurbulenceModel;
template<class BasicTurbulenceModel>
class ThermalDiffusivity;
typedef ThermalDiffusivity<PhaseCompressibleTurbulenceModel<fluidThermo>>
typedef PhaseCompressibleTurbulenceModel<fluidThermo>
VoFphaseCompressibleTurbulenceModel;
}

View File

@ -28,9 +28,6 @@ License
#include "addToRunTimeSelectionTable.H"
#include "makeTurbulenceModel.H"
#include "ThermalDiffusivity.H"
#include "EddyDiffusivity.H"
#include "laminarModel.H"
#include "RASModel.H"
#include "LESModel.H"
@ -43,7 +40,6 @@ makeTurbulenceModelTypes
volScalarField,
compressibleTurbulenceModel,
PhaseCompressibleTurbulenceModel,
ThermalDiffusivity,
fluidThermo
);
@ -53,7 +49,6 @@ makeBaseTurbulenceModel
volScalarField,
compressibleTurbulenceModel,
PhaseCompressibleTurbulenceModel,
ThermalDiffusivity,
fluidThermo
);

View File

@ -94,8 +94,7 @@ Foam::compressibleInterPhaseTransportModel::compressibleInterPhaseTransportModel
turbulence1_ =
(
ThermalDiffusivity<PhaseCompressibleTurbulenceModel<fluidThermo>>
::New
PhaseCompressibleTurbulenceModel<fluidThermo>::New
(
alpha1,
rho1,
@ -108,8 +107,7 @@ Foam::compressibleInterPhaseTransportModel::compressibleInterPhaseTransportModel
turbulence2_ =
(
ThermalDiffusivity<PhaseCompressibleTurbulenceModel<fluidThermo>>
::New
PhaseCompressibleTurbulenceModel<fluidThermo>::New
(
alpha2,
rho2,

View File

@ -84,16 +84,10 @@ class compressibleInterPhaseTransportModel
autoPtr<compressible::turbulenceModel> turbulence_;
//- Phase-1 transport model (constructed for two-phase transport)
autoPtr
<
ThermalDiffusivity<PhaseCompressibleTurbulenceModel<fluidThermo>>
> turbulence1_;
autoPtr<PhaseCompressibleTurbulenceModel<fluidThermo>> turbulence1_;
//- Phase-2 transport model (constructed for two-phase transport)
autoPtr
<
ThermalDiffusivity<PhaseCompressibleTurbulenceModel<fluidThermo>>
> turbulence2_;
autoPtr<PhaseCompressibleTurbulenceModel<fluidThermo>> turbulence2_;
public:

View File

@ -13,10 +13,4 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
LIB_LIBS = \
-lreactingPhaseSystem \
-lreactingEulerianInterfacialModels \
-lreactingEulerianInterfacialCompositionModels \
-lfiniteVolume \
-lfvOptions \
-lmeshTools
LIB_LIBS =

View File

@ -26,7 +26,6 @@ License
#include "alphatWallBoilingWallFunctionFvPatchScalarField.H"
#include "phaseSystem.H"
#include "compressibleTurbulenceModel.H"
#include "ThermalDiffusivity.H"
#include "PhaseCompressibleTurbulenceModel.H"
#include "saturationModel.H"
#include "rhoReactionThermo.H"

View File

@ -29,7 +29,6 @@ License
#include "phaseSystem.H"
#include "compressibleTurbulenceModel.H"
#include "ThermalDiffusivity.H"
#include "PhaseCompressibleTurbulenceModel.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -27,7 +27,6 @@ License
#include "addToRunTimeSelectionTable.H"
#include "uniformDimensionedFields.H"
#include "compressibleTurbulenceModel.H"
#include "ThermalDiffusivity.H"
#include "PhaseCompressibleTurbulenceModel.H"
#include "phaseSystem.H"

View File

@ -27,7 +27,6 @@ License
#include "addToRunTimeSelectionTable.H"
#include "uniformDimensionedFields.H"
#include "compressibleTurbulenceModel.H"
#include "ThermalDiffusivity.H"
#include "PhaseCompressibleTurbulenceModel.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //

View File

@ -27,7 +27,6 @@ License
#include "addToRunTimeSelectionTable.H"
#include "uniformDimensionedFields.H"
#include "compressibleTurbulenceModel.H"
#include "ThermalDiffusivity.H"
#include "PhaseCompressibleTurbulenceModel.H"
#include "phaseSystem.H"

View File

@ -73,10 +73,7 @@ Foam::RASModels::kineticTheoryModel::kineticTheoryModel
const word& type
)
:
eddyViscosity
<
RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel>>
>
eddyViscosity<RASModel<phaseCompressibleTurbulenceModel>>
(
type,
alpha,
@ -241,10 +238,7 @@ bool Foam::RASModels::kineticTheoryModel::read()
{
if
(
eddyViscosity
<
RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel>>
>::read()
eddyViscosity<RASModel<phaseCompressibleTurbulenceModel>>::read()
)
{
coeffDict().lookup("equilibrium") >> equilibrium_;

View File

@ -48,7 +48,6 @@ SourceFiles
#include "RASModel.H"
#include "eddyViscosity.H"
#include "phaseCompressibleTurbulenceModel.H"
#include "EddyDiffusivity.H"
#include "phaseModel.H"
#include "dragModel.H"
#include "viscosityModel.H"
@ -71,10 +70,7 @@ namespace RASModels
class kineticTheoryModel
:
public eddyViscosity
<
RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel>>
>
public eddyViscosity<RASModel<phaseCompressibleTurbulenceModel>>
{
// Private Data

View File

@ -39,7 +39,6 @@ makeTurbulenceModelTypes
volScalarField,
compressibleTurbulenceModel,
PhaseCompressibleTurbulenceModel,
ThermalDiffusivity,
phaseModel
);
@ -49,7 +48,6 @@ makeBaseTurbulenceModel
volScalarField,
compressibleTurbulenceModel,
PhaseCompressibleTurbulenceModel,
ThermalDiffusivity,
phaseModel
);

View File

@ -38,10 +38,7 @@ Foam::RASModels::phasePressureModel::phasePressureModel
const word& type
)
:
eddyViscosity
<
RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel>>
>
eddyViscosity<RASModel<phaseCompressibleTurbulenceModel>>
(
type,
alpha,
@ -83,11 +80,7 @@ bool Foam::RASModels::phasePressureModel::read()
{
if
(
eddyViscosity
<
RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel>>
>::read()
)
eddyViscosity<RASModel<phaseCompressibleTurbulenceModel>>::read())
{
coeffDict().lookup("alphaMax") >> alphaMax_;
coeffDict().lookup("preAlphaExp") >> preAlphaExp_;

View File

@ -54,7 +54,6 @@ SourceFiles
#include "RASModel.H"
#include "eddyViscosity.H"
#include "phaseCompressibleTurbulenceModel.H"
#include "EddyDiffusivity.H"
#include "phaseModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -70,10 +69,7 @@ namespace RASModels
class phasePressureModel
:
public eddyViscosity
<
RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel>>
>
public eddyViscosity<RASModel<phaseCompressibleTurbulenceModel>>
{
// Private Data

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -34,14 +34,13 @@ Description
#include "phaseCompressibleTurbulenceModelFwd.H"
#include "PhaseCompressibleTurbulenceModel.H"
#include "ThermalDiffusivity.H"
#include "phaseModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef ThermalDiffusivity<PhaseCompressibleTurbulenceModel<phaseModel>>
typedef PhaseCompressibleTurbulenceModel<phaseModel>
phaseCompressibleTurbulenceModel;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -41,10 +41,7 @@ namespace Foam
template<class TransportModel>
class PhaseCompressibleTurbulenceModel;
template<class BasicTurbulenceModel>
class ThermalDiffusivity;
typedef ThermalDiffusivity<PhaseCompressibleTurbulenceModel<phaseModel>>
typedef PhaseCompressibleTurbulenceModel<phaseModel>
phaseCompressibleTurbulenceModel;
}

View File

@ -71,17 +71,6 @@ wallBoiling
)
).dPtr()()
)
),
turbulence_
(
popBal_.mesh().lookupObjectRef<phaseCompressibleTurbulenceModel>
(
IOobject::groupName
(
turbulenceModel::typeName,
popBal_.continuousPhase().name()
)
)
)
{}
@ -90,8 +79,13 @@ wallBoiling
void Foam::diameterModels::nucleationModels::wallBoiling::correct()
{
const tmp<volScalarField> talphat(turbulence_.alphat());
const volScalarField::Boundary& alphatBf = talphat().boundaryField();
const volScalarField& alphat =
popBal_.mesh().lookupObject<volScalarField>
(
IOobject::groupName("alphat", popBal_.continuousPhase().name())
);
const volScalarField::Boundary& alphatBf = alphat.boundaryField();
typedef compressible::alphatWallBoilingWallFunctionFvPatchScalarField
alphatWallBoilingWallFunction;
@ -153,8 +147,14 @@ Foam::diameterModels::nucleationModels::wallBoiling::addToNucleationRate
const sizeGroup& fi = popBal_.sizeGroups()[i];
const phaseModel& phase = fi.phase();
const volScalarField& rho = phase.rho();
const tmp<volScalarField> talphat(turbulence_.alphat());
const volScalarField::Boundary& alphatBf = talphat().boundaryField();
const volScalarField& alphat =
popBal_.mesh().lookupObject<volScalarField>
(
IOobject::groupName("alphat", popBal_.continuousPhase().name())
);
const volScalarField::Boundary& alphatBf = alphat.boundaryField();
typedef compressible::alphatWallBoilingWallFunctionFvPatchScalarField
alphatWallBoilingWallFunction;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2018-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2018-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -41,7 +41,6 @@ SourceFiles
#define wallBoiling_H
#include "nucleationModel.H"
#include "phaseCompressibleTurbulenceModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -65,9 +64,6 @@ class wallBoiling
//- Velocity group in which the nucleation occurs
const velocityGroup& velGroup_;
//- Pointer to turbulence model
const phaseCompressibleTurbulenceModel& turbulence_;
public:

View File

@ -39,7 +39,6 @@ makeTurbulenceModelTypes
volScalarField,
compressibleTurbulenceModel,
PhaseCompressibleTurbulenceModel,
ThermalDiffusivity,
phaseModel
);

View File

@ -24,7 +24,6 @@ License
\*---------------------------------------------------------------------------*/
#include "wallBoiling.H"
#include "phaseCompressibleTurbulenceModel.H"
#include "alphatWallBoilingWallFunctionFvPatchScalarField.H"
#include "fvmSup.H"
#include "addToRunTimeSelectionTable.H"
@ -89,18 +88,13 @@ Foam::diameterModels::IATEsources::wallBoiling::R
dimensionedScalar(kappai.dimensions()/dimTime, 0)
);
const phaseCompressibleTurbulenceModel& turbulence =
phase().db().lookupObjectRef<phaseCompressibleTurbulenceModel>
const volScalarField& alphat =
phase().mesh().lookupObject<volScalarField>
(
IOobject::groupName
(
turbulenceModel::typeName,
otherPhase().name()
)
IOobject::groupName("alphat", otherPhase().name())
);
const tmp<volScalarField> talphat(turbulence.alphat());
const volScalarField::Boundary& alphatBf = talphat().boundaryField();
const volScalarField::Boundary& alphatBf = alphat.boundaryField();
const scalarField& rho = phase().rho();

View File

@ -41,10 +41,7 @@ Foam::RASModels::kineticTheoryModel::kineticTheoryModel
const word& type
)
:
eddyViscosity
<
RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel>>
>
eddyViscosity<RASModel<phaseCompressibleTurbulenceModel>>
(
type,
alpha,
@ -204,10 +201,7 @@ bool Foam::RASModels::kineticTheoryModel::read()
{
if
(
eddyViscosity
<
RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel>>
>::read()
eddyViscosity<RASModel<phaseCompressibleTurbulenceModel>>::read()
)
{
coeffDict().lookup("equilibrium") >> equilibrium_;

View File

@ -48,7 +48,6 @@ SourceFiles
#include "RASModel.H"
#include "eddyViscosity.H"
#include "phaseCompressibleTurbulenceModel.H"
#include "EddyDiffusivity.H"
#include "phaseModel.H"
#include "dragModel.H"
#include "viscosityModel.H"
@ -71,10 +70,7 @@ namespace RASModels
class kineticTheoryModel
:
public eddyViscosity
<
RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel>>
>
public eddyViscosity<RASModel<phaseCompressibleTurbulenceModel>>
{
// Private Data

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -34,14 +34,13 @@ Description
#include "phaseCompressibleTurbulenceModelFwd.H"
#include "PhaseCompressibleTurbulenceModel.H"
#include "ThermalDiffusivity.H"
#include "phaseModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef ThermalDiffusivity<PhaseCompressibleTurbulenceModel<phaseModel>>
typedef PhaseCompressibleTurbulenceModel<phaseModel>
phaseCompressibleTurbulenceModel;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -41,11 +41,8 @@ namespace Foam
template<class TransportModel>
class PhaseCompressibleTurbulenceModel;
template<class BasicTurbulenceModel>
class ThermalDiffusivity;
typedef ThermalDiffusivity<PhaseCompressibleTurbulenceModel<phaseModel>>
phaseCompressibleTurbulenceModel;
typedef PhaseCompressibleTurbulenceModel<phaseModel>
phaseCompressibleTurbulenceModel;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2014-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2014-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -29,9 +29,6 @@ License
#include "addToRunTimeSelectionTable.H"
#include "makeTurbulenceModel.H"
#include "ThermalDiffusivity.H"
#include "EddyDiffusivity.H"
#include "laminarModel.H"
#include "RASModel.H"
#include "LESModel.H"
@ -44,7 +41,6 @@ makeTurbulenceModelTypes
volScalarField,
compressibleTurbulenceModel,
PhaseCompressibleTurbulenceModel,
ThermalDiffusivity,
phaseModel
);
@ -54,7 +50,6 @@ makeBaseTurbulenceModel
volScalarField,
compressibleTurbulenceModel,
PhaseCompressibleTurbulenceModel,
ThermalDiffusivity,
phaseModel
);

View File

@ -39,13 +39,7 @@ Foam::RASModels::phasePressureModel::phasePressureModel
const word& type
)
:
eddyViscosity
<
RASModel<EddyDiffusivity<ThermalDiffusivity
<
PhaseCompressibleTurbulenceModel<phaseModel>
>>>
>
eddyViscosity<RASModel<PhaseCompressibleTurbulenceModel<phaseModel>>>
(
type,
alpha,
@ -87,13 +81,8 @@ bool Foam::RASModels::phasePressureModel::read()
{
if
(
eddyViscosity
<
RASModel<EddyDiffusivity<ThermalDiffusivity
<
PhaseCompressibleTurbulenceModel<phaseModel>
>>>
>::read()
eddyViscosity<RASModel<PhaseCompressibleTurbulenceModel<phaseModel>>>
::read()
)
{
coeffDict().lookup("alphaMax") >> alphaMax_;

View File

@ -54,8 +54,6 @@ SourceFiles
#include "RASModel.H"
#include "eddyViscosity.H"
#include "PhaseCompressibleTurbulenceModel.H"
#include "ThermalDiffusivity.H"
#include "EddyDiffusivity.H"
#include "phaseModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -71,13 +69,7 @@ namespace RASModels
class phasePressureModel
:
public eddyViscosity
<
RASModel<EddyDiffusivity<ThermalDiffusivity
<
PhaseCompressibleTurbulenceModel<phaseModel>
>>>
>
public eddyViscosity<RASModel<PhaseCompressibleTurbulenceModel<phaseModel>>>
{
// Private Data

View File

@ -1,3 +1,3 @@
phaseThermophysicalTransportModels.C
LIB = $(FOAM_LIBBIN)/libphaseReactingTherophysicalTransportModels
LIB = $(FOAM_LIBBIN)/libphaseTherophysicalTransportModels

View File

@ -1,8 +1,7 @@
thermophysicalTransportModel/thermophysicalTransportModel.C
thermophysicalTransportModels/thermophysicalTransportModels.C
/*
BCs = turbulentFluidThermoModels/derivedFvPatchFields
BCs = derivedFvPatchFields
$(BCs)/temperatureCoupledBase/temperatureCoupledBase.C
$(BCs)/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C
$(BCs)/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.C
@ -11,9 +10,7 @@ $(BCs)/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFv
$(BCs)/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C
$(BCs)/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C
$(BCs)/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C
turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C
turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C
*/
$(BCs)/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C
$(BCs)/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C
LIB = $(FOAM_LIBBIN)/libthermophysicalTransportModels

View File

@ -36,8 +36,6 @@ SourceFiles
#define ThermophysicalTransportModel_H
#include "thermophysicalTransportModel.H"
#include "autoPtr.H"
#include "fluidThermo.H"
#include "runTimeSelectionTables.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -122,7 +120,7 @@ public:
}
//- Access function to incompressible transport model
const fluidThermo& thermo() const
virtual const fluidThermo& thermo() const
{
return momentumTransport_.transport();
}

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "alphatJayatillekeWallFunctionFvPatchScalarField.H"
#include "turbulentFluidThermoModel.H"
#include "thermophysicalTransportModel.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -159,17 +159,18 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs()
const label patchi = patch().index();
// Retrieve turbulence properties from model
const compressible::turbulenceModel& turbModel =
db().lookupObject<compressible::turbulenceModel>
const thermophysicalTransportModel& ttm =
db().lookupObject<thermophysicalTransportModel>
(
IOobject::groupName
(
compressible::turbulenceModel::typeName,
thermophysicalTransportModel::typeName,
internalField().group()
)
);
const compressibleTurbulenceModel& turbModel = ttm.momentumTransport();
const nutWallFunctionFvPatchScalarField& nutw =
nutWallFunctionFvPatchScalarField::nutw(turbModel, patchi);
@ -180,7 +181,7 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs()
const tmp<scalarField> tmuw = turbModel.mu(patchi);
const scalarField& muw = tmuw();
const tmp<scalarField> talphaw = turbModel.alpha(patchi);
const tmp<scalarField> talphaw = ttm.thermo().alpha(patchi);
const scalarField& alphaw = talphaw();
scalarField& alphatw = *this;
@ -193,14 +194,10 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs()
const scalarField magGradUw(mag(Uw.snGrad()));
const scalarField& rhow = turbModel.rho().boundaryField()[patchi];
const fvPatchScalarField& hew =
turbModel.transport().he().boundaryField()[patchi];
const fvPatchScalarField& hew = ttm.thermo().he().boundaryField()[patchi];
// Heat flux [W/m^2] - lagging alphatw
const scalarField qDot
(
turbModel.transport().alphaEff(alphatw, patchi)*hew.snGrad()
);
const scalarField qDot(ttm.thermo().alphaEff(alphatw, patchi)*hew.snGrad());
// Populate boundary values
forAll(alphatw, facei)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -24,9 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "alphatWallFunctionFvPatchScalarField.H"
#include "compressibleTurbulenceModel.H"
#include "fvPatchFieldMapper.H"
#include "volFields.H"
#include "thermophysicalTransportModel.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -106,18 +104,20 @@ void alphatWallFunctionFvPatchScalarField::updateCoeffs()
const label patchi = patch().index();
// Retrieve turbulence properties from model
const compressibleTurbulenceModel& turbModel =
db().lookupObject<compressibleTurbulenceModel>
const thermophysicalTransportModel& ttm =
db().lookupObject<thermophysicalTransportModel>
(
IOobject::groupName
(
turbulenceModel::typeName,
thermophysicalTransportModel::typeName,
internalField().group()
)
);
const compressibleTurbulenceModel& turbModel = ttm.momentumTransport();
const scalarField& rhow = turbModel.rho().boundaryField()[patchi];
const tmp<scalarField> tnutw = turbModel.nut(patchi);
operator==(rhow*tnutw/Prt_);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -24,8 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "convectiveHeatTransferFvPatchScalarField.H"
#include "turbulentFluidThermoModel.H"
#include "fvPatchFieldMapper.H"
#include "thermophysicalTransportModel.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -110,17 +109,19 @@ void convectiveHeatTransferFvPatchScalarField::updateCoeffs()
const label patchi = patch().index();
const compressible::turbulenceModel& turbModel =
db().lookupObject<compressible::turbulenceModel>
const thermophysicalTransportModel& ttm =
db().lookupObject<thermophysicalTransportModel>
(
IOobject::groupName
(
compressible::turbulenceModel::typeName,
thermophysicalTransportModel::typeName,
internalField().group()
)
);
const scalarField alphaEffw(turbModel.alphaEff(patchi));
const compressibleTurbulenceModel& turbModel = ttm.momentumTransport();
const scalarField alphaEffw(ttm.alphaEff(patchi));
const tmp<scalarField> tmuw = turbModel.mu(patchi);
const scalarField& muw = tmuw();
@ -128,8 +129,8 @@ void convectiveHeatTransferFvPatchScalarField::updateCoeffs()
const scalarField& rhow = turbModel.rho().boundaryField()[patchi];
const vectorField& Uc = turbModel.U();
const vectorField& Uw = turbModel.U().boundaryField()[patchi];
const scalarField& Tw = turbModel.transport().T().boundaryField()[patchi];
const scalarField Cpw(turbModel.transport().Cp(Tw, patchi));
const scalarField& Tw = ttm.thermo().T().boundaryField()[patchi];
const scalarField Cpw(ttm.thermo().Cp(Tw, patchi));
const scalarField kappaw(Cpw*alphaEffw);
const scalarField Pr(muw*Cpw/kappaw);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -24,11 +24,9 @@ License
\*---------------------------------------------------------------------------*/
#include "externalCoupledTemperatureMixedFvPatchScalarField.H"
#include "turbulentFluidThermoModel.H"
#include "addToRunTimeSelectionTable.H"
#include "fvPatchFieldMapper.H"
#include "volFields.H"
#include "thermophysicalTransportModel.H"
#include "OFstream.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
@ -126,29 +124,27 @@ void Foam::externalCoupledTemperatureMixedFvPatchScalarField::transferData
// heat flux [W/m^2]
scalarField qDot(this->patch().size(), 0.0);
typedef compressible::turbulenceModel cmpTurbModelType;
static word turbName
static word ttmName
(
IOobject::groupName
(
turbulenceModel::typeName,
thermophysicalTransportModel::typeName,
internalField().group()
)
);
static word thermoName(basicThermo::dictName);
if (db().foundObject<cmpTurbModelType>(turbName))
if (db().foundObject<thermophysicalTransportModel>(ttmName))
{
const cmpTurbModelType& turbModel =
db().lookupObject<cmpTurbModelType>(turbName);
const thermophysicalTransportModel& ttm =
db().lookupObject<thermophysicalTransportModel>(ttmName);
const basicThermo& thermo = turbModel.transport();
const basicThermo& thermo = ttm.thermo();
const fvPatchScalarField& hep = thermo.he().boundaryField()[patchi];
qDot = turbModel.alphaEff(patchi)*hep.snGrad();
qDot = ttm.alphaEff(patchi)*hep.snGrad();
}
else if (db().foundObject<basicThermo>(thermoName))
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -24,10 +24,9 @@ License
\*---------------------------------------------------------------------------*/
#include "externalWallHeatFluxTemperatureFvPatchScalarField.H"
#include "addToRunTimeSelectionTable.H"
#include "fvPatchFieldMapper.H"
#include "volFields.H"
#include "physicoChemicalConstants.H"
#include "addToRunTimeSelectionTable.H"
using Foam::constant::physicoChemical::sigma;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -24,10 +24,9 @@ License
\*---------------------------------------------------------------------------*/
#include "temperatureCoupledBase.H"
#include "volFields.H"
#include "fluidThermo.H"
#include "solidThermo.H"
#include "turbulentFluidThermoModel.H"
#include "thermophysicalTransportModel.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -74,6 +73,7 @@ Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::kappa
const label patchi = patch_.index();
const word& phase(Tp.internalField().group());
const word fluidThermoName
(
IOobject::groupName(basicThermo::dictName, phase)
@ -81,19 +81,21 @@ Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::kappa
if (mesh.foundObject<fluidThermo>(fluidThermoName))
{
typedef compressible::turbulenceModel turbulenceModel;
const word turbulenceModelName
static word ttmName
(
IOobject::groupName(turbulenceModel::typeName, phase)
IOobject::groupName
(
thermophysicalTransportModel::typeName,
phase
)
);
if (mesh.foundObject<turbulenceModel>(turbulenceModelName))
if (mesh.foundObject<thermophysicalTransportModel>(ttmName))
{
const turbulenceModel& turbModel =
mesh.lookupObject<turbulenceModel>( turbulenceModelName);
const thermophysicalTransportModel& ttm =
mesh.lookupObject<thermophysicalTransportModel>(ttmName);
return turbModel.kappaEff(patchi);
return ttm.kappaEff(patchi);
}
else
{

View File

@ -31,7 +31,7 @@ Description
or solidThermo as appropriate.
For turbulent fluid regions \c kappa is obtained from the
compressible::turbulenceModel \c kappaEff.
thermophysicalTransportModel \c kappaEff.
For solid regions kappa may be obtained from the anisotropic alpha field
by specifying the optional \c alphaAni field name.

View File

@ -25,7 +25,7 @@ License
#include "volFields.H"
#include "surfaceFields.H"
#include "turbulentFluidThermoModel.H"
#include "thermophysicalTransportModel.H"
#include "mapDistribute.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -351,14 +351,21 @@ void thermalBaffle1DFvPatchScalarField<solidType>::updateCoeffs()
{
const fvPatch& nbrPatch = patch().boundaryMesh()[nbrPatchi];
const compressible::turbulenceModel& turbModel =
db().template lookupObject<compressible::turbulenceModel>
const thermophysicalTransportModel& ttm =
db().objectRegistry::template lookupObject
<
thermophysicalTransportModel
>
(
turbulenceModel::typeName
IOobject::groupName
(
thermophysicalTransportModel::typeName,
internalField().group()
)
);
// local properties
const scalarField kappaw(turbModel.kappaEff(patchi));
const scalarField kappaw(ttm.kappaEff(patchi));
const fvPatchScalarField& Tp =
patch().template lookupPatchField<volScalarField, scalar>(TName_);
@ -380,8 +387,7 @@ void thermalBaffle1DFvPatchScalarField<solidType>::updateCoeffs()
scalarField myKDelta(patch().deltaCoeffs()*kappaw);
// nrb properties
scalarField nbrTp =
turbModel.transport().T().boundaryField()[nbrPatchi];
scalarField nbrTp = ttm.thermo().T().boundaryField()[nbrPatchi];
mapDist.distribute(nbrTp);
// solid properties

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -24,12 +24,9 @@ License
\*---------------------------------------------------------------------------*/
#include "totalFlowRateAdvectiveDiffusiveFvPatchScalarField.H"
#include "addToRunTimeSelectionTable.H"
#include "fvPatchFieldMapper.H"
#include "volFields.H"
#include "surfaceFields.H"
#include "IOobjectList.H"
#include "turbulentFluidThermoModel.H"
#include "thermophysicalTransportModel.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -154,12 +151,12 @@ void Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField::updateCoeffs()
const label patchi = patch().index();
const compressible::turbulenceModel& turbModel =
db().lookupObject<compressible::turbulenceModel>
const thermophysicalTransportModel& ttm =
db().lookupObject<thermophysicalTransportModel>
(
IOobject::groupName
(
turbulenceModel::typeName,
thermophysicalTransportModel::typeName,
internalField().group()
)
);
@ -167,7 +164,7 @@ void Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField::updateCoeffs()
const fvsPatchField<scalar>& phip =
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_);
const scalarField alphap(turbModel.alphaEff(patchi));
const scalarField alphap(ttm.alphaEff(patchi));
refValue() = massFluxFraction_;
refGrad() = 0.0;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -37,6 +37,7 @@ SourceFiles
#define thermophysicalTransportModel_H
#include "compressibleTurbulenceModel.H"
#include "fluidThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -94,6 +95,9 @@ public:
return momentumTransportModel_;
}
//- Access function to incompressible transport model
virtual const fluidThermo& thermo() const = 0;
//- Const access to the coefficients dictionary
virtual const dictionary& coeffDict() const = 0;

View File

@ -1,114 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-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 "EddyDiffusivity.H"
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
template<class BasicTurbulenceModel>
void Foam::EddyDiffusivity<BasicTurbulenceModel>::correctNut()
{
// Read Prt if provided
Prt_ = dimensioned<scalar>::lookupOrDefault
(
"Prt",
this->coeffDict(),
1.0
);
alphat_ = this->rho_*this->nut()/Prt_;
alphat_.correctBoundaryConditions();
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class BasicTurbulenceModel>
Foam::EddyDiffusivity<BasicTurbulenceModel>::EddyDiffusivity
(
const word& type,
const alphaField& alpha,
const volScalarField& rho,
const volVectorField& U,
const surfaceScalarField& alphaRhoPhi,
const surfaceScalarField& phi,
const transportModel& transport
)
:
BasicTurbulenceModel
(
type,
alpha,
rho,
U,
alphaRhoPhi,
phi,
transport
),
// Cannot read Prt yet
Prt_("Prt", dimless, 1.0),
alphat_
(
IOobject
(
IOobject::groupName("alphat", alphaRhoPhi.group()),
this->runTime_.timeName(),
this->mesh_,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
this->mesh_
)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class BasicTurbulenceModel>
bool Foam::EddyDiffusivity<BasicTurbulenceModel>::read()
{
if (BasicTurbulenceModel::read())
{
Prt_.readIfPresent(this->coeffDict());
return true;
}
else
{
return false;
}
}
template<class BasicTurbulenceModel>
void Foam::EddyDiffusivity<BasicTurbulenceModel>::correctEnergyTransport()
{
EddyDiffusivity<BasicTurbulenceModel>::correctNut();
}
// ************************************************************************* //

View File

@ -1,162 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-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/>.
Class
Foam::EddyDiffusivity
Description
Templated abstract base class for single-phase compressible
turbulence models.
SourceFiles
EddyDiffusivity.C
\*---------------------------------------------------------------------------*/
#ifndef EddyDiffusivity_H
#define EddyDiffusivity_H
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class EddyDiffusivity Declaration
\*---------------------------------------------------------------------------*/
template<class BasicTurbulenceModel>
class EddyDiffusivity
:
public BasicTurbulenceModel
{
protected:
// Protected data
// Model coefficients
dimensionedScalar Prt_;
// Fields
volScalarField alphat_;
// Protected Member Functions
virtual void correctNut();
public:
typedef typename BasicTurbulenceModel::alphaField alphaField;
typedef typename BasicTurbulenceModel::rhoField rhoField;
typedef typename BasicTurbulenceModel::transportModel transportModel;
// Constructors
//- Construct
EddyDiffusivity
(
const word& type,
const alphaField& alpha,
const volScalarField& rho,
const volVectorField& U,
const surfaceScalarField& alphaRhoPhi,
const surfaceScalarField& phi,
const transportModel& transport
);
//- Destructor
virtual ~EddyDiffusivity()
{}
// Member Functions
//- Re-read model coefficients if they have changed
virtual bool read();
//- Turbulent thermal diffusivity for enthalpy [kg/m/s]
virtual tmp<volScalarField> alphat() const
{
return alphat_;
}
//- Turbulent thermal diffusivity for enthalpy for a patch [kg/m/s]
virtual tmp<scalarField> alphat(const label patchi) const
{
return alphat()().boundaryField()[patchi];
}
//- Effective thermal turbulent diffusivity for temperature
// of mixture [W/m/K]
virtual tmp<volScalarField> kappaEff() const
{
return this->transport_.kappaEff(alphat());
}
//- Effective thermal turbulent diffusivity for temperature
// of mixture for patch [W/m/K]
virtual tmp<scalarField> kappaEff(const label patchi) const
{
return this->transport_.kappaEff(alphat(patchi), patchi);
}
//- Effective thermal turbulent diffusivity of mixture [kg/m/s]
virtual tmp<volScalarField> alphaEff() const
{
return this->transport_.alphaEff(alphat());
}
//- Effective thermal turbulent diffusivity of mixture
// for patch [kg/m/s]
virtual tmp<scalarField> alphaEff(const label patchi) const
{
return this->transport_.alphaEff(alphat(patchi), patchi);
}
//- Correct the turbulence thermal diffusivity for energy transport
virtual void correctEnergyTransport();
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
#include "EddyDiffusivity.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -1,17 +1,4 @@
compressibleTurbulenceModel.C
turbulentFluidThermoModels/turbulentFluidThermoModels.C
BCs = turbulentFluidThermoModels/derivedFvPatchFields
$(BCs)/temperatureCoupledBase/temperatureCoupledBase.C
$(BCs)/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C
$(BCs)/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.C
$(BCs)/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C
$(BCs)/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C
$(BCs)/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C
$(BCs)/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C
$(BCs)/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C
turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C
turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C
LIB = $(FOAM_LIBBIN)/libcompressibleTurbulenceModels

View File

@ -1,138 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-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 "ThermalDiffusivity.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class BasicTurbulenceModel>
Foam::ThermalDiffusivity<BasicTurbulenceModel>::ThermalDiffusivity
(
const word& type,
const alphaField& alpha,
const volScalarField& rho,
const volVectorField& U,
const surfaceScalarField& alphaRhoPhi,
const surfaceScalarField& phi,
const transportModel& transport
)
:
BasicTurbulenceModel
(
type,
alpha,
rho,
U,
alphaRhoPhi,
phi,
transport
)
{}
// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
template<class BasicTurbulenceModel>
Foam::autoPtr<Foam::ThermalDiffusivity<BasicTurbulenceModel>>
Foam::ThermalDiffusivity<BasicTurbulenceModel>::New
(
const alphaField& alpha,
const volScalarField& rho,
const volVectorField& U,
const surfaceScalarField& alphaRhoPhi,
const surfaceScalarField& phi,
const transportModel& transport
)
{
return autoPtr<ThermalDiffusivity>
(
static_cast<ThermalDiffusivity*>(
BasicTurbulenceModel::New
(
alpha,
rho,
U,
alphaRhoPhi,
phi,
transport
).ptr())
);
}
template<class BasicTurbulenceModel>
Foam::autoPtr<Foam::ThermalDiffusivity<BasicTurbulenceModel>>
Foam::ThermalDiffusivity<BasicTurbulenceModel>::New
(
const volScalarField& rho,
const volVectorField& U,
const surfaceScalarField& phi,
const transportModel& transport
)
{
return autoPtr<ThermalDiffusivity>
(
static_cast<ThermalDiffusivity*>(
BasicTurbulenceModel::New
(
rho,
U,
phi,
transport
).ptr())
);
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class BasicTurbulenceModel>
Foam::tmp<Foam::volScalarField>
Foam::ThermalDiffusivity<BasicTurbulenceModel>::alphat() const
{
return volScalarField::New
(
IOobject::groupName("alphat", this->alphaRhoPhi_.group()),
this->mesh_,
dimensionedScalar(dimDensity*dimViscosity, 0)
);
}
template<class BasicTurbulenceModel>
Foam::tmp<Foam::scalarField>
Foam::ThermalDiffusivity<BasicTurbulenceModel>::alphat
(
const label patchi
) const
{
return tmp<scalarField>
(
new scalarField(this->mesh_.boundary()[patchi].size(), 0.0)
);
}
// ************************************************************************* //

View File

@ -1,189 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-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/>.
Class
Foam::ThermalDiffusivity
Description
Templated wrapper class to provide compressible turbulence models
thermal diffusivity based thermal transport.
SourceFiles
ThermalDiffusivity.C
\*---------------------------------------------------------------------------*/
#ifndef ThermalDiffusivity_H
#define ThermalDiffusivity_H
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class ThermalDiffusivity Declaration
\*---------------------------------------------------------------------------*/
template<class BasicTurbulenceModel>
class ThermalDiffusivity
:
public BasicTurbulenceModel
{
public:
typedef typename BasicTurbulenceModel::alphaField alphaField;
typedef volScalarField rhoField;
typedef typename BasicTurbulenceModel::transportModel transportModel;
// Constructors
//- Construct
ThermalDiffusivity
(
const word& type,
const alphaField& alpha,
const volScalarField& rho,
const volVectorField& U,
const surfaceScalarField& alphaRhoPhi,
const surfaceScalarField& phi,
const transportModel& transport
);
// Selectors
//- Return a reference to the selected turbulence model
static autoPtr<ThermalDiffusivity> New
(
const alphaField& alpha,
const volScalarField& rho,
const volVectorField& U,
const surfaceScalarField& alphaRhoPhi,
const surfaceScalarField& phi,
const transportModel& transportModel
);
//- Return a reference to the selected turbulence model
static autoPtr<ThermalDiffusivity> New
(
const volScalarField& rho,
const volVectorField& U,
const surfaceScalarField& phi,
const transportModel& transportModel
);
//- Destructor
virtual ~ThermalDiffusivity()
{}
// Member Functions
//- Thermal diffusivity for enthalpy of mixture [kg/m/s]
virtual tmp<volScalarField> alpha() const
{
return this->transport_.alpha();
}
//- Thermal diffusivity for enthalpy of mixture for patch [kg/m/s]
virtual tmp<scalarField> alpha(const label patchi) const
{
return this->transport_.alpha(patchi);
}
//- Thermal diffusivity for temperature of mixture [W/m/K]
virtual tmp<volScalarField> kappa() const
{
return this->transport_.kappa();
}
//- Thermal diffusivity for temperature of mixture
// for patch [W/m/K]
virtual tmp<scalarField> kappa(const label patchi) const
{
return this->transport_.kappa(patchi);
}
//- Turbulent thermal diffusivity for enthalpy [kg/m/s]
virtual tmp<volScalarField> alphat() const;
//- Turbulent thermal diffusivity for enthalpy for a patch [kg/m/s]
virtual tmp<scalarField> alphat(const label patchi) const;
//- Effective thermal turbulent diffusivity for temperature
// of mixture [W/m/K]
virtual tmp<volScalarField> kappaEff() const
{
return volScalarField::New
(
"kappaEff",
this->transport_.kappa()
);
}
//- Effective thermal turbulent diffusivity for temperature
// of mixture for patch [W/m/K]
virtual tmp<scalarField> kappaEff(const label patchi) const
{
return kappa(patchi);
}
//- Effective thermal turbulent diffusivity of mixture [kg/m/s]
virtual tmp<volScalarField> alphaEff() const
{
return volScalarField::New
(
"alphaEff",
this->transport_.alphahe()
);
}
//- Effective thermal turbulent diffusivity of mixture
// for patch [kg/m/s]
virtual tmp<scalarField> alphaEff(const label patchi) const
{
return this->transport_.alphahe(patchi);
}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
#include "ThermalDiffusivity.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -23,28 +23,26 @@ License
\*---------------------------------------------------------------------------*/
#include "EddyDiffusivity.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makeTurbulenceModelTypes( \
Alpha, Rho, baseModel, BaseModel, TDModel, Transport) \
Alpha, Rho, baseModel, BaseModel, Transport) \
\
namespace Foam \
{ \
typedef TDModel<BaseModel<Transport>> \
typedef BaseModel<Transport> \
Transport##BaseModel; \
typedef laminarModel<Transport##BaseModel> \
laminar##Transport##BaseModel; \
typedef RASModel<EddyDiffusivity<Transport##BaseModel>> \
typedef RASModel<Transport##BaseModel> \
RAS##Transport##BaseModel; \
typedef LESModel<EddyDiffusivity<Transport##BaseModel>> \
typedef LESModel<Transport##BaseModel> \
LES##Transport##BaseModel; \
}
#define makeBaseTurbulenceModel( \
Alpha, Rho, baseModel, BaseModel, TDModel, Transport) \
Alpha, Rho, baseModel, BaseModel, Transport) \
\
namespace Foam \
{ \
@ -62,7 +60,7 @@ License
dictionary \
); \
\
typedef TDModel<BaseModel<Transport>> \
typedef BaseModel<Transport> \
Transport##BaseModel; \
\
\
@ -82,7 +80,7 @@ License
); \
\
\
typedef RASModel<EddyDiffusivity<Transport##BaseModel>> \
typedef RASModel<Transport##BaseModel> \
RAS##Transport##BaseModel; \
\
defineNamedTemplateTypeNameAndDebug(RAS##Transport##BaseModel, 0); \
@ -98,7 +96,7 @@ License
); \
\
\
typedef LESModel<EddyDiffusivity<Transport##BaseModel>> \
typedef LESModel<Transport##BaseModel> \
LES##Transport##BaseModel; \
\
defineNamedTemplateTypeNameAndDebug(LES##Transport##BaseModel, 0); \
@ -137,7 +135,7 @@ License
#define makeTemplatedTurbulenceModel(BaseModel, SType, Type) \
typedef Foam::SType##Models::Type<Foam::EddyDiffusivity<Foam::BaseModel>> \
typedef Foam::SType##Models::Type<Foam::BaseModel> \
Type##SType##BaseModel; \
defineNamedTemplateTypeNameAndDebug(Type##SType##BaseModel, 0); \
\
@ -145,7 +143,7 @@ License
{ \
namespace SType##Models \
{ \
typedef Type<EddyDiffusivity<BaseModel>> Type##SType##BaseModel; \
typedef Type<BaseModel> Type##SType##BaseModel; \
\
addToRunTimeSelectionTable \
( \

View File

@ -47,8 +47,6 @@ SourceFiles
#define turbulentFluidThermoModel_H
#include "CompressibleTurbulenceModel.H"
#include "ThermalDiffusivity.H"
#include "EddyDiffusivity.H"
#include "laminarModel.H"
#include "RASModel.H"
#include "LESModel.H"
@ -60,12 +58,10 @@ namespace Foam
{
namespace compressible
{
typedef ThermalDiffusivity<CompressibleTurbulenceModel<fluidThermo>>
turbulenceModel;
typedef CompressibleTurbulenceModel<fluidThermo> turbulenceModel;
typedef laminarModel<turbulenceModel> laminarModel;
typedef RASModel<EddyDiffusivity<turbulenceModel>> RASModel;
typedef LESModel<EddyDiffusivity<turbulenceModel>> LESModel;
typedef RASModel<turbulenceModel> RASModel;
typedef LESModel<turbulenceModel> LESModel;
template<class BasicCompressibleTurbulenceModel>
autoPtr<BasicCompressibleTurbulenceModel> New

View File

@ -33,7 +33,6 @@ makeBaseTurbulenceModel
volScalarField,
compressibleTurbulenceModel,
CompressibleTurbulenceModel,
ThermalDiffusivity,
fluidThermo
);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -29,9 +29,6 @@ License
#include "addToRunTimeSelectionTable.H"
#include "makeTurbulenceModel.H"
#include "ThermalDiffusivity.H"
#include "EddyDiffusivity.H"
#include "laminarModel.H"
#include "RASModel.H"
#include "LESModel.H"
@ -44,7 +41,6 @@ makeTurbulenceModelTypes
volScalarField,
compressibleTurbulenceModel,
CompressibleTurbulenceModel,
ThermalDiffusivity,
fluidThermo
);

View File

@ -11,7 +11,8 @@ EXE_INC = \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/ThermophysicalTransportModels/lnInclude
LIB_LIBS = \
-lfiniteVolume \
@ -22,6 +23,7 @@ LIB_LIBS = \
-lcompressibleTransportModels \
-lincompressibleTurbulenceModels \
-lcompressibleTurbulenceModels \
-lthermophysicalTransportModels \
-lmeshTools \
-lsurfMesh \
-llagrangian \

View File

@ -25,7 +25,7 @@ License
#include "turbulenceFields.H"
#include "turbulentTransportModel.H"
#include "turbulentFluidThermoModel.H"
#include "thermophysicalTransportModel.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -49,7 +49,7 @@ template<>
const char* Foam::NamedEnum
<
Foam::functionObjects::turbulenceFields::compressibleField,
9
8
>::names[] =
{
"k",
@ -57,7 +57,6 @@ const char* Foam::NamedEnum
"omega",
"mut",
"muEff",
"alphat",
"alphaEff",
"R",
"devRhoReff"
@ -66,7 +65,7 @@ const char* Foam::NamedEnum
const Foam::NamedEnum
<
Foam::functionObjects::turbulenceFields::compressibleField,
9
8
> Foam::functionObjects::turbulenceFields::compressibleFieldNames_;
template<>
@ -163,10 +162,15 @@ bool Foam::functionObjects::turbulenceFields::read(const dictionary& dict)
bool Foam::functionObjects::turbulenceFields::execute()
{
if (obr_.foundObject<compressible::turbulenceModel>(modelName()))
if (obr_.foundObject<thermophysicalTransportModel>(modelName()))
{
const compressible::turbulenceModel& model =
obr_.lookupObject<compressible::turbulenceModel>(modelName());
const thermophysicalTransportModel& ttm =
obr_.lookupObject<thermophysicalTransportModel>
(
thermophysicalTransportModel::typeName
);
const compressibleTurbulenceModel& model = ttm.momentumTransport();
forAllConstIter(wordHashSet, fieldSet_, iter)
{
@ -198,14 +202,9 @@ bool Foam::functionObjects::turbulenceFields::execute()
processField<scalar>(f, model.muEff());
break;
}
case compressibleField::alphat:
{
processField<scalar>(f, model.alphat());
break;
}
case compressibleField::alphaEff:
{
processField<scalar>(f, model.alphaEff());
processField<scalar>(f, ttm.alphaEff());
break;
}
case compressibleField::R:

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -114,12 +114,11 @@ public:
omega,
mut,
muEff,
alphat,
alphaEff,
R,
devRhoReff
};
static const NamedEnum<compressibleField, 9> compressibleFieldNames_;
static const NamedEnum<compressibleField, 8> compressibleFieldNames_;
enum class incompressibleField
{

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "wallHeatFlux.H"
#include "turbulentFluidThermoModel.H"
#include "thermophysicalTransportModel.H"
#include "solidThermo.H"
#include "surfaceInterpolate.H"
#include "fvcSnGrad.H"
@ -202,22 +202,22 @@ bool Foam::functionObjects::wallHeatFlux::execute()
if
(
foundObject<compressible::turbulenceModel>
foundObject<thermophysicalTransportModel>
(
turbulenceModel::typeName
thermophysicalTransportModel::typeName
)
)
{
const compressible::turbulenceModel& turbModel =
lookupObject<compressible::turbulenceModel>
const thermophysicalTransportModel& ttm =
lookupObject<thermophysicalTransportModel>
(
turbulenceModel::typeName
thermophysicalTransportModel::typeName
);
return store
(
name,
calcWallHeatFlux(turbModel.alphaEff(), turbModel.transport().he())
calcWallHeatFlux(ttm.alphaEff(), ttm.thermo().he())
);
}
else if (foundObject<solidThermo>(solidThermo::dictName))

View File

@ -7,11 +7,13 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/ThermophysicalTransportModels/lnInclude
LIB_LIBS = \
-lfiniteVolume \
-lsampling \
-lmeshTools \
-lturbulenceModels \
-lcompressibleTurbulenceModels
-lcompressibleTurbulenceModels \
-lthermophysicalTransportModels

View File

@ -24,11 +24,11 @@ License
\*---------------------------------------------------------------------------*/
#include "volumeFractionSource.H"
#include "fvmDdt.H"
#include "fvmDiv.H"
#include "fvmLaplacian.H"
#include "fvcDiv.H"
#include "surfaceInterpolate.H"
#include "turbulentFluidThermoModel.H"
#include "thermophysicalTransportModel.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -97,18 +97,18 @@ Foam::tmp<Foam::volScalarField> Foam::fv::volumeFractionSource::D
}
else if (phi.dimensions() == dimMass/dimTime)
{
const compressible::turbulenceModel& turbulence =
mesh().lookupObject<compressible::turbulenceModel>
const thermophysicalTransportModel& ttm =
mesh().lookupObject<thermophysicalTransportModel>
(
turbulenceModel::typeName
thermophysicalTransportModel::typeName
);
return
fieldNames_[fieldi] == turbulence.transport().T().name()
? turbulence.kappaEff()
: fieldNames_[fieldi] == turbulence.transport().he().name()
? turbulence.alphaEff()
: turbulence.muEff();
fieldNames_[fieldi] == ttm.thermo().T().name()
? ttm.kappaEff()
: fieldNames_[fieldi] == ttm.thermo().he().name()
? ttm.alphaEff()
: ttm.momentumTransport().muEff();
}
else
{

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "variableHeatTransfer.H"
#include "turbulentFluidThermoModel.H"
#include "thermophysicalTransportModel.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -102,14 +102,15 @@ void Foam::fv::variableHeatTransfer::calculateHtc()
const fvMesh& nbrMesh =
mesh_.time().lookupObject<fvMesh>(nbrRegionName());
const compressible::turbulenceModel& nbrTurb =
nbrMesh.lookupObject<compressible::turbulenceModel>
const thermophysicalTransportModel& nbrTtm =
nbrMesh.lookupObject<thermophysicalTransportModel>
(
turbulenceModel::typeName
thermophysicalTransportModel::typeName
);
const fluidThermo& nbrThermo =
nbrMesh.lookupObject<fluidThermo>(basicThermo::dictName);
const compressibleTurbulenceModel& nbrTurb = nbrTtm.momentumTransport();
const fluidThermo& nbrThermo = nbrTtm.thermo();
const volVectorField& UNbr =
nbrMesh.lookupObject<volVectorField>(UNbrName_);
@ -118,7 +119,7 @@ void Foam::fv::variableHeatTransfer::calculateHtc()
const volScalarField NuNbr(a_*pow(ReNbr, b_)*pow(Pr_, c_));
const scalarField htcNbr(NuNbr*nbrTurb.kappaEff()/ds_);
const scalarField htcNbr(NuNbr*nbrTtm.kappaEff()/ds_);
const scalarField htcNbrMapped(interpolate(htcNbr));

View File

@ -7,6 +7,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/ThermophysicalTransportModels/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude\
-I$(LIB_SRC)/finiteVolume/lnInclude \
@ -21,6 +22,7 @@ LIB_LIBS = \
-lSLGThermo \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lthermophysicalTransportModels \
-lregionModels \
-lsurfaceFilmModels \
-lfiniteVolume \

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "alphatFilmWallFunctionFvPatchScalarField.H"
#include "turbulentFluidThermoModel.H"
#include "thermophysicalTransportModel.H"
#include "surfaceFilmRegionModel.H"
#include "fvPatchFieldMapper.H"
#include "volFields.H"
@ -162,15 +162,17 @@ void alphatFilmWallFunctionFvPatchScalarField::updateCoeffs()
scalarField mDotFilmp = mDotFilm().boundaryField()[filmPatchi];
filmModel.toPrimary(filmPatchi, mDotFilmp);
// Retrieve RAS turbulence model
const turbulenceModel& turbModel = db().lookupObject<turbulenceModel>
(
IOobject::groupName
const thermophysicalTransportModel& ttm =
db().lookupObject<thermophysicalTransportModel>
(
turbulenceModel::typeName,
internalField().group()
)
);
IOobject::groupName
(
thermophysicalTransportModel::typeName,
internalField().group()
)
);
const compressibleTurbulenceModel& turbModel = ttm.momentumTransport();
const scalarField& y = turbModel.y()[patchi];
const scalarField& rhow = turbModel.rho().boundaryField()[patchi];
@ -178,7 +180,7 @@ void alphatFilmWallFunctionFvPatchScalarField::updateCoeffs()
const volScalarField& k = tk();
const tmp<scalarField> tmuw = turbModel.mu(patchi);
const scalarField& muw = tmuw();
const tmp<scalarField> talpha = turbModel.alpha(patchi);
const tmp<scalarField> talpha = ttm.thermo().alpha(patchi);
const scalarField& alphaw = talpha();
const scalar Cmu25 = pow(Cmu_, 0.25);

View File

@ -6,6 +6,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/radiationModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/ThermophysicalTransportModels/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/mesh/extrudeModel/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
@ -17,6 +18,7 @@ LIB_LIBS = \
-lsolidThermo \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lthermophysicalTransportModels \
-lradiationModels \
-ldynamicMesh \
-lfiniteVolume \

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -24,9 +24,9 @@ License
\*---------------------------------------------------------------------------*/
#include "thermalBaffleFvPatchScalarField.H"
#include "addToRunTimeSelectionTable.H"
#include "emptyPolyPatch.H"
#include "mappedWallPolyPatch.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -6,7 +6,8 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/ThermophysicalTransportModels/lnInclude
LIB_LIBS = \
-lfiniteVolume \
@ -16,4 +17,5 @@ LIB_LIBS = \
-lspecie \
-lreactionThermophysicalModels \
-lturbulenceModels \
-lcompressibleTurbulenceModels
-lcompressibleTurbulenceModels \
-lthermophysicalTransportModels

View File

@ -24,12 +24,12 @@ License
\*---------------------------------------------------------------------------*/
#include "adsorptionMassFractionFvPatchScalarField.H"
#include "addToRunTimeSelectionTable.H"
#include "volFields.H"
#include "surfaceFields.H"
#include "turbulentFluidThermoModel.H"
#include "thermophysicalTransportModel.H"
#include "psiReactionThermo.H"
#include "rhoReactionThermo.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -109,14 +109,14 @@ Foam::adsorptionMassFractionFvPatchScalarField::calcPhiYp() const
const scalarField Yc(patchInternalField());
// Get the patch delta coefficients multiplied by the diffusivity
const compressible::turbulenceModel& turb =
db().lookupObject<compressible::turbulenceModel>
const thermophysicalTransportModel& ttm =
db().lookupObject<thermophysicalTransportModel>
(
turbulenceModel::typeName
thermophysicalTransportModel::typeName
);
const scalarField alphaEffDeltap
(
turb.alphaEff(patch().index())*patch().deltaCoeffs()
ttm.alphaEff(patch().index())*patch().deltaCoeffs()
);
// Get the specie molecular weight, if needed

View File

@ -24,14 +24,13 @@ License
\*---------------------------------------------------------------------------*/
#include "semiPermeableBaffleMassFractionFvPatchScalarField.H"
#include "addToRunTimeSelectionTable.H"
#include "fvPatchFieldMapper.H"
#include "volFields.H"
#include "surfaceFields.H"
#include "turbulentFluidThermoModel.H"
#include "thermophysicalTransportModel.H"
#include "psiReactionThermo.H"
#include "rhoReactionThermo.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -124,18 +123,18 @@ Foam::semiPermeableBaffleMassFractionFvPatchScalarField::calcPhiYp() const
mappedPatchBase::map().distribute(nbrYc);
// Get the patch delta coefficients multiplied by the diffusivity
const compressible::turbulenceModel& turb =
db().lookupObject<compressible::turbulenceModel>
const thermophysicalTransportModel& ttm =
db().lookupObject<thermophysicalTransportModel>
(
turbulenceModel::typeName
thermophysicalTransportModel::typeName
);
const scalarField alphaEffDeltap
(
turb.alphaEff(patch().index())*patch().deltaCoeffs()
ttm.alphaEff(patch().index())*patch().deltaCoeffs()
);
scalarField nbrAlphaEffDeltap
(
turb.alphaEff(nbrPatch.index())*nbrPatch.deltaCoeffs()
ttm.alphaEff(nbrPatch.index())*nbrPatch.deltaCoeffs()
);
mappedPatchBase::map().distribute(nbrAlphaEffDeltap);

View File

@ -27,7 +27,7 @@ License
#include "specieTransferVelocityFvPatchVectorField.H"
#include "volFields.H"
#include "surfaceFields.H"
#include "turbulentFluidThermoModel.H"
#include "thermophysicalTransportModel.H"
#include "psiReactionThermo.H"
#include "rhoReactionThermo.H"
@ -253,9 +253,9 @@ void Foam::specieTransferMassFractionFvPatchScalarField::updateCoeffs()
const scalarField AAlphaEffp
(
patch().magSf()
*db().lookupObject<compressible::turbulenceModel>
*db().lookupObject<thermophysicalTransportModel>
(
turbulenceModel::typeName
thermophysicalTransportModel::typeName
)
.alphaEff(patch().index())
);

View File

@ -26,11 +26,11 @@ License
#include "specieTransferTemperatureFvPatchScalarField.H"
#include "specieTransferMassFractionFvPatchScalarField.H"
#include "specieTransferVelocityFvPatchVectorField.H"
#include "addToRunTimeSelectionTable.H"
#include "volFields.H"
#include "surfaceFields.H"
#include "turbulentFluidThermoModel.H"
#include "thermophysicalTransportModel.H"
#include "basicSpecieMixture.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -166,9 +166,9 @@ void Foam::specieTransferTemperatureFvPatchScalarField::updateCoeffs()
const scalarField AAlphaEffp
(
patch().magSf()
*db().lookupObject<compressible::turbulenceModel>
*db().lookupObject<thermophysicalTransportModel>
(
turbulenceModel::typeName
thermophysicalTransportModel::typeName
).alphaEff(patch().index())
);