Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

This commit is contained in:
mattijs
2012-10-04 14:28:23 +01:00
141 changed files with 771 additions and 2108 deletions

View File

@ -46,7 +46,7 @@ temperatureThermoBaffleFvPatchScalarField
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField(p, iF),
owner_(false),
baffle_(),
solidThermoType_("undefined"),
solidThermoType_(new primitiveEntry("thermoType", "undefined")),
dict_(dictionary::null)
{}
@ -69,7 +69,7 @@ temperatureThermoBaffleFvPatchScalarField
),
owner_(ptf.owner_),
baffle_(ptf.baffle_),
solidThermoType_(ptf.solidThermoType_),
solidThermoType_(ptf.solidThermoType_().clone()),
dict_(ptf.dict_)
{}
@ -85,7 +85,7 @@ temperatureThermoBaffleFvPatchScalarField
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField(p, iF, dict),
owner_(false),
baffle_(),
solidThermoType_(),
solidThermoType_(new primitiveEntry("thermoType", "undefined")),
dict_(dict)
{
if (!isA<mappedPatchBase>(patch().patch()))
@ -126,7 +126,7 @@ temperatureThermoBaffleFvPatchScalarField
Info << "Creating thermal baffle" << nbrMesh << endl;
baffle_.reset(baffle::New(thisMesh, dict).ptr());
owner_ = true;
dict.lookup("thermoType") >> solidThermoType_;
solidThermoType_ = dict.lookupEntry("thermoType", false, false).clone();
baffle_->rename(nbrMesh);
}
}
@ -142,7 +142,7 @@ temperatureThermoBaffleFvPatchScalarField
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField(ptf, iF),
owner_(ptf.owner_),
baffle_(ptf.baffle_),
solidThermoType_(ptf.solidThermoType_),
solidThermoType_(ptf.solidThermoType_().clone()),
dict_(ptf.dict_)
{}
@ -219,8 +219,7 @@ void temperatureThermoBaffleFvPatchScalarField::write(Ostream& os) const
os.writeKeyword(word(thermoModel + "Coeffs"));
os << dict_.subDict(thermoModel + "Coeffs") << nl;
os.writeKeyword("thermoType") << solidThermoType_
<< token::END_STATEMENT << nl;
os << solidThermoType_() << nl;
os.writeKeyword("mixture");
os << dict_.subDict("mixture") << nl;

View File

@ -140,7 +140,7 @@ class temperatureThermoBaffleFvPatchScalarField
autoPtr<regionModels::thermoBaffleModels::thermoBaffleModel> baffle_;
//- Solid thermo type
word solidThermoType_;
autoPtr<entry> solidThermoType_;
//- Dictionary
dictionary dict_;

View File

@ -318,7 +318,13 @@ const tmp<volScalarField> thermoBaffle2D::Cp() const
const volScalarField& thermoBaffle2D::kappaRad() const
{
return thermo_->kappaRad();
// ***HGW return thermo_->kappaRad();
FatalErrorIn
(
"thermoBaffle2D::kappaRad()"
) << "not currently supported"
<< exit(FatalError);
return volScalarField::null();
}

View File

@ -1,11 +1,11 @@
basicThermo/basicThermo.C
fluidThermo/fluidThermo.C
psiThermo/psiThermo/psiThermo.C
psiThermo/hePsiThermo/hePsiThermos.C
psiThermo/psiThermo.C
psiThermo/psiThermos.C
rhoThermo/rhoThermo/rhoThermo.C
rhoThermo/heRhoThermo/heRhoThermos.C
rhoThermo/rhoThermo.C
rhoThermo/rhoThermos.C
derivedFvPatchFields/fixedEnergy/fixedEnergyFvPatchScalarField.C
derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.C

View File

@ -105,10 +105,22 @@ public:
// Selectors
//- Generic lookup for each of the related thermodynamics packages
template<class Thermo, class Table>
static typename Table::iterator lookupThermo
(
const dictionary& thermoDict,
Table* tablePtr
);
//- Generic New for each of the related thermodynamics packages
template<class Thermo>
static autoPtr<Thermo> New(const fvMesh&);
//- Generic New for each of the related thermodynamics packages
template<class Thermo>
static autoPtr<Thermo> New(const fvMesh&, const dictionary&);
//- Specialisation of the Generic New for basicThermo
static autoPtr<basicThermo> New(const fvMesh&);

View File

@ -27,25 +27,13 @@ License
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
template<class Thermo>
Foam::autoPtr<Thermo> Foam::basicThermo::New
template<class Thermo, class Table>
typename Table::iterator Foam::basicThermo::lookupThermo
(
const fvMesh& mesh
const dictionary& thermoDict,
Table* tablePtr
)
{
IOdictionary thermoDict
(
IOobject
(
"thermophysicalProperties",
mesh.time().constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
)
);
word thermoTypeName;
if (thermoDict.isDict("thermoType"))
@ -76,16 +64,13 @@ Foam::autoPtr<Thermo> Foam::basicThermo::New
+ word(thermoTypeDict.lookup("specie")) + ">>,"
+ word(thermoTypeDict.lookup("energy")) + ">>>";
Info<< thermoTypeName << endl;
// Lookup the thermo package
typename Thermo::fvMeshConstructorTable::iterator cstrIter =
Thermo::fvMeshConstructorTablePtr_->find(thermoTypeName);
typename Table::iterator cstrIter = tablePtr->find(thermoTypeName);
// Print error message if package not found in the table
if (cstrIter == Thermo::fvMeshConstructorTablePtr_->end())
if (cstrIter == tablePtr->end())
{
FatalErrorIn(Thermo::typeName + "::New(const fvMesh&)")
FatalErrorIn(Thermo::typeName + "::New")
<< "Unknown " << Thermo::typeName << " type " << nl
<< "thermoType" << thermoTypeDict << nl << nl
<< "Valid " << Thermo::typeName << " types are:" << nl << nl;
@ -93,7 +78,7 @@ Foam::autoPtr<Thermo> Foam::basicThermo::New
// Get the list of all the suitable thermo packages available
wordList validThermoTypeNames
(
Thermo::fvMeshConstructorTablePtr_->sortedToc()
tablePtr->sortedToc()
);
// Build a table of the thermo packages constituent parts
@ -123,7 +108,7 @@ Foam::autoPtr<Thermo> Foam::basicThermo::New
FatalError<< exit(FatalError);
}
return autoPtr<Thermo>(cstrIter()(mesh));
return cstrIter;
}
else
{
@ -131,22 +116,69 @@ Foam::autoPtr<Thermo> Foam::basicThermo::New
Info<< "Selecting thermodynamics package " << thermoTypeName << endl;
typename Thermo::fvMeshConstructorTable::iterator cstrIter =
Thermo::fvMeshConstructorTablePtr_->find(thermoTypeName);
typename Table::iterator cstrIter = tablePtr->find(thermoTypeName);
if (cstrIter == Thermo::fvMeshConstructorTablePtr_->end())
if (cstrIter == tablePtr->end())
{
FatalErrorIn(Thermo::typeName + "::New(const fvMesh&)")
FatalErrorIn(Thermo::typeName + "::New")
<< "Unknown " << Thermo::typeName << " type "
<< thermoTypeName << nl << nl
<< "Valid " << Thermo::typeName << " types are:" << nl
<< Thermo::fvMeshConstructorTablePtr_->sortedToc() << nl
<< tablePtr->sortedToc() << nl
<< exit(FatalError);
}
return autoPtr<Thermo>(cstrIter()(mesh));
return cstrIter;
}
}
template<class Thermo>
Foam::autoPtr<Thermo> Foam::basicThermo::New
(
const fvMesh& mesh
)
{
IOdictionary thermoDict
(
IOobject
(
"thermophysicalProperties",
mesh.time().constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
)
);
typename Thermo::fvMeshConstructorTable::iterator cstrIter =
lookupThermo<Thermo, typename Thermo::fvMeshConstructorTable>
(
thermoDict,
Thermo::fvMeshConstructorTablePtr_
);
return autoPtr<Thermo>(cstrIter()(mesh));
}
template<class Thermo>
Foam::autoPtr<Thermo> Foam::basicThermo::New
(
const fvMesh& mesh,
const dictionary& dict
)
{
typename Thermo::dictionaryConstructorTable::iterator cstrIter =
lookupThermo<Thermo, typename Thermo::dictionaryConstructorTable>
(
dict,
Thermo::dictionaryConstructorTablePtr_
);
return autoPtr<Thermo>(cstrIter()(mesh, dict));
}
// ************************************************************************* //

View File

