ENH: Propagated dictionary constructors through lib specie

This commit is contained in:
andy
2010-10-11 17:35:30 +01:00
parent 0de35548f6
commit f1f340bd21
67 changed files with 1113 additions and 318 deletions

View File

@ -43,6 +43,16 @@ icoPolynomial<PolySize>::icoPolynomial(Istream& is)
}
template<int PolySize>
icoPolynomial<PolySize>::icoPolynomial(const dictionary& dict)
:
specie(dict),
rhoPolynomial_(dict.lookup("rhoPolynomial"))
{
rhoPolynomial_ *= this->W();
}
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
template<int PolySize>

View File

@ -117,6 +117,9 @@ public:
//- Construct from Istream
icoPolynomial(Istream&);
//- Construct from dictionary
icoPolynomial(const dictionary& dict);
//- Construct as copy
inline icoPolynomial(const icoPolynomial&);
@ -129,6 +132,9 @@ public:
// Selector from Istream
inline static autoPtr<icoPolynomial> New(Istream& is);
// Selector from dictionary
inline static autoPtr<icoPolynomial> New(const dictionary& dict);
// Member functions

View File

@ -83,6 +83,17 @@ Foam::icoPolynomial<PolySize>::New(Istream& is)
}
template<int PolySize>
inline Foam::autoPtr<Foam::icoPolynomial<PolySize> >
Foam::icoPolynomial<PolySize>::New(const dictionary& dict)
{
return autoPtr<icoPolynomial<PolySize> >
(
new icoPolynomial<PolySize>(dict)
);
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<int PolySize>

View File

@ -41,6 +41,12 @@ perfectGas::perfectGas(Istream& is)
}
perfectGas::perfectGas(const dictionary& dict)
:
specie(dict)
{}
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
Ostream& operator<<(Ostream& os, const perfectGas& pg)

View File

@ -63,6 +63,9 @@ public:
//- Construct from Istream
perfectGas(Istream&);
//- Construct from dictionary
perfectGas(const dictionary& dict);
//- Construct as named copy
inline perfectGas(const word& name, const perfectGas&);
@ -72,6 +75,9 @@ public:
// Selector from Istream
inline static autoPtr<perfectGas> New(Istream& is);
// Selector from dictionary
inline static autoPtr<perfectGas> New(const dictionary& dict);
// Member functions

View File

@ -32,7 +32,6 @@ namespace Foam
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
// Construct from components
inline perfectGas::perfectGas
(
const specie& sp
@ -44,42 +43,44 @@ inline perfectGas::perfectGas
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct as named copy
inline perfectGas::perfectGas(const word& name, const perfectGas& pg)
:
specie(name, pg)
{}
// Construct and return a clone
inline autoPtr<perfectGas> perfectGas::clone() const
{
return autoPtr<perfectGas>(new perfectGas(*this));
}
// Selector from Istream
inline autoPtr<perfectGas> perfectGas::New(Istream& is)
{
return autoPtr<perfectGas>(new perfectGas(is));
}
inline autoPtr<perfectGas> perfectGas::New(const dictionary& dict)
{
return autoPtr<perfectGas>(new perfectGas(dict));
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
//- Return density [kg/m^3]
inline scalar perfectGas::rho(scalar p, scalar T) const
{
return p/(R()*T);
}
//- Return compressibility rho/p [s^2/m^2]
inline scalar perfectGas::psi(scalar, scalar T) const
{
return 1.0/(R()*T);
}
//- Return compression factor []
inline scalar perfectGas::Z(scalar, scalar) const
{
return 1.0;
@ -93,11 +94,13 @@ inline void perfectGas::operator+=(const perfectGas& pg)
specie::operator+=(pg);
}
inline void perfectGas::operator-=(const perfectGas& pg)
{
specie::operator-=(pg);
}
inline void perfectGas::operator*=(const scalar s)
{
specie::operator*=(s);

View File

@ -25,16 +25,10 @@ License
#include "IrreversibleReaction.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
template<class ReactionThermo, class ReactionRate>
IrreversibleReaction<ReactionThermo, ReactionRate>::IrreversibleReaction
Foam::IrreversibleReaction<ReactionThermo, ReactionRate>::IrreversibleReaction
(
const Reaction<ReactionThermo>& reaction,
const ReactionRate& k
@ -45,9 +39,8 @@ IrreversibleReaction<ReactionThermo, ReactionRate>::IrreversibleReaction
{}
// Construct from components
template<class ReactionThermo, class ReactionRate>
IrreversibleReaction<ReactionThermo, ReactionRate>::IrreversibleReaction
Foam::IrreversibleReaction<ReactionThermo, ReactionRate>::IrreversibleReaction
(
const speciesTable& species,
const HashPtrTable<ReactionThermo>& thermoDatabase,
@ -59,9 +52,21 @@ IrreversibleReaction<ReactionThermo, ReactionRate>::IrreversibleReaction
{}
// Construct as copy given new speciesTable
template<class ReactionThermo, class ReactionRate>
IrreversibleReaction<ReactionThermo, ReactionRate>::IrreversibleReaction
Foam::IrreversibleReaction<ReactionThermo, ReactionRate>::IrreversibleReaction
(
const speciesTable& species,
const HashPtrTable<ReactionThermo>& thermoDatabase,
const dictionary& dict
)
:
Reaction<ReactionThermo>(species, thermoDatabase, dict),
k_(species, dict)
{}
template<class ReactionThermo, class ReactionRate>
Foam::IrreversibleReaction<ReactionThermo, ReactionRate>::IrreversibleReaction
(
const IrreversibleReaction<ReactionThermo, ReactionRate>& irr,
const speciesTable& species
@ -75,7 +80,7 @@ IrreversibleReaction<ReactionThermo, ReactionRate>::IrreversibleReaction
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class ReactionThermo, class ReactionRate>
scalar IrreversibleReaction<ReactionThermo, ReactionRate>::kf
Foam::scalar Foam::IrreversibleReaction<ReactionThermo, ReactionRate>::kf
(
const scalar T,
const scalar p,
@ -87,7 +92,7 @@ scalar IrreversibleReaction<ReactionThermo, ReactionRate>::kf
template<class ReactionThermo, class ReactionRate>
void IrreversibleReaction<ReactionThermo, ReactionRate>::write
void Foam::IrreversibleReaction<ReactionThermo, ReactionRate>::write
(
Ostream& os
) const
@ -97,8 +102,4 @@ void IrreversibleReaction<ReactionThermo, ReactionRate>::write
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -44,7 +44,7 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class IrreversibleReaction Declaration
Class IrreversibleReaction Declaration
\*---------------------------------------------------------------------------*/
template<class ReactionThermo, class ReactionRate>
@ -96,6 +96,14 @@ public:
Istream& is
);
//- Construct from dictionary
IrreversibleReaction
(
const speciesTable& species,
const HashPtrTable<ReactionThermo>& thermoDatabase,
const dictionary& dict
);
//- Construct and return a clone
virtual autoPtr<Reaction<ReactionThermo> > clone() const
{

View File

@ -25,16 +25,10 @@ License
#include "NonEquilibriumReversibleReaction.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
template<class ReactionThermo, class ReactionRate>
NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::
Foam::NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::
NonEquilibriumReversibleReaction
(
const Reaction<ReactionThermo>& reaction,
@ -48,9 +42,9 @@ NonEquilibriumReversibleReaction
{}
// Construct from components
template<class ReactionThermo, class ReactionRate>
NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::
Foam::NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::
NonEquilibriumReversibleReaction
(
const speciesTable& species,
@ -63,9 +57,24 @@ NonEquilibriumReversibleReaction
rk_(species, is)
{}
// Construct as copy given new speciesTable
template<class ReactionThermo, class ReactionRate>
NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::
Foam::NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::
NonEquilibriumReversibleReaction
(
const speciesTable& species,
const HashPtrTable<ReactionThermo>& thermoDatabase,
const dictionary& dict
)
:
Reaction<ReactionThermo>(species, thermoDatabase, dict),
fk_(species, dict),
rk_(species, dict)
{}
template<class ReactionThermo, class ReactionRate>
Foam::NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::
NonEquilibriumReversibleReaction
(
const NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>& nerr,
@ -81,7 +90,8 @@ NonEquilibriumReversibleReaction
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class ReactionThermo, class ReactionRate>
scalar NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::kf
Foam::scalar
Foam::NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::kf
(
const scalar T,
const scalar p,
@ -93,7 +103,8 @@ scalar NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::kf
template<class ReactionThermo, class ReactionRate>
scalar NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::kr
Foam::scalar
Foam::NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::kr
(
const scalar,
const scalar T,
@ -106,7 +117,8 @@ scalar NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::kr
template<class ReactionThermo, class ReactionRate>
scalar NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::kr
Foam::scalar
Foam::NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::kr
(
const scalar T,
const scalar p,
@ -118,7 +130,7 @@ scalar NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::kr
template<class ReactionThermo, class ReactionRate>
void NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::write
void Foam::NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::write
(
Ostream& os
) const
@ -128,8 +140,4 @@ void NonEquilibriumReversibleReaction<ReactionThermo, ReactionRate>::write
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -44,7 +44,7 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class NonEquilibriumReversibleReaction Declaration
Class NonEquilibriumReversibleReaction Declaration
\*---------------------------------------------------------------------------*/
template<class ReactionThermo, class ReactionRate>
@ -100,6 +100,14 @@ public:
Istream& is
);
//- Construct from dictionary
NonEquilibriumReversibleReaction
(
const speciesTable& species,
const HashPtrTable<ReactionThermo>& thermoDatabase,
const dictionary& dict
);
//- Construct and return a clone
virtual autoPtr<Reaction<ReactionThermo> > clone() const
{

View File

@ -196,6 +196,22 @@ Foam::Reaction<ReactionThermo>::Reaction
}
template<class ReactionThermo>
Foam::Reaction<ReactionThermo>::Reaction
(
const speciesTable& species,
const HashPtrTable<ReactionThermo>& thermoDatabase,
const dictionary& dict
)
:
ReactionThermo(*thermoDatabase[species[0]]),
species_(species)
{
setLRhs(IStringStream(dict.lookup("reaction"))());
setThermo(thermoDatabase);
}
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
template<class ReactionThermo>
@ -211,11 +227,11 @@ Foam::Reaction<ReactionThermo>::New
{
FatalIOErrorIn
(
"Reaction<ReactionThermo>::New(const speciesTable& species,"
" const HashPtrTable<ReactionThermo>& thermoDatabase, Istream&)",
"Reaction<ReactionThermo>::New(const speciesTable&, "
" const HashPtrTable<ReactionThermo>&, Istream&)",
is
) << "Reaction type not specified" << nl << nl
<< "Valid Reaction types are :" << endl
<< "Valid Reaction types are :" << nl
<< IstreamConstructorTablePtr_->sortedToc()
<< exit(FatalIOError);
}
@ -229,12 +245,12 @@ Foam::Reaction<ReactionThermo>::New
{
FatalIOErrorIn
(
"Reaction<ReactionThermo>::New(const speciesTable& species,"
" const HashPtrTable<ReactionThermo>& thermoDatabase, Istream&)",
"Reaction<ReactionThermo>::New(const speciesTable&, "
" const HashPtrTable<ReactionThermo>&, Istream&)",
is
) << "Unknown reaction type "
<< reactionTypeName << nl << nl
<< "Valid reaction types are :" << endl
<< "Valid reaction types are :" << nl
<< IstreamConstructorTablePtr_->sortedToc()
<< exit(FatalIOError);
}
@ -246,6 +262,44 @@ Foam::Reaction<ReactionThermo>::New
}
template<class ReactionThermo>
Foam::autoPtr<Foam::Reaction<ReactionThermo> >
Foam::Reaction<ReactionThermo>::New
(
const speciesTable& species,
const HashPtrTable<ReactionThermo>& thermoDatabase,
const dictionary& dict
)
{
const word& reactionTypeName = dict.dictName();
typename dictionaryConstructorTable::iterator cstrIter
= dictionaryConstructorTablePtr_->find(reactionTypeName);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"Reaction<ReactionThermo>::New"
"("
"const speciesTable&, "
"const HashPtrTable<ReactionThermo>&, "
"const dictionary&"
")"
) << "Unknown reaction type "
<< reactionTypeName << nl << nl
<< "Valid reaction types are :" << nl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
return autoPtr<Reaction<ReactionThermo> >
(
cstrIter()(species, thermoDatabase, dict)
);
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class ReactionThermo>

View File

@ -152,6 +152,19 @@ public:
(species, thermoDatabase, is)
);
declareRunTimeSelectionTable
(
autoPtr,
Reaction,
dictionary,
(
const speciesTable& species,
const HashPtrTable<ReactionThermo>& thermoDatabase,
const dictionary& dict
),
(species, thermoDatabase, dict)
);
// Public classes
@ -205,6 +218,14 @@ public:
Istream& is
);
//- Construct from dictionary
Reaction
(
const speciesTable& species,
const HashPtrTable<ReactionThermo>& thermoDatabase,
const dictionary& dict
);
//- Construct and return a clone
virtual autoPtr<Reaction<ReactionThermo> > clone() const
{
@ -229,12 +250,20 @@ public:
// Selectors
//- Return a pointer to a new patchField created on freestore from input
//- Return a pointer to new patchField created on freestore from input
static autoPtr<Reaction<ReactionThermo> > New
(
const speciesTable& species,
const HashPtrTable<ReactionThermo>& thermoDatabase,
Istream&
Istream& is
);
//- Return a pointer to new patchField created on freestore from dict
static autoPtr<Reaction<ReactionThermo> > New
(
const speciesTable& species,
const HashPtrTable<ReactionThermo>& thermoDatabase,
const dictionary& dict
);

View File

@ -0,0 +1,136 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
\\/ 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 "ReactionList.H"
#include "IFstream.H"
#include "SLPtrList.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class ThermoType>
Foam::ReactionList<ThermoType>::ReactionList
(
const speciesTable& species,
const HashPtrTable<ThermoType>& thermoDb
)
:
PtrList<Reaction<ThermoType> >(),
species_(species),
thermoDb_(thermoDb),
dict_(dictionary::null)
{}
template<class ThermoType>
Foam::ReactionList<ThermoType>::ReactionList
(
const speciesTable& species,
const HashPtrTable<ThermoType>& thermoDb,
const dictionary& dict
)
:
PtrList<Reaction<ThermoType> >(),
species_(species),
thermoDb_(thermoDb),
dict_(dict)
{
readReactionDict();
}
template<class ThermoType>
Foam::ReactionList<ThermoType>::ReactionList
(
const speciesTable& species,
const HashPtrTable<ThermoType>& thermoDb,
const fileName& fName
)
:
PtrList<Reaction<ThermoType> >
(
dictionary(IFstream(fName)()).lookup("reactions"),
Reaction<ThermoType>::iNew(species, thermoDb)
),
species_(species),
thermoDb_(thermoDb),
dict_(dictionary::null)
{}
template<class ThermoType>
Foam::ReactionList<ThermoType>::ReactionList(const ReactionList& reactions)
:
PtrList<Reaction<ThermoType> >(reactions),
species_(reactions.species_),
thermoDb_(reactions.thermoDb_),
dict_(reactions.dict_)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class ThermoType>
Foam::ReactionList<ThermoType>::~ReactionList()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class ThermoType>
bool Foam::ReactionList<ThermoType>::readReactionDict()
{
const dictionary& reactions(dict_.subDict("reactions"));
PtrList<Reaction<ThermoType> > newPtrs(reactions.size());
label i = 0;
forAllConstIter(dictionary, reactions, iter)
{
newPtrs.set
(
i++,
Reaction<ThermoType>::New
(
species_,
thermoDb_,
reactions.subDict(iter().keyword())
)
);
}
PtrList<Reaction<ThermoType> >::transfer(newPtrs);
return true;
}
template<class ThermoType>
const Foam::PtrList<Foam::Reaction<ThermoType> >&
Foam::ReactionList<ThermoType>::reactions() const
{
return *this;
}
// ************************************************************************* //

View File

@ -0,0 +1,135 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
\\/ 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::ReactionList
Description
List of templated reactions
SourceFiles
ReactionList.C
\*---------------------------------------------------------------------------*/
#ifndef ReactionList_H
#define ReactionList_H
#include "PtrList.H"
#include "SLPtrList.H"
#include "speciesTable.H"
#include "HashPtrTable.H"
#include "Reaction.H"
#include "fileName.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class ReactionList Declaration
\*---------------------------------------------------------------------------*/
template<class ThermoType>
class ReactionList
:
private PtrList<Reaction<ThermoType> >
{
// Private data
//- Reference to the table of species
const speciesTable& species_;
//- Reference to the thermo database
const HashPtrTable<ThermoType>& thermoDb_;
//- The dictionary used for construction
const dictionary dict_;
// Private Member Functions
//- Disallow default bitwise assignment
void operator=(const ReactionList&);
public:
// Constructors
//- Construct null
ReactionList
(
const speciesTable& species,
const HashPtrTable<ThermoType>& thermoDatabase
);
//- Construct from dictionary
ReactionList
(
const speciesTable& species,
const HashPtrTable<ThermoType>& thermoDatabase,
const dictionary& dict
);
//- Construct from file using (Istream)
ReactionList
(
const speciesTable& species,
const HashPtrTable<ThermoType>& thermoDatabase,
const fileName& fName
);
//- Construct copy
ReactionList(const ReactionList<ThermoType>& reactions);
//- Destructor
~ReactionList();
// Public Member Functions
//- Read reactions from dictionary
bool readReactionDict();
//- Return the list of reactions
const PtrList<Reaction<ThermoType> >& reactions() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "ReactionList.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -25,16 +25,10 @@ License
#include "ReversibleReaction.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
template<class ReactionThermo, class ReactionRate>
ReversibleReaction<ReactionThermo, ReactionRate>::ReversibleReaction
Foam::ReversibleReaction<ReactionThermo, ReactionRate>::ReversibleReaction
(
const Reaction<ReactionThermo>& reaction,
const ReactionRate& k
@ -45,9 +39,8 @@ ReversibleReaction<ReactionThermo, ReactionRate>::ReversibleReaction
{}
// Construct from components
template<class ReactionThermo, class ReactionRate>
ReversibleReaction<ReactionThermo, ReactionRate>::ReversibleReaction
Foam::ReversibleReaction<ReactionThermo, ReactionRate>::ReversibleReaction
(
const speciesTable& species,
const HashPtrTable<ReactionThermo>& thermoDatabase,
@ -59,9 +52,21 @@ ReversibleReaction<ReactionThermo, ReactionRate>::ReversibleReaction
{}
// Construct as copy given new speciesTable
template<class ReactionThermo, class ReactionRate>
ReversibleReaction<ReactionThermo, ReactionRate>::ReversibleReaction
Foam::ReversibleReaction<ReactionThermo, ReactionRate>::ReversibleReaction
(
const speciesTable& species,
const HashPtrTable<ReactionThermo>& thermoDatabase,
const dictionary& dict
)
:
Reaction<ReactionThermo>(species, thermoDatabase, dict),
k_(species, dict)
{}
template<class ReactionThermo, class ReactionRate>
Foam::ReversibleReaction<ReactionThermo, ReactionRate>::ReversibleReaction
(
const ReversibleReaction<ReactionThermo, ReactionRate>& rr,
const speciesTable& species
@ -75,7 +80,7 @@ ReversibleReaction<ReactionThermo, ReactionRate>::ReversibleReaction
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class ReactionThermo, class ReactionRate>
scalar ReversibleReaction<ReactionThermo, ReactionRate>::kf
Foam::scalar Foam::ReversibleReaction<ReactionThermo, ReactionRate>::kf
(
const scalar T,
const scalar p,
@ -87,7 +92,7 @@ scalar ReversibleReaction<ReactionThermo, ReactionRate>::kf
template<class ReactionThermo, class ReactionRate>
scalar ReversibleReaction<ReactionThermo, ReactionRate>::kr
Foam::scalar Foam::ReversibleReaction<ReactionThermo, ReactionRate>::kr
(
const scalar kfwd,
const scalar T,
@ -100,7 +105,7 @@ scalar ReversibleReaction<ReactionThermo, ReactionRate>::kr
template<class ReactionThermo, class ReactionRate>
scalar ReversibleReaction<ReactionThermo, ReactionRate>::kr
Foam::scalar Foam::ReversibleReaction<ReactionThermo, ReactionRate>::kr
(
const scalar T,
const scalar p,
@ -112,7 +117,7 @@ scalar ReversibleReaction<ReactionThermo, ReactionRate>::kr
template<class ReactionThermo, class ReactionRate>
void ReversibleReaction<ReactionThermo, ReactionRate>::write
void Foam::ReversibleReaction<ReactionThermo, ReactionRate>::write
(
Ostream& os
) const
@ -122,8 +127,4 @@ void ReversibleReaction<ReactionThermo, ReactionRate>::write
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -44,7 +44,7 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class ReversibleReaction Declaration
Class ReversibleReaction Declaration
\*---------------------------------------------------------------------------*/
template<class ReactionThermo, class ReactionRate>
@ -93,6 +93,14 @@ public:
Istream& is
);
//- Construct from dictionary
ReversibleReaction
(
const speciesTable& species,
const HashPtrTable<ReactionThermo>& thermoDatabase,
const dictionary& dict
);
//- Construct and return a clone
virtual autoPtr<Reaction<ReactionThermo> > clone() const
{

View File

@ -25,7 +25,9 @@ Class
Foam::ArrheniusReactionRate
Description
Arrhenius reaction rate.
Arrhenius reaction rate given by:
k = A * T^beta * exp(-Ta/T)
SourceFiles
ArrheniusReactionRateI.H
@ -44,7 +46,7 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class ArrheniusReactionRate Declaration
Class ArrheniusReactionRate Declaration
\*---------------------------------------------------------------------------*/
class ArrheniusReactionRate
@ -75,6 +77,13 @@ public:
Istream& is
);
//- Construct from dictionary
inline ArrheniusReactionRate
(
const speciesTable& species,
const dictionary& dict
);
// Member Functions

View File

@ -23,15 +23,9 @@ License
\*---------------------------------------------------------------------------*/
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
inline ArrheniusReactionRate::ArrheniusReactionRate
inline Foam::ArrheniusReactionRate::ArrheniusReactionRate
(
const scalar A,
const scalar beta,
@ -44,8 +38,7 @@ inline ArrheniusReactionRate::ArrheniusReactionRate
{}
//- Construct from Istream
inline ArrheniusReactionRate::ArrheniusReactionRate
inline Foam::ArrheniusReactionRate::ArrheniusReactionRate
(
const speciesTable&,
Istream& is
@ -59,9 +52,21 @@ inline ArrheniusReactionRate::ArrheniusReactionRate
}
inline Foam::ArrheniusReactionRate::ArrheniusReactionRate
(
const speciesTable&,
const dictionary& dict
)
:
A_(readScalar(dict.lookup("A"))),
beta_(readScalar(dict.lookup("beta"))),
Ta_(readScalar(dict.lookup("Ta")))
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
inline scalar ArrheniusReactionRate::operator()
inline Foam::scalar Foam::ArrheniusReactionRate::operator()
(
const scalar T,
const scalar,
@ -84,7 +89,11 @@ inline scalar ArrheniusReactionRate::operator()
}
inline Ostream& operator<<(Ostream& os, const ArrheniusReactionRate& arr)
inline Foam::Ostream& Foam::operator<<
(
Ostream& os,
const ArrheniusReactionRate& arr
)
{
os << token::BEGIN_LIST
<< arr.A_ << token::SPACE << arr.beta_ << token::SPACE << arr.Ta_
@ -93,8 +102,4 @@ inline Ostream& operator<<(Ostream& os, const ArrheniusReactionRate& arr)
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -91,6 +91,13 @@ public:
Istream& is
);
//- Construct from dictionary
inline ChemicallyActivatedReactionRate
(
const speciesTable& species,
const dictionary& dict
);
// Member Functions

View File

@ -25,16 +25,12 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
template<class ReactionRate, class ChemicallyActivationFunction>
inline
ChemicallyActivatedReactionRate<ReactionRate, ChemicallyActivationFunction>::
ChemicallyActivatedReactionRate
inline Foam::ChemicallyActivatedReactionRate
<
ReactionRate,
ChemicallyActivationFunction
>::ChemicallyActivatedReactionRate
(
const ReactionRate& k0,
const ReactionRate& kInf,
@ -49,11 +45,12 @@ ChemicallyActivatedReactionRate
{}
//- Construct from Istream
template<class ReactionRate, class ChemicallyActivationFunction>
inline
ChemicallyActivatedReactionRate<ReactionRate, ChemicallyActivationFunction>::
ChemicallyActivatedReactionRate
inline Foam::ChemicallyActivatedReactionRate
<
ReactionRate,
ChemicallyActivationFunction
>::ChemicallyActivatedReactionRate
(
const speciesTable& species,
Istream& is
@ -68,11 +65,32 @@ ChemicallyActivatedReactionRate
}
template<class ReactionRate, class ChemicallyActivationFunction>
inline Foam::ChemicallyActivatedReactionRate
<
ReactionRate,
ChemicallyActivationFunction
>::ChemicallyActivatedReactionRate
(
const speciesTable& species,
const dictionary& dict
)
:
k0_(species, dict),
kInf_(species, dict),
F_(dict),
thirdBodyEfficiencies_(species, dict)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class ReactionRate, class ChemicallyActivationFunction>
inline scalar ChemicallyActivatedReactionRate
<ReactionRate, ChemicallyActivationFunction>::operator()
inline Foam::scalar Foam::ChemicallyActivatedReactionRate
<
ReactionRate,
ChemicallyActivationFunction
>::operator()
(
const scalar T,
const scalar p,
@ -89,7 +107,7 @@ inline scalar ChemicallyActivatedReactionRate
template<class ReactionRate, class ChemicallyActivationFunction>
inline Ostream& operator<<
inline Foam::Ostream& Foam::operator<<
(
Ostream& os,
const ChemicallyActivatedReactionRate
@ -103,8 +121,4 @@ inline Ostream& operator<<
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -90,6 +90,13 @@ public:
Istream& is
);
//- Construct from dictionary
inline FallOffReactionRate
(
const speciesTable& species,
const dictionary& dict
);
// Member Functions

View File

@ -23,16 +23,11 @@ License
\*---------------------------------------------------------------------------*/
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
template<class ReactionRate, class FallOffFunction>
inline FallOffReactionRate<ReactionRate, FallOffFunction>::FallOffReactionRate
inline Foam::FallOffReactionRate<ReactionRate, FallOffFunction>::
FallOffReactionRate
(
const ReactionRate& k0,
const ReactionRate& kInf,
@ -47,9 +42,9 @@ inline FallOffReactionRate<ReactionRate, FallOffFunction>::FallOffReactionRate
{}
//- Construct from Istream
template<class ReactionRate, class FallOffFunction>
inline FallOffReactionRate<ReactionRate, FallOffFunction>::FallOffReactionRate
inline Foam::FallOffReactionRate<ReactionRate, FallOffFunction>::
FallOffReactionRate
(
const speciesTable& species,
Istream& is
@ -64,10 +59,26 @@ inline FallOffReactionRate<ReactionRate, FallOffFunction>::FallOffReactionRate
}
template<class ReactionRate, class FallOffFunction>
inline Foam::FallOffReactionRate<ReactionRate, FallOffFunction>::
FallOffReactionRate
(
const speciesTable& species,
const dictionary& dict
)
:
k0_(species, dict),
kInf_(species, dict),
F_(dict),
thirdBodyEfficiencies_(species, dict)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class ReactionRate, class FallOffFunction>
inline scalar FallOffReactionRate<ReactionRate, FallOffFunction>::operator()
inline Foam::scalar
Foam::FallOffReactionRate<ReactionRate, FallOffFunction>::operator()
(
const scalar T,
const scalar p,
@ -84,7 +95,7 @@ inline scalar FallOffReactionRate<ReactionRate, FallOffFunction>::operator()
template<class ReactionRate, class FallOffFunction>
inline Ostream& operator<<
inline Foam::Ostream& Foam::operator<<
(
Ostream& os,
const FallOffReactionRate<ReactionRate, FallOffFunction>& forr
@ -100,8 +111,4 @@ inline Ostream& operator<<
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -37,6 +37,7 @@ SourceFiles
#include "scalarField.H"
#include "typeInfo.H"
#include "FixedList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -44,7 +45,7 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class JanevReactionRate Declaration
Class JanevReactionRate Declaration
\*---------------------------------------------------------------------------*/
class JanevReactionRate
@ -56,7 +57,7 @@ class JanevReactionRate
scalar Ta_;
static const label nb_ = 9;
scalar b_[nb_];
FixedList<scalar, nb_> b_;
public:
@ -69,7 +70,7 @@ public:
const scalar A,
const scalar beta,
const scalar Ta,
const scalar b[]
const FixedList<scalar, nb_> b
);
//- Construct from Istream
@ -79,6 +80,13 @@ public:
Istream& is
);
//- Construct from dictionary
inline JanevReactionRate
(
const speciesTable& species,
const dictionary& dict
);
// Member Functions

View File

@ -23,35 +23,24 @@ License
\*---------------------------------------------------------------------------*/
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
inline JanevReactionRate::JanevReactionRate
inline Foam::JanevReactionRate::JanevReactionRate
(
const scalar A,
const scalar beta,
const scalar Ta,
const scalar b[]
const FixedList<scalar, nb_> b
)
:
A_(A),
beta_(beta),
Ta_(Ta)
{
for (int n=0; n<nb_; n++)
{
b_[n] = b[n];
}
}
Ta_(Ta),
b_(b)
{}
//- Construct from Istream
inline JanevReactionRate::JanevReactionRate
inline Foam::JanevReactionRate::JanevReactionRate
(
const speciesTable&,
Istream& is
@ -59,20 +48,29 @@ inline JanevReactionRate::JanevReactionRate
:
A_(readScalar(is.readBegin("JanevReactionRate(Istream&)"))),
beta_(readScalar(is)),
Ta_(readScalar(is))
Ta_(readScalar(is)),
b_(is)
{
for (int n=0; n<nb_; n++)
{
is >> b_[n];
}
is.readEnd("JanevReactionRate(Istream&)");
}
inline Foam::JanevReactionRate::JanevReactionRate
(
const speciesTable&,
const dictionary& dict
)
:
A_(readScalar(dict.lookup("A"))),
beta_(readScalar(dict.lookup("beta"))),
Ta_(readScalar(dict.lookup("Ta"))),
b_(dict.lookup("b"))
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
inline scalar JanevReactionRate::operator()
inline Foam::scalar Foam::JanevReactionRate::operator()
(
const scalar T,
const scalar,
@ -106,7 +104,11 @@ inline scalar JanevReactionRate::operator()
}
inline Ostream& operator<<(Ostream& os, const JanevReactionRate& jrr)
inline Foam::Ostream& Foam::operator<<
(
Ostream& os,
const JanevReactionRate& jrr
)
{
os << token::BEGIN_LIST
<< jrr.A_ << token::SPACE << jrr.beta_ << token::SPACE << jrr.Ta_;
@ -122,8 +124,4 @@ inline Ostream& operator<<(Ostream& os, const JanevReactionRate& jrr)
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -78,6 +78,13 @@ public:
Istream& is
);
//- Construct from dictionary
inline LandauTellerReactionRate
(
const speciesTable& species,
const dictionary& dict
);
// Member Functions

View File

@ -23,15 +23,9 @@ License
\*---------------------------------------------------------------------------*/
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
inline LandauTellerReactionRate::LandauTellerReactionRate
inline Foam::LandauTellerReactionRate::LandauTellerReactionRate
(
const scalar A,
const scalar beta,
@ -48,8 +42,7 @@ inline LandauTellerReactionRate::LandauTellerReactionRate
{}
//- Construct from Istream
inline LandauTellerReactionRate::LandauTellerReactionRate
inline Foam::LandauTellerReactionRate::LandauTellerReactionRate
(
const speciesTable&,
Istream& is
@ -65,9 +58,23 @@ inline LandauTellerReactionRate::LandauTellerReactionRate
}
inline Foam::LandauTellerReactionRate::LandauTellerReactionRate
(
const speciesTable&,
const dictionary& dict
)
:
A_(readScalar(dict.lookup("A"))),
beta_(readScalar(dict.lookup("beta"))),
Ta_(readScalar(dict.lookup("Ta"))),
B_(readScalar(dict.lookup("B"))),
C_(readScalar(dict.lookup("C")))
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
inline scalar LandauTellerReactionRate::operator()
inline Foam::scalar Foam::LandauTellerReactionRate::operator()
(
const scalar T,
const scalar,
@ -107,7 +114,11 @@ inline scalar LandauTellerReactionRate::operator()
}
inline Ostream& operator<<(Ostream& os, const LandauTellerReactionRate& arr)
inline Foam::Ostream& Foam::operator<<
(
Ostream& os,
const LandauTellerReactionRate& arr
)
{
os << token::BEGIN_LIST
<< arr.A_ << token::SPACE << arr.beta_ << token::SPACE << arr.Ta_
@ -117,8 +128,4 @@ inline Ostream& operator<<(Ostream& os, const LandauTellerReactionRate& arr)
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -81,6 +81,13 @@ public:
Istream& is
);
//- Construct from dictionary
inline LangmuirHinshelwoodReactionRate
(
const speciesTable& species,
const dictionary& dict
);
// Member Functions

View File

@ -23,15 +23,12 @@ License
\*---------------------------------------------------------------------------*/
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
#include "FixedList.H"
#include "Tuple2.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
inline LangmuirHinshelwoodReactionRate::LangmuirHinshelwoodReactionRate
inline Foam::LangmuirHinshelwoodReactionRate::LangmuirHinshelwoodReactionRate
(
const scalar A[],
const scalar Ta[],
@ -52,8 +49,7 @@ inline LangmuirHinshelwoodReactionRate::LangmuirHinshelwoodReactionRate
}
//- Construct from Istream
inline LangmuirHinshelwoodReactionRate::LangmuirHinshelwoodReactionRate
inline Foam::LangmuirHinshelwoodReactionRate::LangmuirHinshelwoodReactionRate
(
const speciesTable& st,
Istream& is
@ -74,9 +70,30 @@ inline LangmuirHinshelwoodReactionRate::LangmuirHinshelwoodReactionRate
}
inline Foam::LangmuirHinshelwoodReactionRate::LangmuirHinshelwoodReactionRate
(
const speciesTable& st,
const dictionary& dict
)
:
co_(st["CO"]),
c3h6_(st["C3H6"]),
no_(st["NO"])
{
// read (A, Ta) pairs
FixedList<Tuple2<scalar, scalar>, n_> coeffs(dict.lookup("coeffs"));
forAll(coeffs, i)
{
A_[i] = coeffs[i].first();
Ta_[i] = coeffs[i].second();
}
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
inline scalar LangmuirHinshelwoodReactionRate::operator()
inline Foam::scalar Foam::LangmuirHinshelwoodReactionRate::operator()
(
const scalar T,
const scalar,
@ -93,7 +110,7 @@ inline scalar LangmuirHinshelwoodReactionRate::operator()
}
inline Ostream& operator<<
inline Foam::Ostream& Foam::operator<<
(
Ostream& os,
const LangmuirHinshelwoodReactionRate& lhrr
@ -103,7 +120,8 @@ inline Ostream& operator<<
for (int i=0; i<LangmuirHinshelwoodReactionRate::n_; i++)
{
os << token::SPACE << lhrr.A_[i] << token::SPACE << lhrr.Ta_[i];
os << token::SPACE
<< '(' << lhrr.A_[i] << token::SPACE << lhrr.Ta_[i] << ')';
}
os << token::END_LIST;
@ -112,8 +130,4 @@ inline Ostream& operator<<
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -65,6 +65,9 @@ public:
//- Construct from Istream
inline LindemannFallOffFunction(Istream&);
//- Construct from dictionary
inline LindemannFallOffFunction(const dictionary& dict);
// Member Functions

View File

@ -25,16 +25,21 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
//- Construct null
inline Foam::LindemannFallOffFunction::LindemannFallOffFunction()
{}
//- Construct from Istream
inline Foam::LindemannFallOffFunction::LindemannFallOffFunction(Istream&)
{}
inline Foam::LindemannFallOffFunction::LindemannFallOffFunction
(
const dictionary& dict
)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
inline Foam::scalar Foam::LindemannFallOffFunction::operator()

View File

@ -76,6 +76,9 @@ public:
//- Construct from Istream
inline SRIFallOffFunction(Istream&);
//- Construct from dictionary
inline SRIFallOffFunction(const dictionary& dict);
// Member Functions

View File

@ -25,7 +25,6 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
inline Foam::SRIFallOffFunction::SRIFallOffFunction
(
const scalar a,
@ -43,7 +42,6 @@ inline Foam::SRIFallOffFunction::SRIFallOffFunction
{}
// Construct from Istream
inline Foam::SRIFallOffFunction::SRIFallOffFunction(Istream& is)
:
a_(readScalar(is.readBegin("SRIFallOffFunction(Istream&)"))),
@ -56,6 +54,16 @@ inline Foam::SRIFallOffFunction::SRIFallOffFunction(Istream& is)
}
inline Foam::SRIFallOffFunction::SRIFallOffFunction(const dictionary& dict)
:
a_(readScalar(dict.lookup("a"))),
b_(readScalar(dict.lookup("b"))),
c_(readScalar(dict.lookup("c"))),
d_(readScalar(dict.lookup("d"))),
e_(readScalar(dict.lookup("e")))
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
inline Foam::scalar Foam::SRIFallOffFunction::operator()

View File

@ -76,6 +76,9 @@ public:
//- Construct from Istream
inline TroeFallOffFunction(Istream&);
//- Construct from dictionary
inline TroeFallOffFunction(const dictionary& dict);
// Member Functions

View File

@ -25,7 +25,6 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
inline Foam::TroeFallOffFunction::TroeFallOffFunction
(
const scalar alpha,
@ -41,7 +40,6 @@ inline Foam::TroeFallOffFunction::TroeFallOffFunction
{}
// Construct from Istream
inline Foam::TroeFallOffFunction::TroeFallOffFunction(Istream& is)
:
alpha_(readScalar(is.readBegin("TroeFallOffFunction(Istream&)"))),
@ -53,6 +51,15 @@ inline Foam::TroeFallOffFunction::TroeFallOffFunction(Istream& is)
}
inline Foam::TroeFallOffFunction::TroeFallOffFunction(const dictionary& dict)
:
alpha_(readScalar(dict.lookup("alpha"))),
Tsss_(readScalar(dict.lookup("Tsss"))),
Ts_(readScalar(dict.lookup("Ts"))),
Tss_(readScalar(dict.lookup("Tss")))
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
inline Foam::scalar Foam::TroeFallOffFunction::operator()

View File

@ -37,6 +37,7 @@ SourceFiles
#include "scalarField.H"
#include "typeInfo.H"
#include "FixedList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -56,7 +57,7 @@ class powerSeriesReactionRate
scalar Ta_;
static const label nb_ = 4;
scalar b_[nb_];
FixedList<scalar, nb_> b_;
public:
@ -69,7 +70,7 @@ public:
const scalar A,
const scalar beta,
const scalar Ta,
const scalar b[]
const FixedList<scalar, nb_> b
);
//- Construct from Istream
@ -79,6 +80,13 @@ public:
Istream& is
);
//- Construct from dictionary
inline powerSeriesReactionRate
(
const speciesTable& species,
const dictionary& dict
);
// Member Functions

View File

@ -23,35 +23,24 @@ License
\*---------------------------------------------------------------------------*/
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
inline powerSeriesReactionRate::powerSeriesReactionRate
inline Foam::powerSeriesReactionRate::powerSeriesReactionRate
(
const scalar A,
const scalar beta,
const scalar Ta,
const scalar b[]
const FixedList<scalar, nb_> b
)
:
A_(A),
beta_(beta),
Ta_(Ta)
{
for (int n=0; n<nb_; n++)
{
b_[n] = b[n];
}
}
Ta_(Ta),
b_(b)
{}
//- Construct from Istream
inline powerSeriesReactionRate::powerSeriesReactionRate
inline Foam::powerSeriesReactionRate::powerSeriesReactionRate
(
const speciesTable&,
Istream& is
@ -59,20 +48,29 @@ inline powerSeriesReactionRate::powerSeriesReactionRate
:
A_(readScalar(is.readBegin("powerSeriesReactionRate(Istream&)"))),
beta_(readScalar(is)),
Ta_(readScalar(is))
Ta_(readScalar(is)),
b_(is)
{
for (int n=0; n<nb_; n++)
{
is >> b_[n];
}
is.readEnd("powerSeriesReactionRate(Istream&)");
}
inline Foam::powerSeriesReactionRate::powerSeriesReactionRate
(
const speciesTable&,
const dictionary& dict
)
:
A_(readScalar(dict.lookup("A"))),
beta_(readScalar(dict.lookup("beta"))),
Ta_(readScalar(dict.lookup("Ta"))),
b_(dict.lookup("coeffs"))
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
inline scalar powerSeriesReactionRate::operator()
inline Foam::scalar Foam::powerSeriesReactionRate::operator()
(
const scalar T,
const scalar,
@ -99,7 +97,11 @@ inline scalar powerSeriesReactionRate::operator()
}
inline Ostream& operator<<(Ostream& os, const powerSeriesReactionRate& psrr)
inline Foam::Ostream& Foam::operator<<
(
Ostream& os,
const powerSeriesReactionRate& psrr
)
{
os << token::BEGIN_LIST
<< psrr.A_ << token::SPACE << psrr.beta_ << token::SPACE << psrr.Ta_;
@ -115,8 +117,4 @@ inline Ostream& operator<<(Ostream& os, const powerSeriesReactionRate& psrr)
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -76,6 +76,13 @@ public:
Istream& is
);
//- Construct from dictionary
inline thirdBodyArrheniusReactionRate
(
const speciesTable& species,
const dictionary& dict
);
// Member Functions

View File

@ -23,15 +23,9 @@ License
\*---------------------------------------------------------------------------*/
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
inline thirdBodyArrheniusReactionRate::thirdBodyArrheniusReactionRate
inline Foam::thirdBodyArrheniusReactionRate::thirdBodyArrheniusReactionRate
(
const scalar A,
const scalar beta,
@ -44,8 +38,7 @@ inline thirdBodyArrheniusReactionRate::thirdBodyArrheniusReactionRate
{}
//- Construct from Istream
inline thirdBodyArrheniusReactionRate::thirdBodyArrheniusReactionRate
inline Foam::thirdBodyArrheniusReactionRate::thirdBodyArrheniusReactionRate
(
const speciesTable& species,
Istream& is
@ -62,9 +55,24 @@ inline thirdBodyArrheniusReactionRate::thirdBodyArrheniusReactionRate
}
inline Foam::thirdBodyArrheniusReactionRate::thirdBodyArrheniusReactionRate
(
const speciesTable& species,
const dictionary& dict
)
:
ArrheniusReactionRate
(
species,
dict
),
thirdBodyEfficiencies_(species, dict)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
inline scalar thirdBodyArrheniusReactionRate::operator()
inline Foam::scalar Foam::thirdBodyArrheniusReactionRate::operator()
(
const scalar T,
const scalar p,
@ -77,7 +85,7 @@ inline scalar thirdBodyArrheniusReactionRate::operator()
}
inline Ostream& operator<<
inline Foam::Ostream& Foam::operator<<
(
Ostream& os,
const thirdBodyArrheniusReactionRate& arr
@ -91,8 +99,4 @@ inline Ostream& operator<<
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -50,7 +50,7 @@ Ostream& operator<<(Ostream&, const thirdBodyEfficiencies&);
/*---------------------------------------------------------------------------*\
Class thirdBodyEfficiencies Declaration
Class thirdBodyEfficiencies Declaration
\*---------------------------------------------------------------------------*/
class thirdBodyEfficiencies
@ -80,6 +80,13 @@ public:
Istream& is
);
//- Construct from dictionary
inline thirdBodyEfficiencies
(
const speciesTable& species,
const dictionary& dict
);
// Member functions

View File

@ -23,9 +23,10 @@ License
\*---------------------------------------------------------------------------*/
#include "Tuple2.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
//- Construct from components
inline Foam::thirdBodyEfficiencies::thirdBodyEfficiencies
(
const speciesTable& species,
@ -48,7 +49,6 @@ inline Foam::thirdBodyEfficiencies::thirdBodyEfficiencies
}
//- Construct from Istream
inline Foam::thirdBodyEfficiencies::thirdBodyEfficiencies
(
const speciesTable& species,
@ -111,6 +111,42 @@ inline Foam::thirdBodyEfficiencies::thirdBodyEfficiencies
}
inline Foam::thirdBodyEfficiencies::thirdBodyEfficiencies
(
const speciesTable& species,
const dictionary& dict
)
:
scalarList(species.size()),
species_(species)
{
if (dict.found("coeffs"))
{
List<Tuple2<word, scalar> > coeffs(dict.lookup("coeffs"));
if (coeffs.size() != species_.size())
{
FatalErrorIn
(
"thirdBodyEfficiencies::thirdBodyEfficiencies"
"(const speciesTable&, const dictionary&)"
) << "number of efficiencies = " << coeffs.size()
<< " is not equat to the number of species " << species_.size()
<< exit(FatalIOError);
}
forAll(coeffs, i)
{
operator[](species[coeffs[i].first()]) = coeffs[i].second();
}
}
else
{
scalar defaultEff = readScalar(dict.lookup("defaultEfficiency"));
scalarList::operator=(defaultEff);
}
}
// * * * * * * * * * * * * * * * Member functions * * * * * * * * * * * * * //
inline Foam::scalar Foam::thirdBodyEfficiencies::M(const scalarList& c) const

View File

@ -47,6 +47,7 @@ namespace Foam
defineTemplateTypeNameAndDebug(gasReaction, 0);
defineTemplateRunTimeSelectionTable(gasReaction, Istream);
defineTemplateRunTimeSelectionTable(gasReaction, dictionary);
// * * * * * * * * * * * * * Make CHEMKIN reactions * * * * * * * * * * * * //

View File

@ -77,8 +77,16 @@ namespace Foam
Reaction##Thermo, \
ReactionType##Thermo##ReactionRate, \
Istream \
); \
\
addToRunTimeSelectionTable \
( \
Reaction##Thermo, \
ReactionType##Thermo##ReactionRate, \
dictionary \
);
#define makePressureDependentReaction\
( \
Thermo, \

View File

@ -47,6 +47,7 @@ namespace Foam
defineTemplateTypeNameAndDebug(icoPoly8Reaction, 0);
defineTemplateRunTimeSelectionTable(icoPoly8Reaction, Istream);
defineTemplateRunTimeSelectionTable(icoPoly8Reaction, dictionary);
// * * * * * * * * * * * * * Make CHEMKIN reactions * * * * * * * * * * * * //

View File

@ -51,6 +51,14 @@ Foam::specie::specie(Istream& is)
}
Foam::specie::specie(const dictionary& dict)
:
name_(dict.dictName()),
nMoles_(readScalar(dict.lookup("nMoles"))),
molWeight_(readScalar(dict.lookup("molWeight")))
{}
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
Foam::Ostream& Foam::operator<<(Ostream& os, const specie& st)

View File

@ -38,6 +38,7 @@ SourceFiles
#include "word.H"
#include "scalar.H"
#include "dictionary.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -68,11 +69,7 @@ class specie
// Private Member Functions
//- Construct from components without name
inline specie
(
const scalar nMoles,
const scalar molWeight
);
inline specie(const scalar nMoles, const scalar molWeight);
public:
@ -110,6 +107,9 @@ public:
//- Construct from Istream
specie(Istream&);
//- Construct from dictionary
specie(const dictionary& dict);
// Member Functions

View File

@ -39,6 +39,15 @@ Foam::eConstThermo<equationOfState>::eConstThermo(Istream& is)
}
template<class equationOfState>
Foam::eConstThermo<equationOfState>::eConstThermo(const dictionary& dict)
:
equationOfState(dict),
Cv_(readScalar(dict.lookup("Cv"))),
Hf_(readScalar(dict.lookup("Hf")))
{}
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
template<class equationOfState>

View File

@ -117,6 +117,9 @@ public:
//- Construct from Istream
eConstThermo(Istream&);
//- Construct from dictionary
eConstThermo(const dictionary& dict);
//- Construct as named copy
inline eConstThermo(const word&, const eConstThermo&);
@ -126,6 +129,9 @@ public:
// Selector from Istream
inline static autoPtr<eConstThermo> New(Istream& is);
// Selector from dictionary
inline static autoPtr<eConstThermo> New(const dictionary& dict);
// Member Functions

View File

@ -76,6 +76,17 @@ Foam::eConstThermo<equationOfState>::New(Istream& is)
}
template<class equationOfState>
inline Foam::autoPtr<Foam::eConstThermo<equationOfState> >
Foam::eConstThermo<equationOfState>::New(const dictionary& dict)
{
return autoPtr<eConstThermo<equationOfState> >
(
new eConstThermo<equationOfState>(dict)
);
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class equationOfState>

View File

@ -39,6 +39,15 @@ Foam::hConstThermo<equationOfState>::hConstThermo(Istream& is)
}
template<class equationOfState>
Foam::hConstThermo<equationOfState>::hConstThermo(const dictionary& dict)
:
equationOfState(dict),
Cp_(readScalar(dict.lookup("Cp"))),
Hf_(readScalar(dict.lookup("Hf")))
{}
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
template<class equationOfState>

View File

@ -115,6 +115,9 @@ public:
//- Construct from Istream
hConstThermo(Istream&);
//- Construct from dictionary
hConstThermo(const dictionary& dict);
//- Construct as named copy
inline hConstThermo(const word&, const hConstThermo&);
@ -124,6 +127,9 @@ public:
//- Selector from Istream
inline static autoPtr<hConstThermo> New(Istream& is);
//- Selector from dictionary
inline static autoPtr<hConstThermo> New(const dictionary& dict);
// Member Functions

View File

@ -76,6 +76,17 @@ Foam::hConstThermo<equationOfState>::New(Istream& is)
}
template<class equationOfState>
inline Foam::autoPtr<Foam::hConstThermo<equationOfState> >
Foam::hConstThermo<equationOfState>::New(const dictionary& dict)
{
return autoPtr<hConstThermo<equationOfState> >
(
new hConstThermo<equationOfState>(dict)
);
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class equationOfState>

View File

@ -56,6 +56,34 @@ Foam::hPolynomialThermo<EquationOfState, PolySize>::hPolynomialThermo
}
template<class EquationOfState, int PolySize>
Foam::hPolynomialThermo<EquationOfState, PolySize>::hPolynomialThermo
(
const dictionary& dict
)
:
EquationOfState(dict),
Hf_(readScalar(dict.lookup("Hf"))),
Sf_(readScalar(dict.lookup("Sf"))),
cpPolynomial_(dict.lookup("cpPolynomial")),
hPolynomial_(),
sPolynomial_()
{
Hf_ *= this->W();
Sf_ *= this->W();
cpPolynomial_ *= this->W();
hPolynomial_ = cpPolynomial_.integrate();
sPolynomial_ = cpPolynomial_.integrateMinus1();
// Offset h poly so that it is relative to the enthalpy at Tstd
hPolynomial_[0] += Hf_ - hPolynomial_.evaluate(specie::Tstd);
// Offset s poly so that it is relative to the entropy at Tstd
sPolynomial_[0] += Sf_ - sPolynomial_.evaluate(specie::Tstd);
}
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
template<class EquationOfState, int PolySize>

View File

@ -135,9 +135,12 @@ public:
// Constructors
//- Construct from dictionary
//- Construct from Istream
hPolynomialThermo(Istream& is);
//- Construct from dictionary
hPolynomialThermo(const dictionary& dict);
//- Construct as copy
inline hPolynomialThermo(const hPolynomialThermo&);

View File

@ -26,6 +26,34 @@ License
#include "janafThermo.H"
#include "IOstreams.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template<class equationOfState>
void Foam::janafThermo<equationOfState>::checkInputData() const
{
if (Tlow_ >= Thigh_)
{
FatalErrorIn("janafThermo<equationOfState>::check()")
<< "Tlow(" << Tlow_ << ") >= Thigh(" << Thigh_ << ')'
<< exit(FatalIOError);
}
if (Tcommon_ <= Tlow_)
{
FatalErrorIn("janafThermo<equationOfState>::check()")
<< "Tcommon(" << Tcommon_ << ") <= Tlow(" << Tlow_ << ')'
<< exit(FatalIOError);
}
if (Tcommon_ > Thigh_)
{
FatalErrorIn("janafThermo<equationOfState>::check()")
<< "Tcommon(" << Tcommon_ << ") > Thigh(" << Thigh_ << ')'
<< exit(FatalIOError);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class equationOfState>
@ -36,54 +64,16 @@ Foam::janafThermo<equationOfState>::janafThermo(Istream& is)
Thigh_(readScalar(is)),
Tcommon_(readScalar(is))
{
if (Tlow_ >= Thigh_)
checkInputData();
forAll(highCpCoeffs_, i)
{
FatalIOErrorIn
(
"janafThermo<equationOfState>::janafThermo(Istream& is)",
is
) << "Tlow(" << Tlow_ << ") >= Thigh(" << Thigh_ << ')'
<< exit(FatalIOError);
is >> highCpCoeffs_[i];
}
if (Tcommon_ <= Tlow_)
forAll(lowCpCoeffs_, i)
{
FatalIOErrorIn
(
"janafThermo<equationOfState>::janafThermo(Istream& is)",
is
) << "Tcommon(" << Tcommon_ << ") <= Tlow(" << Tlow_ << ')'
<< exit(FatalIOError);
}
if (Tcommon_ > Thigh_)
{
FatalIOErrorIn
(
"janafThermo<equationOfState>::janafThermo(Istream& is)",
is
) << "Tcommon(" << Tcommon_ << ") > Thigh(" << Thigh_ << ')'
<< exit(FatalIOError);
}
for
(
register label coefLabel=0;
coefLabel<janafThermo<equationOfState>::nCoeffs_;
coefLabel++
)
{
is >> highCpCoeffs_[coefLabel];
}
for
(
register label coefLabel=0;
coefLabel<janafThermo<equationOfState>::nCoeffs_;
coefLabel++
)
{
is >> lowCpCoeffs_[coefLabel];
is >> lowCpCoeffs_[i];
}
// Check state of Istream
@ -91,6 +81,20 @@ Foam::janafThermo<equationOfState>::janafThermo(Istream& is)
}
template<class equationOfState>
Foam::janafThermo<equationOfState>::janafThermo(const dictionary& dict)
:
equationOfState(dict),
Tlow_(readScalar(dict.lookup("Tlow"))),
Thigh_(readScalar(dict.lookup("Thigh"))),
Tcommon_(readScalar(dict.lookup("Tcommon"))),
highCpCoeffs_(dict.lookup("highCpCoeffs")),
lowCpCoeffs_(dict.lookup("lowCpCoeffs"))
{
checkInputData();
}
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
template<class equationOfState>
@ -107,26 +111,16 @@ Foam::Ostream& Foam::operator<<
os << nl << " ";
for
(
register label coefLabel=0;
coefLabel<janafThermo<equationOfState>::nCoeffs_;
coefLabel++
)
forAll(jt.highCpCoeffs_, i)
{
os << jt.highCpCoeffs_[coefLabel] << ' ';
os << jt.highCpCoeffs_[i] << ' ';
}
os << nl << " ";
for
(
register label coefLabel=0;
coefLabel<janafThermo<equationOfState>::nCoeffs_;
coefLabel++
)
forAll(jt.lowCpCoeffs_, i)
{
os << jt.lowCpCoeffs_[coefLabel] << ' ';
os << jt.lowCpCoeffs_[i] << ' ';
}
os << endl;

View File

@ -38,6 +38,7 @@ SourceFiles
#define janafThermo_H
#include "scalar.H"
#include "FixedList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -96,8 +97,11 @@ class janafThermo
public:
// Public data
static const int nCoeffs_ = 7;
typedef scalar coeffArray[7];
typedef FixedList<scalar, nCoeffs_> coeffArray;
private:
@ -112,6 +116,9 @@ private:
// Private Member Functions
//- Check that input data is valid
void checkInputData() const;
//- Check given temperature is within the range of the fitted coeffs
inline void checkT(const scalar T) const;
@ -137,6 +144,9 @@ public:
//- Construct from Istream
janafThermo(Istream&);
//- Construct from dictionary
janafThermo(const dictionary& dict);
//- Construct as a named copy
inline janafThermo(const word&, const janafThermo&);

View File

@ -46,6 +46,13 @@ Foam::specieThermo<thermo>::specieThermo(Istream& is)
}
template<class thermo>
Foam::specieThermo<thermo>::specieThermo(const dictionary& dict)
:
thermo(dict)
{}
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
template<class thermo>

View File

@ -124,6 +124,9 @@ public:
//- Construct from Istream
specieThermo(Istream&);
//- Construct from dictionary
specieThermo(const dictionary& dict);
//- Construct as named copy
inline specieThermo(const word& name, const specieThermo&);

View File

@ -44,6 +44,15 @@ constTransport<thermo>::constTransport(Istream& is)
}
template<class thermo>
constTransport<thermo>::constTransport(const dictionary& dict)
:
thermo(dict),
Mu(readScalar(dict.lookup("Mu"))),
rPr(1.0/readScalar(dict.lookup("Pr")))
{}
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
template<class thermo>

View File

@ -119,6 +119,9 @@ public:
//- Construct from Istream
constTransport(Istream&);
//- Construct from dictionary
constTransport(const dictionary& dict);
// Member functions

View File

@ -40,6 +40,21 @@ Foam::polynomialTransport<Thermo, PolySize>::polynomialTransport(Istream& is)
}
template<class Thermo, int PolySize>
Foam::polynomialTransport<Thermo, PolySize>::polynomialTransport
(
const dictionary& dict
)
:
Thermo(dict),
muPolynomial_(dict.lookup("muPolynomial")),
kappaPolynomial_(dict.lookup("kappaPolynomial"))
{
muPolynomial_ *= this->W();
kappaPolynomial_ *= this->W();
}
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
template<class Thermo, int PolySize>

View File

@ -127,12 +127,18 @@ public:
//- Construct from Istream
polynomialTransport(Istream& is);
//- Construct from dictionary
polynomialTransport(const dictionary& dict);
//- Construct and return a clone
inline autoPtr<polynomialTransport> clone() const;
// Selector from Istream
inline static autoPtr<polynomialTransport> New(Istream& is);
// Selector from dictionary
inline static autoPtr<polynomialTransport> New(const dictionary& dict);
// Member functions

View File

@ -88,6 +88,17 @@ Foam::polynomialTransport<Thermo, PolySize>::New(Istream& is)
}
template<class Thermo, int PolySize>
inline Foam::autoPtr<Foam::polynomialTransport<Thermo, PolySize> >
Foam::polynomialTransport<Thermo, PolySize>::New(const dictionary& dict)
{
return autoPtr<polynomialTransport<Thermo, PolySize> >
(
new polynomialTransport<Thermo, PolySize>(dict)
);
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Thermo, int PolySize>

View File

@ -44,6 +44,12 @@ speciesTransport::speciesTransport(Istream& is)
}
speciesTransport::speciesTransport(const dictionary& dict)
:
janafThermo(dict)
{}
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
Ostream& operator<<(Ostream& os, const speciesTransport& sTranport)

View File

@ -64,14 +64,14 @@ public:
// Constructors
//- Construct from speciesThermo
inline speciesTransport
(
const janafThermo& sThermo
);
inline speciesTransport(const janafThermo& sThermo);
//- Construct from Istream
speciesTransport(Istream&);
//- Construct from dictionary
speciesTransport(const dictionary& dict);
// Member Functions

View File

@ -44,6 +44,15 @@ sutherlandTransport<thermo>::sutherlandTransport(Istream& is)
}
template<class thermo>
sutherlandTransport<thermo>::sutherlandTransport(const dictionary& dict)
:
thermo(dict),
As(readScalar(dict.lookup("As"))),
Ts(readScalar(dict.lookup("Ts")))
{}
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
template<class thermo>

View File

@ -141,12 +141,18 @@ public:
//- Construct from Istream
sutherlandTransport(Istream&);
//- Construct from dictionary
sutherlandTransport(const dictionary& dict);
//- Construct and return a clone
inline autoPtr<sutherlandTransport> clone() const;
// Selector from Istream
inline static autoPtr<sutherlandTransport> New(Istream& is);
// Selector from dictionary
inline static autoPtr<sutherlandTransport> New(const dictionary& dict);
// Member functions

View File

@ -51,7 +51,6 @@ inline void sutherlandTransport<thermo>::calcCoeffs
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
template<class thermo>
inline sutherlandTransport<thermo>::sutherlandTransport
(
@ -66,7 +65,6 @@ inline sutherlandTransport<thermo>::sutherlandTransport
{}
// Construct from components
template<class thermo>
inline sutherlandTransport<thermo>::sutherlandTransport
(
@ -81,7 +79,6 @@ inline sutherlandTransport<thermo>::sutherlandTransport
}
//- Construct as named copy
template<class thermo>
inline sutherlandTransport<thermo>::sutherlandTransport
(
@ -95,7 +92,6 @@ inline sutherlandTransport<thermo>::sutherlandTransport
{}
// Construct and return a clone
template<class thermo>
inline autoPtr<sutherlandTransport<thermo> > sutherlandTransport<thermo>::clone
() const
@ -107,7 +103,6 @@ inline autoPtr<sutherlandTransport<thermo> > sutherlandTransport<thermo>::clone
}
// Selector from Istream
template<class thermo>
inline autoPtr<sutherlandTransport<thermo> > sutherlandTransport<thermo>::New
(
@ -121,6 +116,19 @@ inline autoPtr<sutherlandTransport<thermo> > sutherlandTransport<thermo>::New
}
template<class thermo>
inline autoPtr<sutherlandTransport<thermo> > sutherlandTransport<thermo>::New
(
const dictionary& dict
)
{
return autoPtr<sutherlandTransport<thermo> >
(
new sutherlandTransport<thermo>(dict)
);
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// Dynamic viscosity [kg/ms]
@ -131,7 +139,6 @@ inline scalar sutherlandTransport<thermo>::mu(const scalar T) const
}
// Thermal conductivity [W/mK]
template<class thermo>
inline scalar sutherlandTransport<thermo>::kappa(const scalar T) const
{
@ -140,7 +147,6 @@ inline scalar sutherlandTransport<thermo>::kappa(const scalar T) const
}
// Thermal diffusivity for enthalpy [kg/ms]
template<class thermo>
inline scalar sutherlandTransport<thermo>::alpha(const scalar T) const
{