mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Solid thermodynamic: rationalize and update selection mechanism for consistency with fluid thermo
This commit is contained in:
@ -0,0 +1,191 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 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 "basicChemistryModel.H"
|
||||
#include "basicThermo.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ChemistryModel>
|
||||
Foam::autoPtr<ChemistryModel> Foam::basicChemistryModel::New
|
||||
(
|
||||
const fvMesh& mesh
|
||||
)
|
||||
{
|
||||
IOdictionary chemistryDict
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"chemistryProperties",
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
);
|
||||
|
||||
word chemistryTypeName;
|
||||
|
||||
if (chemistryDict.isDict("chemistryType"))
|
||||
{
|
||||
const dictionary& chemistryTypeDict
|
||||
(
|
||||
chemistryDict.subDict("chemistryType")
|
||||
);
|
||||
|
||||
Info<< "Selecting chemistry type " << chemistryTypeDict << endl;
|
||||
|
||||
const int nCmpt = 8;
|
||||
const char* cmptNames[nCmpt] =
|
||||
{
|
||||
"chemistrySolver",
|
||||
"chemistryModel",
|
||||
"???ChemistryModel",
|
||||
"transport",
|
||||
"thermo",
|
||||
"equationOfState",
|
||||
"specie",
|
||||
"energy"
|
||||
};
|
||||
|
||||
IOdictionary thermoDict
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"thermophysicalProperties",
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
);
|
||||
|
||||
word thermoTypeName;
|
||||
|
||||
if (thermoDict.isDict("thermoType"))
|
||||
{
|
||||
const dictionary& thermoTypeDict(thermoDict.subDict("thermoType"));
|
||||
thermoTypeName =
|
||||
word(thermoTypeDict.lookup("transport")) + '<'
|
||||
+ word(thermoTypeDict.lookup("thermo")) + '<'
|
||||
+ word(thermoTypeDict.lookup("equationOfState")) + '<'
|
||||
+ word(thermoTypeDict.lookup("specie")) + ">>,"
|
||||
+ word(thermoTypeDict.lookup("energy")) + ">";
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalIOErrorIn
|
||||
(
|
||||
(ChemistryModel::typeName + "::New(const mesh&)").c_str(),
|
||||
thermoDict
|
||||
) << "thermoType is in the old format and must be upgraded"
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
// Construct the name of the chemistry type from the components
|
||||
chemistryTypeName =
|
||||
word(chemistryTypeDict.lookup("chemistrySolver")) + '<'
|
||||
+ word(chemistryTypeDict.lookup("chemistryModel")) + '<'
|
||||
+ ChemistryModel::typeName + ','
|
||||
+ thermoTypeName + ">>";
|
||||
|
||||
typename ChemistryModel::fvMeshConstructorTable::iterator cstrIter =
|
||||
ChemistryModel::fvMeshConstructorTablePtr_->find(chemistryTypeName);
|
||||
|
||||
if (cstrIter == ChemistryModel::fvMeshConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn(ChemistryModel::typeName + "::New(const mesh&)")
|
||||
<< "Unknown " << ChemistryModel::typeName << " type " << nl
|
||||
<< "chemistryType" << chemistryTypeDict << nl << nl
|
||||
<< "Valid " << ChemistryModel ::typeName << " types are:"
|
||||
<< nl << nl;
|
||||
|
||||
// Get the list of all the suitable chemistry packages available
|
||||
wordList validChemistryTypeNames
|
||||
(
|
||||
ChemistryModel::fvMeshConstructorTablePtr_->sortedToc()
|
||||
);
|
||||
|
||||
// Build a table of the thermo packages constituent parts
|
||||
// Note: row-0 contains the names of constituent parts
|
||||
List<wordList> validChemistryTypeNameCmpts
|
||||
(
|
||||
validChemistryTypeNames.size() + 1
|
||||
);
|
||||
|
||||
validChemistryTypeNameCmpts[0].setSize(nCmpt);
|
||||
forAll(validChemistryTypeNameCmpts[0], j)
|
||||
{
|
||||
validChemistryTypeNameCmpts[0][j] = cmptNames[j];
|
||||
}
|
||||
|
||||
// Split the thermo package names into their constituent parts
|
||||
forAll(validChemistryTypeNames, i)
|
||||
{
|
||||
validChemistryTypeNameCmpts[i+1] = basicThermo::splitThermoName
|
||||
(
|
||||
validChemistryTypeNames[i],
|
||||
nCmpt
|
||||
);
|
||||
}
|
||||
|
||||
// Print the table of available packages
|
||||
// in terms of their constituent parts
|
||||
printTable(validChemistryTypeNameCmpts, FatalError);
|
||||
|
||||
FatalError<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<ChemistryModel>
|
||||
(cstrIter()(mesh, typeName, chemistryTypeName));
|
||||
}
|
||||
else
|
||||
{
|
||||
chemistryTypeName =
|
||||
word(chemistryDict.lookup("chemistryType"));
|
||||
|
||||
Info<< "Selecting chemistry type " << chemistryTypeName << endl;
|
||||
|
||||
typename ChemistryModel::fvMeshConstructorTable::iterator cstrIter =
|
||||
ChemistryModel::fvMeshConstructorTablePtr_->find(chemistryTypeName);
|
||||
|
||||
if (cstrIter == ChemistryModel::fvMeshConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn(ChemistryModel::typeName + "::New(const mesh&)")
|
||||
<< "Unknown " << ChemistryModel::typeName << " type "
|
||||
<< chemistryTypeName << nl << nl
|
||||
<< "Valid ChemistryModel types are:" << nl
|
||||
<< ChemistryModel::fvMeshConstructorTablePtr_->sortedToc() << nl
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<ChemistryModel>
|
||||
(cstrIter()(mesh, typeName, chemistryTypeName));
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,61 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 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/>.
|
||||
|
||||
Description
|
||||
Macros for instantiating solid chemistry models
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef makeSolidChemistryModel_H
|
||||
#define makeSolidChemistryModel_H
|
||||
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#define makeSolidChemistryModel(SS, Comp, SThermo, GThermo) \
|
||||
\
|
||||
typedef SS<Comp, SThermo, GThermo> SS##Comp##SThermo##GThermo; \
|
||||
\
|
||||
defineTemplateTypeNameAndDebugWithName \
|
||||
( \
|
||||
SS##Comp##SThermo##GThermo, \
|
||||
#SS"<"#Comp","#SThermo","#GThermo">", \
|
||||
0 \
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -30,7 +30,7 @@ Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "makeChemistryModel.H"
|
||||
#include "makeSolidChemistryModel.H"
|
||||
|
||||
#include "ODESolidChemistryModel.H"
|
||||
#include "solidChemistryModel.H"
|
||||
|
||||
@ -41,11 +41,6 @@ namespace Foam
|
||||
|
||||
#define makeSolidChemistrySolverType(SS, ODEChem, Comp, SThermo, GThermo) \
|
||||
\
|
||||
typedef ODESolidChemistryModel<Comp, SThermo, GThermo> \
|
||||
ODESolidChemistryModel##Comp##SThermo##GThermo; \
|
||||
\
|
||||
makeChemistrySolver(ODESolidChemistryModel##Comp##SThermo##GThermo) \
|
||||
\
|
||||
typedef SS<ODEChem<Comp, SThermo, GThermo> > \
|
||||
SS##ODEChem##Comp##SThermo##GThermo; \
|
||||
\
|
||||
|
||||
@ -41,30 +41,30 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
template<class thermo> class constSolidRad;
|
||||
template<class Thermo> class constSolidRad;
|
||||
|
||||
template<class thermo>
|
||||
inline constSolidRad<thermo> operator*
|
||||
template<class Thermo>
|
||||
inline constSolidRad<Thermo> operator*
|
||||
(
|
||||
const scalar,
|
||||
const constSolidRad<thermo>&
|
||||
const constSolidRad<Thermo>&
|
||||
);
|
||||
|
||||
template<class thermo>
|
||||
template<class Thermo>
|
||||
Ostream& operator<<
|
||||
(
|
||||
Ostream&,
|
||||
const constSolidRad<thermo>&
|
||||
const constSolidRad<Thermo>&
|
||||
);
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class constSolidRad Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class thermo>
|
||||
template<class Thermo>
|
||||
class constSolidRad
|
||||
:
|
||||
public thermo
|
||||
public Thermo
|
||||
{
|
||||
// Private data
|
||||
|
||||
@ -81,7 +81,7 @@ class constSolidRad
|
||||
//- Construct from components
|
||||
inline constSolidRad
|
||||
(
|
||||
const thermo& t,
|
||||
const Thermo& t,
|
||||
const scalar kappaRad,
|
||||
const scalar sigmaS,
|
||||
const scalar emissivity
|
||||
@ -107,6 +107,12 @@ public:
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Return the instantiated type name
|
||||
static word typeName()
|
||||
{
|
||||
return "const<" + Thermo::typeName() + '>';
|
||||
}
|
||||
|
||||
//- Return absorption coefficient [1/m]
|
||||
inline scalar kappaRad(scalar T) const;
|
||||
|
||||
@ -129,7 +135,7 @@ public:
|
||||
|
||||
// Friend operators
|
||||
|
||||
friend constSolidRad operator* <thermo>
|
||||
friend constSolidRad operator* <Thermo>
|
||||
(
|
||||
const scalar,
|
||||
const constSolidRad&
|
||||
@ -138,7 +144,7 @@ public:
|
||||
|
||||
// Ostream Operator
|
||||
|
||||
friend Ostream& operator<< <thermo>
|
||||
friend Ostream& operator<< <Thermo>
|
||||
(
|
||||
Ostream&,
|
||||
const constSolidRad&
|
||||
|
||||
@ -45,20 +45,20 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
template<class thermo> class constIsoSolidTransport;
|
||||
template<class Thermo> class constIsoSolidTransport;
|
||||
|
||||
template<class thermo>
|
||||
inline constIsoSolidTransport<thermo> operator*
|
||||
template<class Thermo>
|
||||
inline constIsoSolidTransport<Thermo> operator*
|
||||
(
|
||||
const scalar,
|
||||
const constIsoSolidTransport<thermo>&
|
||||
const constIsoSolidTransport<Thermo>&
|
||||
);
|
||||
|
||||
template<class thermo>
|
||||
template<class Thermo>
|
||||
Ostream& operator<<
|
||||
(
|
||||
Ostream&,
|
||||
const constIsoSolidTransport<thermo>&
|
||||
const constIsoSolidTransport<Thermo>&
|
||||
);
|
||||
|
||||
|
||||
@ -66,10 +66,10 @@ Ostream& operator<<
|
||||
Class constIsoSolidTransport Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class thermo>
|
||||
template<class Thermo>
|
||||
class constIsoSolidTransport
|
||||
:
|
||||
public thermo
|
||||
public Thermo
|
||||
{
|
||||
// Private data
|
||||
|
||||
@ -80,7 +80,7 @@ class constIsoSolidTransport
|
||||
// Private Member Functions
|
||||
|
||||
//- Construct from components
|
||||
inline constIsoSolidTransport(const thermo& t, const scalar kappa);
|
||||
inline constIsoSolidTransport(const Thermo& t, const scalar kappa);
|
||||
|
||||
|
||||
public:
|
||||
@ -100,6 +100,12 @@ public:
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Return the instantiated type name
|
||||
static word typeName()
|
||||
{
|
||||
return "constIso<" + Thermo::typeName() + '>';
|
||||
}
|
||||
|
||||
//- Isotropic thermal conductivity [W/mK]
|
||||
inline scalar kappa(const scalar T) const;
|
||||
|
||||
@ -122,7 +128,7 @@ public:
|
||||
|
||||
// Friend operators
|
||||
|
||||
friend constIsoSolidTransport operator* <thermo>
|
||||
friend constIsoSolidTransport operator* <Thermo>
|
||||
(
|
||||
const scalar,
|
||||
const constIsoSolidTransport&
|
||||
@ -131,7 +137,7 @@ public:
|
||||
|
||||
// Ostream Operator
|
||||
|
||||
friend Ostream& operator<< <thermo>
|
||||
friend Ostream& operator<< <Thermo>
|
||||
(
|
||||
Ostream&,
|
||||
const constIsoSolidTransport&
|
||||
|
||||
@ -42,20 +42,20 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
template<class thermo> class exponentialSolidTransport;
|
||||
template<class Thermo> class exponentialSolidTransport;
|
||||
|
||||
template<class thermo>
|
||||
inline exponentialSolidTransport<thermo> operator*
|
||||
template<class Thermo>
|
||||
inline exponentialSolidTransport<Thermo> operator*
|
||||
(
|
||||
const scalar,
|
||||
const exponentialSolidTransport<thermo>&
|
||||
const exponentialSolidTransport<Thermo>&
|
||||
);
|
||||
|
||||
template<class thermo>
|
||||
template<class Thermo>
|
||||
Ostream& operator<<
|
||||
(
|
||||
Ostream&,
|
||||
const exponentialSolidTransport<thermo>&
|
||||
const exponentialSolidTransport<Thermo>&
|
||||
);
|
||||
|
||||
|
||||
@ -63,10 +63,10 @@ Ostream& operator<<
|
||||
Class exponentialSolidTransport Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class thermo>
|
||||
template<class Thermo>
|
||||
class exponentialSolidTransport
|
||||
:
|
||||
public thermo
|
||||
public Thermo
|
||||
{
|
||||
// Private data
|
||||
|
||||
@ -85,7 +85,7 @@ class exponentialSolidTransport
|
||||
//- Construct from components
|
||||
inline exponentialSolidTransport
|
||||
(
|
||||
const thermo& t,
|
||||
const Thermo& t,
|
||||
const scalar kappa0,
|
||||
const scalar n0,
|
||||
const scalar Tref
|
||||
@ -110,6 +110,12 @@ public:
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Return the instantiated type name
|
||||
static word typeName()
|
||||
{
|
||||
return "exponential<" + Thermo::typeName() + '>';
|
||||
}
|
||||
|
||||
//- Thermal conductivity [W/mK]
|
||||
inline scalar kappa(const scalar T) const;
|
||||
|
||||
@ -132,7 +138,7 @@ public:
|
||||
|
||||
// Friend operators
|
||||
|
||||
friend exponentialSolidTransport operator* <thermo>
|
||||
friend exponentialSolidTransport operator* <Thermo>
|
||||
(
|
||||
const scalar,
|
||||
const exponentialSolidTransport&
|
||||
@ -140,7 +146,7 @@ public:
|
||||
|
||||
// Ostream Operator
|
||||
|
||||
friend Ostream& operator<< <thermo>
|
||||
friend Ostream& operator<< <Thermo>
|
||||
(
|
||||
Ostream&,
|
||||
const exponentialSolidTransport&
|
||||
|
||||
@ -28,10 +28,9 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class MixtureType, class BasicSolidThermo>
|
||||
void Foam::heSolidThermo<MixtureType, BasicSolidThermo>::calculate()
|
||||
template<class BasicSolidThermo, class MixtureType>
|
||||
void Foam::heSolidThermo<BasicSolidThermo, MixtureType>::calculate()
|
||||
{
|
||||
|
||||
scalarField& TCells = this->T_.internalField();
|
||||
|
||||
const scalarField& hCells = this->he_.internalField();
|
||||
@ -123,8 +122,8 @@ void Foam::heSolidThermo<MixtureType, BasicSolidThermo>::calculate()
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class MixtureType, class BasicSolidThermo>
|
||||
Foam::heSolidThermo<MixtureType, BasicSolidThermo>::
|
||||
template<class BasicSolidThermo, class MixtureType>
|
||||
Foam::heSolidThermo<BasicSolidThermo, MixtureType>::
|
||||
heSolidThermo(const fvMesh& mesh)
|
||||
:
|
||||
heThermo<BasicSolidThermo, MixtureType>(mesh)
|
||||
@ -133,8 +132,8 @@ heSolidThermo(const fvMesh& mesh)
|
||||
}
|
||||
|
||||
|
||||
template<class MixtureType, class BasicSolidThermo>
|
||||
Foam::heSolidThermo<MixtureType, BasicSolidThermo>::
|
||||
template<class BasicSolidThermo, class MixtureType>
|
||||
Foam::heSolidThermo<BasicSolidThermo, MixtureType>::
|
||||
heSolidThermo(const fvMesh& mesh, const dictionary& dict)
|
||||
:
|
||||
heThermo<BasicSolidThermo, MixtureType>(mesh, dict)
|
||||
@ -145,15 +144,15 @@ heSolidThermo(const fvMesh& mesh, const dictionary& dict)
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class MixtureType, class BasicSolidThermo>
|
||||
Foam::heSolidThermo<MixtureType, BasicSolidThermo>::~heSolidThermo()
|
||||
template<class BasicSolidThermo, class MixtureType>
|
||||
Foam::heSolidThermo<BasicSolidThermo, MixtureType>::~heSolidThermo()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class MixtureType, class BasicSolidThermo>
|
||||
void Foam::heSolidThermo<MixtureType, BasicSolidThermo>::correct()
|
||||
template<class BasicSolidThermo, class MixtureType>
|
||||
void Foam::heSolidThermo<BasicSolidThermo, MixtureType>::correct()
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
@ -169,9 +168,9 @@ void Foam::heSolidThermo<MixtureType, BasicSolidThermo>::correct()
|
||||
}
|
||||
|
||||
|
||||
template<class MixtureType, class BasicSolidThermo>
|
||||
template<class BasicSolidThermo, class MixtureType>
|
||||
Foam::tmp<Foam::volVectorField>
|
||||
Foam::heSolidThermo<MixtureType, BasicSolidThermo>::Kappa() const
|
||||
Foam::heSolidThermo<BasicSolidThermo, MixtureType>::Kappa() const
|
||||
{
|
||||
const fvMesh& mesh = this->T_.mesh();
|
||||
|
||||
@ -231,9 +230,9 @@ Foam::heSolidThermo<MixtureType, BasicSolidThermo>::Kappa() const
|
||||
}
|
||||
|
||||
|
||||
template<class MixtureType, class BasicSolidThermo>
|
||||
template<class BasicSolidThermo, class MixtureType>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::heSolidThermo<MixtureType, BasicSolidThermo>::kappaRad() const
|
||||
Foam::heSolidThermo<BasicSolidThermo, MixtureType>::kappaRad() const
|
||||
{
|
||||
const fvMesh& mesh = this->T_.mesh();
|
||||
|
||||
@ -293,9 +292,9 @@ Foam::heSolidThermo<MixtureType, BasicSolidThermo>::kappaRad() const
|
||||
}
|
||||
|
||||
|
||||
template<class MixtureType, class BasicSolidThermo>
|
||||
template<class BasicSolidThermo, class MixtureType>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::heSolidThermo<MixtureType, BasicSolidThermo>::sigmaS() const
|
||||
Foam::heSolidThermo<BasicSolidThermo, MixtureType>::sigmaS() const
|
||||
{
|
||||
const fvMesh& mesh = this->T_.mesh();
|
||||
|
||||
@ -355,9 +354,9 @@ Foam::heSolidThermo<MixtureType, BasicSolidThermo>::sigmaS() const
|
||||
}
|
||||
|
||||
|
||||
template<class MixtureType, class BasicSolidThermo>
|
||||
template<class BasicSolidThermo, class MixtureType>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::heSolidThermo<MixtureType, BasicSolidThermo>::emissivity() const
|
||||
Foam::heSolidThermo<BasicSolidThermo, MixtureType>::emissivity() const
|
||||
{
|
||||
const fvMesh& mesh = this->T_.mesh();
|
||||
|
||||
@ -417,9 +416,9 @@ Foam::heSolidThermo<MixtureType, BasicSolidThermo>::emissivity() const
|
||||
}
|
||||
|
||||
|
||||
template<class MixtureType, class BasicSolidThermo>
|
||||
template<class BasicSolidThermo, class MixtureType>
|
||||
Foam::tmp<Foam::vectorField>
|
||||
Foam::heSolidThermo<MixtureType, BasicSolidThermo>::Kappa
|
||||
Foam::heSolidThermo<BasicSolidThermo, MixtureType>::Kappa
|
||||
(
|
||||
const label patchi
|
||||
) const
|
||||
@ -446,9 +445,9 @@ Foam::heSolidThermo<MixtureType, BasicSolidThermo>::Kappa
|
||||
}
|
||||
|
||||
|
||||
template<class MixtureType, class BasicSolidThermo>
|
||||
template<class BasicSolidThermo, class MixtureType>
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::heSolidThermo<MixtureType, BasicSolidThermo>::kappaRad
|
||||
Foam::heSolidThermo<BasicSolidThermo, MixtureType>::kappaRad
|
||||
(
|
||||
const label patchi
|
||||
) const
|
||||
@ -474,9 +473,9 @@ Foam::heSolidThermo<MixtureType, BasicSolidThermo>::kappaRad
|
||||
}
|
||||
|
||||
|
||||
template<class MixtureType, class BasicSolidThermo>
|
||||
template<class BasicSolidThermo, class MixtureType>
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::heSolidThermo<MixtureType, BasicSolidThermo>::sigmaS
|
||||
Foam::heSolidThermo<BasicSolidThermo, MixtureType>::sigmaS
|
||||
(
|
||||
const label patchi
|
||||
) const
|
||||
@ -503,9 +502,9 @@ Foam::heSolidThermo<MixtureType, BasicSolidThermo>::sigmaS
|
||||
}
|
||||
|
||||
|
||||
template<class MixtureType, class BasicSolidThermo>
|
||||
template<class BasicSolidThermo, class MixtureType>
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::heSolidThermo<MixtureType, BasicSolidThermo>::emissivity
|
||||
Foam::heSolidThermo<BasicSolidThermo, MixtureType>::emissivity
|
||||
(
|
||||
const label patchi
|
||||
) const
|
||||
|
||||
@ -36,8 +36,6 @@ SourceFiles
|
||||
#define heSolidThermo_H
|
||||
|
||||
#include "heThermo.H"
|
||||
#include "solidThermo.H"
|
||||
#include "coordinateSystem.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -48,7 +46,7 @@ namespace Foam
|
||||
Class heSolidThermo Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class MixtureType, class BasicSolidThermo>
|
||||
template<class BasicSolidThermo, class MixtureType>
|
||||
class heSolidThermo
|
||||
:
|
||||
public heThermo<BasicSolidThermo, MixtureType>
|
||||
@ -60,7 +58,7 @@ class heSolidThermo
|
||||
void calculate();
|
||||
|
||||
//- Construct as copy (not implemented)
|
||||
heSolidThermo(const heSolidThermo<MixtureType, BasicSolidThermo>&);
|
||||
heSolidThermo(const heSolidThermo<BasicSolidThermo, MixtureType>&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -208,7 +208,6 @@ public:
|
||||
|
||||
//- Specific heat capacity
|
||||
virtual scalar Cp(scalar p, scalar T, label celli) const = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -82,9 +82,6 @@ public:
|
||||
//- The type of thermodynamics this mixture is instantiated for
|
||||
typedef ThermoType thermoType;
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("multiComponentSolidMixture");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
|
||||
@ -65,10 +65,6 @@ public:
|
||||
typedef ThermoType thermoType;
|
||||
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("pureSolidMixture");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from dictionary and mesh
|
||||
|
||||
@ -67,8 +67,6 @@ public:
|
||||
//- The type of thermo package this mixture is instantiated for
|
||||
typedef ThermoSolidType thermoType;
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("reactingSolidMixture");
|
||||
|
||||
// Constructors
|
||||
|
||||
|
||||
@ -39,110 +39,56 @@ Description
|
||||
|
||||
#define makeSolidThermo(BaseThermo,Cthermo,Mixture,Transport,Radiation,Type,Thermo,EqnOfState,Specie)\
|
||||
\
|
||||
typedef Cthermo \
|
||||
< \
|
||||
typedef \
|
||||
Transport \
|
||||
< \
|
||||
Radiation \
|
||||
< \
|
||||
species::thermo \
|
||||
< \
|
||||
Thermo \
|
||||
< \
|
||||
EqnOfState \
|
||||
< \
|
||||
Specie \
|
||||
> \
|
||||
>, \
|
||||
Type \
|
||||
> \
|
||||
> \
|
||||
> Transport##Radiation##Type##Thermo##EqnOfState##Specie; \
|
||||
\
|
||||
typedef \
|
||||
Mixture \
|
||||
< \
|
||||
Transport \
|
||||
< \
|
||||
Radiation \
|
||||
< \
|
||||
species::thermo \
|
||||
< \
|
||||
Thermo \
|
||||
< \
|
||||
EqnOfState \
|
||||
< \
|
||||
Specie \
|
||||
> \
|
||||
>, \
|
||||
Type \
|
||||
> \
|
||||
> \
|
||||
> \
|
||||
>, \
|
||||
BaseThermo \
|
||||
> Cthermo##Mixture##Transport##Radiation##Type##Thermo \
|
||||
##EqnOfState##Specie##BaseThermo; \
|
||||
Transport##Radiation##Type##Thermo##EqnOfState##Specie \
|
||||
> Mixture##Transport##Radiation##Type##Thermo##EqnOfState##Specie; \
|
||||
\
|
||||
defineTemplateTypeNameAndDebugWithName \
|
||||
( \
|
||||
Cthermo##Mixture##Transport##Radiation##Type##Thermo \
|
||||
##EqnOfState##Specie##BaseThermo, \
|
||||
#Cthermo \
|
||||
"<" \
|
||||
#Mixture \
|
||||
"<" \
|
||||
#Transport \
|
||||
"<" \
|
||||
#Radiation \
|
||||
"<" \
|
||||
#Thermo \
|
||||
"<" \
|
||||
#EqnOfState \
|
||||
"<" \
|
||||
#Specie \
|
||||
">" \
|
||||
">," \
|
||||
#Type \
|
||||
">>>>", \
|
||||
0 \
|
||||
); \
|
||||
\
|
||||
\
|
||||
typedef Mixture \
|
||||
< \
|
||||
Transport \
|
||||
typedef \
|
||||
Cthermo \
|
||||
< \
|
||||
Radiation \
|
||||
< \
|
||||
species::thermo \
|
||||
< \
|
||||
Thermo \
|
||||
< \
|
||||
EqnOfState \
|
||||
< \
|
||||
Specie \
|
||||
> \
|
||||
>, \
|
||||
Type \
|
||||
> \
|
||||
> \
|
||||
> \
|
||||
> Mixture##Transport##Radiation##Type##Thermo##EqnOfState##Specie; \
|
||||
\
|
||||
\
|
||||
defineTemplateTypeNameAndDebugWithName \
|
||||
( \
|
||||
Mixture##Transport##Radiation##Type##Thermo##EqnOfState##Specie, \
|
||||
#Mixture \
|
||||
"<" \
|
||||
#Transport \
|
||||
"<" \
|
||||
#Radiation \
|
||||
"<" \
|
||||
#Thermo \
|
||||
"<" \
|
||||
#EqnOfState \
|
||||
">," \
|
||||
#Type \
|
||||
">>>", \
|
||||
0 \
|
||||
); \
|
||||
\
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
BaseThermo, \
|
||||
Mixture##Transport##Radiation##Type##Thermo##EqnOfState##Specie \
|
||||
> Cthermo##Mixture##Transport##Radiation##Type##Thermo \
|
||||
##EqnOfState##Specie; \
|
||||
\
|
||||
defineTemplateTypeNameAndDebugWithName \
|
||||
( \
|
||||
Cthermo##Mixture##Transport##Radiation##Type##Thermo \
|
||||
##EqnOfState##Specie##BaseThermo, \
|
||||
mesh \
|
||||
##EqnOfState##Specie, \
|
||||
( \
|
||||
#Cthermo"<"#Mixture"<" \
|
||||
+ Transport##Radiation##Type##Thermo##EqnOfState##Specie::typeName() \
|
||||
+ ">>" \
|
||||
).c_str(), \
|
||||
0 \
|
||||
); \
|
||||
\
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
basicThermo, \
|
||||
Cthermo##Mixture##Transport##Radiation##Type##Thermo \
|
||||
##EqnOfState##Specie##BaseThermo, \
|
||||
##EqnOfState##Specie, \
|
||||
fvMesh \
|
||||
); \
|
||||
\
|
||||
@ -150,7 +96,15 @@ addToRunTimeSelectionTable \
|
||||
( \
|
||||
BaseThermo, \
|
||||
Cthermo##Mixture##Transport##Radiation##Type##Thermo \
|
||||
##EqnOfState##Specie##BaseThermo, \
|
||||
##EqnOfState##Specie, \
|
||||
fvMesh \
|
||||
); \
|
||||
\
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
BaseThermo, \
|
||||
Cthermo##Mixture##Transport##Radiation##Type##Thermo \
|
||||
##EqnOfState##Specie, \
|
||||
dictionary \
|
||||
);
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@ License
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(solidThermo, 0);
|
||||
defineRunTimeSelectionTable(solidThermo, mesh);
|
||||
defineRunTimeSelectionTable(solidThermo, fvMesh);
|
||||
defineRunTimeSelectionTable(solidThermo, dictionary);
|
||||
}
|
||||
|
||||
|
||||
@ -77,12 +77,11 @@ public:
|
||||
(
|
||||
autoPtr,
|
||||
solidThermo,
|
||||
mesh,
|
||||
fvMesh,
|
||||
(const fvMesh& mesh),
|
||||
(mesh)
|
||||
);
|
||||
|
||||
|
||||
// Declare run-time constructor selection tables
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
|
||||
@ -55,10 +55,10 @@ Foam::autoPtr<Foam::solidThermo> Foam::solidThermo::New
|
||||
).lookup("thermoType")
|
||||
);
|
||||
|
||||
meshConstructorTable::iterator cstrIter =
|
||||
meshConstructorTablePtr_->find(thermoType);
|
||||
fvMeshConstructorTable::iterator cstrIter =
|
||||
fvMeshConstructorTablePtr_->find(thermoType);
|
||||
|
||||
if (cstrIter == meshConstructorTablePtr_->end())
|
||||
if (cstrIter == fvMeshConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
@ -66,7 +66,7 @@ Foam::autoPtr<Foam::solidThermo> Foam::solidThermo::New
|
||||
) << "Unknown solidThermo type " << thermoType
|
||||
<< endl << endl
|
||||
<< "Valid solidThermo types are :" << endl
|
||||
<< meshConstructorTablePtr_->toc()
|
||||
<< fvMeshConstructorTablePtr_->toc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType heSolidThermo<pureSolidMixture<constIsoSolidTransport<constSolidRad<hConstThermo<rhoConst<specie>>,sensibleEnthalpy>>>>;
|
||||
thermoType heSolidThermo<pureSolidMixture<constIso<const<hConst<rhoConst<specie>>,sensibleEnthalpy>>>>;
|
||||
|
||||
mixture
|
||||
{
|
||||
|
||||
@ -14,7 +14,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType heSolidThermo<pureSolidMixture<constIsoSolidTransport<constSolidRad<hConstThermo<rhoConst<specie>>,sensibleEnthalpy>>>>;
|
||||
thermoType heSolidThermo<pureSolidMixture<constIso<const<hConst<rhoConst<specie>>,sensibleEnthalpy>>>>;
|
||||
|
||||
mixture
|
||||
{
|
||||
|
||||
@ -14,7 +14,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType heSolidThermo<pureSolidMixture<constIsoSolidTransport<constSolidRad<hConstThermo<rhoConst<specie>>,sensibleEnthalpy>>>>;
|
||||
thermoType heSolidThermo<pureSolidMixture<constIso<const<hConst<rhoConst<specie>>,sensibleEnthalpy>>>>;
|
||||
|
||||
mixture
|
||||
{
|
||||
|
||||
@ -14,7 +14,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType heSolidThermo<pureSolidMixture<constIsoSolidTransport<constSolidRad<hConstThermo<rhoConst<specie>>,sensibleEnthalpy>>>>;
|
||||
thermoType heSolidThermo<pureSolidMixture<constIso<const<hConst<rhoConst<specie>>,sensibleEnthalpy>>>>;
|
||||
|
||||
mixture
|
||||
{
|
||||
|
||||
@ -14,7 +14,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType heSolidThermo<pureSolidMixture<constIsoSolidTransport<constSolidRad<hConstThermo<rhoConst<specie>>,sensibleEnthalpy>>>>;
|
||||
thermoType heSolidThermo<pureSolidMixture<constIso<const<hConst<rhoConst<specie>>,sensibleEnthalpy>>>>;
|
||||
|
||||
mixture
|
||||
{
|
||||
|
||||
@ -14,7 +14,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType heSolidThermo<pureSolidMixture<constIsoSolidTransport<constSolidRad<hConstThermo<rhoConst<specie>>,sensibleEnthalpy>>>>;
|
||||
thermoType heSolidThermo<pureSolidMixture<constIso<const<hConst<rhoConst<specie>>,sensibleEnthalpy>>>>;
|
||||
|
||||
mixture
|
||||
{
|
||||
|
||||
@ -14,7 +14,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType heSolidThermo<pureSolidMixture<constIsoSolidTransport<constSolidRad<hConstThermo<rhoConst<specie>>,sensibleEnthalpy>>>>;
|
||||
thermoType heSolidThermo<pureSolidMixture<constIso<const<hConst<rhoConst<specie>>,sensibleEnthalpy>>>>;
|
||||
|
||||
mixture
|
||||
{
|
||||
|
||||
@ -14,7 +14,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType heSolidThermo<pureSolidMixture<constIsoSolidTransport<constSolidRad<hConstThermo<rhoConst<specie>>,sensibleEnthalpy>>>>;
|
||||
thermoType heSolidThermo<pureSolidMixture<constIso<const<hConst<rhoConst<specie>>,sensibleEnthalpy>>>>;
|
||||
|
||||
mixture
|
||||
{
|
||||
|
||||
@ -14,7 +14,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType heSolidThermo<pureSolidMixture<constIsoSolidTransport<constSolidRad<hConstThermo<rhoConst<specie>>,sensibleEnthalpy>>>>;
|
||||
thermoType heSolidThermo<pureSolidMixture<constIso<const<hConst<rhoConst<specie>>,sensibleEnthalpy>>>>;
|
||||
|
||||
mixture
|
||||
{
|
||||
|
||||
@ -14,7 +14,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType heSolidThermo<pureSolidMixture<constIsoSolidTransport<constSolidRad<hConstThermo<rhoConst<specie>>,sensibleEnthalpy>>>>;
|
||||
thermoType heSolidThermo<pureSolidMixture<constIso<const<hConst<rhoConst<specie>>,sensibleEnthalpy>>>>;
|
||||
|
||||
mixture
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user