@ -37,7 +37,7 @@ Description
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makeThermo(BaseThermo,Cthermo,Mixture,Transport,Type,Thermo,EqnOfState,Specie)\
#define makeThermoTypedefs(BaseThermo,Cthermo,Mixture,Transport,Type,Thermo,EqnOfState,Specie)\
\
typedef \
Transport \
@ -58,10 +58,8 @@ typedef \
typedef \
Cthermo \
< \
Mixture \
< \
Transport##Type##Thermo##EqnOfState##Specie \
> \
BaseThermo, \
Mixture<Transport##Type##Thermo##EqnOfState##Specie> \
> Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie; \
\
defineTemplateTypeNameAndDebugWithName \
@ -73,7 +71,22 @@ defineTemplateTypeNameAndDebugWithName \
+ ">>" \
).c_str(), \
0 \
); \
);
#define makeThermo(BaseThermo,Cthermo,Mixture,Transport,Type,Thermo,EqnOfState,Specie)\
\
makeThermoTypedefs \
( \
BaseThermo, \
Cthermo, \
Mixture, \
Transport, \
Type, \
Thermo, \
EqnOfState, \
Specie \
) \
\
addToRunTimeSelectionTable \
( \

View File

@ -27,8 +27,8 @@ License
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template<class MixtureType>
void Foam::hePsiThermo<MixtureType>::calculate()
template<class BasicPsiThermo, class MixtureType>
void Foam::hePsiThermo<BasicPsiThermo, MixtureType>::calculate()
{
const scalarField& hCells = this->he_.internalField();
const scalarField& pCells = this->p_.internalField();
@ -101,10 +101,10 @@ void Foam::hePsiThermo<MixtureType>::calculate()
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class MixtureType>
Foam::hePsiThermo<MixtureType>::hePsiThermo(const fvMesh& mesh)
template<class BasicPsiThermo, class MixtureType>
Foam::hePsiThermo<BasicPsiThermo, MixtureType>::hePsiThermo(const fvMesh& mesh)
:
heThermo<psiThermo, MixtureType>(mesh)
heThermo<BasicPsiThermo, MixtureType>(mesh)
{
calculate();
@ -115,19 +115,20 @@ Foam::hePsiThermo<MixtureType>::hePsiThermo(const fvMesh& mesh)
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class MixtureType>
Foam::hePsiThermo<MixtureType>::~hePsiThermo()
template<class BasicPsiThermo, class MixtureType>
Foam::hePsiThermo<BasicPsiThermo, MixtureType>::~hePsiThermo()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class MixtureType>
void Foam::hePsiThermo<MixtureType>::correct()
template<class BasicPsiThermo, class MixtureType>
void Foam::hePsiThermo<BasicPsiThermo, MixtureType>::correct()
{
if (debug)
{
Info<< "entering hePsiThermo<MixtureType>::correct()" << endl;
Info<< "entering hePsiThermo<BasicPsiThermo, MixtureType>::correct()"
<< endl;
}
// force the saving of the old-time values
@ -137,7 +138,8 @@ void Foam::hePsiThermo<MixtureType>::correct()
if (debug)
{
Info<< "exiting hePsiThermo<MixtureType>::correct()" << endl;
Info<< "exiting hePsiThermo<BasicPsiThermo, MixtureType>::correct()"
<< endl;
}
}

View File

@ -25,7 +25,7 @@ Class
Foam::hePsiThermo
Description
Enthalpy for a mixture based on compressibility
Energy for a mixture based on compressibility
SourceFiles
hePsiThermo.C
@ -47,10 +47,10 @@ namespace Foam
Class hePsiThermo Declaration
\*---------------------------------------------------------------------------*/
template<class MixtureType>
template<class BasicPsiThermo, class MixtureType>
class hePsiThermo
:
public heThermo<psiThermo, MixtureType>
public heThermo<BasicPsiThermo, MixtureType>
{
// Private Member Functions
@ -58,7 +58,7 @@ class hePsiThermo
void calculate();
//- Construct as copy (not implemented)
hePsiThermo(const hePsiThermo<MixtureType>&);
hePsiThermo(const hePsiThermo<BasicPsiThermo, MixtureType>&);
public:

View File

@ -27,8 +27,8 @@ License
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template<class MixtureType>
void Foam::heRhoThermo<MixtureType>::calculate()
template<class BasicPsiThermo, class MixtureType>
void Foam::heRhoThermo<BasicPsiThermo, MixtureType>::calculate()
{
const scalarField& hCells = this->he().internalField();
const scalarField& pCells = this->p_.internalField();
@ -106,10 +106,10 @@ void Foam::heRhoThermo<MixtureType>::calculate()
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class MixtureType>
Foam::heRhoThermo<MixtureType>::heRhoThermo(const fvMesh& mesh)
template<class BasicPsiThermo, class MixtureType>
Foam::heRhoThermo<BasicPsiThermo, MixtureType>::heRhoThermo(const fvMesh& mesh)
:
heThermo<rhoThermo, MixtureType>(mesh)
heThermo<BasicPsiThermo, MixtureType>(mesh)
{
calculate();
}
@ -117,15 +117,15 @@ Foam::heRhoThermo<MixtureType>::heRhoThermo(const fvMesh& mesh)
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class MixtureType>
Foam::heRhoThermo<MixtureType>::~heRhoThermo()
template<class BasicPsiThermo, class MixtureType>
Foam::heRhoThermo<BasicPsiThermo, MixtureType>::~heRhoThermo()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class MixtureType>
void Foam::heRhoThermo<MixtureType>::correct()
template<class BasicPsiThermo, class MixtureType>
void Foam::heRhoThermo<BasicPsiThermo, MixtureType>::correct()
{
if (debug)
{

View File

@ -25,7 +25,7 @@ Class
Foam::heRhoThermo
Description
Enthalpy for a mixture based on density
Energy for a mixture based on density
SourceFiles
heRhoThermo.C
@ -47,10 +47,10 @@ namespace Foam
Class heRhoThermo Declaration
\*---------------------------------------------------------------------------*/
template<class MixtureType>
template<class BasicPsiThermo, class MixtureType>
class heRhoThermo
:
public heThermo<rhoThermo, MixtureType>
public heThermo<BasicPsiThermo, MixtureType>
{
// Private Member Functions
@ -58,7 +58,7 @@ class heRhoThermo
void calculate();
//- Construct as copy (not implemented)
heRhoThermo(const heRhoThermo<MixtureType>&);
heRhoThermo(const heRhoThermo<BasicPsiThermo, MixtureType>&);
public:

View File

@ -58,12 +58,11 @@ Foam::autoPtr<ChemistryModel> Foam::basicChemistryModel::New
Info<< "Selecting chemistry type " << chemistryTypeDict << endl;
const int nCmpt = 8;
const int nCmpt = 7;
const char* cmptNames[nCmpt] =
{
"chemistrySolver",
"chemistryModel",
"???ChemistryModel",
"chemistryThermo",
"transport",
"thermo",
"equationOfState",
@ -109,9 +108,8 @@ Foam::autoPtr<ChemistryModel> Foam::basicChemistryModel::New
// Construct the name of the chemistry type from the components
chemistryTypeName =
word(chemistryTypeDict.lookup("chemistrySolver")) + '<'
+ word(chemistryTypeDict.lookup("chemistryModel")) + '<'
+ ChemistryModel::typeName + ','
+ thermoTypeName + ">>";
+ word(chemistryTypeDict.lookup("chemistryThermo")) + ','
+ thermoTypeName + ">";
typename ChemistryModel::fvMeshConstructorTable::iterator cstrIter =
ChemistryModel::fvMeshConstructorTablePtr_->find(chemistryTypeName);
@ -160,8 +158,7 @@ Foam::autoPtr<ChemistryModel> Foam::basicChemistryModel::New
FatalError<< exit(FatalError);
}
return autoPtr<ChemistryModel>
(cstrIter()(mesh, typeName, chemistryTypeName));
return autoPtr<ChemistryModel>(cstrIter()(mesh));
}
else
{
@ -183,8 +180,7 @@ Foam::autoPtr<ChemistryModel> Foam::basicChemistryModel::New
<< exit(FatalError);
}
return autoPtr<ChemistryModel>
(cstrIter()(mesh, typeName, chemistryTypeName));
return autoPtr<ChemistryModel>(cstrIter()(mesh));
}
}

View File

@ -23,26 +23,20 @@ License
\*---------------------------------------------------------------------------*/
#include "ODEChemistryModel.H"
#include "chemistrySolver.H"
#include "chemistryModel.H"
#include "reactingMixture.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class CompType, class ThermoType>
Foam::ODEChemistryModel<CompType, ThermoType>::ODEChemistryModel
Foam::chemistryModel<CompType, ThermoType>::chemistryModel
(
const fvMesh& mesh,
const word& ODEModelName,
const word& thermoTypeName
const fvMesh& mesh
)
:
CompType(mesh, thermoTypeName),
CompType(mesh),
ODE(),
Y_(this->thermo().composition().Y()),
reactions_
(
dynamic_cast<const reactingMixture<ThermoType>&>(this->thermo())
@ -80,7 +74,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::ODEChemistryModel
);
}
Info<< "ODEChemistryModel: Number of species = " << nSpecie_
Info<< "chemistryModel: Number of species = " << nSpecie_
<< " and reactions = " << nReaction_ << endl;
}
@ -88,7 +82,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::ODEChemistryModel
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class CompType, class ThermoType>
Foam::ODEChemistryModel<CompType, ThermoType>::~ODEChemistryModel()
Foam::chemistryModel<CompType, ThermoType>::~chemistryModel()
{}
@ -96,7 +90,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::~ODEChemistryModel()
template<class CompType, class ThermoType>
Foam::tmp<Foam::scalarField>
Foam::ODEChemistryModel<CompType, ThermoType>::omega
Foam::chemistryModel<CompType, ThermoType>::omega
(
const scalarField& c,
const scalar T,
@ -138,7 +132,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::omega
template<class CompType, class ThermoType>
Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::omegaI
Foam::scalar Foam::chemistryModel<CompType, ThermoType>::omegaI
(
const label index,
const scalarField& c,
@ -160,7 +154,7 @@ Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::omegaI
template<class CompType, class ThermoType>
void Foam::ODEChemistryModel<CompType, ThermoType>::updateConcsInReactionI
void Foam::chemistryModel<CompType, ThermoType>::updateConcsInReactionI
(
const label index,
const scalar dt,
@ -189,7 +183,7 @@ void Foam::ODEChemistryModel<CompType, ThermoType>::updateConcsInReactionI
template<class CompType, class ThermoType>
void Foam::ODEChemistryModel<CompType, ThermoType>::updateRRInReactionI
void Foam::chemistryModel<CompType, ThermoType>::updateRRInReactionI
(
const label index,
const scalar pr,
@ -220,7 +214,7 @@ void Foam::ODEChemistryModel<CompType, ThermoType>::updateRRInReactionI
template<class CompType, class ThermoType>
Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::omega
Foam::scalar Foam::chemistryModel<CompType, ThermoType>::omega
(
const Reaction<ThermoType>& R,
const scalarField& c,
@ -338,7 +332,7 @@ Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::omega
template<class CompType, class ThermoType>
void Foam::ODEChemistryModel<CompType, ThermoType>::derivatives
void Foam::chemistryModel<CompType, ThermoType>::derivatives
(
const scalar time,
const scalarField &c,
@ -389,7 +383,7 @@ void Foam::ODEChemistryModel<CompType, ThermoType>::derivatives
template<class CompType, class ThermoType>
void Foam::ODEChemistryModel<CompType, ThermoType>::jacobian
void Foam::chemistryModel<CompType, ThermoType>::jacobian
(
const scalar t,
const scalarField& c,
@ -532,7 +526,7 @@ void Foam::ODEChemistryModel<CompType, ThermoType>::jacobian
template<class CompType, class ThermoType>
Foam::tmp<Foam::volScalarField>
Foam::ODEChemistryModel<CompType, ThermoType>::tc() const
Foam::chemistryModel<CompType, ThermoType>::tc() const
{
scalar pf, cf, pr, cr;
label lRef, rRef;
@ -570,6 +564,8 @@ Foam::ODEChemistryModel<CompType, ThermoType>::tc() const
);
scalarField& tc = ttc();
const scalarField& T = this->thermo().T();
const scalarField& p = this->thermo().p();
const label nReaction = reactions_.size();
@ -578,8 +574,8 @@ Foam::ODEChemistryModel<CompType, ThermoType>::tc() const
forAll(rho, celli)
{
scalar rhoi = rho[celli];
scalar Ti = this->thermo().T()[celli];
scalar pi = this->thermo().p()[celli];
scalar Ti = T[celli];
scalar pi = p[celli];
scalarField c(nSpecie_);
scalar cSum = 0.0;
@ -615,7 +611,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::tc() const
template<class CompType, class ThermoType>
Foam::tmp<Foam::volScalarField>
Foam::ODEChemistryModel<CompType, ThermoType>::Sh() const
Foam::chemistryModel<CompType, ThermoType>::Sh() const
{
tmp<volScalarField> tSh
(
@ -657,7 +653,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::Sh() const
template<class CompType, class ThermoType>
Foam::tmp<Foam::volScalarField>
Foam::ODEChemistryModel<CompType, ThermoType>::dQ() const
Foam::chemistryModel<CompType, ThermoType>::dQ() const
{
tmp<volScalarField> tdQ
(
@ -689,7 +685,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::dQ() const
template<class CompType, class ThermoType>
Foam::label Foam::ODEChemistryModel<CompType, ThermoType>::nEqns() const
Foam::label Foam::chemistryModel<CompType, ThermoType>::nEqns() const
{
// nEqns = number of species + temperature + pressure
return nSpecie_ + 2;
@ -697,7 +693,7 @@ Foam::label Foam::ODEChemistryModel<CompType, ThermoType>::nEqns() const
template<class CompType, class ThermoType>
void Foam::ODEChemistryModel<CompType, ThermoType>::calculate()
void Foam::chemistryModel<CompType, ThermoType>::calculate()
{
if (!this->chemistry_)
{
@ -718,11 +714,14 @@ void Foam::ODEChemistryModel<CompType, ThermoType>::calculate()
this->thermo().rho()
);
const scalarField& T = this->thermo().T();
const scalarField& p = this->thermo().p();
forAll(rho, celli)
{
const scalar rhoi = rho[celli];
const scalar Ti = this->thermo().T()[celli];
const scalar pi = this->thermo().p()[celli];
const scalar Ti = T[celli];
const scalar pi = p[celli];
scalarField c(nSpecie_, 0.0);
for (label i=0; i<nSpecie_; i++)
@ -742,7 +741,7 @@ void Foam::ODEChemistryModel<CompType, ThermoType>::calculate()
template<class CompType, class ThermoType>
Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::solve
Foam::scalar Foam::chemistryModel<CompType, ThermoType>::solve
(
const scalar t0,
const scalar deltaT
@ -773,13 +772,16 @@ Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::solve
tmp<volScalarField> thc = this->thermo().hc();
const scalarField& hc = thc();
const scalarField& he = this->thermo().he();
const scalarField& T = this->thermo().T();
const scalarField& p = this->thermo().p();
forAll(rho, celli)
{
const scalar rhoi = rho[celli];
const scalar hi = this->thermo().he()[celli] + hc[celli];
const scalar pi = this->thermo().p()[celli];
scalar Ti = this->thermo().T()[celli];
const scalar hi = he[celli] + hc[celli];
const scalar pi = p[celli];
scalar Ti = T[celli];
scalarField c(nSpecie_, 0.0);
scalarField c0(nSpecie_, 0.0);
@ -833,7 +835,7 @@ Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::solve
template<class CompType, class ThermoType>
Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::solve
Foam::scalar Foam::chemistryModel<CompType, ThermoType>::solve
(
scalarField &c,
const scalar T,
@ -844,7 +846,7 @@ Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::solve
{
notImplemented
(
"ODEChemistryModel::solve"
"chemistryModel::solve"
"("
"scalarField&, "
"const scalar, "

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::ODEChemistryModel
Foam::chemistryModel
Description
Extends base chemistry model by adding a thermo package, and ODE functions.
@ -30,13 +30,13 @@ Description
terms.
SourceFiles
ODEChemistryModelI.H
ODEChemistryModel.C
chemistryModelI.H
chemistryModel.C
\*---------------------------------------------------------------------------*/
#ifndef ODEChemistryModel_H
#define ODEChemistryModel_H
#ifndef chemistryModel_H
#define chemistryModel_H
#include "Reaction.H"
#include "ODE.H"
@ -53,11 +53,11 @@ namespace Foam
class fvMesh;
/*---------------------------------------------------------------------------*\
Class ODEChemistryModel Declaration
Class chemistryModel Declaration
\*---------------------------------------------------------------------------*/
template<class CompType, class ThermoType>
class ODEChemistryModel
class chemistryModel
:
public CompType,
public ODE
@ -65,10 +65,10 @@ class ODEChemistryModel
// Private Member Functions
//- Disallow copy constructor
ODEChemistryModel(const ODEChemistryModel&);
chemistryModel(const chemistryModel&);
//- Disallow default bitwise assignment
void operator=(const ODEChemistryModel&);
void operator=(const chemistryModel&);
protected:
@ -104,22 +104,17 @@ protected:
public:
//- Runtime type information
TypeName("ODEChemistryModel");
TypeName("chemistryModel");
// Constructors
//- Construct from components
ODEChemistryModel
(
const fvMesh& mesh,
const word& ODEModelName,
const word& thermoTypeName
);
//- Construct from mesh
chemistryModel(const fvMesh& mesh);
//- Destructor
virtual ~ODEChemistryModel();
virtual ~chemistryModel();
// Member Functions
@ -263,12 +258,12 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "ODEChemistryModelI.H"
#include "chemistryModelI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "ODEChemistryModel.C"
# include "chemistryModel.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -30,7 +30,7 @@ License
template<class CompType, class ThermoType>
inline Foam::PtrList<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >&
Foam::ODEChemistryModel<CompType, ThermoType>::RR()
Foam::chemistryModel<CompType, ThermoType>::RR()
{
return RR_;
}
@ -38,7 +38,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::RR()
template<class CompType, class ThermoType>
inline const Foam::PtrList<Foam::Reaction<ThermoType> >&
Foam::ODEChemistryModel<CompType, ThermoType>::reactions() const
Foam::chemistryModel<CompType, ThermoType>::reactions() const
{
return reactions_;
}
@ -46,7 +46,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::reactions() const
template<class CompType, class ThermoType>
inline const Foam::PtrList<ThermoType>&
Foam::ODEChemistryModel<CompType, ThermoType>::specieThermo() const
Foam::chemistryModel<CompType, ThermoType>::specieThermo() const
{
return specieThermo_;
}
@ -54,7 +54,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::specieThermo() const
template<class CompType, class ThermoType>
inline Foam::label
Foam::ODEChemistryModel<CompType, ThermoType>::nSpecie() const
Foam::chemistryModel<CompType, ThermoType>::nSpecie() const
{
return nSpecie_;
}
@ -62,7 +62,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::nSpecie() const
template<class CompType, class ThermoType>
inline Foam::label
Foam::ODEChemistryModel<CompType, ThermoType>::nReaction() const
Foam::chemistryModel<CompType, ThermoType>::nReaction() const
{
return nReaction_;
}
@ -70,7 +70,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::nReaction() const
template<class CompType, class ThermoType>
inline const Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
Foam::ODEChemistryModel<CompType, ThermoType>::RR
Foam::chemistryModel<CompType, ThermoType>::RR
(
const label i
) const

View File

@ -25,7 +25,6 @@ License
#include "psiChemistryModel.H"
#include "fvMesh.H"
#include "Time.H"
/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
@ -35,12 +34,12 @@ namespace Foam
defineRunTimeSelectionTable(psiChemistryModel, fvMesh);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::psiChemistryModel::psiChemistryModel
(
const fvMesh& mesh,
const word& thermoTypeName
const fvMesh& mesh
)
:
basicChemistryModel(mesh),

View File

@ -78,7 +78,7 @@ protected:
public:
//- Runtime type information
TypeName("psiChemistryModel");
TypeName("psi");
//- Declare run-time constructor selection tables
@ -87,19 +87,15 @@ public:
autoPtr,
psiChemistryModel,
fvMesh,
(
const fvMesh& mesh,
const word& compTypeName,
const word& thermoTypeName
),
(mesh, compTypeName, thermoTypeName)
(const fvMesh& mesh),
(mesh)
);
// Constructors
//- Construct from mesh
psiChemistryModel(const fvMesh& mesh, const word& thermoTypeName);
psiChemistryModel(const fvMesh& mesh);
//- Selector

View File

@ -32,7 +32,7 @@ Description
#include "makeChemistryModel.H"
#include "psiChemistryModel.H"
#include "ODEChemistryModel.H"
#include "chemistryModel.H"
#include "thermoPhysicsTypes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -41,35 +41,35 @@ namespace Foam
{
makeChemistryModel
(
ODEChemistryModel,
chemistryModel,
psiChemistryModel,
constGasThermoPhysics
);
makeChemistryModel
(
ODEChemistryModel,
chemistryModel,
psiChemistryModel,
gasThermoPhysics
);
makeChemistryModel
(
ODEChemistryModel,
chemistryModel,
psiChemistryModel,
constIncompressibleGasThermoPhysics
);
makeChemistryModel
(
ODEChemistryModel,
chemistryModel,
psiChemistryModel,
incompressibleGasThermoPhysics
);
makeChemistryModel
(
ODEChemistryModel,
chemistryModel,
psiChemistryModel,
icoPoly8ThermoPhysics
);

View File

@ -25,7 +25,6 @@ License
#include "rhoChemistryModel.H"
#include "fvMesh.H"
#include "Time.H"
/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
@ -35,12 +34,12 @@ namespace Foam
defineRunTimeSelectionTable(rhoChemistryModel, fvMesh);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::rhoChemistryModel::rhoChemistryModel
(
const fvMesh& mesh,
const word& thermoTypeName
const fvMesh& mesh
)
:
basicChemistryModel(mesh),

View File

@ -78,7 +78,7 @@ protected:
public:
//- Runtime type information
TypeName("rhoChemistryModel");
TypeName("rho");
//- Declare run-time constructor selection tables
@ -88,18 +88,16 @@ public:
rhoChemistryModel,
fvMesh,
(
const fvMesh& mesh,
const word& compTypeName,
const word& thermoTypeName
const fvMesh& mesh
),
(mesh, compTypeName, thermoTypeName)
(mesh)
);
// Constructors
//- Construct from mesh
rhoChemistryModel(const fvMesh& mesh, const word& thermoTypeName);
rhoChemistryModel(const fvMesh& mesh);
//- Selector

View File

@ -32,7 +32,7 @@ Description
#include "makeChemistryModel.H"
#include "rhoChemistryModel.H"
#include "ODEChemistryModel.H"
#include "chemistryModel.H"
#include "thermoPhysicsTypes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -41,35 +41,35 @@ namespace Foam
{
makeChemistryModel
(
ODEChemistryModel,
chemistryModel,
rhoChemistryModel,
constGasThermoPhysics
);
makeChemistryModel
(
ODEChemistryModel,
chemistryModel,
rhoChemistryModel,
gasThermoPhysics
);
makeChemistryModel
(
ODEChemistryModel,
chemistryModel,
rhoChemistryModel,
constIncompressibleGasThermoPhysics
);
makeChemistryModel
(
ODEChemistryModel,
chemistryModel,
rhoChemistryModel,
incompressibleGasThermoPhysics
);
makeChemistryModel
(
ODEChemistryModel,
chemistryModel,
rhoChemistryModel,
icoPoly8ThermoPhysics
);

View File

@ -29,15 +29,13 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class ODEChemistryType>
Foam::EulerImplicit<ODEChemistryType>::EulerImplicit
template<class ChemistryModel>
Foam::EulerImplicit<ChemistryModel>::EulerImplicit
(
const fvMesh& mesh,
const word& ODEModelName,
const word& thermoType
const fvMesh& mesh
)
:
chemistrySolver<ODEChemistryType>(mesh, ODEModelName, thermoType),
chemistrySolver<ChemistryModel>(mesh),
coeffsDict_(this->subDict("EulerImplicitCoeffs")),
cTauChem_(readScalar(coeffsDict_.lookup("cTauChem"))),
eqRateLimiter_(coeffsDict_.lookup("equilibriumRateLimiter"))
@ -46,15 +44,15 @@ Foam::EulerImplicit<ODEChemistryType>::EulerImplicit
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class ODEChemistryType>
Foam::EulerImplicit<ODEChemistryType>::~EulerImplicit()
template<class ChemistryModel>
Foam::EulerImplicit<ChemistryModel>::~EulerImplicit()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class ODEChemistryType>
Foam::scalar Foam::EulerImplicit<ODEChemistryType>::solve
template<class ChemistryModel>
Foam::scalar Foam::EulerImplicit<ChemistryModel>::solve
(
scalarField &c,
const scalar T,

View File

@ -46,10 +46,10 @@ namespace Foam
Class EulerImplicit Declaration
\*---------------------------------------------------------------------------*/
template<class ODEChemistryType>
template<class ChemistryModel>
class EulerImplicit
:
public chemistrySolver<ODEChemistryType>
public chemistrySolver<ChemistryModel>
{
// Private data
@ -74,13 +74,8 @@ public:
// Constructors
//- Construct from components
EulerImplicit
(
const fvMesh& mesh,
const word& ODEmodelName,
const word& thermoType
);
//- Construct from mesh
EulerImplicit(const fvMesh& mesh);
//- Destructor

View File

@ -27,23 +27,20 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class ODEChemistryType>
Foam::chemistrySolver<ODEChemistryType>::chemistrySolver
template<class ChemistryModel>
Foam::chemistrySolver<ChemistryModel>::chemistrySolver
(
const fvMesh& mesh,
const word& ODEModelName,
const word& thermoType
const fvMesh& mesh
)
:
ODEChemistryType(mesh, ODEModelName, thermoType),
name_(ODEModelName)
ChemistryModel(mesh)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class ODEChemistryType>
Foam::chemistrySolver<ODEChemistryType>::~chemistrySolver()
template<class ChemistryModel>
Foam::chemistrySolver<ChemistryModel>::~chemistrySolver()
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -35,7 +35,7 @@ SourceFiles
#ifndef chemistrySolver_H
#define chemistrySolver_H
#include "ODEChemistryModel.H"
#include "chemistryModel.H"
#include "IOdictionary.H"
#include "scalarField.H"
@ -48,30 +48,18 @@ namespace Foam
Class chemistrySolver Declaration
\*---------------------------------------------------------------------------*/
template<class ODEChemistryType>
template<class ChemistryModel>
class chemistrySolver
:
public ODEChemistryType
public ChemistryModel
{
protected:
// Protected data
//- Name of the chemistry solver
const word name_;
public:
// Constructors
//- Construct from components
chemistrySolver
(
const fvMesh& mesh,
const word& ODEModelName,
const word& thermoType
);
chemistrySolver(const fvMesh& mesh);
//- Destructor

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,7 +28,7 @@ License
#include "chemistrySolver.H"
#include "ODEChemistryModel.H"
#include "chemistryModel.H"
#include "noChemistrySolver.H"
#include "EulerImplicit.H"
@ -37,21 +37,22 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makeChemistrySolverType(SS, ODEChem, Comp, Thermo) \
#define makeChemistrySolverType(SS, Comp, Thermo) \
\
typedef SS<ODEChem<Comp, Thermo> > SS##ODEChem##Comp##Thermo; \
typedef SS<chemistryModel<Comp, Thermo> > SS##Comp##Thermo; \
\
defineTemplateTypeNameAndDebugWithName \
( \
SS##ODEChem##Comp##Thermo, \
(#SS"<"#ODEChem"<"#Comp"," + Thermo::typeName() + ">>").c_str(), \
SS##Comp##Thermo, \
(#SS"<" + word(Comp::typeName_()) \
+ "," + Thermo::typeName() + ">").c_str(), \
0 \
); \
\
addToRunTimeSelectionTable \
( \
Comp, \
SS##ODEChem##Comp##Thermo, \
SS##Comp##Thermo, \
fvMesh \
);
@ -61,7 +62,6 @@ License
makeChemistrySolverType \
( \
noChemistrySolver, \
ODEChemistryModel, \
CompChemModel, \
Thermo \
); \
@ -69,7 +69,6 @@ License
makeChemistrySolverType \
( \
EulerImplicit, \
ODEChemistryModel, \
CompChemModel, \
Thermo \
); \
@ -77,7 +76,6 @@ License
makeChemistrySolverType \
( \
ode, \
ODEChemistryModel, \
CompChemModel, \
Thermo \
); \
@ -85,7 +83,6 @@ License
makeChemistrySolverType \
( \
sequential, \
ODEChemistryModel, \
CompChemModel, \
Thermo \
);

View File

@ -28,29 +28,27 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class ODEChemistryType>
Foam::noChemistrySolver<ODEChemistryType>::noChemistrySolver
template<class ChemistryModel>
Foam::noChemistrySolver<ChemistryModel>::noChemistrySolver
(
const fvMesh& mesh,
const word& ODEModelName,
const word& thermoType
const fvMesh& mesh
)
:
chemistrySolver<ODEChemistryType>(mesh, ODEModelName, thermoType)
chemistrySolver<ChemistryModel>(mesh)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class ODEChemistryType>
Foam::noChemistrySolver<ODEChemistryType>::~noChemistrySolver()
template<class ChemistryModel>
Foam::noChemistrySolver<ChemistryModel>::~noChemistrySolver()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class ODEChemistryType>
Foam::scalar Foam::noChemistrySolver<ODEChemistryType>::solve
template<class ChemistryModel>
Foam::scalar Foam::noChemistrySolver<ChemistryModel>::solve
(
scalarField&,
const scalar,

View File

@ -47,10 +47,10 @@ namespace Foam
Class noChemistrySolver Declaration
\*---------------------------------------------------------------------------*/
template<class ODEChemistryType>
template<class ChemistryModel>
class noChemistrySolver
:
public chemistrySolver<ODEChemistryType>
public chemistrySolver<ChemistryModel>
{
public:
@ -61,14 +61,8 @@ public:
// Constructors
//- Construct from components
noChemistrySolver
(
const fvMesh& mesh,
const word& ODEModelName,
const word& thermoType
);
noChemistrySolver(const fvMesh& mesh);
//- Destructor

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -24,19 +24,17 @@ License
\*---------------------------------------------------------------------------*/
#include "ode.H"
#include "ODEChemistryModel.H"
#include "chemistryModel.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class ODEChemistryType>
Foam::ode<ODEChemistryType>::ode
template<class ChemistryModel>
Foam::ode<ChemistryModel>::ode
(
const fvMesh& mesh,
const word& ODEModelName,
const word& thermoType
const fvMesh& mesh
)
:
chemistrySolver<ODEChemistryType>(mesh, ODEModelName, thermoType),
chemistrySolver<ChemistryModel>(mesh),
coeffsDict_(this->subDict("odeCoeffs")),
solverName_(coeffsDict_.lookup("solver")),
odeSolver_(ODESolver::New(solverName_, *this)),
@ -46,15 +44,15 @@ Foam::ode<ODEChemistryType>::ode
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class ODEChemistryType>
Foam::ode<ODEChemistryType>::~ode()
template<class ChemistryModel>
Foam::ode<ChemistryModel>::~ode()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class ODEChemistryType>
Foam::scalar Foam::ode<ODEChemistryType>::solve
template<class ChemistryModel>
Foam::scalar Foam::ode<ChemistryModel>::solve
(
scalarField& c,
const scalar T,

View File

@ -47,10 +47,10 @@ namespace Foam
Class ode Declaration
\*---------------------------------------------------------------------------*/
template<class ODEChemistryType>
template<class ChemistryModel>
class ode
:
public chemistrySolver<ODEChemistryType>
public chemistrySolver<ChemistryModel>
{
// Private data
@ -66,18 +66,13 @@ class ode
public:
//- Runtime type information
TypeName("ODE");
TypeName("ode");
// Constructors
//- Construct from components
ode
(
const fvMesh& mesh,
const word& ODEModeNewlName,
const word& thermoType
);
//- Construct from mesh
ode(const fvMesh& mesh);
//- Destructor

View File

@ -28,15 +28,13 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class ODEChemistryType>
Foam::sequential<ODEChemistryType>::sequential
template<class ChemistryModel>
Foam::sequential<ChemistryModel>::sequential
(
const fvMesh& mesh,
const word& ODEModelName,
const word& thermoType
const fvMesh& mesh
)
:
chemistrySolver<ODEChemistryType>(mesh, ODEModelName, thermoType),
chemistrySolver<ChemistryModel>(mesh),
coeffsDict_(this->subDict("sequentialCoeffs")),
cTauChem_(readScalar(coeffsDict_.lookup("cTauChem"))),
eqRateLimiter_(coeffsDict_.lookup("equilibriumRateLimiter"))
@ -45,15 +43,15 @@ Foam::sequential<ODEChemistryType>::sequential
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class ODEChemistryType>
Foam::sequential<ODEChemistryType>::~sequential()
template<class ChemistryModel>
Foam::sequential<ChemistryModel>::~sequential()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class ODEChemistryType>
Foam::scalar Foam::sequential<ODEChemistryType>::solve
template<class ChemistryModel>
Foam::scalar Foam::sequential<ChemistryModel>::solve
(
scalarField &c,
const scalar T,

View File

@ -48,17 +48,16 @@ namespace Foam
Class sequential Declaration
\*---------------------------------------------------------------------------*/
template<class ODEChemistryType>
template<class ChemistryModel>
class sequential
:
public chemistrySolver<ODEChemistryType>
public chemistrySolver<ChemistryModel>
{
// Private data
//- Coefficients dictionary
dictionary coeffsDict_;
// Model constants
//- Chemistry time scale
@ -76,13 +75,8 @@ public:
// Constructors
//- Construct from components
sequential
(
const fvMesh& mesh,
const word& ODEModelName,
const word& thermoType
);
//- Construct from mesh
sequential(const fvMesh& mesh);
//- Destructor

View File

@ -135,33 +135,39 @@ Foam::scalarField Foam::radiationCoupledBase::emissivity() const
case SOLIDTHERMO:
{
// Get the coupling information from the mappedPatchBase
const mappedPatchBase& mpp =
refCast<const mappedPatchBase>
(
patch_.patch()
);
// const mappedPatchBase& mpp =
// refCast<const mappedPatchBase>
// (
// patch_.patch()
// );
const polyMesh& nbrMesh = mpp.sampleMesh();
// const polyMesh& nbrMesh = mpp.sampleMesh();
const solidThermo& thermo =
nbrMesh.lookupObject<solidThermo>
(
"thermophysicalProperties"
);
// const solidThermo& thermo =
// nbrMesh.lookupObject<solidThermo>
// (
// "thermophysicalProperties"
// );
// Force recalculation of mapping and schedule
const mapDistribute& distMap = mpp.map();
// const mapDistribute& distMap = mpp.map();
const fvPatch& nbrPatch = refCast<const fvMesh>
// const fvPatch& nbrPatch = refCast<const fvMesh>
// (
// nbrMesh
// ).boundary()[mpp.samplePolyPatch().index()];
// scalarField emissivity(thermo.emissivity(nbrPatch.index()));
// distMap.distribute(emissivity);
// return emissivity;
FatalErrorIn
(
nbrMesh
).boundary()[mpp.samplePolyPatch().index()];
scalarField emissivity(thermo.emissivity(nbrPatch.index()));
distMap.distribute(emissivity);
return emissivity;
"radiationCoupledBase::emissivity(const scalarField&)"
) << "Solid radiation properties temporarily removed"
<< exit(FatalError);
return scalarField(0);
}
break;
@ -176,8 +182,7 @@ Foam::scalarField Foam::radiationCoupledBase::emissivity() const
FatalErrorIn
(
"radiationCoupledBase::emissivity(const scalarField&)"
)
<< "Unimplemented method " << method_ << endl
) << "Unimplemented method " << method_ << endl
<< "Please set 'emissivity' to one of "
<< emissivityMethodTypeNames_.toc()
<< " and 'emissivityName' to the name of the volScalar"
@ -185,6 +190,7 @@ Foam::scalarField Foam::radiationCoupledBase::emissivity() const
}
break;
}
return scalarField(0);
}

View File

@ -4,14 +4,14 @@ chemistryReaders/chemistryReader/makeChemistryReaders.C
mixtures/basicMultiComponentMixture/basicMultiComponentMixture.C
psiReactionThermo/psiReactionThermo/psiReactionThermo.C
psiReactionThermo/hePsiReactionThermo/hePsiReactionThermos.C
psiReactionThermo/psiReactionThermo.C
psiReactionThermo/psiReactionThermos.C
psiReactionThermo/psiuReactionThermo/psiuReactionThermo.C
psiReactionThermo/heheuReactionThermo/heheuReactionThermos.C
psiuReactionThermo/psiuReactionThermo.C
psiuReactionThermo/psiuReactionThermos.C
rhoReactionThermo/rhoReactionThermo/rhoReactionThermo.C
rhoReactionThermo/heRhoReactionThermo/heRhoReactionThermos.C
rhoReactionThermo/rhoReactionThermo.C
rhoReactionThermo/rhoReactionThermos.C
derivedFvPatchFields/fixedUnburntEnthalpy/fixedUnburntEnthalpyFvPatchScalarField.C
derivedFvPatchFields/gradientUnburntEnthalpy/gradientUnburntEnthalpyFvPatchScalarField.C

View File

@ -35,6 +35,7 @@ License
\
typedef MixtureThermo \
< \
CThermo, \
SpecieMixture \
< \
Mixture \

View File

@ -1,147 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-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 "hePsiReactionThermo.H"
#include "fvMesh.H"
#include "fixedValueFvPatchFields.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template<class MixtureType>
void Foam::hePsiReactionThermo<MixtureType>::calculate()
{
const scalarField& hCells = this->he_.internalField();
const scalarField& pCells = this->p_.internalField();
scalarField& TCells = this->T_.internalField();
scalarField& psiCells = this->psi_.internalField();
scalarField& muCells = this->mu_.internalField();
scalarField& alphaCells = this->alpha_.internalField();
forAll(TCells, celli)
{
const typename MixtureType::thermoType& mixture =
this->cellMixture(celli);
TCells[celli] = mixture.THE
(
hCells[celli],
pCells[celli],
TCells[celli]
);
psiCells[celli] = mixture.psi(pCells[celli], TCells[celli]);
muCells[celli] = mixture.mu(pCells[celli], TCells[celli]);
alphaCells[celli] = mixture.alphah(pCells[celli], TCells[celli]);
}
forAll(this->T_.boundaryField(), patchi)
{
fvPatchScalarField& pp = this->p_.boundaryField()[patchi];
fvPatchScalarField& pT = this->T_.boundaryField()[patchi];
fvPatchScalarField& ppsi = this->psi_.boundaryField()[patchi];
fvPatchScalarField& ph = this->he_.boundaryField()[patchi];
fvPatchScalarField& pmu_ = this->mu_.boundaryField()[patchi];
fvPatchScalarField& palpha_ = this->alpha_.boundaryField()[patchi];
if (pT.fixesValue())
{
forAll(pT, facei)
{
const typename MixtureType::thermoType& mixture =
this->patchFaceMixture(patchi, facei);
ph[facei] = mixture.HE(pp[facei], pT[facei]);
ppsi[facei] = mixture.psi(pp[facei], pT[facei]);
pmu_[facei] = mixture.mu(pp[facei], pT[facei]);
palpha_[facei] = mixture.alphah(pp[facei], pT[facei]);
}
}
else
{
forAll(pT, facei)
{
const typename MixtureType::thermoType& mixture =
this->patchFaceMixture(patchi, facei);
pT[facei] = mixture.THE(ph[facei], pp[facei], pT[facei]);
ppsi[facei] = mixture.psi(pp[facei], pT[facei]);
pmu_[facei] = mixture.mu(pp[facei], pT[facei]);
palpha_[facei] = mixture.alphah(pp[facei], pT[facei]);
}
}
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class MixtureType>
Foam::hePsiReactionThermo<MixtureType>::hePsiReactionThermo(const fvMesh& mesh)
:
heThermo<psiReactionThermo, MixtureType>(mesh)
{
calculate();
// Switch on saving old time
this->psi_.oldTime();
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class MixtureType>
Foam::hePsiReactionThermo<MixtureType>::~hePsiReactionThermo()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class MixtureType>
void Foam::hePsiReactionThermo<MixtureType>::correct()
{
if (debug)
{
Info<< "entering hePsiReactionThermo<MixtureType>::correct()" << endl;
}
// force the saving of the old-time values
this->psi_.oldTime();
calculate();
if (debug)
{
Info<< "exiting hePsiReactionThermo<MixtureType>::correct()" << endl;
}
}
// ************************************************************************* //

View File

@ -1,100 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-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/>.
Class
Foam::hePsiReactionThermo
Description
Foam::hePsiReactionThermo
SourceFiles
hePsiReactionThermo.C
\*---------------------------------------------------------------------------*/
#ifndef hePsiReactionThermo_H
#define hePsiReactionThermo_H
#include "heThermo.H"
#include "psiReactionThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class hePsiReactionThermo Declaration
\*---------------------------------------------------------------------------*/
template<class MixtureType>
class hePsiReactionThermo
:
public heThermo<psiReactionThermo, MixtureType>
{
// Private Member Functions
void calculate();
//- Construct as copy (not implemented)
hePsiReactionThermo(const hePsiReactionThermo<MixtureType>&);
public:
//- Runtime type information
TypeName("hePsiReactionThermo");
// Constructors
//- Construct from mesh
hePsiReactionThermo(const fvMesh&);
//- Destructor
virtual ~hePsiReactionThermo();
// Member functions
//- Update properties
virtual void correct();
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "hePsiReactionThermo.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -26,7 +26,7 @@ License
#include "makeReactionThermo.H"
#include "psiReactionThermo.H"
#include "hePsiReactionThermo.H"
#include "hePsiThermo.H"
#include "specie.H"
#include "perfectGas.H"
@ -59,7 +59,7 @@ makeReactionThermo
(
psiThermo,
psiReactionThermo,
hePsiReactionThermo,
hePsiThermo,
homogeneousMixture,
constTransport,
sensibleEnthalpy,
@ -72,7 +72,7 @@ makeReactionThermo
(
psiThermo,
psiReactionThermo,
hePsiReactionThermo,
hePsiThermo,
inhomogeneousMixture,
constTransport,
sensibleEnthalpy,
@ -85,7 +85,7 @@ makeReactionThermo
(
psiThermo,
psiReactionThermo,
hePsiReactionThermo,
hePsiThermo,
veryInhomogeneousMixture,
constTransport,
sensibleEnthalpy,
@ -101,7 +101,7 @@ makeReactionThermo
(
psiThermo,
psiReactionThermo,
hePsiReactionThermo,
hePsiThermo,
homogeneousMixture,
sutherlandTransport,
sensibleEnthalpy,
@ -114,7 +114,7 @@ makeReactionThermo
(
psiThermo,
psiReactionThermo,
hePsiReactionThermo,
hePsiThermo,
inhomogeneousMixture,
sutherlandTransport,
sensibleEnthalpy,
@ -127,7 +127,7 @@ makeReactionThermo
(
psiThermo,
psiReactionThermo,
hePsiReactionThermo,
hePsiThermo,
veryInhomogeneousMixture,
sutherlandTransport,
sensibleEnthalpy,
@ -143,7 +143,7 @@ makeReactionThermo
(
psiThermo,
psiReactionThermo,
hePsiReactionThermo,
hePsiThermo,
homogeneousMixture,
sutherlandTransport,
sensibleEnthalpy,
@ -156,7 +156,7 @@ makeReactionThermo
(
psiThermo,
psiReactionThermo,
hePsiReactionThermo,
hePsiThermo,
inhomogeneousMixture,
sutherlandTransport,
sensibleEnthalpy,
@ -169,7 +169,7 @@ makeReactionThermo
(
psiThermo,
psiReactionThermo,
hePsiReactionThermo,
hePsiThermo,
veryInhomogeneousMixture,
sutherlandTransport,
sensibleEnthalpy,
@ -185,7 +185,7 @@ makeReactionMixtureThermo
(
psiThermo,
psiReactionThermo,
hePsiReactionThermo,
hePsiThermo,
multiComponentMixture,
constGasThermoPhysics
);
@ -194,7 +194,7 @@ makeReactionMixtureThermo
(
psiThermo,
psiReactionThermo,
hePsiReactionThermo,
hePsiThermo,
multiComponentMixture,
gasThermoPhysics
);
@ -206,7 +206,7 @@ makeReactionMixtureThermo
(
psiThermo,
psiReactionThermo,
hePsiReactionThermo,
hePsiThermo,
reactingMixture,
constGasThermoPhysics
);
@ -215,7 +215,7 @@ makeReactionMixtureThermo
(
psiThermo,
psiReactionThermo,
hePsiReactionThermo,
hePsiThermo,
reactingMixture,
gasThermoPhysics
);
@ -224,7 +224,7 @@ makeReactionMixtureThermo
(
psiThermo,
psiReactionThermo,
hePsiReactionThermo,
hePsiThermo,
singleStepReactingMixture,
gasThermoPhysics
);

View File

@ -23,14 +23,14 @@ License
\*---------------------------------------------------------------------------*/
#include "heheuReactionThermo.H"
#include "heheuPsiThermo.H"
#include "fvMesh.H"
#include "fixedValueFvPatchFields.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template<class MixtureType>
void Foam::heheuReactionThermo<MixtureType>::calculate()
template<class BasicPsiThermo, class MixtureType>
void Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::calculate()
{
const scalarField& hCells = this->he_.internalField();
const scalarField& heuCells = this->heu_.internalField();
@ -118,8 +118,11 @@ void Foam::heheuReactionThermo<MixtureType>::calculate()
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class MixtureType>
Foam::heheuReactionThermo<MixtureType>::heheuReactionThermo(const fvMesh& mesh)
template<class BasicPsiThermo, class MixtureType>
Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::heheuPsiThermo
(
const fvMesh& mesh
)
:
heThermo<psiuReactionThermo, MixtureType>(mesh),
Tu_
@ -188,19 +191,20 @@ Foam::heheuReactionThermo<MixtureType>::heheuReactionThermo(const fvMesh& mesh)
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class MixtureType>
Foam::heheuReactionThermo<MixtureType>::~heheuReactionThermo()
template<class BasicPsiThermo, class MixtureType>
Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::~heheuPsiThermo()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class MixtureType>
void Foam::heheuReactionThermo<MixtureType>::correct()
template<class BasicPsiThermo, class MixtureType>
void Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::correct()
{
if (debug)
{
Info<< "entering heheuReactionThermo<MixtureType>::correct()" << endl;
Info<< "entering heheuPsiThermo<BasicPsiThermo, MixtureType>::correct()"
<< endl;
}
// force the saving of the old-time values
@ -210,14 +214,15 @@ void Foam::heheuReactionThermo<MixtureType>::correct()
if (debug)
{
Info<< "exiting heheuReactionThermo<MixtureType>::correct()" << endl;
Info<< "exiting heheuPsiThermo<BasicPsiThermo, MixtureType>::correct()"
<< endl;
}
}
template<class MixtureType>
template<class BasicPsiThermo, class MixtureType>
Foam::tmp<Foam::scalarField>
Foam::heheuReactionThermo<MixtureType>::heu
Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::heu
(
const scalarField& p,
const scalarField& Tu,
@ -236,9 +241,9 @@ Foam::heheuReactionThermo<MixtureType>::heu
}
template<class MixtureType>
template<class BasicPsiThermo, class MixtureType>
Foam::tmp<Foam::scalarField>
Foam::heheuReactionThermo<MixtureType>::heu
Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::heu
(
const scalarField& p,
const scalarField& Tu,
@ -258,9 +263,9 @@ Foam::heheuReactionThermo<MixtureType>::heu
}
template<class MixtureType>
template<class BasicPsiThermo, class MixtureType>
Foam::tmp<Foam::volScalarField>
Foam::heheuReactionThermo<MixtureType>::Tb() const
Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::Tb() const
{
tmp<volScalarField> tTb
(
@ -314,9 +319,9 @@ Foam::heheuReactionThermo<MixtureType>::Tb() const
}
template<class MixtureType>
template<class BasicPsiThermo, class MixtureType>
Foam::tmp<Foam::volScalarField>
Foam::heheuReactionThermo<MixtureType>::psiu() const
Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::psiu() const
{
tmp<volScalarField> tpsiu
(
@ -365,9 +370,9 @@ Foam::heheuReactionThermo<MixtureType>::psiu() const
}
template<class MixtureType>
template<class BasicPsiThermo, class MixtureType>
Foam::tmp<Foam::volScalarField>
Foam::heheuReactionThermo<MixtureType>::psib() const
Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::psib() const
{
tmp<volScalarField> tpsib
(
@ -417,9 +422,9 @@ Foam::heheuReactionThermo<MixtureType>::psib() const
}
template<class MixtureType>
template<class BasicPsiThermo, class MixtureType>
Foam::tmp<Foam::volScalarField>
Foam::heheuReactionThermo<MixtureType>::muu() const
Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::muu() const
{
tmp<volScalarField> tmuu
(
@ -472,9 +477,9 @@ Foam::heheuReactionThermo<MixtureType>::muu() const
}
template<class MixtureType>
template<class BasicPsiThermo, class MixtureType>
Foam::tmp<Foam::volScalarField>
Foam::heheuReactionThermo<MixtureType>::mub() const
Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::mub() const
{
tmp<volScalarField> tmub
(

View File

@ -36,7 +36,6 @@ SourceFiles
#define heheuReactionThermo_H
#include "heThermo.H"
#include "psiuReactionThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -44,13 +43,13 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class heheuReactionThermo Declaration
Class heheuPsiThermo Declaration
\*---------------------------------------------------------------------------*/
template<class MixtureType>
class heheuReactionThermo
template<class BasicPsiThermo, class MixtureType>
class heheuPsiThermo
:
public heThermo<psiuReactionThermo, MixtureType>
public heThermo<BasicPsiThermo, MixtureType>
{
// Private Member Functions
@ -63,23 +62,26 @@ class heheuReactionThermo
void calculate();
//- Construct as copy (not implemented)
heheuReactionThermo(const heheuReactionThermo<MixtureType>&);
heheuPsiThermo
(
const heheuPsiThermo<BasicPsiThermo, MixtureType>&
);
public:
//- Runtime type information
TypeName("heheuReactionThermo");
TypeName("heheuPsiThermo");
// Constructors
//- Construct from mesh
heheuReactionThermo(const fvMesh&);
heheuPsiThermo(const fvMesh&);
//- Destructor
virtual ~heheuReactionThermo();
virtual ~heheuPsiThermo();
// Member functions
@ -155,7 +157,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
#ifdef NoRepository
# include "heheuReactionThermo.C"
# include "heheuPsiThermo.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "psiuReactionThermo.H"
#include "heheuReactionThermo.H"
#include "heheuPsiThermo.H"
#include "makeReactionThermo.H"
#include "addToRunTimeSelectionTable.H"
@ -56,7 +56,7 @@ makeReactionThermo
(
psiThermo,
psiuReactionThermo,
heheuReactionThermo,
heheuPsiThermo,
homogeneousMixture,
constTransport,
absoluteEnthalpy,
@ -69,7 +69,7 @@ makeReactionThermo
(
psiThermo,
psiuReactionThermo,
heheuReactionThermo,
heheuPsiThermo,
inhomogeneousMixture,
constTransport,
absoluteEnthalpy,
@ -82,7 +82,7 @@ makeReactionThermo
(
psiThermo,
psiuReactionThermo,
heheuReactionThermo,
heheuPsiThermo,
veryInhomogeneousMixture,
constTransport,
absoluteEnthalpy,
@ -95,7 +95,7 @@ makeReactionThermo
(
psiThermo,
psiuReactionThermo,
heheuReactionThermo,
heheuPsiThermo,
homogeneousMixture,
sutherlandTransport,
absoluteEnthalpy,
@ -108,7 +108,7 @@ makeReactionThermo
(
psiThermo,
psiuReactionThermo,
heheuReactionThermo,
heheuPsiThermo,
inhomogeneousMixture,
sutherlandTransport,
absoluteEnthalpy,
@ -121,7 +121,7 @@ makeReactionThermo
(
psiThermo,
psiuReactionThermo,
heheuReactionThermo,
heheuPsiThermo,
veryInhomogeneousMixture,
sutherlandTransport,
absoluteEnthalpy,
@ -134,7 +134,7 @@ makeReactionThermo
(
psiThermo,
psiuReactionThermo,
heheuReactionThermo,
heheuPsiThermo,
egrMixture,
constTransport,
absoluteEnthalpy,
@ -147,7 +147,7 @@ makeReactionThermo
(
psiThermo,
psiuReactionThermo,
heheuReactionThermo,
heheuPsiThermo,
egrMixture,
sutherlandTransport,
absoluteEnthalpy,

View File

@ -1,145 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-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 "heRhoReactionThermo.H"
#include "fvMesh.H"
#include "fixedValueFvPatchFields.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template<class MixtureType>
void Foam::heRhoReactionThermo<MixtureType>::calculate()
{
const scalarField& hCells = this->he_.internalField();
const scalarField& pCells = this->p_.internalField();
scalarField& TCells = this->T_.internalField();
scalarField& psiCells = this->psi_.internalField();
scalarField& rhoCells = this->rho_.internalField();
scalarField& muCells = this->mu_.internalField();
scalarField& alphaCells = this->alpha_.internalField();
forAll(TCells, celli)
{
const typename MixtureType::thermoType& mixture =
this->cellMixture(celli);
TCells[celli] = mixture.THE
(
hCells[celli],
pCells[celli],
TCells[celli]
);
psiCells[celli] = mixture.psi(pCells[celli], TCells[celli]);
rhoCells[celli] = mixture.rho(pCells[celli], TCells[celli]);
muCells[celli] = mixture.mu(pCells[celli], TCells[celli]);
alphaCells[celli] = mixture.alphah(pCells[celli], TCells[celli]);
}
forAll(this->T_.boundaryField(), patchi)
{
fvPatchScalarField& pp = this->p_.boundaryField()[patchi];
fvPatchScalarField& pT = this->T_.boundaryField()[patchi];
fvPatchScalarField& ppsi = this->psi_.boundaryField()[patchi];
fvPatchScalarField& prho = this->rho_.boundaryField()[patchi];
fvPatchScalarField& ph = this->he_.boundaryField()[patchi];
fvPatchScalarField& pmu_ = this->mu_.boundaryField()[patchi];
fvPatchScalarField& palpha_ = this->alpha_.boundaryField()[patchi];
if (pT.fixesValue())
{
forAll(pT, facei)
{
const typename MixtureType::thermoType& mixture =
this->patchFaceMixture(patchi, facei);
ph[facei] = mixture.HE(pp[facei], pT[facei]);
ppsi[facei] = mixture.psi(pp[facei], pT[facei]);
prho[facei] = mixture.rho(pp[facei], pT[facei]);
pmu_[facei] = mixture.mu(pp[facei], pT[facei]);
palpha_[facei] = mixture.alphah(pp[facei], pT[facei]);
}
}
else
{
forAll(pT, facei)
{
const typename MixtureType::thermoType& mixture =
this->patchFaceMixture(patchi, facei);
pT[facei] = mixture.THE(ph[facei], pp[facei], pT[facei]);
ppsi[facei] = mixture.psi(pp[facei], pT[facei]);
prho[facei] = mixture.rho(pp[facei], pT[facei]);
pmu_[facei] = mixture.mu(pp[facei], pT[facei]);
palpha_[facei] = mixture.alphah(pp[facei], pT[facei]);
}
}
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class MixtureType>
Foam::heRhoReactionThermo<MixtureType>::heRhoReactionThermo(const fvMesh& mesh)
:
heThermo<rhoReactionThermo, MixtureType>(mesh)
{
calculate();
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class MixtureType>
Foam::heRhoReactionThermo<MixtureType>::~heRhoReactionThermo()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class MixtureType>
void Foam::heRhoReactionThermo<MixtureType>::correct()
{
if (debug)
{
Info<< "entering heRhoReactionThermo<MixtureType>::correct()" << endl;
}
calculate();
if (debug)
{
Info<< "exiting heRhoReactionThermo<MixtureType>::correct()" << endl;
}
}
// ************************************************************************* //

View File

@ -1,100 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-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/>.
Class
Foam::heRhoReactionThermo
Description
Foam::heRhoReactionThermo
SourceFiles
heRhoReactionThermo.C
\*---------------------------------------------------------------------------*/
#ifndef heRhoReactionThermo_H
#define heRhoReactionThermo_H
#include "heThermo.H"
#include "rhoReactionThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class heRhoReactionThermo Declaration
\*---------------------------------------------------------------------------*/
template<class MixtureType>
class heRhoReactionThermo
:
public heThermo<rhoReactionThermo, MixtureType>
{
// Private Member Functions
void calculate();
//- Construct as copy (not implemented)
heRhoReactionThermo(const heRhoReactionThermo<MixtureType>&);
public:
//- Runtime type information
TypeName("heRhoReactionThermo");
// Constructors
//- Construct from mesh
heRhoReactionThermo(const fvMesh&);
//- Destructor
virtual ~heRhoReactionThermo();
// Member functions
//- Update properties
virtual void correct();
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "heRhoReactionThermo.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -26,7 +26,7 @@ License
#include "makeReactionThermo.H"
#include "rhoReactionThermo.H"
#include "heRhoReactionThermo.H"
#include "heRhoThermo.H"
#include "specie.H"
#include "perfectGas.H"
@ -59,7 +59,7 @@ makeReactionThermo
(
rhoThermo,
rhoReactionThermo,
heRhoReactionThermo,
heRhoThermo,
homogeneousMixture,
constTransport,
sensibleEnthalpy,
@ -72,7 +72,7 @@ makeReactionThermo
(
rhoThermo,
rhoReactionThermo,
heRhoReactionThermo,
heRhoThermo,
inhomogeneousMixture,
constTransport,
sensibleEnthalpy,
@ -85,7 +85,7 @@ makeReactionThermo
(
rhoThermo,
rhoReactionThermo,
heRhoReactionThermo,
heRhoThermo,
veryInhomogeneousMixture,
constTransport,
sensibleEnthalpy,
@ -98,7 +98,7 @@ makeReactionThermo
(
rhoThermo,
rhoReactionThermo,
heRhoReactionThermo,
heRhoThermo,
homogeneousMixture,
sutherlandTransport,
sensibleEnthalpy,
@ -111,7 +111,7 @@ makeReactionThermo
(
rhoThermo,
rhoReactionThermo,
heRhoReactionThermo,
heRhoThermo,
inhomogeneousMixture,
sutherlandTransport,
sensibleEnthalpy,
@ -124,7 +124,7 @@ makeReactionThermo
(
rhoThermo,
rhoReactionThermo,
heRhoReactionThermo,
heRhoThermo,
veryInhomogeneousMixture,
sutherlandTransport,
sensibleEnthalpy,
@ -138,7 +138,7 @@ makeReactionThermo
(
rhoThermo,
rhoReactionThermo,
heRhoReactionThermo,
heRhoThermo,
homogeneousMixture,
constTransport,
sensibleEnthalpy,
@ -151,7 +151,7 @@ makeReactionThermo
(
rhoThermo,
rhoReactionThermo,
heRhoReactionThermo,
heRhoThermo,
inhomogeneousMixture,
constTransport,
sensibleEnthalpy,
@ -164,7 +164,7 @@ makeReactionThermo
(
rhoThermo,
rhoReactionThermo,
heRhoReactionThermo,
heRhoThermo,
veryInhomogeneousMixture,
constTransport,
sensibleEnthalpy,
@ -177,7 +177,7 @@ makeReactionThermo
(
rhoThermo,
rhoReactionThermo,
heRhoReactionThermo,
heRhoThermo,
homogeneousMixture,
sutherlandTransport,
sensibleEnthalpy,
@ -190,7 +190,7 @@ makeReactionThermo
(
rhoThermo,
rhoReactionThermo,
heRhoReactionThermo,
heRhoThermo,
inhomogeneousMixture,
sutherlandTransport,
sensibleEnthalpy,
@ -203,7 +203,7 @@ makeReactionThermo
(
rhoThermo,
rhoReactionThermo,
heRhoReactionThermo,
heRhoThermo,
veryInhomogeneousMixture,
sutherlandTransport,
sensibleEnthalpy,
@ -219,7 +219,7 @@ makeReactionMixtureThermo
(
rhoThermo,
rhoReactionThermo,
heRhoReactionThermo,
heRhoThermo,
multiComponentMixture,
constGasThermoPhysics
);
@ -228,7 +228,7 @@ makeReactionMixtureThermo
(
rhoThermo,
rhoReactionThermo,
heRhoReactionThermo,
heRhoThermo,
multiComponentMixture,
gasThermoPhysics
);
@ -237,7 +237,7 @@ makeReactionMixtureThermo
(
rhoThermo,
rhoReactionThermo,
heRhoReactionThermo,
heRhoThermo,
multiComponentMixture,
constIncompressibleGasThermoPhysics
);
@ -246,7 +246,7 @@ makeReactionMixtureThermo
(
rhoThermo,
rhoReactionThermo,
heRhoReactionThermo,
heRhoThermo,
multiComponentMixture,
incompressibleGasThermoPhysics
);
@ -255,7 +255,7 @@ makeReactionMixtureThermo
(
rhoThermo,
rhoReactionThermo,
heRhoReactionThermo,
heRhoThermo,
multiComponentMixture,
icoPoly8ThermoPhysics
);
@ -267,7 +267,7 @@ makeReactionMixtureThermo
(
rhoThermo,
rhoReactionThermo,
heRhoReactionThermo,
heRhoThermo,
reactingMixture,
constGasThermoPhysics
);
@ -276,7 +276,7 @@ makeReactionMixtureThermo
(
rhoThermo,
rhoReactionThermo,
heRhoReactionThermo,
heRhoThermo,
reactingMixture,
gasThermoPhysics
);
@ -285,7 +285,7 @@ makeReactionMixtureThermo
(
rhoThermo,
rhoReactionThermo,
heRhoReactionThermo,
heRhoThermo,
reactingMixture,
constIncompressibleGasThermoPhysics
);
@ -294,7 +294,7 @@ makeReactionMixtureThermo
(
rhoThermo,
rhoReactionThermo,
heRhoReactionThermo,
heRhoThermo,
reactingMixture,
incompressibleGasThermoPhysics
);
@ -303,7 +303,7 @@ makeReactionMixtureThermo
(
rhoThermo,
rhoReactionThermo,
heRhoReactionThermo,
heRhoThermo,
reactingMixture,
icoPoly8ThermoPhysics
);
@ -312,7 +312,7 @@ makeReactionMixtureThermo
(
rhoThermo,
rhoReactionThermo,
heRhoReactionThermo,
heRhoThermo,
singleStepReactingMixture,
gasThermoPhysics
);

View File

@ -32,14 +32,12 @@ template<class CompType, class SolidThermo, class GasThermo>
Foam::ODESolidChemistryModel<CompType, SolidThermo, GasThermo>::
ODESolidChemistryModel
(
const fvMesh& mesh,
const word& compTypeName,
const word& solidThermoName
const fvMesh& mesh
)
:
CompType(mesh, solidThermoName),
CompType(mesh),
ODE(),
Ys_(this->solid().composition().Y()),
Ys_(this->solidThermo().composition().Y()),
pyrolisisGases_
(
mesh.lookupObject<dictionary>
@ -47,12 +45,17 @@ ODESolidChemistryModel
),
reactions_
(
dynamic_cast<const reactingSolidMixture<SolidThermo>& >(this->solid())
dynamic_cast<const reactingSolidMixture<SolidThermo>& >
(
this->solidThermo()
)
),
solidThermo_
(
dynamic_cast<const reactingSolidMixture<SolidThermo>& >
(this->solid()).solidData()
(
this->solidThermo()
).solidData()
),
gasThermo_(pyrolisisGases_.size()),
nGases_(pyrolisisGases_.size()),
@ -149,7 +152,7 @@ ODESolidChemistryModel
// Calculate inital values of Ysi0 = rho*delta*Yi
Ys0_[fieldI].internalField() =
this->solid().rho()
this->solidThermo().rho()
*max(Ys_[fieldI], scalar(0.001))*mesh.V();
}
}
@ -566,7 +569,7 @@ void Foam::ODESolidChemistryModel<CompType, SolidThermo, GasThermo>::calculate()
IOobject::NO_WRITE,
false
),
this->solid().rho()
this->solidThermo().rho()
);
forAll(RRs_, i)
@ -587,8 +590,8 @@ void Foam::ODESolidChemistryModel<CompType, SolidThermo, GasThermo>::calculate()
if (reactingCells_[celli])
{
scalar rhoi = rho[celli];
scalar Ti = this->solid().T()[celli];
scalar pi = this->solid().p()[celli];
scalar Ti = this->solidThermo().T()[celli];
scalar pi = this->solidThermo().p()[celli];
scalarField c(nSpecie_, 0.0);
for (label i=0; i<nSolids_; i++)
@ -638,7 +641,7 @@ Foam::ODESolidChemistryModel<CompType, SolidThermo, GasThermo>::solve
IOobject::NO_WRITE,
false
),
this->solid().rho()
this->solidThermo().rho()
);
forAll(RRs_, i)
@ -658,8 +661,8 @@ Foam::ODESolidChemistryModel<CompType, SolidThermo, GasThermo>::solve
cellCounter_ = celli;
scalar rhoi = rho[celli];
scalar Ti = this->solid().T()[celli];
scalar pi = this->solid().p()[celli];
scalar Ti = this->solidThermo().T()[celli];
scalar pi = this->solidThermo().p()[celli];
scalarField c(nSpecie_, 0.0);
scalarField c0(nSpecie_, 0.0);

View File

@ -138,13 +138,8 @@ public:
// Constructors
//- Construct from components
ODESolidChemistryModel
(
const fvMesh& mesh,
const word& compTypeName,
const word& SolidThermoName
);
//- Construct from mesh
ODESolidChemistryModel(const fvMesh& mesh);
//- Destructor

View File

@ -39,12 +39,11 @@ namespace Foam
Foam::solidChemistryModel::solidChemistryModel
(
const fvMesh& mesh,
const word& solidThermoTypeName
const fvMesh& mesh
)
:
basicChemistryModel(mesh),
solidThermo_(solidReactionThermo::New(mesh)) //, thermoTypeName))
solidThermo_(solidReactionThermo::New(mesh))
{}

View File

@ -88,23 +88,15 @@ public:
autoPtr,
solidChemistryModel,
fvMesh,
(
const fvMesh& mesh,
const word& compTypeName,
const word& solidThermoTypeName
),
(mesh, compTypeName, solidThermoTypeName)
(const fvMesh& mesh),
(mesh)
);
// Constructors
//- Construct from mesh and thermo type name
solidChemistryModel
(
const fvMesh& mesh,
const word& solidThermoTypeName
);
//- Construct from mesh
solidChemistryModel(const fvMesh& mesh);
//- Selector
@ -118,10 +110,10 @@ public:
// Member Functions
//- Return access to the solid thermo package
inline solidReactionThermo& solid();
inline solidReactionThermo& solidThermo();
//- Return const access to the solid thermo package
inline const solidReactionThermo& solid() const;
inline const solidReactionThermo& solidThermo() const;
//- Return total gases mass source term [kg/m3/s]
virtual tmp<DimensionedField<scalar, volMesh> > RRg() const = 0;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -25,14 +25,14 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
inline Foam::solidReactionThermo& Foam::solidChemistryModel::solid()
inline Foam::solidReactionThermo& Foam::solidChemistryModel::solidThermo()
{
return solidThermo_();
}
inline const Foam::solidReactionThermo&
Foam::solidChemistryModel::solid() const
Foam::solidChemistryModel::solidThermo() const
{
return solidThermo_();
}

View File

@ -104,8 +104,7 @@ Foam::autoPtr<Foam::solidChemistryModel> Foam::solidChemistryModel::New
}
}
return autoPtr<solidChemistryModel>
(cstrIter()(mesh, ODEModelName, thermoTypeName));
return autoPtr<solidChemistryModel>(cstrIter()(mesh));
}

View File

@ -1,4 +1,4 @@
reaction/Reactions/solidReaction/solidReaction.C
reaction/reactions/makeSolidReactionThermoReactions.C
reaction/reactions/makeSolidReactions.C
LIB = $(FOAM_LIBBIN)/libsolidSpecie

View File

@ -39,7 +39,6 @@ Description
#include "constIsoSolidTransport.H"
#include "constAnIsoSolidTransport.H"
#include "exponentialSolidTransport.H"
#include "constSolidRad.H"
#include "sensibleEnthalpy.H"
#include "thermo.H"
@ -50,16 +49,13 @@ namespace Foam
typedef
constIsoSolidTransport
<
constSolidRad
species::thermo
<
species::thermo
hConstThermo
<
hConstThermo
<
rhoConst<specie>
>,
sensibleEnthalpy
>
rhoConst<specie>
>,
sensibleEnthalpy
>
>
hConstSolidThermoPhysics;
@ -67,16 +63,13 @@ namespace Foam
typedef
exponentialSolidTransport
<
constSolidRad
species::thermo
<
species::thermo
hExponentialThermo
<
hExponentialThermo
<
rhoConst<specie>
>,
sensibleEnthalpy
>
rhoConst<specie>
>,
sensibleEnthalpy
>
>
hExponentialSolidThermoPhysics;

View File

@ -1,171 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-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/>.
Class
Foam::constSolidRad
Description
Constant radiative properties
SourceFiles
constSolidRadI.H
constSolidRad.C
\*---------------------------------------------------------------------------*/
#ifndef constSolidRad_H
#define constSolidRad_H
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
template<class Thermo> class constSolidRad;
template<class Thermo>
inline constSolidRad<Thermo> operator*
(
const scalar,
const constSolidRad<Thermo>&
);
template<class Thermo>
Ostream& operator<<
(
Ostream&,
const constSolidRad<Thermo>&
);
/*---------------------------------------------------------------------------*\
Class constSolidRad Declaration
\*---------------------------------------------------------------------------*/
template<class Thermo>
class constSolidRad
:
public Thermo
{
// Private data
//- Absorption coefficient
scalar kappaRad_;
//- Scattering coefficient
scalar sigmaS_;
//- Emissivity coefficient
scalar emissivity_;
//- Construct from components
inline constSolidRad
(
const Thermo& t,
const scalar kappaRad,
const scalar sigmaS,
const scalar emissivity
);
public:
// Constructors
//- Construct from Istream
constSolidRad(const dictionary&);
//- Construct as named copy
inline constSolidRad(const word& name, const constSolidRad&);
//- Construct and return a clone
inline autoPtr<constSolidRad> clone() const;
// Selector from Istream
inline static autoPtr<constSolidRad> New(Istream& is);
// 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;
//- Return scattering [1/m]
inline scalar sigmaS(scalar T) const;
//- Return emissivity[]
inline scalar emissivity(scalar T) const;
//- Write to Ostream
void write(Ostream& os) const;
// Member operators
inline constSolidRad& operator=(const constSolidRad&);
inline void operator+=(const constSolidRad&);
inline void operator-=(const constSolidRad&);
// Friend operators
friend constSolidRad operator* <Thermo>
(
const scalar,
const constSolidRad&
);
// Ostream Operator
friend Ostream& operator<< <Thermo>
(
Ostream&,
const constSolidRad&
);
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "constSolidRadI.H"
#ifdef NoRepository
# include "constSolidRad.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -1,179 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-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 "constSolidRad.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template<class thermo>
inline Foam::constSolidRad<thermo>::constSolidRad
(
const thermo& t,
const scalar kappaRad,
const scalar sigmaS,
const scalar emissivity
)
:
thermo(t),
kappaRad_(kappaRad),
sigmaS_(sigmaS),
emissivity_(emissivity)
{}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class thermo>
inline Foam::constSolidRad<thermo>::constSolidRad
(
const word& name,
const constSolidRad& pg
)
:
thermo(name, pg),
kappaRad_(pg.kappaRad_),
sigmaS_(pg.sigmaS_),
emissivity_(pg.emissivity_)
{}
template<class thermo>
inline Foam::autoPtr<Foam::constSolidRad<thermo> >
Foam::constSolidRad<thermo>::clone() const
{
return autoPtr<constSolidRad<thermo> >(new constSolidRad<thermo>(*this));
}
template<class thermo>
inline Foam::autoPtr<Foam::constSolidRad<thermo> >
Foam::constSolidRad<thermo>::New(Istream& is)
{
return autoPtr<constSolidRad<thermo> >(new constSolidRad<thermo>(is));
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class thermo>
inline Foam::scalar Foam::constSolidRad<thermo>::kappaRad(scalar) const
{
return kappaRad_;
}
template<class thermo>
inline Foam::scalar Foam::constSolidRad<thermo>::sigmaS(scalar) const
{
return sigmaS_;
}
template<class thermo>
inline Foam::scalar Foam::constSolidRad<thermo>::emissivity(scalar) const
{
return emissivity_;
}
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template<class thermo>
inline Foam::constSolidRad<thermo>&
Foam::constSolidRad<thermo>::operator=(const constSolidRad<thermo>& ct)
{
thermo::operator=(ct);
kappaRad_ = ct.kappaRad_;
sigmaS_ = ct.sigmaS_;
emissivity_ = ct.emissivity_;
return *this;
}
template<class thermo>
inline void Foam::constSolidRad<thermo>::operator+=
(
const constSolidRad<thermo>& ct
)
{
scalar molr1 = this->nMoles();
thermo::operator+=(ct);
molr1 /= this->nMoles();
scalar molr2 = ct.nMoles()/this->nMoles();
kappaRad_ = molr1*kappaRad_ + molr2*ct.kappaRad_;
sigmaS_ = molr1*sigmaS_ + molr2*ct.sigmaS_;
emissivity_ = molr1*emissivity_ + molr2*ct.emissivity_;
}
template<class thermo>
inline void Foam::constSolidRad<thermo>::operator-=
(
const constSolidRad<thermo>& ct
)
{
scalar molr1 = this->nMoles();
thermo::operator-=(ct);
molr1 /= this->nMoles();
scalar molr2 = ct.nMoles()/this->nMoles();
kappaRad_ = molr1*kappaRad_ - molr2*ct.kappaRad_;
sigmaS_ = molr1*sigmaS_ - molr2*ct.sigmaS_;
emissivity_ = molr1*emissivity_ - molr2*ct.emissivity_;
}
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
template<class thermo>
inline Foam::constSolidRad<thermo> Foam::operator*
(
const scalar s,
const constSolidRad<thermo>& ct
)
{
return constSolidRad<thermo>
(
s*static_cast<const thermo&>(ct),
ct.kappaRad_,
ct.sigmaS_,
ct.emissivity_
);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -22,10 +22,10 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
InClass
Foam::makeSolidReactionThermo
Foam::makeSolidReaction
Description
Macros for instantiating reactions on given solid thermo packages
Macros for instantiating reactions for solid
\*---------------------------------------------------------------------------*/
@ -79,5 +79,4 @@ namespace Foam
#endif
// ************************************************************************* //

View File

@ -23,7 +23,7 @@ License
\*---------------------------------------------------------------------------*/
#include "makeSolidReactionThermo.H"
#include "makeSolidReaction.H"
#include "solidArrheniusReactionRate.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -1,10 +1,8 @@
solidThermo/solidThermo.C
solidThermo/solidThermoNew.C
solidThermo/solidThermos.C
mixtures/basicSolidMixture/basicSolidMixture.C
solidReactionThermo/solidReactionThermo.C
solidReactionThermo/solidReactionThermoNew.C
heSolidThermo/heSolidThermos.C
solidReactionThermo/solidReactionThermos.C
LIB = $(FOAM_LIBBIN)/libsolidThermo

View File

@ -191,21 +191,9 @@ public:
//- Density
virtual scalar rho(scalar p, scalar T, label celli) const = 0;
//- Absorption coefficient
virtual scalar kappaRad(scalar p, scalar T, label celli) const = 0;
//- Scatter coefficient
virtual scalar sigmaS(scalar p, scalar T, label celli) const = 0;
//- Thermal conductivity
virtual scalar kappa(scalar p, scalar T, label celli) const = 0;
//- Emissivity coefficient
virtual scalar emissivity
(
scalar p, scalar T, label celli
) const = 0;
//- Specific heat capacity
virtual scalar Cp(scalar p, scalar T, label celli) const = 0;
};
@ -217,7 +205,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
# include "basicSolidMixtureI.H"
#include "basicSolidMixtureI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -29,7 +29,6 @@ Description
#include "basicMixture.H"
#include "makeBasicMixture.H"
#include "rhoConst.H"
#include "hConstThermo.H"
@ -39,8 +38,6 @@ Description
#include "constAnIsoSolidTransport.H"
#include "exponentialSolidTransport.H"
#include "constSolidRad.H"
#include "sensibleInternalEnergy.H"
#include "sensibleEnthalpy.H"
#include "thermo.H"

View File

@ -316,36 +316,6 @@ Foam::scalar Foam::multiComponentSolidMixture<ThermoType>::rho
}
template<class ThermoType>
Foam::scalar Foam::multiComponentSolidMixture<ThermoType>::kappaRad
(
scalar p, scalar T, label celli
) const
{
scalar tmp = 0.0;
forAll(solidData_, i)
{
tmp += solidData_[i].kappaRad(T)*X(i, celli, p, T);
}
return tmp;
}
template<class ThermoType>
Foam::scalar Foam::multiComponentSolidMixture<ThermoType>::sigmaS
(
scalar p, scalar T, label celli
) const
{
scalar tmp = 0.0;
forAll(solidData_, i)
{
tmp += solidData_[i].sigmaS(T)*X(i, celli, p, T);
}
return tmp;
}
template<class ThermoType>
Foam::scalar Foam::multiComponentSolidMixture<ThermoType>::kappa
(
@ -361,21 +331,6 @@ Foam::scalar Foam::multiComponentSolidMixture<ThermoType>::kappa
}
template<class ThermoType>
Foam::scalar Foam::multiComponentSolidMixture<ThermoType>::emissivity
(
scalar p, scalar T, label celli
) const
{
scalar tmp = 0.0;
forAll(solidData_, i)
{
tmp += solidData_[i].emissivity(T)*X(i, celli, p, T);
}
return tmp;
}
template<class ThermoType>
Foam::scalar Foam::multiComponentSolidMixture<ThermoType>::Cp
(

View File

@ -208,21 +208,11 @@ public:
//- Density
virtual scalar rho(scalar p, scalar T, label celli) const;
//- Absorption coefficient
virtual scalar kappaRad(scalar p, scalar T, label celli) const;
//- Scatter coefficient
virtual scalar sigmaS(scalar p, scalar T, label celli) const;
//- Thermal conductivity
virtual scalar kappa(scalar p, scalar T, label celli) const;
//- Emissivity coefficient
virtual scalar emissivity(scalar p, scalar T, label celli) const;
//- Specific heat capacity
virtual scalar Cp(scalar p, scalar T, label celli) const;
};

View File

@ -54,6 +54,27 @@ Foam::solidReactionThermo::solidReactionThermo
{}
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::solidReactionThermo> Foam::solidReactionThermo::New
(
const fvMesh& mesh
)
{
return basicThermo::New<solidReactionThermo>(mesh);
}
Foam::autoPtr<Foam::solidReactionThermo> Foam::solidReactionThermo::New
(
const fvMesh& mesh,
const dictionary& dict
)
{
return basicThermo::New<solidReactionThermo>(mesh, dict);
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::solidReactionThermo::~solidReactionThermo()

View File

@ -1,107 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-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 "solidReactionThermo.H"
#include "fvMesh.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::solidReactionThermo> Foam::solidReactionThermo::New
(
const fvMesh& mesh
)
{
// get model name, but do not register the dictionary
// otherwise it is registered in the database twice
const word modelType
(
IOdictionary
(
IOobject
(
"thermophysicalProperties",
mesh.time().constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
)
).lookup("thermoType")
);
Info<< "Selecting thermodynamics package " << modelType << endl;
fvMeshConstructorTable::iterator cstrIter =
fvMeshConstructorTablePtr_->find(modelType);
if (cstrIter == fvMeshConstructorTablePtr_->end())
{
FatalErrorIn("solidReactionThermo::New(const fvMesh&)")
<< "Unknown solidReactionThermo type "
<< modelType << nl << nl
<< "Valid solidReactionThermo types:" << nl
<< fvMeshConstructorTablePtr_->sortedToc() << nl
<< exit(FatalError);
}
return autoPtr<solidReactionThermo>(cstrIter()(mesh));
}
Foam::autoPtr<Foam::solidReactionThermo> Foam::solidReactionThermo::New
(
const fvMesh& mesh,
const dictionary& dict
)
{
if (debug)
{
Info<< "solidReactionThermo::New(const fvMesh&, const dictionary&): "
<< "constructing solidReactionThermo"
<< endl;
}
const word thermoType = dict.lookup("thermoType");
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(thermoType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"solidReactionThermo::New(const fvMesh&, const dictionary&)"
) << "Unknown solidReactionThermo type " << thermoType
<< endl << endl
<< "Valid solidReactionThermo types are :" << endl
<< dictionaryConstructorTablePtr_->toc()
<< exit(FatalError);
}
return autoPtr<solidReactionThermo>(cstrIter()(mesh, dict));
}
// ************************************************************************* //

View File

@ -23,52 +23,40 @@ License
\*---------------------------------------------------------------------------*/
#include "constSolidRad.H"
#include "IOstreams.H"
#include "makeSolidThermo.H"
#include "solidReactionThermo.H"
#include "heSolidThermo.H"
#include "specie.H"
#include "rhoConst.H"
#include "hConstThermo.H"
#include "hExponentialThermo.H"
#include "constIsoSolidTransport.H"
#include "constAnIsoSolidTransport.H"
#include "exponentialSolidTransport.H"
#include "reactingSolidMixture.H"
#include "sensibleEnthalpy.H"
#include "thermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
/* * * * * * * * * * * * * * * * * Enthalpy-based * * * * * * * * * * * * * */
template<class thermo>
constSolidRad<thermo>::constSolidRad(const dictionary& dict)
:
thermo(dict),
kappaRad_(readScalar(dict.subDict("radiation").lookup("kappaRad"))),
sigmaS_(readScalar(dict.subDict("radiation").lookup("sigmaS"))),
emissivity_(readScalar(dict.subDict("radiation").lookup("emissivity")))
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class thermo>
void Foam::constSolidRad<thermo>::constSolidRad::write(Ostream& os) const
{
thermo::write(os);
dictionary dict("radiation");
dict.add("kappaRad", kappaRad_);
dict.add("sigmaS", sigmaS_);
dict.add("emissivity", emissivity_);
os << indent << dict.dictName() << dict;
}
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
template<class thermo>
Ostream& operator<<(Ostream& os, const constSolidRad<thermo>& pg)
{
os << static_cast<const thermo&>(pg);
os << tab << pg.kappaRad_ << tab << pg.sigmaS_ << tab << pg.emissivity_;
os.check("Ostream& operator<<(Ostream& os, const constSolidRad& st)");
return os;
}
makeSolidThermo
(
solidReactionThermo,
heSolidThermo,
reactingSolidMixture,
constIsoSolidTransport,
sensibleEnthalpy,
hConstThermo,
rhoConst,
specie
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -230,192 +230,6 @@ Foam::heSolidThermo<BasicSolidThermo, MixtureType>::Kappa() const
}
template<class BasicSolidThermo, class MixtureType>
Foam::tmp<Foam::volScalarField>
Foam::heSolidThermo<BasicSolidThermo, MixtureType>::kappaRad() const
{
const fvMesh& mesh = this->T_.mesh();
tmp<volScalarField> tkappaRad
(
new volScalarField
(
IOobject
(
"kappaRad",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
inv(dimLength)
)
);
volScalarField& kappaRad = tkappaRad();
scalarField& kappaRadCells = kappaRad.internalField();
const scalarField& TCells = this->T_.internalField();
const scalarField& pCells = this->p_.internalField();
forAll(kappaRadCells, celli)
{
kappaRadCells[celli] =
this->cellVolMixture
(
pCells[celli],
TCells[celli],
celli
).kappaRad(TCells[celli]);
}
forAll(kappaRad.boundaryField(), patchi)
{
scalarField& kappaRadp = kappaRad.boundaryField()[patchi];
const scalarField& pT = this->T_.boundaryField()[patchi];
const scalarField& pp = this->p_.boundaryField()[patchi];
forAll(kappaRadp, facei)
{
kappaRadp[facei] =
this->patchFaceVolMixture
(
pp[facei],
pT[facei],
patchi,
facei
).kappaRad(pT[facei]);
}
}
return tkappaRad;
}
template<class BasicSolidThermo, class MixtureType>
Foam::tmp<Foam::volScalarField>
Foam::heSolidThermo<BasicSolidThermo, MixtureType>::sigmaS() const
{
const fvMesh& mesh = this->T_.mesh();
tmp<volScalarField> tsigmaS
(
new volScalarField
(
IOobject
(
"sigmaS",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
inv(dimLength)
)
);
volScalarField& sigmaS = tsigmaS();
scalarField& sigmaSCells = sigmaS.internalField();
const scalarField& TCells = this->T_.internalField();
const scalarField& pCells = this->p_.internalField();
forAll(sigmaSCells, celli)
{
sigmaSCells[celli] =
this->cellVolMixture
(
pCells[celli],
TCells[celli],
celli
).sigmaS(TCells[celli]);
}
forAll(sigmaS.boundaryField(), patchi)
{
scalarField& sigmaSp = sigmaS.boundaryField()[patchi];
const scalarField& pT = this->T_.boundaryField()[patchi];
const scalarField& pp = this->p_.boundaryField()[patchi];
forAll(sigmaSp, facei)
{
sigmaSp[facei] =
this->patchFaceVolMixture
(
pp[facei],
pT[facei],
patchi,
facei
).sigmaS(pT[facei]);
}
}
return tsigmaS;
}
template<class BasicSolidThermo, class MixtureType>
Foam::tmp<Foam::volScalarField>
Foam::heSolidThermo<BasicSolidThermo, MixtureType>::emissivity() const
{
const fvMesh& mesh = this->T_.mesh();
tmp<volScalarField> temissivity
(
new volScalarField
(
IOobject
(
"emissivity",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
inv(dimLength)
)
);
volScalarField& emissivity = temissivity();
scalarField& emissivityCells = emissivity.internalField();
const scalarField& TCells = this->T_.internalField();
const scalarField& pCells = this->p_.internalField();
forAll(emissivityCells, celli)
{
emissivityCells[celli] =
this->cellVolMixture
(
pCells[celli],
TCells[celli],
celli
).emissivity(TCells[celli]);
}
forAll(emissivity.boundaryField(), patchi)
{
scalarField& emissivityp = emissivity.boundaryField()[patchi];
const scalarField& pT = this->T_.boundaryField()[patchi];
const scalarField& pp = this->p_.boundaryField()[patchi];
forAll(emissivityp, facei)
{
emissivityp[facei] =
this->patchFaceVolMixture
(
pp[facei],
pT[facei],
patchi,
facei
).emissivity(pT[facei]);
}
}
return temissivity;
}
template<class BasicSolidThermo, class MixtureType>
Foam::tmp<Foam::vectorField>
Foam::heSolidThermo<BasicSolidThermo, MixtureType>::Kappa
@ -445,89 +259,4 @@ Foam::heSolidThermo<BasicSolidThermo, MixtureType>::Kappa
}
template<class BasicSolidThermo, class MixtureType>
Foam::tmp<Foam::scalarField>
Foam::heSolidThermo<BasicSolidThermo, MixtureType>::kappaRad
(
const label patchi
) const
{
const scalarField& Tp = this->T_.boundaryField()[patchi];
tmp<scalarField> tKappaRad(new scalarField(Tp.size()));
scalarField& KappapRadp = tKappaRad();
const scalarField& pp = this->p_.boundaryField()[patchi];
forAll(Tp, facei)
{
KappapRadp[facei] =
this->patchFaceVolMixture
(
pp[facei],
Tp[facei],
patchi,
facei
).kappaRad(Tp[facei]);
}
return tKappaRad;
}
template<class BasicSolidThermo, class MixtureType>
Foam::tmp<Foam::scalarField>
Foam::heSolidThermo<BasicSolidThermo, MixtureType>::sigmaS
(
const label patchi
) const
{
const scalarField& Tp = this->T_.boundaryField()[patchi];
tmp<scalarField> tsigmaS(new scalarField(Tp.size()));
scalarField& sigmaSp = tsigmaS();
const scalarField& pp = this->p_.boundaryField()[patchi];
forAll(Tp, facei)
{
sigmaSp[facei] =
this->patchFaceVolMixture
(
pp[facei],
Tp[facei],
patchi,
facei
).sigmaS(Tp[facei]);
}
return tsigmaS;
}
template<class BasicSolidThermo, class MixtureType>
Foam::tmp<Foam::scalarField>
Foam::heSolidThermo<BasicSolidThermo, MixtureType>::emissivity
(
const label patchi
) const
{
const scalarField& Tp = this->T_.boundaryField()[patchi];
tmp<scalarField> temissivity(new scalarField(Tp.size()));
scalarField& emissivity = temissivity();
const scalarField& pp = this->p_.boundaryField()[patchi];
forAll(Tp, facei)
{
emissivity[facei] =
this->patchFaceVolMixture
(
pp[facei],
Tp[facei],
patchi,
facei
).emissivity(Tp[facei]);
}
return temissivity;
}
// ************************************************************************* //

View File

@ -25,7 +25,7 @@ Class
Foam::heSolidThermo
Description
Enthalpy, internal energy based for a solid mixture.
Energy for a solid mixture
SourceFiles
heSolidThermo.C
@ -51,7 +51,6 @@ class heSolidThermo
:
public heThermo<BasicSolidThermo, MixtureType>
{
// Private Member Functions
//- Calculate the thermo variables
@ -91,29 +90,11 @@ public:
//- Anisotropic thermal conductivity [W/m/K]
virtual tmp<volVectorField> Kappa() const;
//- Absorption coefficient [1/m]
virtual tmp<volScalarField> kappaRad() const;
//- Scatter coefficient
virtual tmp<volScalarField> sigmaS() const;
//- Emissivity coefficient [1/m]
virtual tmp<volScalarField> emissivity() const;
// Per patch calculation
//- Anisotropic thermal conductivity [W/m/K]
virtual tmp<vectorField> Kappa(const label patchI) const;
//- Absorption coefficient [1/m]
virtual tmp<scalarField> kappaRad(const label patchI) const;
//- Scatter coefficient
virtual tmp<scalarField> sigmaS(const label patchI) const;
//- Emissivity coefficient [1/m]
virtual tmp<scalarField> emissivity(const label patchI) const;
};

View File

@ -32,79 +32,42 @@ Description
#ifndef makeSolidThermo_H
#define makesolidThermo_H
#include "addToRunTimeSelectionTable.H"
#include "basicThermo.H"
#include "makeThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makeSolidThermo(BaseThermo,Cthermo,Mixture,Transport,Radiation,Type,Thermo,EqnOfState,Specie)\
#define makeSolidThermo(BaseThermo,Cthermo,Mixture,Transport,Type,Thermo,EqnOfState,Specie)\
\
typedef \
Transport \
< \
Radiation \
< \
species::thermo \
< \
Thermo \
< \
EqnOfState \
< \
Specie \
> \
>, \
Type \
> \
> \
> Transport##Radiation##Type##Thermo##EqnOfState##Specie; \
\
typedef \
Mixture \
< \
Transport##Radiation##Type##Thermo##EqnOfState##Specie \
> Mixture##Transport##Radiation##Type##Thermo##EqnOfState##Specie; \
\
typedef \
Cthermo \
< \
BaseThermo, \
Mixture##Transport##Radiation##Type##Thermo##EqnOfState##Specie \
> Cthermo##Mixture##Transport##Radiation##Type##Thermo \
##EqnOfState##Specie; \
\
defineTemplateTypeNameAndDebugWithName \
makeThermoTypedefs \
( \
Cthermo##Mixture##Transport##Radiation##Type##Thermo \
##EqnOfState##Specie, \
( \
#Cthermo"<"#Mixture"<" \
+ Transport##Radiation##Type##Thermo##EqnOfState##Specie::typeName() \
+ ">>" \
).c_str(), \
0 \
); \
BaseThermo, \
Cthermo, \
Mixture, \
Transport, \
Type, \
Thermo, \
EqnOfState, \
Specie \
) \
\
addToRunTimeSelectionTable \
( \
basicThermo, \
Cthermo##Mixture##Transport##Radiation##Type##Thermo \
##EqnOfState##Specie, \
Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie, \
fvMesh \
); \
\
addToRunTimeSelectionTable \
( \
BaseThermo, \
Cthermo##Mixture##Transport##Radiation##Type##Thermo \
##EqnOfState##Specie, \
Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie, \
fvMesh \
); \
\
addToRunTimeSelectionTable \
( \
BaseThermo, \
Cthermo##Mixture##Transport##Radiation##Type##Thermo \
##EqnOfState##Specie, \
Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie, \
dictionary \
);

View File

@ -81,6 +81,27 @@ Foam::solidThermo::solidThermo
{}
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::solidThermo> Foam::solidThermo::New
(
const fvMesh& mesh
)
{
return basicThermo::New<solidThermo>(mesh);
}
Foam::autoPtr<Foam::solidThermo> Foam::solidThermo::New
(
const fvMesh& mesh,
const dictionary& dict
)
{
return basicThermo::New<solidThermo>(mesh, dict);
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::solidThermo::~solidThermo()

View File

@ -127,49 +127,20 @@ public:
//- Thermal conductivity [W/m/K]
virtual tmp<volVectorField> Kappa() const = 0;
//- Absorption coefficient [1/m]
virtual tmp<volScalarField> kappaRad() const = 0;
//- Scatter coefficient
virtual tmp<volScalarField> sigmaS() const = 0;
//- Emissivity coefficient [1/m]
virtual tmp<volScalarField> emissivity() const = 0;
// Per patch calculation
//- Anisotropic thermal conductivity [W/m/K]
virtual tmp<vectorField> Kappa
(
const label patchI
) const = 0;
//- Absorption coefficient [1/m]
virtual tmp<scalarField> kappaRad
(
const label patchI
) const = 0;
//- Scatter coefficient
virtual tmp<scalarField> sigmaS
(
const label patchI
) const = 0;
//- Emissivity coefficient [1/m]
virtual tmp<scalarField> emissivity
(
const label patchI
) const = 0;
// I-O
//- Read thermophysicalProperties dictionary
virtual bool read();
};

View File

@ -1,111 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-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 "solidThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::solidThermo> Foam::solidThermo::New
(
const fvMesh& mesh
)
{
if (debug)
{
Info<< "solidThermo::New(const fvMesh&): "
<< "constructing solidThermo"
<< endl;
}
const word thermoType
(
IOdictionary
(
IOobject
(
"thermophysicalProperties",
mesh.time().constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
)
).lookup("thermoType")
);
fvMeshConstructorTable::iterator cstrIter =
fvMeshConstructorTablePtr_->find(thermoType);
if (cstrIter == fvMeshConstructorTablePtr_->end())
{
FatalErrorIn
(
"solidThermo::New(const fvMesh&)"
) << "Unknown solidThermo type " << thermoType
<< endl << endl
<< "Valid solidThermo types are :" << endl
<< fvMeshConstructorTablePtr_->toc()
<< exit(FatalError);
}
return autoPtr<solidThermo>(cstrIter()(mesh));
}
Foam::autoPtr<Foam::solidThermo> Foam::solidThermo::New
(
const fvMesh& mesh,
const dictionary& dict
)
{
if (debug)
{
Info<< "solidThermo::New(const fvMesh&, const dictionary&): "
<< "constructing solidThermo"
<< endl;
}
const word thermoType = dict.lookup("thermoType");
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(thermoType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"solidThermo::New(const fvMesh&, const dictionary&)"
) << "Unknown solidThermo type " << thermoType
<< endl << endl
<< "Valid solidThermo types are :" << endl
<< dictionaryConstructorTablePtr_->toc()
<< exit(FatalError);
}
return autoPtr<solidThermo>(cstrIter()(mesh, dict));
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -23,8 +23,9 @@ License
\*---------------------------------------------------------------------------*/
#include "makeSolidThermo.H"
#include "solidThermo.H"
#include "heSolidThermo.H"
#include "specie.H"
#include "rhoConst.H"
@ -33,7 +34,6 @@ License
#include "constIsoSolidTransport.H"
#include "constAnIsoSolidTransport.H"
#include "exponentialSolidTransport.H"
#include "constSolidRad.H"
#include "pureSolidMixture.H"
#include "multiComponentSolidMixture.H"
#include "reactingSolidMixture.H"
@ -41,11 +41,6 @@ License
#include "sensibleInternalEnergy.H"
#include "thermo.H"
#include "heThermo.H"
#include "solidThermo.H"
#include "solidReactionThermo.H"
#include "heSolidThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -60,7 +55,6 @@ makeSolidThermo
heSolidThermo,
pureSolidMixture,
constIsoSolidTransport,
constSolidRad,
sensibleEnthalpy,
hConstThermo,
rhoConst,
@ -73,7 +67,6 @@ makeSolidThermo
heSolidThermo,
pureSolidMixture,
constAnIsoSolidTransport,
constSolidRad,
sensibleEnthalpy,
hConstThermo,
rhoConst,
@ -86,7 +79,6 @@ makeSolidThermo
heSolidThermo,
pureSolidMixture,
exponentialSolidTransport,
constSolidRad,
sensibleEnthalpy,
hExponentialThermo,
rhoConst,
@ -99,20 +91,6 @@ makeSolidThermo
heSolidThermo,
multiComponentSolidMixture,
constIsoSolidTransport,
constSolidRad,
sensibleEnthalpy,
hConstThermo,
rhoConst,
specie
);
makeSolidThermo
(
solidReactionThermo,
heSolidThermo,
reactingSolidMixture,
constIsoSolidTransport,
constSolidRad,
sensibleEnthalpy,
hConstThermo,
rhoConst,

View File

@ -1,11 +1,6 @@
atomicWeights = atomicWeights
specie = specie
equationOfState = equationOfState
reactions = reaction/reactions
$(atomicWeights)/atomicWeights.C
$(specie)/specie.C
$(reactions)/makeReactionThermoReactions.C
$(reactions)/makeLangmuirHinshelwoodReactions.C
atomicWeights/atomicWeights.C
specie/specie.C
reaction/reactions/makeReactions.C
reaction/reactions/makeLangmuirHinshelwoodReactions.C
LIB = $(FOAM_LIBBIN)/libspecie

View File

@ -17,7 +17,7 @@ FoamFile
thermoType
{
type heheuReactionThermo;
type heheuPsiThermo;
mixture inhomogeneousMixture;
transport sutherland;
thermo janaf;

View File

@ -17,7 +17,7 @@ FoamFile
thermoType
{
type heheuReactionThermo;
type heheuPsiThermo;
mixture homogeneousMixture;
transport sutherland;
thermo janaf;

View File

@ -17,8 +17,8 @@ FoamFile
chemistryType
{
chemistryModel ODEChemistryModel;
chemistrySolver ode;
chemistryThermo psi;
}
chemistry on;

View File

@ -17,7 +17,7 @@ FoamFile
thermoType
{
type hePsiReactionThermo;
type hePsiThermo;
mixture reactingMixture;
transport sutherland;
thermo janaf;

View File

@ -17,8 +17,8 @@ FoamFile
chemistryType
{
chemistryModel ODEChemistryModel;
chemistrySolver ode;
chemistryThermo psi;
}
chemistry on;

View File

@ -17,7 +17,7 @@ FoamFile
thermoType
{
type hePsiReactionThermo;
type hePsiThermo;
mixture reactingMixture;
transport sutherland;
thermo janaf;

View File

@ -17,8 +17,8 @@ FoamFile
chemistryType
{
chemistryModel ODEChemistryModel;
chemistrySolver ode;
chemistryThermo psi;
}
chemistry on;

View File

@ -17,7 +17,7 @@ FoamFile
thermoType
{
type hePsiReactionThermo;
type hePsiThermo;
mixture reactingMixture;
transport sutherland;
thermo janaf;

View File

@ -17,8 +17,8 @@ FoamFile
chemistryType
{
chemistryModel ODEChemistryModel;
chemistrySolver ode;
chemistryThermo psi;
}
chemistry on;

View File

@ -17,7 +17,7 @@ FoamFile
thermoType
{
type hePsiReactionThermo;
type hePsiThermo;
mixture reactingMixture;
transport sutherland;
thermo janaf;

View File

@ -17,7 +17,7 @@ FoamFile
thermoType
{
type heheuReactionThermo;
type heheuPsiThermo;
mixture inhomogeneousMixture;
transport sutherland;
thermo janaf;

View File

@ -14,7 +14,16 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType heSolidThermo<reactingSolidMixture<constIso<const<hConst<rhoConst<specie>>,sensibleEnthalpy>>>>;
thermoType
{
type heSolidThermo;
mixture reactingSolidMixture;
transport constIso;
thermo hConst;
equationOfState rhoConst;
specie specie;
energy sensibleEnthalpy;
}
solidComponents
(

View File

@ -17,7 +17,7 @@ FoamFile
thermoType
{
type hePsiReactionThermo;
type hePsiThermo;
mixture singleStepReactingMixture;
transport sutherland;
thermo janaf;

View File

@ -17,7 +17,7 @@ FoamFile
thermoType
{
type hePsiReactionThermo;
type hePsiThermo;
mixture singleStepReactingMixture;
transport sutherland;
thermo janaf;

View File

@ -17,8 +17,8 @@ FoamFile
chemistryType
{
chemistryModel ODEChemistryModel;
chemistrySolver noChemistrySolver;
chemistryThermo psi;
}
chemistry off;

Some files were not shown because too many files have changed in this diff Show More