From eeedf5a05150047e04151e297fcf2e9750373fbc Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 18 Feb 2015 21:21:22 +0000 Subject: [PATCH] Thermodyamics: Add support for multiphase Pass the phase-name through hierarchy Add phase-name to variables Split basicCombustionMixture Update applications accordingly --- .../coalChemistryFoam/createFields.H | 2 +- .../reactingParcelFilmFoam/createFields.H | 2 +- .../reactingParcelFoam/createFields.H | 2 +- .../simpleReactingParcelFoam/createFields.H | 2 +- .../lagrangian/sprayFoam/createFields.H | 2 +- .../CompositionModel/CompositionModel.C | 5 +- .../CompositionModel/CompositionModel.H | 2 +- .../SLGThermo/SLGThermo/SLGThermo.C | 12 +- .../SLGThermo/SLGThermo/SLGThermo.H | 8 +- .../basic/heThermo/heThermo.C | 4 +- .../mixtures/basicMixture/basicMixture.H | 6 +- .../basic/mixtures/pureMixture/pureMixture.C | 20 +- .../basic/mixtures/pureMixture/pureMixture.H | 6 +- .../basicChemistryModel/basicChemistryModel.C | 12 +- .../basicChemistryModel/basicChemistryModel.H | 12 +- .../basicChemistryModelTemplates.C | 13 +- .../chemistryModel/chemistryModel.C | 9 +- .../chemistryModel/chemistryModel.H | 8 +- .../psiChemistryModel/psiChemistryModel.C | 14 +- .../psiChemistryModel/psiChemistryModel.H | 16 +- .../rhoChemistryModel/rhoChemistryModel.C | 14 +- .../rhoChemistryModel/rhoChemistryModel.H | 18 +- .../EulerImplicit/EulerImplicit.C | 7 +- .../EulerImplicit/EulerImplicit.H | 6 +- .../chemistrySolver/chemistrySolver.C | 7 +- .../chemistrySolver/chemistrySolver.H | 6 +- .../noChemistrySolver/noChemistrySolver.C | 7 +- .../noChemistrySolver/noChemistrySolver.H | 6 +- .../chemistryModel/chemistrySolver/ode/ode.C | 7 +- .../chemistryModel/chemistrySolver/ode/ode.H | 6 +- .../greyMeanAbsorptionEmission.C | 8 +- .../greyMeanSolidAbsorptionEmission.C | 4 +- .../greyMeanSolidAbsorptionEmission.H | 4 +- .../mixtureFractionSoot/mixtureFractionSoot.C | 10 +- .../reactionThermo/Make/files | 2 + .../mixtures/SpecieMixture/SpecieMixture.C | 9 +- .../mixtures/SpecieMixture/SpecieMixture.H | 12 +- .../basicCombustionMixture.C | 50 +++++ .../basicCombustionMixture.H | 105 +++++++++ .../basicCombustionMixtureI.H} | 25 ++- .../basicMultiComponentMixture.C | 21 +- .../basicMultiComponentMixture.H | 145 ++---------- .../basicMultiComponentMixtureI.H | 29 +-- .../basicSpecieMixture/basicSpecieMixture.C | 84 +++++++ .../basicSpecieMixture/basicSpecieMixture.H | 209 ++++++++++++++++++ .../mixtures/egrMixture/egrMixture.C | 20 +- .../mixtures/egrMixture/egrMixture.H | 12 +- .../homogeneousMixture/homogeneousMixture.C | 18 +- .../homogeneousMixture/homogeneousMixture.H | 12 +- .../inhomogeneousMixture.C | 25 ++- .../inhomogeneousMixture.H | 12 +- .../multiComponentMixture.C | 18 +- .../multiComponentMixture.H | 16 +- .../reactingMixture/reactingMixture.C | 8 +- .../reactingMixture/reactingMixture.H | 6 +- .../singleStepReactingMixture.C | 59 ++--- .../singleStepReactingMixture.H | 11 +- .../veryInhomogeneousMixture.C | 26 ++- .../veryInhomogeneousMixture.H | 17 +- .../psiReactionThermo/psiReactionThermo.H | 8 +- .../rhoReactionThermo/rhoReactionThermo.H | 8 +- .../basicSolidChemistryModel.C | 11 +- .../basicSolidChemistryModel.H | 18 +- .../basicSolidChemistryModelNew.C | 9 +- .../pyrolysisChemistryModel.C | 5 +- .../pyrolysisChemistryModel.H | 6 +- .../solidChemistryModel/solidChemistryModel.C | 7 +- .../solidChemistryModel/solidChemistryModel.H | 6 +- .../solidReactionThermo/solidReactionThermo.H | 8 +- 69 files changed, 851 insertions(+), 453 deletions(-) create mode 100644 src/thermophysicalModels/reactionThermo/mixtures/basicCombustionMixture/basicCombustionMixture.C create mode 100644 src/thermophysicalModels/reactionThermo/mixtures/basicCombustionMixture/basicCombustionMixture.H rename src/thermophysicalModels/{basic/mixtures/basicMixture/basicMixture.C => reactionThermo/mixtures/basicCombustionMixture/basicCombustionMixtureI.H} (70%) create mode 100644 src/thermophysicalModels/reactionThermo/mixtures/basicSpecieMixture/basicSpecieMixture.C create mode 100644 src/thermophysicalModels/reactionThermo/mixtures/basicSpecieMixture/basicSpecieMixture.H diff --git a/applications/solvers/lagrangian/coalChemistryFoam/createFields.H b/applications/solvers/lagrangian/coalChemistryFoam/createFields.H index 1a45776ed4..52d736458c 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/createFields.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/createFields.H @@ -10,7 +10,7 @@ SLGThermo slgThermo(mesh, thermo); - basicMultiComponentMixture& composition = thermo.composition(); + basicSpecieMixture& composition = thermo.composition(); PtrList& Y = composition.Y(); const word inertSpecie(thermo.lookup("inertSpecie")); diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H index 057978c8f8..d3fffd0244 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H @@ -10,7 +10,7 @@ SLGThermo slgThermo(mesh, thermo); - basicMultiComponentMixture& composition = thermo.composition(); + basicSpecieMixture& composition = thermo.composition(); PtrList& Y = composition.Y(); const word inertSpecie(thermo.lookup("inertSpecie")); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFoam/createFields.H index 4dc0b1cfb9..4cb020cdfa 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/createFields.H @@ -10,7 +10,7 @@ SLGThermo slgThermo(mesh, thermo); - basicMultiComponentMixture& composition = thermo.composition(); + basicSpecieMixture& composition = thermo.composition(); PtrList& Y = composition.Y(); const word inertSpecie(thermo.lookup("inertSpecie")); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createFields.H index 7f84d791a7..541833ad10 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createFields.H @@ -10,7 +10,7 @@ SLGThermo slgThermo(mesh, thermo); - basicMultiComponentMixture& composition = thermo.composition(); + basicSpecieMixture& composition = thermo.composition(); PtrList& Y = composition.Y(); const word inertSpecie(thermo.lookup("inertSpecie")); diff --git a/applications/solvers/lagrangian/sprayFoam/createFields.H b/applications/solvers/lagrangian/sprayFoam/createFields.H index c2d4ae7f0f..0ad541a3fa 100644 --- a/applications/solvers/lagrangian/sprayFoam/createFields.H +++ b/applications/solvers/lagrangian/sprayFoam/createFields.H @@ -10,7 +10,7 @@ SLGThermo slgThermo(mesh, thermo); - basicMultiComponentMixture& composition = thermo.composition(); + basicSpecieMixture& composition = thermo.composition(); PtrList& Y = composition.Y(); const word inertSpecie(thermo.lookup("inertSpecie")); diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C index 1fbd847b79..0a6d8c11d0 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.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 @@ -85,7 +85,7 @@ const Foam::SLGThermo& Foam::CompositionModel::thermo() const template -const Foam::basicMultiComponentMixture& +const Foam::basicSpecieMixture& Foam::CompositionModel::carrier() const { return thermo_.carrier(); @@ -713,4 +713,3 @@ Foam::scalar Foam::CompositionModel::L #include "CompositionModelNew.C" // ************************************************************************* // - diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H index c786615bec..28c68e15da 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H @@ -138,7 +138,7 @@ public: // Composition lists //- Return the carrier components (wrapper function) - const basicMultiComponentMixture& carrier() const; + const basicSpecieMixture& carrier() const; //- Return the global (additional) liquids const liquidMixtureProperties& liquids() const; diff --git a/src/thermophysicalModels/SLGThermo/SLGThermo/SLGThermo.C b/src/thermophysicalModels/SLGThermo/SLGThermo/SLGThermo.C index 55fb47b25e..724120d790 100644 --- a/src/thermophysicalModels/SLGThermo/SLGThermo/SLGThermo.C +++ b/src/thermophysicalModels/SLGThermo/SLGThermo/SLGThermo.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 @@ -53,10 +53,10 @@ Foam::SLGThermo::SLGThermo(const fvMesh& mesh, fluidThermo& thermo) { Info<< "Creating component thermo properties:" << endl; - if (isA(thermo)) + if (isA(thermo)) { - basicMultiComponentMixture& mcThermo = - dynamic_cast(thermo); + basicSpecieMixture& mcThermo = + dynamic_cast(thermo); carrier_ = &mcThermo; Info<< " multi-component carrier - " << mcThermo.species().size() @@ -105,13 +105,13 @@ const Foam::fluidThermo& Foam::SLGThermo::thermo() const } -const Foam::basicMultiComponentMixture& Foam::SLGThermo::carrier() const +const Foam::basicSpecieMixture& Foam::SLGThermo::carrier() const { if (carrier_ == NULL) { FatalErrorIn ( - "const Foam::basicMultiComponentMixture& " + "const Foam::basicSpecieMixture& " "Foam::SLGThermo::carrier() const" ) << "carrier requested, but object is not allocated" << abort(FatalError); diff --git a/src/thermophysicalModels/SLGThermo/SLGThermo/SLGThermo.H b/src/thermophysicalModels/SLGThermo/SLGThermo/SLGThermo.H index e674ad4f32..33c9f38f55 100644 --- a/src/thermophysicalModels/SLGThermo/SLGThermo/SLGThermo.H +++ b/src/thermophysicalModels/SLGThermo/SLGThermo/SLGThermo.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 @@ -47,7 +47,7 @@ SourceFiles #include "regIOobject.H" #include "fluidThermo.H" -#include "basicMultiComponentMixture.H" +#include "basicSpecieMixture.H" #include "liquidMixtureProperties.H" #include "solidMixtureProperties.H" @@ -70,7 +70,7 @@ class SLGThermo fluidThermo& thermo_; //- Reference to the multi-component carrier phase thermo - basicMultiComponentMixture* carrier_; + basicSpecieMixture* carrier_; //- Additional liquid properties data autoPtr liquids_; @@ -102,7 +102,7 @@ public: const fluidThermo& thermo() const; //- Return reference to the gaseous components - const basicMultiComponentMixture& carrier() const; + const basicSpecieMixture& carrier() const; //- Return reference to the global (additional) liquids const liquidMixtureProperties& liquids() const; diff --git a/src/thermophysicalModels/basic/heThermo/heThermo.C b/src/thermophysicalModels/basic/heThermo/heThermo.C index 07a75f2c91..466640e151 100644 --- a/src/thermophysicalModels/basic/heThermo/heThermo.C +++ b/src/thermophysicalModels/basic/heThermo/heThermo.C @@ -89,7 +89,7 @@ Foam::heThermo::heThermo ) : BasicThermo(mesh, phaseName), - MixtureType(*this, mesh), + MixtureType(*this, mesh, phaseName), he_ ( @@ -123,7 +123,7 @@ Foam::heThermo::heThermo ) : BasicThermo(mesh, dict, phaseName), - MixtureType(*this, mesh), + MixtureType(*this, mesh, phaseName), he_ ( diff --git a/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixture.H b/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixture.H index 8d8ed84cb0..3f46d6e3f8 100644 --- a/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixture.H +++ b/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixture.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 @@ -58,8 +58,8 @@ public: // Constructors - //- Construct from dictionary and mesh - basicMixture(const dictionary&, const fvMesh&) + //- Construct from dictionary, mesh and phase name + basicMixture(const dictionary&, const fvMesh&, const word&) {} }; diff --git a/src/thermophysicalModels/basic/mixtures/pureMixture/pureMixture.C b/src/thermophysicalModels/basic/mixtures/pureMixture/pureMixture.C index bfd8ed2a8f..152eb5a008 100644 --- a/src/thermophysicalModels/basic/mixtures/pureMixture/pureMixture.C +++ b/src/thermophysicalModels/basic/mixtures/pureMixture/pureMixture.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 @@ -26,21 +26,17 @@ License #include "pureMixture.H" #include "fvMesh.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -pureMixture::pureMixture +Foam::pureMixture::pureMixture ( const dictionary& thermoDict, - const fvMesh& mesh + const fvMesh& mesh, + const word& phaseName ) : - basicMixture(thermoDict, mesh), + basicMixture(thermoDict, mesh, phaseName), mixture_(thermoDict.subDict("mixture")) {} @@ -48,14 +44,10 @@ pureMixture::pureMixture // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template -void pureMixture::read(const dictionary& thermoDict) +void Foam::pureMixture::read(const dictionary& thermoDict) { mixture_ = ThermoType(thermoDict.subDict("mixture")); } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/thermophysicalModels/basic/mixtures/pureMixture/pureMixture.H b/src/thermophysicalModels/basic/mixtures/pureMixture/pureMixture.H index 52978db2e5..95c61d4eeb 100644 --- a/src/thermophysicalModels/basic/mixtures/pureMixture/pureMixture.H +++ b/src/thermophysicalModels/basic/mixtures/pureMixture/pureMixture.H @@ -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 @@ -67,8 +67,8 @@ public: // Constructors - //- Construct from dictionary and mesh - pureMixture(const dictionary&, const fvMesh&); + //- Construct from dictionary, mesh and phase name + pureMixture(const dictionary&, const fvMesh&, const word&); // Member functions diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.C index 1182c22b92..3aae3999bc 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.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 @@ -44,13 +44,17 @@ void Foam::basicChemistryModel::correct() // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::basicChemistryModel::basicChemistryModel(const fvMesh& mesh) +Foam::basicChemistryModel::basicChemistryModel +( + const fvMesh& mesh, + const word& phaseName +) : IOdictionary ( IOobject ( - "chemistryProperties", + IOobject::groupName("chemistryProperties", phaseName), mesh.time().constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, @@ -64,7 +68,7 @@ Foam::basicChemistryModel::basicChemistryModel(const fvMesh& mesh) ( IOobject ( - "deltaTChem", + IOobject::groupName("deltaTChem", phaseName), mesh.time().constant(), mesh, IOobject::NO_READ, diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.H b/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.H index 89c28de489..9a2b4a56fa 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -104,14 +104,14 @@ public: // Constructors //- Construct from mesh - basicChemistryModel(const fvMesh& mesh); + basicChemistryModel(const fvMesh& mesh, const word& phaseName); // Selectors //- Generic New for each of the related chemistry model template - static autoPtr New(const fvMesh&); + static autoPtr New(const fvMesh& mesh, const word& phaseName); //- Destructor @@ -146,11 +146,11 @@ public: const label i ) = 0; - //- Return reaction rate of the specieI in reactionI + //- Return reaction rate of the speciei in reactioni virtual tmp > calculateRR ( - const label reactionI, - const label specieI + const label reactioni, + const label speciei ) const = 0; diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModelTemplates.C b/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModelTemplates.C index 7e20960210..bbabc14421 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModelTemplates.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModelTemplates.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 @@ -31,14 +31,15 @@ License template Foam::autoPtr Foam::basicChemistryModel::New ( - const fvMesh& mesh + const fvMesh& mesh, + const word& phaseName ) { IOdictionary chemistryDict ( IOobject ( - "chemistryProperties", + IOobject::groupName("chemistryProperties", phaseName), mesh.time().constant(), mesh, IOobject::MUST_READ, @@ -74,7 +75,7 @@ Foam::autoPtr Foam::basicChemistryModel::New ( IOobject ( - "thermophysicalProperties", + IOobject::groupName("thermophysicalProperties", phaseName), mesh.time().constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, @@ -158,7 +159,7 @@ Foam::autoPtr Foam::basicChemistryModel::New FatalError<< exit(FatalError); } - return autoPtr(cstrIter()(mesh)); + return autoPtr(cstrIter()(mesh, phaseName)); } else { @@ -180,7 +181,7 @@ Foam::autoPtr Foam::basicChemistryModel::New << exit(FatalError); } - return autoPtr(cstrIter()(mesh)); + return autoPtr(cstrIter()(mesh, phaseName)); } } diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C index bd2a834063..4347fcf642 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C @@ -32,10 +32,11 @@ License template Foam::chemistryModel::chemistryModel ( - const fvMesh& mesh + const fvMesh& mesh, + const word& phaseName ) : - CompType(mesh), + CompType(mesh, phaseName), ODESystem(), Y_(this->thermo().composition().Y()), reactions_ @@ -632,7 +633,7 @@ Foam::tmp > Foam::chemistryModel::calculateRR ( const label reactionI, - const label specieI + const label speciei ) const { scalar pf, cf, pr, cr; @@ -701,7 +702,7 @@ Foam::chemistryModel::calculateRR rRef ); - RR[celli] = w*specieThermo_[specieI].W(); + RR[celli] = w*specieThermo_[speciei].W(); } diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.H b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.H index 368090a2d7..ee5482ecde 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -117,7 +117,7 @@ public: // Constructors //- Construct from mesh - chemistryModel(const fvMesh& mesh); + chemistryModel(const fvMesh& mesh, const word& phaseName); //- Destructor @@ -198,11 +198,11 @@ public: const label i ); - //- Return reaction rate of the specieI in reactionI + //- Return reaction rate of the speciei in reactionI virtual tmp > calculateRR ( const label reactionI, - const label specieI + const label speciei ) const; //- Solve the reaction system for the given time step diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModel.C index bc687c1390..75ed215f9c 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModel.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 @@ -39,11 +39,12 @@ namespace Foam Foam::psiChemistryModel::psiChemistryModel ( - const fvMesh& mesh + const fvMesh& mesh, + const word& phaseName ) : - basicChemistryModel(mesh), - thermo_(psiReactionThermo::New(mesh)) + basicChemistryModel(mesh, phaseName), + thermo_(psiReactionThermo::New(mesh, phaseName)) {} @@ -51,10 +52,11 @@ Foam::psiChemistryModel::psiChemistryModel Foam::autoPtr Foam::psiChemistryModel::New ( - const fvMesh& mesh + const fvMesh& mesh, + const word& phaseName ) { - return basicChemistryModel::New(mesh); + return basicChemistryModel::New(mesh, phaseName); } diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModel.H b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModel.H index d214a6912a..132999f78b 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModel.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModel.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 @@ -87,19 +87,23 @@ public: autoPtr, psiChemistryModel, fvMesh, - (const fvMesh& mesh), - (mesh) + (const fvMesh& mesh, const word& phaseName), + (mesh, phaseName) ); // Constructors - //- Construct from mesh - psiChemistryModel(const fvMesh& mesh); + //- Construct from mesh and phase name + psiChemistryModel(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 diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModel.C index 59c8f270e4..16a6fa4632 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModel.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 @@ -39,11 +39,12 @@ namespace Foam Foam::rhoChemistryModel::rhoChemistryModel ( - const fvMesh& mesh + const fvMesh& mesh, + const word& phaseName ) : - basicChemistryModel(mesh), - thermo_(rhoReactionThermo::New(mesh)) + basicChemistryModel(mesh, phaseName), + thermo_(rhoReactionThermo::New(mesh, phaseName)) {} @@ -51,10 +52,11 @@ Foam::rhoChemistryModel::rhoChemistryModel Foam::autoPtr Foam::rhoChemistryModel::New ( - const fvMesh& mesh + const fvMesh& mesh, + const word& phaseName ) { - return basicChemistryModel::New(mesh); + return basicChemistryModel::New(mesh, phaseName); } diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModel.H b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModel.H index 94c66733e3..3d160fa024 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModel.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModel.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 @@ -87,21 +87,23 @@ public: autoPtr, rhoChemistryModel, fvMesh, - ( - const fvMesh& mesh - ), - (mesh) + (const fvMesh& mesh, const word& phaseName), + (mesh, phaseName) ); // Constructors - //- Construct from mesh - rhoChemistryModel(const fvMesh& mesh); + //- Construct from mesh and phase name + rhoChemistryModel(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 diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit/EulerImplicit.C b/src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit/EulerImplicit.C index 9c8fff4c3c..15a256f66b 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit/EulerImplicit.C +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit/EulerImplicit.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 @@ -32,10 +32,11 @@ License template Foam::EulerImplicit::EulerImplicit ( - const fvMesh& mesh + const fvMesh& mesh, + const word& phaseName ) : - chemistrySolver(mesh), + chemistrySolver(mesh, phaseName), coeffsDict_(this->subDict("EulerImplicitCoeffs")), cTauChem_(readScalar(coeffsDict_.lookup("cTauChem"))), eqRateLimiter_(coeffsDict_.lookup("equilibriumRateLimiter")), diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit/EulerImplicit.H b/src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit/EulerImplicit.H index d9cc7dcb14..0b6c7e08f9 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit/EulerImplicit.H +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit/EulerImplicit.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 @@ -77,8 +77,8 @@ public: // Constructors - //- Construct from mesh - EulerImplicit(const fvMesh& mesh); + //- Construct from mesh and phase name + EulerImplicit(const fvMesh& mesh, const word& phaseName); //- Destructor diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolver.C b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolver.C index 40459010be..3bbdaf27db 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolver.C +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolver.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,10 +30,11 @@ License template Foam::chemistrySolver::chemistrySolver ( - const fvMesh& mesh + const fvMesh& mesh, + const word& phaseName ) : - ChemistryModel(mesh) + ChemistryModel(mesh, phaseName) {} diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolver.H b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolver.H index 4175d957c7..b5fb3adca1 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolver.H +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolver.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 @@ -58,8 +58,8 @@ public: // Constructors - //- Construct from components - chemistrySolver(const fvMesh& mesh); + //- Construct from components and phase name + chemistrySolver(const fvMesh& mesh, const word& phaseName); //- Destructor diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/noChemistrySolver/noChemistrySolver.C b/src/thermophysicalModels/chemistryModel/chemistrySolver/noChemistrySolver/noChemistrySolver.C index 8220077c12..2534684843 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/noChemistrySolver/noChemistrySolver.C +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/noChemistrySolver/noChemistrySolver.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 @@ -31,10 +31,11 @@ License template Foam::noChemistrySolver::noChemistrySolver ( - const fvMesh& mesh + const fvMesh& mesh, + const word& phaseName ) : - chemistrySolver(mesh) + chemistrySolver(mesh, phaseName) {} diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/noChemistrySolver/noChemistrySolver.H b/src/thermophysicalModels/chemistryModel/chemistrySolver/noChemistrySolver/noChemistrySolver.H index aa1bb32e56..c0e9d642a4 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/noChemistrySolver/noChemistrySolver.H +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/noChemistrySolver/noChemistrySolver.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 @@ -61,8 +61,8 @@ public: // Constructors - //- Construct from components - noChemistrySolver(const fvMesh& mesh); + //- Construct from mesh and phase name + noChemistrySolver(const fvMesh& mesh, const word& phaseName); //- Destructor diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/ode/ode.C b/src/thermophysicalModels/chemistryModel/chemistrySolver/ode/ode.C index 3ca485902e..64b2d4da83 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/ode/ode.C +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/ode/ode.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 @@ -31,10 +31,11 @@ License template Foam::ode::ode ( - const fvMesh& mesh + const fvMesh& mesh, + const word& phaseName ) : - chemistrySolver(mesh), + chemistrySolver(mesh, phaseName), coeffsDict_(this->subDict("odeCoeffs")), odeSolver_(ODESolver::New(*this, coeffsDict_)), cTp_(this->nEqns()) diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/ode/ode.H b/src/thermophysicalModels/chemistryModel/chemistrySolver/ode/ode.H index efdfd40cc2..cfd8164f47 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/ode/ode.H +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/ode/ode.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 @@ -69,8 +69,8 @@ public: // Constructors - //- Construct from mesh - ode(const fvMesh& mesh); + //- Construct from mesh and phase name + ode(const fvMesh& mesh, const word& phaseName); //- Destructor diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C index fbfa2f8c87..21bf3194d1 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C @@ -27,7 +27,7 @@ License #include "addToRunTimeSelectionTable.H" #include "unitConversion.H" #include "zeroGradientFvPatchFields.H" -#include "basicMultiComponentMixture.H" +#include "basicSpecieMixture.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -64,7 +64,7 @@ Foam::radiation::greyMeanAbsorptionEmission::greyMeanAbsorptionEmission EhrrCoeff_(readScalar(coeffsDict_.lookup("EhrrCoeff"))), Yj_(nSpecies_) { - if (!isA(thermo_)) + if (!isA(thermo_)) { FatalErrorIn ( @@ -203,8 +203,8 @@ Foam::radiation::greyMeanAbsorptionEmission::~greyMeanAbsorptionEmission() Foam::tmp Foam::radiation::greyMeanAbsorptionEmission::aCont(const label bandI) const { - const basicMultiComponentMixture& mixture = - dynamic_cast(thermo_); + const basicSpecieMixture& mixture = + dynamic_cast(thermo_); const volScalarField& T = thermo_.T(); const volScalarField& p = thermo_.p(); diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C index 1c06a749a3..f691bb4fc0 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C @@ -93,10 +93,10 @@ greyMeanSolidAbsorptionEmission coeffsDict_((dict.subDict(typeName + "Coeffs"))), thermo_(mesh.lookupObject("thermophysicalProperties")), speciesNames_(0), - mixture_(dynamic_cast(thermo_)), + mixture_(dynamic_cast(thermo_)), solidData_(mixture_.Y().size()) { - if (!isA(thermo_)) + if (!isA(thermo_)) { FatalErrorIn ( diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.H b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.H index 2a78371a9f..09a6df1c99 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.H +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.H @@ -51,7 +51,7 @@ SourceFiles #include "absorptionEmissionModel.H" #include "solidThermo.H" -#include "basicMultiComponentMixture.H" +#include "basicSpecieMixture.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -90,7 +90,7 @@ private: HashTable