combustionModels: Added multiphase-phase support

by naming fields including the phase name is needed
This commit is contained in:
Henry
2015-06-05 08:19:13 +01:00
parent 28f58cb679
commit 320b8708c2
35 changed files with 262 additions and 154 deletions

View File

@ -40,10 +40,16 @@ template<class CombThermoType, class ThermoType>
FSD<CombThermoType, ThermoType>::FSD FSD<CombThermoType, ThermoType>::FSD
( (
const word& modelType, const word& modelType,
const fvMesh& mesh const fvMesh& mesh,
const word& phaseName
) )
: :
singleStepCombustion<CombThermoType, ThermoType>(modelType, mesh), singleStepCombustion<CombThermoType, ThermoType>
(
modelType,
mesh,
phaseName
),
reactionRateFlameArea_ reactionRateFlameArea_
( (
reactionRateFlameArea::New reactionRateFlameArea::New
@ -57,7 +63,7 @@ FSD<CombThermoType, ThermoType>::FSD
( (
IOobject IOobject
( (
"ft", IOobject::groupName("ft", phaseName),
this->mesh().time().timeName(), this->mesh().time().timeName(),
this->mesh(), this->mesh(),
IOobject::NO_READ, IOobject::NO_READ,
@ -144,7 +150,7 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm()
( (
IOobject IOobject
( (
"Pc", IOobject::groupName("Pc", this->phaseName_),
U.time().timeName(), U.time().timeName(),
U.db(), U.db(),
IOobject::NO_READ, IOobject::NO_READ,
@ -163,7 +169,7 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm()
( (
IOobject IOobject
( (
"omegaFuelBar", IOobject::groupName("omegaFuelBar", this->phaseName_),
U.time().timeName(), U.time().timeName(),
U.db(), U.db(),
IOobject::NO_READ, IOobject::NO_READ,
@ -291,7 +297,7 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm()
( (
IOobject IOobject
( (
"products", IOobject::groupName("products", this->phaseName_),
U.time().timeName(), U.time().timeName(),
U.db(), U.db(),
IOobject::NO_READ, IOobject::NO_READ,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -136,7 +136,7 @@ public:
// Constructors // Constructors
//- Construct from components //- Construct from components
FSD(const word& modelType, const fvMesh& mesh); FSD(const word& modelType, const fvMesh& mesh, const word& phaseName);
// Destructor // Destructor
@ -149,7 +149,7 @@ public:
virtual void correct(); virtual void correct();
// I-O // IO
//- Update properties //- Update properties
virtual bool read(); virtual bool read();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -61,15 +61,16 @@ Foam::scalar Foam::consumptionSpeed::omega0Sigma
) const ) const
{ {
scalar omega0 = 0.0; scalar omega0 = 0.0;
if (sigma < sigmaExt_) if (sigma < sigmaExt_)
{ {
omega0 = omega0 = max
max
( (
a*omega0_*(1.0 - exp(eta_*max(sigma, 0.0))), a*omega0_*(1.0 - exp(eta_*max(sigma, 0.0))),
omegaMin_ omegaMin_
) ; ) ;
} }
return omega0; return omega0;
} }
@ -137,4 +138,5 @@ void Foam::consumptionSpeed::read(const dictionary& dict)
dict.lookup("omegaMin") >> omegaMin_; dict.lookup("omegaMin") >> omegaMin_;
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -51,7 +51,6 @@ class consumptionSpeed
{ {
// Private Data // Private Data
//- Maximum consumption speed //- Maximum consumption speed
scalar omega0_; scalar omega0_;
@ -122,7 +121,7 @@ public:
} }
// I-O // IO
//- Update properties //- Update properties
void read(const dictionary& dict); void read(const dictionary& dict);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -59,8 +59,7 @@ Foam::reactionRateFlameArea::reactionRateFlameArea
), ),
mesh_ mesh_
) )
{ {}
}
Foam::reactionRateFlameArea::reactionRateFlameArea Foam::reactionRateFlameArea::reactionRateFlameArea
@ -87,8 +86,8 @@ Foam::reactionRateFlameArea::reactionRateFlameArea
), ),
mesh_ mesh_
) )
{ {}
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
@ -101,8 +100,9 @@ Foam::reactionRateFlameArea::~reactionRateFlameArea()
bool Foam::reactionRateFlameArea::read(const dictionary& dict) bool Foam::reactionRateFlameArea::read(const dictionary& dict)
{ {
dict.lookup("fuel") >> fuel_; dict.lookup("fuel") >> fuel_;
return true;
return true;
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -103,7 +103,7 @@ public:
virtual void correct(const volScalarField& sigma); virtual void correct(const volScalarField& sigma);
// I-O // IO
//- Update properties from given dictionary //- Update properties from given dictionary
virtual bool read(const dictionary& dictProperties); virtual bool read(const dictionary& dictProperties);

View File

@ -32,17 +32,18 @@ template<class Type>
Foam::combustionModels::PaSR<Type>::PaSR Foam::combustionModels::PaSR<Type>::PaSR
( (
const word& modelType, const word& modelType,
const fvMesh& mesh const fvMesh& mesh,
const word& phaseName
) )
: :
laminar<Type>(modelType, mesh), laminar<Type>(modelType, mesh, phaseName),
Cmix_(readScalar(this->coeffs().lookup("Cmix"))), Cmix_(readScalar(this->coeffs().lookup("Cmix"))),
turbulentReaction_(this->coeffs().lookup("turbulentReaction")), turbulentReaction_(this->coeffs().lookup("turbulentReaction")),
kappa_ kappa_
( (
IOobject IOobject
( (
"PaSR:kappa", IOobject::groupName("PaSR:kappa", phaseName),
mesh.time().timeName(), mesh.time().timeName(),
mesh, mesh,
IOobject::NO_READ, IOobject::NO_READ,
@ -116,10 +117,13 @@ template<class Type>
Foam::tmp<Foam::volScalarField> Foam::tmp<Foam::volScalarField>
Foam::combustionModels::PaSR<Type>::dQ() const Foam::combustionModels::PaSR<Type>::dQ() const
{ {
return return tmp<volScalarField>
tmp<volScalarField>
( (
new volScalarField("PaSR:dQ", kappa_*laminar<Type>::dQ()) new volScalarField
(
IOobject::groupName("PaSR:dQ", this->phaseName_),
kappa_*laminar<Type>::dQ()
)
); );
} }
@ -128,10 +132,13 @@ template<class Type>
Foam::tmp<Foam::volScalarField> Foam::tmp<Foam::volScalarField>
Foam::combustionModels::PaSR<Type>::Sh() const Foam::combustionModels::PaSR<Type>::Sh() const
{ {
return return tmp<volScalarField>
tmp<volScalarField>
( (
new volScalarField("PaSR:Sh", kappa_*laminar<Type>::Sh()) new volScalarField
(
IOobject::groupName("PaSR:Sh", this->phaseName_),
kappa_*laminar<Type>::Sh()
)
); );
} }

View File

@ -86,7 +86,7 @@ public:
// Constructors // Constructors
//- Construct from components //- Construct from components
PaSR(const word& modelType, const fvMesh& mesh); PaSR(const word& modelType, const fvMesh& mesh, const word& phaseName);
//- Destructor //- Destructor
@ -110,7 +110,7 @@ public:
virtual tmp<volScalarField> Sh() const; virtual tmp<volScalarField> Sh() const;
// I-O // IO
//- Update properties from given dictionary //- Update properties from given dictionary
virtual bool read(); virtual bool read();

View File

@ -37,14 +37,15 @@ namespace Foam
Foam::combustionModel::combustionModel Foam::combustionModel::combustionModel
( (
const word& modelType, const word& modelType,
const fvMesh& mesh const fvMesh& mesh,
const word& phaseName
) )
: :
IOdictionary IOdictionary
( (
IOobject IOobject
( (
"combustionProperties", IOobject::groupName("combustionProperties", phaseName),
mesh.time().constant(), mesh.time().constant(),
mesh, mesh,
IOobject::MUST_READ_IF_MODIFIED, IOobject::MUST_READ_IF_MODIFIED,
@ -55,7 +56,8 @@ Foam::combustionModel::combustionModel
mesh_(mesh), mesh_(mesh),
active_(lookupOrDefault<Switch>("active", true)), active_(lookupOrDefault<Switch>("active", true)),
coeffs_(subDict(modelType + "Coeffs")), coeffs_(subDict(modelType + "Coeffs")),
modelType_(modelType) modelType_(modelType),
phaseName_(phaseName)
{} {}
@ -96,7 +98,7 @@ Foam::tmp<Foam::volScalarField> Foam::combustionModel::Sh() const
( (
IOobject IOobject
( (
"Sh", IOobject::groupName("Sh", phaseName_),
mesh_.time().timeName(), mesh_.time().timeName(),
mesh_, mesh_,
IOobject::NO_READ, IOobject::NO_READ,

View File

@ -51,6 +51,14 @@ class combustionModel
: :
public IOdictionary public IOdictionary
{ {
// Private Member Functions
//- Disallow copy construct
combustionModel(const combustionModel&);
//- Disallow default bitwise assignment
void operator=(const combustionModel&);
protected: protected:
@ -68,19 +76,11 @@ protected:
//- Dictionary of the model //- Dictionary of the model
dictionary coeffs_; dictionary coeffs_;
//- Model name //- Model type
const word modelType_; const word modelType_;
//- Phase name
private: const word phaseName_;
// Private Member Functions
//- Disallow copy construct
combustionModel(const combustionModel&);
//- Disallow default bitwise assignment
void operator=(const combustionModel&);
public: public:
@ -91,9 +91,13 @@ public:
// Constructors // Constructors
//- Construct from components //- Construct from components
combustionModel(const word& modelType, const fvMesh& mesh); combustionModel
(
const word& modelType,
const fvMesh& mesh,
const word& phaseName=word::null
);
//- Destructor //- Destructor
@ -104,7 +108,6 @@ public:
// Access // Access
//- Return const access to the mesh database //- Return const access to the mesh database
inline const fvMesh& mesh() const; inline const fvMesh& mesh() const;
@ -145,7 +148,7 @@ public:
virtual tmp<volScalarField> Sh() const; virtual tmp<volScalarField> Sh() const;
// I-O // IO
//- Update properties from given dictionary //- Update properties from given dictionary
virtual bool read(); virtual bool read();

View File

@ -36,10 +36,17 @@ namespace combustionModels
template<class CombThermoType, class ThermoType> template<class CombThermoType, class ThermoType>
diffusion<CombThermoType, ThermoType>::diffusion diffusion<CombThermoType, ThermoType>::diffusion
( (
const word& modelType, const fvMesh& mesh const word& modelType,
const fvMesh& mesh,
const word& phaseName
) )
: :
singleStepCombustion<CombThermoType, ThermoType>(modelType, mesh), singleStepCombustion<CombThermoType, ThermoType>
(
modelType,
mesh,
phaseName
),
C_(readScalar(this->coeffs().lookup("C"))), C_(readScalar(this->coeffs().lookup("C"))),
oxidantName_(this->coeffs().template lookupOrDefault<word>("oxidant", "O2")) oxidantName_(this->coeffs().template lookupOrDefault<word>("oxidant", "O2"))
{} {}

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -82,7 +82,12 @@ public:
// Constructors // Constructors
//- Construct from components //- Construct from components
diffusion(const word& modelType, const fvMesh& mesh); diffusion
(
const word& modelType,
const fvMesh& mesh,
const word& phaseName
);
//- Destructor //- Destructor
@ -97,7 +102,7 @@ public:
virtual void correct(); virtual void correct();
// I-O // IO
//- Update properties //- Update properties
virtual bool read(); virtual bool read();

View File

@ -35,10 +35,17 @@ namespace combustionModels
template<class CombThermoType, class ThermoType> template<class CombThermoType, class ThermoType>
infinitelyFastChemistry<CombThermoType, ThermoType>::infinitelyFastChemistry infinitelyFastChemistry<CombThermoType, ThermoType>::infinitelyFastChemistry
( (
const word& modelType, const fvMesh& mesh const word& modelType,
const fvMesh& mesh,
const word& phaseName
) )
: :
singleStepCombustion<CombThermoType, ThermoType>(modelType, mesh), singleStepCombustion<CombThermoType, ThermoType>
(
modelType,
mesh,
phaseName
),
C_(readScalar(this->coeffs().lookup("C"))) C_(readScalar(this->coeffs().lookup("C")))
{} {}

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -79,7 +79,12 @@ public:
// Constructors // Constructors
//- Construct from components //- Construct from components
infinitelyFastChemistry(const word& modelType, const fvMesh& mesh); infinitelyFastChemistry
(
const word& modelType,
const fvMesh& mesh,
const word& phaseName
);
//- Destructor //- Destructor
@ -94,7 +99,7 @@ public:
virtual void correct(); virtual void correct();
// I-O // IO
//- Update properties //- Update properties
virtual bool read(); virtual bool read();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -33,10 +33,11 @@ template<class Type>
Foam::combustionModels::laminar<Type>::laminar Foam::combustionModels::laminar<Type>::laminar
( (
const word& modelType, const word& modelType,
const fvMesh& mesh const fvMesh& mesh,
const word& phaseName
) )
: :
Type(modelType, mesh), Type(modelType, mesh, phaseName),
integrateReactionRate_ integrateReactionRate_
( (
this->coeffs().lookupOrDefault("integrateReactionRate", true) this->coeffs().lookupOrDefault("integrateReactionRate", true)
@ -128,7 +129,8 @@ Foam::combustionModels::laminar<Type>::R(volScalarField& Y) const
if (this->active()) if (this->active())
{ {
const label specieI = this->thermo().composition().species()[Y.name()]; const label specieI =
this->thermo().composition().species()[Y.member()];
Su += this->chemistryPtr_->RR(specieI); Su += this->chemistryPtr_->RR(specieI);
} }
@ -147,7 +149,7 @@ Foam::combustionModels::laminar<Type>::dQ() const
( (
IOobject IOobject
( (
typeName + ":dQ", IOobject::groupName(typeName + ":dQ", this->phaseName_),
this->mesh().time().timeName(), this->mesh().time().timeName(),
this->mesh(), this->mesh(),
IOobject::NO_READ, IOobject::NO_READ,
@ -179,7 +181,7 @@ Foam::combustionModels::laminar<Type>::Sh() const
( (
IOobject IOobject
( (
typeName + ":Sh", IOobject::groupName(typeName + ":Sh", this->phaseName_),
this->mesh().time().timeName(), this->mesh().time().timeName(),
this->mesh(), this->mesh(),
IOobject::NO_READ, IOobject::NO_READ,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -84,7 +84,12 @@ public:
// Constructors // Constructors
//- Construct from components //- Construct from components
laminar(const word& modelType, const fvMesh& mesh); laminar
(
const word& modelType,
const fvMesh& mesh,
const word& phaseName
);
//- Destructor //- Destructor
@ -108,7 +113,7 @@ public:
virtual tmp<volScalarField> Sh() const; virtual tmp<volScalarField> Sh() const;
// I-O // IO
//- Update properties from given dictionary //- Update properties from given dictionary
virtual bool read(); virtual bool read();

View File

@ -32,10 +32,11 @@ template<class CombThermoType>
Foam::combustionModels::noCombustion<CombThermoType>::noCombustion Foam::combustionModels::noCombustion<CombThermoType>::noCombustion
( (
const word& modelType, const word& modelType,
const fvMesh& mesh const fvMesh& mesh,
const word& phaseName
) )
: :
CombThermoType(modelType, mesh) CombThermoType(modelType, mesh, phaseName)
{} {}
@ -81,7 +82,7 @@ Foam::combustionModels::noCombustion<CombThermoType>::dQ() const
( (
IOobject IOobject
( (
"dQ", IOobject::groupName("dQ", this->phaseName_),
this->mesh().time().timeName(), this->mesh().time().timeName(),
this->mesh(), this->mesh(),
IOobject::NO_READ, IOobject::NO_READ,
@ -108,7 +109,7 @@ Foam::combustionModels::noCombustion<CombThermoType>::Sh() const
( (
IOobject IOobject
( (
"Sh", IOobject::groupName("Sh", this->phaseName_),
this->mesh().time().timeName(), this->mesh().time().timeName(),
this->mesh(), this->mesh(),
IOobject::NO_READ, IOobject::NO_READ,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -71,7 +71,8 @@ public:
noCombustion noCombustion
( (
const word& modelType, const word& modelType,
const fvMesh& mesh const fvMesh& mesh,
const word& phaseName
); );
@ -95,7 +96,7 @@ public:
//- Return source for enthalpy equation [kg/m/s3] //- Return source for enthalpy equation [kg/m/s3]
virtual tmp<volScalarField> Sh() const; virtual tmp<volScalarField> Sh() const;
// I-O // IO
//- Update properties from given dictionary //- Update properties from given dictionary
virtual bool read(); virtual bool read();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -30,11 +30,12 @@ License
Foam::combustionModels::psiChemistryCombustion::psiChemistryCombustion Foam::combustionModels::psiChemistryCombustion::psiChemistryCombustion
( (
const word& modelType, const word& modelType,
const fvMesh& mesh const fvMesh& mesh,
const word& phaseName
) )
: :
psiCombustionModel(modelType, mesh), psiCombustionModel(modelType, mesh, phaseName),
chemistryPtr_(psiChemistryModel::New(mesh)) chemistryPtr_(psiChemistryModel::New(mesh, phaseName))
{} {}

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -76,7 +76,12 @@ public:
// Constructors // Constructors
//- Construct from components and thermo //- Construct from components and thermo
psiChemistryCombustion(const word& modelType, const fvMesh& mesh); psiChemistryCombustion
(
const word& modelType,
const fvMesh& mesh,
const word& phaseName
);
//- Destructor //- Destructor

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -41,10 +41,11 @@ namespace combustionModels
Foam::combustionModels::psiCombustionModel::psiCombustionModel Foam::combustionModels::psiCombustionModel::psiCombustionModel
( (
const word& modelType, const word& modelType,
const fvMesh& mesh const fvMesh& mesh,
const word& phaseName
) )
: :
combustionModel(modelType, mesh) combustionModel(modelType, mesh, phaseName)
{} {}

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -81,21 +81,31 @@ public:
dictionary, dictionary,
( (
const word& modelType, const word& modelType,
const fvMesh& mesh const fvMesh& mesh,
const word& phaseName
), ),
(modelType, mesh) (modelType, mesh, phaseName)
); );
// Constructors // Constructors
//- Construct from components and thermo //- Construct from components
psiCombustionModel(const word& modelType, const fvMesh& mesh); psiCombustionModel
(
const word& modelType,
const fvMesh& mesh,
const word& phaseName
);
//- Selector //- Selector
static autoPtr<psiCombustionModel> New(const fvMesh& mesh); static autoPtr<psiCombustionModel> New
(
const fvMesh& mesh,
const word& phaseName=word::null
);
//- Destructor //- Destructor
@ -114,7 +124,7 @@ public:
virtual tmp<volScalarField> rho() const = 0; virtual tmp<volScalarField> rho() const = 0;
// I-O // IO
//- Update properties from given dictionary //- Update properties from given dictionary
virtual bool read(); virtual bool read();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -30,7 +30,8 @@ License
Foam::autoPtr<Foam::combustionModels::psiCombustionModel> Foam::autoPtr<Foam::combustionModels::psiCombustionModel>
Foam::combustionModels::psiCombustionModel::New Foam::combustionModels::psiCombustionModel::New
( (
const fvMesh& mesh const fvMesh& mesh,
const word& phaseName
) )
{ {
const word combModelName const word combModelName
@ -39,7 +40,7 @@ Foam::combustionModels::psiCombustionModel::New
( (
IOobject IOobject
( (
"combustionProperties", IOobject::groupName("combustionProperties", phaseName),
mesh.time().constant(), mesh.time().constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ,
@ -70,7 +71,7 @@ Foam::combustionModels::psiCombustionModel::New
const word className = combModelName(0, tempOpen); const word className = combModelName(0, tempOpen);
return autoPtr<psiCombustionModel>(cstrIter()(className, mesh)); return autoPtr<psiCombustionModel>(cstrIter()(className, mesh, phaseName));
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -30,11 +30,12 @@ License
Foam::combustionModels::psiThermoCombustion::psiThermoCombustion Foam::combustionModels::psiThermoCombustion::psiThermoCombustion
( (
const word& modelType, const word& modelType,
const fvMesh& mesh const fvMesh& mesh,
const word& phaseName
) )
: :
psiCombustionModel(modelType, mesh), psiCombustionModel(modelType, mesh, phaseName),
thermoPtr_(psiReactionThermo::New(mesh)) thermoPtr_(psiReactionThermo::New(mesh, phaseName))
{} {}

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -75,8 +75,13 @@ public:
// Constructors // Constructors
//- Construct from components and thermo //- Construct from components
psiThermoCombustion(const word& modelType, const fvMesh& mesh); psiThermoCombustion
(
const word& modelType,
const fvMesh& mesh,
const word& phaseName
);
//- Destructor //- Destructor

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -30,11 +30,12 @@ License
Foam::combustionModels::rhoChemistryCombustion::rhoChemistryCombustion Foam::combustionModels::rhoChemistryCombustion::rhoChemistryCombustion
( (
const word& modelType, const word& modelType,
const fvMesh& mesh const fvMesh& mesh,
const word& phaseName
) )
: :
rhoCombustionModel(modelType, mesh), rhoCombustionModel(modelType, mesh, phaseName),
chemistryPtr_(rhoChemistryModel::New(mesh)) chemistryPtr_(rhoChemistryModel::New(mesh, phaseName))
{} {}

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -76,7 +76,12 @@ public:
// Constructors // Constructors
//- Construct from components and thermo //- Construct from components and thermo
rhoChemistryCombustion(const word& modelType, const fvMesh& mesh); rhoChemistryCombustion
(
const word& modelType,
const fvMesh& mesh,
const word& phaseName
);
//- Destructor //- Destructor

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -38,14 +38,14 @@ namespace combustionModels
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::combustionModels::rhoCombustionModel::rhoCombustionModel Foam::combustionModels::rhoCombustionModel::rhoCombustionModel
( (
const word& modelType, const word& modelType,
const fvMesh& mesh const fvMesh& mesh,
const word& phaseName
) )
: :
combustionModel(modelType, mesh) combustionModel(modelType, mesh, phaseName)
{} {}

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -81,22 +81,32 @@ public:
dictionary, dictionary,
( (
const word& modelType, const word& modelType,
const fvMesh& mesh const fvMesh& mesh,
const word& phaseName
), ),
(modelType, mesh) (modelType, mesh, phaseName)
); );
// Constructors // Constructors
//- Construct from components and thermo //- Construct from components
rhoCombustionModel(const word& modelType, const fvMesh& mesh); rhoCombustionModel
(
const word& modelType,
const fvMesh& mesh,
const word& phaseName
);
//- Selector //- Selector
static autoPtr<rhoCombustionModel> New(const fvMesh& mesh); static autoPtr<rhoCombustionModel> New
(
const fvMesh& mesh,
const word& phaseName=word::null
);
//- Destructor //- Destructor
@ -121,7 +131,7 @@ public:
virtual tmp<volScalarField> rho() const = 0; virtual tmp<volScalarField> rho() const = 0;
// I-O // IO
//- Update properties from given dictionary //- Update properties from given dictionary
virtual bool read(); virtual bool read();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -30,7 +30,8 @@ License
Foam::autoPtr<Foam::combustionModels::rhoCombustionModel> Foam::autoPtr<Foam::combustionModels::rhoCombustionModel>
Foam::combustionModels::rhoCombustionModel::New Foam::combustionModels::rhoCombustionModel::New
( (
const fvMesh& mesh const fvMesh& mesh,
const word& phaseName
) )
{ {
const word combTypeName const word combTypeName
@ -39,7 +40,7 @@ Foam::combustionModels::rhoCombustionModel::New
( (
IOobject IOobject
( (
"combustionProperties", IOobject::groupName("combustionProperties", phaseName),
mesh.time().constant(), mesh.time().constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ,
@ -70,7 +71,7 @@ Foam::combustionModels::rhoCombustionModel::New
const word className = combTypeName(0, tempOpen); const word className = combTypeName(0, tempOpen);
return autoPtr<rhoCombustionModel> (cstrIter()(className, mesh)); return autoPtr<rhoCombustionModel> (cstrIter()(className, mesh, phaseName));
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -30,11 +30,12 @@ License
Foam::combustionModels::rhoThermoCombustion::rhoThermoCombustion Foam::combustionModels::rhoThermoCombustion::rhoThermoCombustion
( (
const word& modelType, const word& modelType,
const fvMesh& mesh const fvMesh& mesh,
const word& phaseName
) )
: :
rhoCombustionModel(modelType, mesh), rhoCombustionModel(modelType, mesh, phaseName),
thermoPtr_(rhoReactionThermo::New(mesh)) thermoPtr_(rhoReactionThermo::New(mesh, phaseName))
{} {}

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -75,8 +75,13 @@ public:
// Constructors // Constructors
//- Construct from components and thermo //- Construct from components
rhoThermoCombustion(const word& modelType, const fvMesh& mesh); rhoThermoCombustion
(
const word& modelType,
const fvMesh& mesh,
const word& phaseName
);
//- Destructor //- Destructor

View File

@ -37,16 +37,17 @@ template<class CombThermoType, class ThermoType>
singleStepCombustion<CombThermoType, ThermoType>::singleStepCombustion singleStepCombustion<CombThermoType, ThermoType>::singleStepCombustion
( (
const word& modelType, const word& modelType,
const fvMesh& mesh const fvMesh& mesh,
const word& phaseName
) )
: :
CombThermoType(modelType, mesh), CombThermoType(modelType, mesh, phaseName),
singleMixturePtr_(NULL), singleMixturePtr_(NULL),
wFuel_ wFuel_
( (
IOobject IOobject
( (
"wFuel", IOobject::groupName("wFuel", phaseName),
this->mesh().time().timeName(), this->mesh().time().timeName(),
this->mesh(), this->mesh(),
IOobject::NO_READ, IOobject::NO_READ,
@ -74,6 +75,7 @@ singleStepCombustion<CombThermoType, ThermoType>::singleStepCombustion
"(" "("
"const word&, " "const word&, "
"const fvMesh& " "const fvMesh& "
"const word&"
")" ")"
) )
<< "Inconsistent thermo package for " << this->type() << " model:\n" << "Inconsistent thermo package for " << this->type() << " model:\n"
@ -108,7 +110,8 @@ tmp<fvScalarMatrix> singleStepCombustion<CombThermoType, ThermoType>::R
volScalarField& Y volScalarField& Y
) const ) const
{ {
const label specieI = this->thermoPtr_->composition().species()[Y.name()]; const label specieI =
this->thermoPtr_->composition().species()[Y.member()];
volScalarField wSpecie volScalarField wSpecie
( (
@ -152,7 +155,7 @@ singleStepCombustion<CombThermoType, ThermoType>::dQ() const
( (
IOobject IOobject
( (
"dQ", IOobject::groupName("dQ", this->phaseName_),
this->mesh_.time().timeName(), this->mesh_.time().timeName(),
this->mesh_, this->mesh_,
IOobject::NO_READ, IOobject::NO_READ,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -81,7 +81,12 @@ public:
// Constructors // Constructors
//- Construct from components //- Construct from components
singleStepCombustion(const word& modelType, const fvMesh& mesh); singleStepCombustion
(
const word& modelType,
const fvMesh& mesh,
const word& phaseName
);
//- Destructor //- Destructor
@ -102,7 +107,7 @@ public:
virtual tmp<volScalarField> Sh() const; virtual tmp<volScalarField> Sh() const;
// I-O // IO
//- Update properties from given dictionary //- Update properties from given dictionary
virtual bool read(); virtual bool read();

View File

@ -24,6 +24,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "perfectFluid.H" #include "perfectFluid.H"
#include "specie.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //