diff --git a/src/combustionModels/FSD/FSD.C b/src/combustionModels/FSD/FSD.C index 7717c73c70..9d79904cd4 100644 --- a/src/combustionModels/FSD/FSD.C +++ b/src/combustionModels/FSD/FSD.C @@ -40,10 +40,16 @@ template FSD::FSD ( const word& modelType, - const fvMesh& mesh + const fvMesh& mesh, + const word& phaseName ) : - singleStepCombustion(modelType, mesh), + singleStepCombustion + ( + modelType, + mesh, + phaseName + ), reactionRateFlameArea_ ( reactionRateFlameArea::New @@ -57,7 +63,7 @@ FSD::FSD ( IOobject ( - "ft", + IOobject::groupName("ft", phaseName), this->mesh().time().timeName(), this->mesh(), IOobject::NO_READ, @@ -144,7 +150,7 @@ void FSD::calculateSourceNorm() ( IOobject ( - "Pc", + IOobject::groupName("Pc", this->phaseName_), U.time().timeName(), U.db(), IOobject::NO_READ, @@ -163,7 +169,7 @@ void FSD::calculateSourceNorm() ( IOobject ( - "omegaFuelBar", + IOobject::groupName("omegaFuelBar", this->phaseName_), U.time().timeName(), U.db(), IOobject::NO_READ, @@ -291,7 +297,7 @@ void FSD::calculateSourceNorm() ( IOobject ( - "products", + IOobject::groupName("products", this->phaseName_), U.time().timeName(), U.db(), IOobject::NO_READ, diff --git a/src/combustionModels/FSD/FSD.H b/src/combustionModels/FSD/FSD.H index f9156edcbd..6e3609abdb 100644 --- a/src/combustionModels/FSD/FSD.H +++ b/src/combustionModels/FSD/FSD.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -136,7 +136,7 @@ public: // Constructors //- Construct from components - FSD(const word& modelType, const fvMesh& mesh); + FSD(const word& modelType, const fvMesh& mesh, const word& phaseName); // Destructor @@ -149,7 +149,7 @@ public: virtual void correct(); - // I-O + // IO //- Update properties virtual bool read(); diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C b/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C index 1ff3208491..2a5cbbd7da 100644 --- a/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C +++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -60,17 +60,18 @@ Foam::scalar Foam::consumptionSpeed::omega0Sigma scalar a ) const { - scalar omega0 = 0.0; - if (sigma < sigmaExt_) - { - omega0 = - max - ( - a*omega0_*(1.0 - exp(eta_*max(sigma, 0.0))), - omegaMin_ - ) ; - } - return omega0; + scalar omega0 = 0.0; + + if (sigma < sigmaExt_) + { + omega0 = max + ( + a*omega0_*(1.0 - exp(eta_*max(sigma, 0.0))), + omegaMin_ + ) ; + } + + return omega0; } @@ -137,4 +138,5 @@ void Foam::consumptionSpeed::read(const dictionary& dict) dict.lookup("omegaMin") >> omegaMin_; } + // ************************************************************************* // diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.H b/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.H index d56216903c..c7f35d0c7d 100644 --- a/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.H +++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -51,7 +51,6 @@ class consumptionSpeed { // Private Data - //- Maximum consumption speed scalar omega0_; @@ -122,7 +121,7 @@ public: } - // I-O + // IO //- Update properties void read(const dictionary& dict); diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.C b/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.C index bc9f4481a8..06dca4d56c 100644 --- a/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.C +++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -59,8 +59,7 @@ Foam::reactionRateFlameArea::reactionRateFlameArea ), mesh_ ) -{ -} +{} Foam::reactionRateFlameArea::reactionRateFlameArea @@ -87,8 +86,8 @@ Foam::reactionRateFlameArea::reactionRateFlameArea ), mesh_ ) -{ -} +{} + // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // @@ -101,8 +100,9 @@ Foam::reactionRateFlameArea::~reactionRateFlameArea() bool Foam::reactionRateFlameArea::read(const dictionary& dict) { dict.lookup("fuel") >> fuel_; - return true; + return true; } + // ************************************************************************* // diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.H b/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.H index b647997dda..33cead008c 100644 --- a/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.H +++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -103,7 +103,7 @@ public: virtual void correct(const volScalarField& sigma); - // I-O + // IO //- Update properties from given dictionary virtual bool read(const dictionary& dictProperties); diff --git a/src/combustionModels/PaSR/PaSR.C b/src/combustionModels/PaSR/PaSR.C index 9e14ce1d27..581e155671 100644 --- a/src/combustionModels/PaSR/PaSR.C +++ b/src/combustionModels/PaSR/PaSR.C @@ -32,17 +32,18 @@ template Foam::combustionModels::PaSR::PaSR ( const word& modelType, - const fvMesh& mesh + const fvMesh& mesh, + const word& phaseName ) : - laminar(modelType, mesh), + laminar(modelType, mesh, phaseName), Cmix_(readScalar(this->coeffs().lookup("Cmix"))), turbulentReaction_(this->coeffs().lookup("turbulentReaction")), kappa_ ( IOobject ( - "PaSR:kappa", + IOobject::groupName("PaSR:kappa", phaseName), mesh.time().timeName(), mesh, IOobject::NO_READ, @@ -116,11 +117,14 @@ template Foam::tmp Foam::combustionModels::PaSR::dQ() const { - return - tmp + return tmp + ( + new volScalarField ( - new volScalarField("PaSR:dQ", kappa_*laminar::dQ()) - ); + IOobject::groupName("PaSR:dQ", this->phaseName_), + kappa_*laminar::dQ() + ) + ); } @@ -128,11 +132,14 @@ template Foam::tmp Foam::combustionModels::PaSR::Sh() const { - return - tmp + return tmp + ( + new volScalarField ( - new volScalarField("PaSR:Sh", kappa_*laminar::Sh()) - ); + IOobject::groupName("PaSR:Sh", this->phaseName_), + kappa_*laminar::Sh() + ) + ); } diff --git a/src/combustionModels/PaSR/PaSR.H b/src/combustionModels/PaSR/PaSR.H index 7ca8a51074..f0d8344af1 100644 --- a/src/combustionModels/PaSR/PaSR.H +++ b/src/combustionModels/PaSR/PaSR.H @@ -86,7 +86,7 @@ public: // Constructors //- Construct from components - PaSR(const word& modelType, const fvMesh& mesh); + PaSR(const word& modelType, const fvMesh& mesh, const word& phaseName); //- Destructor @@ -110,7 +110,7 @@ public: virtual tmp Sh() const; - // I-O + // IO //- Update properties from given dictionary virtual bool read(); diff --git a/src/combustionModels/combustionModel/combustionModel.C b/src/combustionModels/combustionModel/combustionModel.C index 35bcec380c..21e81beb91 100644 --- a/src/combustionModels/combustionModel/combustionModel.C +++ b/src/combustionModels/combustionModel/combustionModel.C @@ -37,14 +37,15 @@ namespace Foam Foam::combustionModel::combustionModel ( const word& modelType, - const fvMesh& mesh + const fvMesh& mesh, + const word& phaseName ) : IOdictionary ( IOobject ( - "combustionProperties", + IOobject::groupName("combustionProperties", phaseName), mesh.time().constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, @@ -55,7 +56,8 @@ Foam::combustionModel::combustionModel mesh_(mesh), active_(lookupOrDefault("active", true)), coeffs_(subDict(modelType + "Coeffs")), - modelType_(modelType) + modelType_(modelType), + phaseName_(phaseName) {} @@ -96,7 +98,7 @@ Foam::tmp Foam::combustionModel::Sh() const ( IOobject ( - "Sh", + IOobject::groupName("Sh", phaseName_), mesh_.time().timeName(), mesh_, IOobject::NO_READ, diff --git a/src/combustionModels/combustionModel/combustionModel.H b/src/combustionModels/combustionModel/combustionModel.H index f46072820d..7c30881fd2 100644 --- a/src/combustionModels/combustionModel/combustionModel.H +++ b/src/combustionModels/combustionModel/combustionModel.H @@ -51,6 +51,14 @@ class combustionModel : public IOdictionary { + // Private Member Functions + + //- Disallow copy construct + combustionModel(const combustionModel&); + + //- Disallow default bitwise assignment + void operator=(const combustionModel&); + protected: @@ -68,19 +76,11 @@ protected: //- Dictionary of the model dictionary coeffs_; - //- Model name + //- Model type const word modelType_; - -private: - - // Private Member Functions - - //- Disallow copy construct - combustionModel(const combustionModel&); - - //- Disallow default bitwise assignment - void operator=(const combustionModel&); + //- Phase name + const word phaseName_; public: @@ -91,9 +91,13 @@ public: // Constructors - //- Construct from components - combustionModel(const word& modelType, const fvMesh& mesh); + combustionModel + ( + const word& modelType, + const fvMesh& mesh, + const word& phaseName=word::null + ); //- Destructor @@ -104,7 +108,6 @@ public: // Access - //- Return const access to the mesh database inline const fvMesh& mesh() const; @@ -145,7 +148,7 @@ public: virtual tmp Sh() const; - // I-O + // IO //- Update properties from given dictionary virtual bool read(); diff --git a/src/combustionModels/diffusion/diffusion.C b/src/combustionModels/diffusion/diffusion.C index 387dbe90e1..f78194cc49 100644 --- a/src/combustionModels/diffusion/diffusion.C +++ b/src/combustionModels/diffusion/diffusion.C @@ -36,10 +36,17 @@ namespace combustionModels template diffusion::diffusion ( - const word& modelType, const fvMesh& mesh + const word& modelType, + const fvMesh& mesh, + const word& phaseName ) : - singleStepCombustion(modelType, mesh), + singleStepCombustion + ( + modelType, + mesh, + phaseName + ), C_(readScalar(this->coeffs().lookup("C"))), oxidantName_(this->coeffs().template lookupOrDefault("oxidant", "O2")) {} diff --git a/src/combustionModels/diffusion/diffusion.H b/src/combustionModels/diffusion/diffusion.H index add1a643a4..b2a3516188 100644 --- a/src/combustionModels/diffusion/diffusion.H +++ b/src/combustionModels/diffusion/diffusion.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -82,7 +82,12 @@ public: // Constructors //- Construct from components - diffusion(const word& modelType, const fvMesh& mesh); + diffusion + ( + const word& modelType, + const fvMesh& mesh, + const word& phaseName + ); //- Destructor @@ -97,7 +102,7 @@ public: virtual void correct(); - // I-O + // IO //- Update properties virtual bool read(); diff --git a/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C b/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C index c7ab4ef736..6262682618 100644 --- a/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C +++ b/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C @@ -35,10 +35,17 @@ namespace combustionModels template infinitelyFastChemistry::infinitelyFastChemistry ( - const word& modelType, const fvMesh& mesh + const word& modelType, + const fvMesh& mesh, + const word& phaseName ) : - singleStepCombustion(modelType, mesh), + singleStepCombustion + ( + modelType, + mesh, + phaseName + ), C_(readScalar(this->coeffs().lookup("C"))) {} diff --git a/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.H b/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.H index 0e10e9347e..69fb847e26 100644 --- a/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.H +++ b/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -79,7 +79,12 @@ public: // Constructors //- Construct from components - infinitelyFastChemistry(const word& modelType, const fvMesh& mesh); + infinitelyFastChemistry + ( + const word& modelType, + const fvMesh& mesh, + const word& phaseName + ); //- Destructor @@ -94,7 +99,7 @@ public: virtual void correct(); - // I-O + // IO //- Update properties virtual bool read(); diff --git a/src/combustionModels/laminar/laminar.C b/src/combustionModels/laminar/laminar.C index 07bffa5c4c..7203a715e8 100644 --- a/src/combustionModels/laminar/laminar.C +++ b/src/combustionModels/laminar/laminar.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,10 +33,11 @@ template Foam::combustionModels::laminar::laminar ( const word& modelType, - const fvMesh& mesh + const fvMesh& mesh, + const word& phaseName ) : - Type(modelType, mesh), + Type(modelType, mesh, phaseName), integrateReactionRate_ ( this->coeffs().lookupOrDefault("integrateReactionRate", true) @@ -128,7 +129,8 @@ Foam::combustionModels::laminar::R(volScalarField& Y) const 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); } @@ -147,7 +149,7 @@ Foam::combustionModels::laminar::dQ() const ( IOobject ( - typeName + ":dQ", + IOobject::groupName(typeName + ":dQ", this->phaseName_), this->mesh().time().timeName(), this->mesh(), IOobject::NO_READ, @@ -179,7 +181,7 @@ Foam::combustionModels::laminar::Sh() const ( IOobject ( - typeName + ":Sh", + IOobject::groupName(typeName + ":Sh", this->phaseName_), this->mesh().time().timeName(), this->mesh(), IOobject::NO_READ, diff --git a/src/combustionModels/laminar/laminar.H b/src/combustionModels/laminar/laminar.H index b756843394..6abd8978fa 100644 --- a/src/combustionModels/laminar/laminar.H +++ b/src/combustionModels/laminar/laminar.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -84,7 +84,12 @@ public: // Constructors //- Construct from components - laminar(const word& modelType, const fvMesh& mesh); + laminar + ( + const word& modelType, + const fvMesh& mesh, + const word& phaseName + ); //- Destructor @@ -108,7 +113,7 @@ public: virtual tmp Sh() const; - // I-O + // IO //- Update properties from given dictionary virtual bool read(); diff --git a/src/combustionModels/noCombustion/noCombustion.C b/src/combustionModels/noCombustion/noCombustion.C index 3699bd751a..838edd169c 100644 --- a/src/combustionModels/noCombustion/noCombustion.C +++ b/src/combustionModels/noCombustion/noCombustion.C @@ -32,10 +32,11 @@ template Foam::combustionModels::noCombustion::noCombustion ( 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::dQ() const ( IOobject ( - "dQ", + IOobject::groupName("dQ", this->phaseName_), this->mesh().time().timeName(), this->mesh(), IOobject::NO_READ, @@ -108,7 +109,7 @@ Foam::combustionModels::noCombustion::Sh() const ( IOobject ( - "Sh", + IOobject::groupName("Sh", this->phaseName_), this->mesh().time().timeName(), this->mesh(), IOobject::NO_READ, diff --git a/src/combustionModels/noCombustion/noCombustion.H b/src/combustionModels/noCombustion/noCombustion.H index 835317268c..1a93461c39 100644 --- a/src/combustionModels/noCombustion/noCombustion.H +++ b/src/combustionModels/noCombustion/noCombustion.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -71,7 +71,8 @@ public: noCombustion ( 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] virtual tmp Sh() const; - // I-O + // IO //- Update properties from given dictionary virtual bool read(); diff --git a/src/combustionModels/psiCombustionModel/psiChemistryCombustion/psiChemistryCombustion.C b/src/combustionModels/psiCombustionModel/psiChemistryCombustion/psiChemistryCombustion.C index dc59186040..be0ccfabfb 100644 --- a/src/combustionModels/psiCombustionModel/psiChemistryCombustion/psiChemistryCombustion.C +++ b/src/combustionModels/psiCombustionModel/psiChemistryCombustion/psiChemistryCombustion.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -30,11 +30,12 @@ License Foam::combustionModels::psiChemistryCombustion::psiChemistryCombustion ( const word& modelType, - const fvMesh& mesh + const fvMesh& mesh, + const word& phaseName ) : - psiCombustionModel(modelType, mesh), - chemistryPtr_(psiChemistryModel::New(mesh)) + psiCombustionModel(modelType, mesh, phaseName), + chemistryPtr_(psiChemistryModel::New(mesh, phaseName)) {} diff --git a/src/combustionModels/psiCombustionModel/psiChemistryCombustion/psiChemistryCombustion.H b/src/combustionModels/psiCombustionModel/psiChemistryCombustion/psiChemistryCombustion.H index 81c7a91139..e3725d35d3 100644 --- a/src/combustionModels/psiCombustionModel/psiChemistryCombustion/psiChemistryCombustion.H +++ b/src/combustionModels/psiCombustionModel/psiChemistryCombustion/psiChemistryCombustion.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -76,7 +76,12 @@ public: // Constructors //- Construct from components and thermo - psiChemistryCombustion(const word& modelType, const fvMesh& mesh); + psiChemistryCombustion + ( + const word& modelType, + const fvMesh& mesh, + const word& phaseName + ); //- Destructor diff --git a/src/combustionModels/psiCombustionModel/psiCombustionModel/psiCombustionModel.C b/src/combustionModels/psiCombustionModel/psiCombustionModel/psiCombustionModel.C index 287f102101..1ecc201dd3 100644 --- a/src/combustionModels/psiCombustionModel/psiCombustionModel/psiCombustionModel.C +++ b/src/combustionModels/psiCombustionModel/psiCombustionModel/psiCombustionModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -41,10 +41,11 @@ namespace combustionModels Foam::combustionModels::psiCombustionModel::psiCombustionModel ( const word& modelType, - const fvMesh& mesh + const fvMesh& mesh, + const word& phaseName ) : - combustionModel(modelType, mesh) + combustionModel(modelType, mesh, phaseName) {} diff --git a/src/combustionModels/psiCombustionModel/psiCombustionModel/psiCombustionModel.H b/src/combustionModels/psiCombustionModel/psiCombustionModel/psiCombustionModel.H index 0206a5e70c..64c5234bfc 100644 --- a/src/combustionModels/psiCombustionModel/psiCombustionModel/psiCombustionModel.H +++ b/src/combustionModels/psiCombustionModel/psiCombustionModel/psiCombustionModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -81,21 +81,31 @@ public: dictionary, ( const word& modelType, - const fvMesh& mesh + const fvMesh& mesh, + const word& phaseName ), - (modelType, mesh) + (modelType, mesh, phaseName) ); // Constructors - //- Construct from components and thermo - psiCombustionModel(const word& modelType, const fvMesh& mesh); + //- Construct from components + psiCombustionModel + ( + const word& modelType, + const fvMesh& mesh, + const word& phaseName + ); //- Selector - static autoPtr New(const fvMesh& mesh); + static autoPtr New + ( + const fvMesh& mesh, + const word& phaseName=word::null + ); //- Destructor @@ -114,7 +124,7 @@ public: virtual tmp rho() const = 0; - // I-O + // IO //- Update properties from given dictionary virtual bool read(); diff --git a/src/combustionModels/psiCombustionModel/psiCombustionModel/psiCombustionModelNew.C b/src/combustionModels/psiCombustionModel/psiCombustionModel/psiCombustionModelNew.C index b3ca2cc74b..42a000e187 100644 --- a/src/combustionModels/psiCombustionModel/psiCombustionModel/psiCombustionModelNew.C +++ b/src/combustionModels/psiCombustionModel/psiCombustionModel/psiCombustionModelNew.C @@ -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-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -30,7 +30,8 @@ License Foam::autoPtr Foam::combustionModels::psiCombustionModel::New ( - const fvMesh& mesh + const fvMesh& mesh, + const word& phaseName ) { const word combModelName @@ -39,7 +40,7 @@ Foam::combustionModels::psiCombustionModel::New ( IOobject ( - "combustionProperties", + IOobject::groupName("combustionProperties", phaseName), mesh.time().constant(), mesh, IOobject::MUST_READ, @@ -70,7 +71,7 @@ Foam::combustionModels::psiCombustionModel::New const word className = combModelName(0, tempOpen); - return autoPtr(cstrIter()(className, mesh)); + return autoPtr(cstrIter()(className, mesh, phaseName)); } diff --git a/src/combustionModels/psiCombustionModel/psiThermoCombustion/psiThermoCombustion.C b/src/combustionModels/psiCombustionModel/psiThermoCombustion/psiThermoCombustion.C index 89a4a5daa7..6d45d60ef5 100644 --- a/src/combustionModels/psiCombustionModel/psiThermoCombustion/psiThermoCombustion.C +++ b/src/combustionModels/psiCombustionModel/psiThermoCombustion/psiThermoCombustion.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -30,11 +30,12 @@ License Foam::combustionModels::psiThermoCombustion::psiThermoCombustion ( const word& modelType, - const fvMesh& mesh + const fvMesh& mesh, + const word& phaseName ) : - psiCombustionModel(modelType, mesh), - thermoPtr_(psiReactionThermo::New(mesh)) + psiCombustionModel(modelType, mesh, phaseName), + thermoPtr_(psiReactionThermo::New(mesh, phaseName)) {} diff --git a/src/combustionModels/psiCombustionModel/psiThermoCombustion/psiThermoCombustion.H b/src/combustionModels/psiCombustionModel/psiThermoCombustion/psiThermoCombustion.H index 8a294718a3..44a55155ad 100644 --- a/src/combustionModels/psiCombustionModel/psiThermoCombustion/psiThermoCombustion.H +++ b/src/combustionModels/psiCombustionModel/psiThermoCombustion/psiThermoCombustion.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -75,8 +75,13 @@ public: // Constructors - //- Construct from components and thermo - psiThermoCombustion(const word& modelType, const fvMesh& mesh); + //- Construct from components + psiThermoCombustion + ( + const word& modelType, + const fvMesh& mesh, + const word& phaseName + ); //- Destructor diff --git a/src/combustionModels/rhoCombustionModel/rhoChemistryCombustion/rhoChemistryCombustion.C b/src/combustionModels/rhoCombustionModel/rhoChemistryCombustion/rhoChemistryCombustion.C index 22495abb4a..70ce698d7b 100644 --- a/src/combustionModels/rhoCombustionModel/rhoChemistryCombustion/rhoChemistryCombustion.C +++ b/src/combustionModels/rhoCombustionModel/rhoChemistryCombustion/rhoChemistryCombustion.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -30,11 +30,12 @@ License Foam::combustionModels::rhoChemistryCombustion::rhoChemistryCombustion ( const word& modelType, - const fvMesh& mesh + const fvMesh& mesh, + const word& phaseName ) : - rhoCombustionModel(modelType, mesh), - chemistryPtr_(rhoChemistryModel::New(mesh)) + rhoCombustionModel(modelType, mesh, phaseName), + chemistryPtr_(rhoChemistryModel::New(mesh, phaseName)) {} diff --git a/src/combustionModels/rhoCombustionModel/rhoChemistryCombustion/rhoChemistryCombustion.H b/src/combustionModels/rhoCombustionModel/rhoChemistryCombustion/rhoChemistryCombustion.H index 7010cb5389..2a37812e05 100644 --- a/src/combustionModels/rhoCombustionModel/rhoChemistryCombustion/rhoChemistryCombustion.H +++ b/src/combustionModels/rhoCombustionModel/rhoChemistryCombustion/rhoChemistryCombustion.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -76,7 +76,12 @@ public: // Constructors //- Construct from components and thermo - rhoChemistryCombustion(const word& modelType, const fvMesh& mesh); + rhoChemistryCombustion + ( + const word& modelType, + const fvMesh& mesh, + const word& phaseName + ); //- Destructor diff --git a/src/combustionModels/rhoCombustionModel/rhoCombustionModel/rhoCombustionModel.C b/src/combustionModels/rhoCombustionModel/rhoCombustionModel/rhoCombustionModel.C index 55655caeeb..531b169d7d 100644 --- a/src/combustionModels/rhoCombustionModel/rhoCombustionModel/rhoCombustionModel.C +++ b/src/combustionModels/rhoCombustionModel/rhoCombustionModel/rhoCombustionModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -38,14 +38,14 @@ namespace combustionModels // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - Foam::combustionModels::rhoCombustionModel::rhoCombustionModel ( const word& modelType, - const fvMesh& mesh + const fvMesh& mesh, + const word& phaseName ) : - combustionModel(modelType, mesh) + combustionModel(modelType, mesh, phaseName) {} diff --git a/src/combustionModels/rhoCombustionModel/rhoCombustionModel/rhoCombustionModel.H b/src/combustionModels/rhoCombustionModel/rhoCombustionModel/rhoCombustionModel.H index 04cf1f56ab..341b5b6dcd 100644 --- a/src/combustionModels/rhoCombustionModel/rhoCombustionModel/rhoCombustionModel.H +++ b/src/combustionModels/rhoCombustionModel/rhoCombustionModel/rhoCombustionModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -81,22 +81,32 @@ public: dictionary, ( const word& modelType, - const fvMesh& mesh + const fvMesh& mesh, + const word& phaseName ), - (modelType, mesh) + (modelType, mesh, phaseName) ); // Constructors - //- Construct from components and thermo - rhoCombustionModel(const word& modelType, const fvMesh& mesh); + //- Construct from components + rhoCombustionModel + ( + const word& modelType, + const fvMesh& mesh, + const word& phaseName + ); //- Selector - static autoPtr New(const fvMesh& mesh); + static autoPtr New + ( + const fvMesh& mesh, + const word& phaseName=word::null + ); //- Destructor @@ -121,7 +131,7 @@ public: virtual tmp rho() const = 0; - // I-O + // IO //- Update properties from given dictionary virtual bool read(); diff --git a/src/combustionModels/rhoCombustionModel/rhoCombustionModel/rhoCombustionModelNew.C b/src/combustionModels/rhoCombustionModel/rhoCombustionModel/rhoCombustionModelNew.C index 71de8ee57a..2c94b39931 100644 --- a/src/combustionModels/rhoCombustionModel/rhoCombustionModel/rhoCombustionModelNew.C +++ b/src/combustionModels/rhoCombustionModel/rhoCombustionModel/rhoCombustionModelNew.C @@ -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-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -30,7 +30,8 @@ License Foam::autoPtr Foam::combustionModels::rhoCombustionModel::New ( - const fvMesh& mesh + const fvMesh& mesh, + const word& phaseName ) { const word combTypeName @@ -39,7 +40,7 @@ Foam::combustionModels::rhoCombustionModel::New ( IOobject ( - "combustionProperties", + IOobject::groupName("combustionProperties", phaseName), mesh.time().constant(), mesh, IOobject::MUST_READ, @@ -70,7 +71,7 @@ Foam::combustionModels::rhoCombustionModel::New const word className = combTypeName(0, tempOpen); - return autoPtr (cstrIter()(className, mesh)); + return autoPtr (cstrIter()(className, mesh, phaseName)); } diff --git a/src/combustionModels/rhoCombustionModel/rhoThermoCombustion/rhoThermoCombustion.C b/src/combustionModels/rhoCombustionModel/rhoThermoCombustion/rhoThermoCombustion.C index da06dfda61..ef95710f2a 100644 --- a/src/combustionModels/rhoCombustionModel/rhoThermoCombustion/rhoThermoCombustion.C +++ b/src/combustionModels/rhoCombustionModel/rhoThermoCombustion/rhoThermoCombustion.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -30,11 +30,12 @@ License Foam::combustionModels::rhoThermoCombustion::rhoThermoCombustion ( const word& modelType, - const fvMesh& mesh + const fvMesh& mesh, + const word& phaseName ) : - rhoCombustionModel(modelType, mesh), - thermoPtr_(rhoReactionThermo::New(mesh)) + rhoCombustionModel(modelType, mesh, phaseName), + thermoPtr_(rhoReactionThermo::New(mesh, phaseName)) {} diff --git a/src/combustionModels/rhoCombustionModel/rhoThermoCombustion/rhoThermoCombustion.H b/src/combustionModels/rhoCombustionModel/rhoThermoCombustion/rhoThermoCombustion.H index 1a14440606..6982569fa6 100644 --- a/src/combustionModels/rhoCombustionModel/rhoThermoCombustion/rhoThermoCombustion.H +++ b/src/combustionModels/rhoCombustionModel/rhoThermoCombustion/rhoThermoCombustion.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -75,8 +75,13 @@ public: // Constructors - //- Construct from components and thermo - rhoThermoCombustion(const word& modelType, const fvMesh& mesh); + //- Construct from components + rhoThermoCombustion + ( + const word& modelType, + const fvMesh& mesh, + const word& phaseName + ); //- Destructor diff --git a/src/combustionModels/singleStepCombustion/singleStepCombustion.C b/src/combustionModels/singleStepCombustion/singleStepCombustion.C index 5954bf1b93..65a41fcada 100644 --- a/src/combustionModels/singleStepCombustion/singleStepCombustion.C +++ b/src/combustionModels/singleStepCombustion/singleStepCombustion.C @@ -37,16 +37,17 @@ template singleStepCombustion::singleStepCombustion ( const word& modelType, - const fvMesh& mesh + const fvMesh& mesh, + const word& phaseName ) : - CombThermoType(modelType, mesh), + CombThermoType(modelType, mesh, phaseName), singleMixturePtr_(NULL), wFuel_ ( IOobject ( - "wFuel", + IOobject::groupName("wFuel", phaseName), this->mesh().time().timeName(), this->mesh(), IOobject::NO_READ, @@ -73,7 +74,8 @@ singleStepCombustion::singleStepCombustion "singleStepCombustion" "(" "const word&, " - "const fvMesh&" + "const fvMesh& " + "const word&" ")" ) << "Inconsistent thermo package for " << this->type() << " model:\n" @@ -108,7 +110,8 @@ tmp singleStepCombustion::R volScalarField& Y ) const { - const label specieI = this->thermoPtr_->composition().species()[Y.name()]; + const label specieI = + this->thermoPtr_->composition().species()[Y.member()]; volScalarField wSpecie ( @@ -152,7 +155,7 @@ singleStepCombustion::dQ() const ( IOobject ( - "dQ", + IOobject::groupName("dQ", this->phaseName_), this->mesh_.time().timeName(), this->mesh_, IOobject::NO_READ, diff --git a/src/combustionModels/singleStepCombustion/singleStepCombustion.H b/src/combustionModels/singleStepCombustion/singleStepCombustion.H index cafa24f6d3..6fd81ea098 100644 --- a/src/combustionModels/singleStepCombustion/singleStepCombustion.H +++ b/src/combustionModels/singleStepCombustion/singleStepCombustion.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -81,7 +81,12 @@ public: // Constructors //- Construct from components - singleStepCombustion(const word& modelType, const fvMesh& mesh); + singleStepCombustion + ( + const word& modelType, + const fvMesh& mesh, + const word& phaseName + ); //- Destructor @@ -102,7 +107,7 @@ public: virtual tmp Sh() const; - // I-O + // IO //- Update properties from given dictionary virtual bool read(); diff --git a/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluidI.H b/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluidI.H index 1de935d350..338807ad02 100644 --- a/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluidI.H +++ b/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluidI.H @@ -24,6 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "perfectFluid.H" +#include "specie.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //