From 233d8dea124debf951ae7cbbeb76aee2fed356d5 Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Thu, 14 Dec 2017 15:23:27 +0000 Subject: [PATCH] reactionThermo: Select singleComponentMixture as pureMixture A pureMixture can now be specified in a reacting solver. This further enhances compatibility between non-reacting and reacting solvers. To achieve this, mixtures now have a typeName function of the same form as the lower thermodyanmic models. In addition, to avoid name clashes, the reacting thermo make macros have been split into those that create entries on multiple selection tables, and those that just add to the reaction thermo table. --- .../InterfaceCompositionModels.C | 39 +-- .../reactionThermo/hRefConstThermos.C | 12 +- .../basic/fluidThermo/makeThermo.H | 8 +- .../basic/mixtures/pureMixture/pureMixture.H | 6 + .../reactionThermo/makeReactionThermo.H | 158 ++++++------ .../mixtures/egrMixture/egrMixture.H | 8 +- .../homogeneousMixture/homogeneousMixture.H | 8 +- .../inhomogeneousMixture.H | 8 +- .../multiComponentMixture.H | 8 +- .../reactingMixture/reactingMixture.H | 8 +- .../singleComponentMixture.C | 3 - .../singleComponentMixture.H | 8 + .../singleStepReactingMixture.H | 8 +- .../veryInhomogeneousMixture.H | 8 +- .../psiReactionThermo/psiReactionThermos.C | 42 ++-- .../psiuReactionThermo/psiuReactionThermos.C | 26 +- .../rhoReactionThermo/rhoReactionThermos.C | 238 +++++++++--------- .../specie/include/thermoPhysicsTypes.H | 89 ++++++- .../bottomWater/thermophysicalProperties | 2 +- .../constant/topAir/thermophysicalProperties | 2 +- .../bottomAir/thermophysicalProperties | 2 +- 21 files changed, 409 insertions(+), 282 deletions(-) diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModels.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModels.C index c413e0c524..422276d65b 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModels.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModels.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -54,43 +54,6 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -namespace Foam -{ - typedef - constTransport - < - species::thermo - < - hConstThermo - < - perfectFluid - >, - sensibleInternalEnergy - > - > constFluidEThermoPhysics; -}; - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // multi-component liquid - makeReactionThermo - ( - rhoThermo, - rhoReactionThermo, - heRhoThermo, - multiComponentMixture, - constTransport, - sensibleInternalEnergy, - hConstThermo, - perfectFluid, - specie - ); -} - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - namespace Foam { using namespace interfaceCompositionModels; diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/reactionThermo/hRefConstThermos.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/reactionThermo/hRefConstThermos.C index 712a96e1de..600e26b9ad 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/reactionThermo/hRefConstThermos.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/reactionThermo/hRefConstThermos.C @@ -214,7 +214,7 @@ makeThermo // multiComponentMixture, sensibleInternalEnergy: -makeReactionMixtureThermo +makeReactionMixtureThermos ( rhoThermo, rhoReactionThermo, @@ -223,7 +223,7 @@ makeReactionMixtureThermo constRefGasEThermoPhysics ); -makeReactionMixtureThermo +makeReactionMixtureThermos ( rhoThermo, rhoReactionThermo, @@ -232,7 +232,7 @@ makeReactionMixtureThermo constRefFluidEThermoPhysics ); -makeReactionMixtureThermo +makeReactionMixtureThermos ( rhoThermo, rhoReactionThermo, @@ -244,7 +244,7 @@ makeReactionMixtureThermo // multiComponentMixture, sensibleEnthalpy: -makeReactionMixtureThermo +makeReactionMixtureThermos ( rhoThermo, rhoReactionThermo, @@ -253,7 +253,7 @@ makeReactionMixtureThermo constRefRhoConstHThermoPhysics ); -makeReactionMixtureThermo +makeReactionMixtureThermos ( rhoThermo, rhoReactionThermo, @@ -262,7 +262,7 @@ makeReactionMixtureThermo constRefFluidHThermoPhysics ); -makeReactionMixtureThermo +makeReactionMixtureThermos ( rhoThermo, rhoReactionThermo, diff --git a/src/thermophysicalModels/basic/fluidThermo/makeThermo.H b/src/thermophysicalModels/basic/fluidThermo/makeThermo.H index 8581ff5025..21f6940a65 100644 --- a/src/thermophysicalModels/basic/fluidThermo/makeThermo.H +++ b/src/thermophysicalModels/basic/fluidThermo/makeThermo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -66,9 +66,9 @@ defineTemplateTypeNameAndDebugWithName \ ( \ Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie, \ ( \ - #Cthermo"<"#Mixture"<" \ - + Transport##Type##Thermo##EqnOfState##Specie::typeName() \ - + ">>" \ + #Cthermo"<" \ + + Mixture::typeName() \ + + ">" \ ).c_str(), \ 0 \ ); diff --git a/src/thermophysicalModels/basic/mixtures/pureMixture/pureMixture.H b/src/thermophysicalModels/basic/mixtures/pureMixture/pureMixture.H index f7f213f10a..3676506482 100644 --- a/src/thermophysicalModels/basic/mixtures/pureMixture/pureMixture.H +++ b/src/thermophysicalModels/basic/mixtures/pureMixture/pureMixture.H @@ -73,6 +73,12 @@ public: // Member functions + //- Return the instantiated type name + static word typeName() + { + return "pureMixture<" + ThermoType::typeName() + '>'; + } + const ThermoType& mixture() const { return mixture_; diff --git a/src/thermophysicalModels/reactionThermo/makeReactionThermo.H b/src/thermophysicalModels/reactionThermo/makeReactionThermo.H index 3a63f0ba58..fc6b3973d8 100644 --- a/src/thermophysicalModels/reactionThermo/makeReactionThermo.H +++ b/src/thermophysicalModels/reactionThermo/makeReactionThermo.H @@ -31,82 +31,100 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define makeReactionMixtureThermo(BaseThermo,BaseReactionThermo,CThermo,Mixture,ThermoPhys) \ +#define defineReactionMixtureThermo(BaseReactionThermo,CThermo,Mixture,ThermoPhys) \ \ -typedef CThermo \ -< \ - BaseReactionThermo, \ - SpecieMixture \ + typedef CThermo \ < \ - Mixture \ + BaseReactionThermo, \ + SpecieMixture \ < \ - ThermoPhys \ - > \ - > \ -> CThermo##Mixture##ThermoPhys; \ - \ -defineTemplateTypeNameAndDebugWithName \ -( \ - CThermo##Mixture##ThermoPhys, \ - (#CThermo"<"#Mixture"<" + ThermoPhys::typeName() + ">>").c_str(), \ - 0 \ -); \ - \ -addToRunTimeSelectionTable \ -( \ - basicThermo, \ - CThermo##Mixture##ThermoPhys, \ - fvMesh \ -); \ - \ -addToRunTimeSelectionTable \ -( \ - fluidThermo, \ - CThermo##Mixture##ThermoPhys, \ - fvMesh \ -); \ - \ -addToRunTimeSelectionTable \ -( \ - BaseThermo, \ - CThermo##Mixture##ThermoPhys, \ - fvMesh \ -); \ - \ -addToRunTimeSelectionTable \ -( \ - BaseReactionThermo, \ - CThermo##Mixture##ThermoPhys, \ - fvMesh \ -); - - -#define makeReactionThermo(BaseThermo,BaseReactionThermo,CThermo,Mixture,Transport,Type,Thermo,EqnOfState,Specie) \ - \ -typedef \ - Transport \ - < \ - species::thermo \ - < \ - Thermo \ + Mixture \ < \ - EqnOfState \ - < \ - Specie \ - > \ - >, \ - Type \ + ThermoPhys \ + > \ > \ - > Transport##Type##Thermo##EqnOfState##Specie; \ + > CThermo##Mixture##ThermoPhys; \ \ -makeReactionMixtureThermo \ -( \ - BaseThermo, \ - BaseReactionThermo, \ - CThermo, \ - Mixture, \ - Transport##Type##Thermo##EqnOfState##Specie \ -); + defineTemplateTypeNameAndDebugWithName \ + ( \ + CThermo##Mixture##ThermoPhys, \ + (#CThermo"<" + Mixture::typeName() + ">").c_str(), \ + 0 \ + ) + + +#define addReactionMixtureThermo(BaseThermo,CThermoMixtureThermoPhys) \ + \ + addToRunTimeSelectionTable \ + ( \ + BaseThermo, \ + CThermoMixtureThermoPhys, \ + fvMesh \ + ) + + +#define makeReactionMixtureThermos(BaseThermo,BaseReactionThermo,CThermo,Mixture,ThermoPhys) \ + \ + defineReactionMixtureThermo(BaseReactionThermo,CThermo,Mixture,ThermoPhys);\ + \ + addReactionMixtureThermo(basicThermo, CThermo##Mixture##ThermoPhys); \ + addReactionMixtureThermo(fluidThermo, CThermo##Mixture##ThermoPhys); \ + addReactionMixtureThermo(BaseThermo, CThermo##Mixture##ThermoPhys); \ + addReactionMixtureThermo(BaseReactionThermo, CThermo##Mixture##ThermoPhys) + + +#define makeReactionMixtureThermo(BaseReactionThermo,CThermo,Mixture,ThermoPhys) \ + \ + defineReactionMixtureThermo(BaseReactionThermo,CThermo,Mixture,ThermoPhys);\ + \ + addReactionMixtureThermo(BaseReactionThermo, CThermo##Mixture##ThermoPhys) + + +#define defineThermoPhys(Transport,Type,Thermo,EqnOfState,Specie) \ + \ + typedef \ + Transport \ + < \ + species::thermo \ + < \ + Thermo \ + < \ + EqnOfState \ + < \ + Specie \ + > \ + >, \ + Type \ + > \ + > \ + Transport##Type##Thermo##EqnOfState##Specie \ + + +#define makeReactionThermos(BaseThermo,BaseReactionThermo,CThermo,Mixture,Transport,Type,Thermo,EqnOfState,Specie) \ + \ + defineThermoPhys(Transport,Type,Thermo,EqnOfState,Specie); \ + \ + makeReactionMixtureThermos \ + ( \ + BaseThermo, \ + BaseReactionThermo, \ + CThermo, \ + Mixture, \ + Transport##Type##Thermo##EqnOfState##Specie \ + ) + + +#define makeReactionThermo(BaseReactionThermo,CThermo,Mixture,Transport,Type,Thermo,EqnOfState,Specie) \ + \ + defineThermoPhys(Transport,Type,Thermo,EqnOfState,Specie); \ + \ + makeReactionMixtureThermo \ + ( \ + BaseReactionThermo, \ + CThermo, \ + Mixture, \ + Transport##Type##Thermo##EqnOfState##Specie \ + ) // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.H index fa81aa92e1..ed54ab73e5 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -96,6 +96,12 @@ public: // Member functions + //- Return the instantiated type name + static word typeName() + { + return "egrMixture<" + ThermoType::typeName() + '>'; + } + const dimensionedScalar& stoicRatio() const { return stoicRatio_; diff --git a/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.H index 31915735d1..4242d716b6 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -87,6 +87,12 @@ public: // Member functions + //- Return the instantiated type name + static word typeName() + { + return "homogeneousMixture<" + ThermoType::typeName() + '>'; + } + const ThermoType& mixture(const scalar) const; const ThermoType& cellMixture(const label celli) const diff --git a/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.H index ef9284dde8..1c644af525 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -93,6 +93,12 @@ public: // Member functions + //- Return the instantiated type name + static word typeName() + { + return "inhomogeneousMixture<" + ThermoType::typeName() + '>'; + } + const dimensionedScalar& stoicRatio() const { return stoicRatio_; diff --git a/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.H index eaf395a91e..b9ac78fe8e 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -108,6 +108,12 @@ public: // Member functions + //- Return the instantiated type name + static word typeName() + { + return "multiComponentMixture<" + ThermoType::typeName() + '>'; + } + const ThermoType& cellMixture(const label celli) const; const ThermoType& patchFaceMixture diff --git a/src/thermophysicalModels/reactionThermo/mixtures/reactingMixture/reactingMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/reactingMixture/reactingMixture.H index d61a9fc758..d01b4ce158 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/reactingMixture/reactingMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/reactingMixture/reactingMixture.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -90,6 +90,12 @@ public: // Member functions + //- Return the instantiated type name + static word typeName() + { + return "reactingMixture<" + ThermoType::typeName() + '>'; + } + //- Read dictionary void read(const dictionary&); diff --git a/src/thermophysicalModels/reactionThermo/mixtures/singleComponentMixture/singleComponentMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/singleComponentMixture/singleComponentMixture.C index 8b8672650a..b8374445dc 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/singleComponentMixture/singleComponentMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/singleComponentMixture/singleComponentMixture.C @@ -25,9 +25,6 @@ License #include "singleComponentMixture.H" -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template diff --git a/src/thermophysicalModels/reactionThermo/mixtures/singleComponentMixture/singleComponentMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/singleComponentMixture/singleComponentMixture.H index 9456ff16d5..7067d07081 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/singleComponentMixture/singleComponentMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/singleComponentMixture/singleComponentMixture.H @@ -75,6 +75,14 @@ public: // Member Functions + //- Return the instantiated type name + // Note: This defines the same name as pureMixture so that + // non-reacting and reacting solvers are compatable + static word typeName() + { + return "pureMixture<" + ThermoType::typeName() + '>'; + } + //- Get the mixture for the given cell const ThermoType& cellMixture(const label celli) const { diff --git a/src/thermophysicalModels/reactionThermo/mixtures/singleStepReactingMixture/singleStepReactingMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/singleStepReactingMixture/singleStepReactingMixture.H index b5a4a90fbf..3c7e6de5e9 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/singleStepReactingMixture/singleStepReactingMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/singleStepReactingMixture/singleStepReactingMixture.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -132,6 +132,12 @@ public: // Member functions + //- Return the instantiated type name + static word typeName() + { + return "singleStepReactingMixture<" + ThermoType::typeName() + '>'; + } + //- Calculates the residual for all components void fresCorrect(); diff --git a/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.H index 2e852b80c1..080e5e6c87 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -101,6 +101,12 @@ public: // Member functions + //- Return the instantiated type name + static word typeName() + { + return "veryInhomogeneousMixture<" + ThermoType::typeName() + '>'; + } + const dimensionedScalar& stoicRatio() const { return stoicRatio_; diff --git a/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermos.C b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermos.C index 8bb0bed913..0da95cd824 100644 --- a/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermos.C +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermos.C @@ -56,7 +56,7 @@ namespace Foam // constTransport, hConstThermo -makeReactionThermo +makeReactionThermos ( psiThermo, psiReactionThermo, @@ -69,7 +69,7 @@ makeReactionThermo specie ); -makeReactionThermo +makeReactionThermos ( psiThermo, psiReactionThermo, @@ -82,7 +82,7 @@ makeReactionThermo specie ); -makeReactionThermo +makeReactionThermos ( psiThermo, psiReactionThermo, @@ -98,7 +98,7 @@ makeReactionThermo // sutherlandTransport, hConstThermo -makeReactionThermo +makeReactionThermos ( psiThermo, psiReactionThermo, @@ -111,7 +111,7 @@ makeReactionThermo specie ); -makeReactionThermo +makeReactionThermos ( psiThermo, psiReactionThermo, @@ -124,7 +124,7 @@ makeReactionThermo specie ); -makeReactionThermo +makeReactionThermos ( psiThermo, psiReactionThermo, @@ -140,7 +140,7 @@ makeReactionThermo // sutherlandTransport, janafThermo -makeReactionThermo +makeReactionThermos ( psiThermo, psiReactionThermo, @@ -153,7 +153,7 @@ makeReactionThermo specie ); -makeReactionThermo +makeReactionThermos ( psiThermo, psiReactionThermo, @@ -166,7 +166,7 @@ makeReactionThermo specie ); -makeReactionThermo +makeReactionThermos ( psiThermo, psiReactionThermo, @@ -183,7 +183,7 @@ makeReactionThermo // Multi-component thermo for sensible enthalpy -makeReactionMixtureThermo +makeReactionMixtureThermos ( psiThermo, psiReactionThermo, @@ -192,7 +192,7 @@ makeReactionMixtureThermo constGasHThermoPhysics ); -makeReactionMixtureThermo +makeReactionMixtureThermos ( psiThermo, psiReactionThermo, @@ -204,7 +204,7 @@ makeReactionMixtureThermo // Multi-component thermo for internal energy -makeReactionMixtureThermo +makeReactionMixtureThermos ( psiThermo, psiReactionThermo, @@ -213,7 +213,7 @@ makeReactionMixtureThermo constGasEThermoPhysics ); -makeReactionMixtureThermo +makeReactionMixtureThermos ( psiThermo, psiReactionThermo, @@ -225,7 +225,7 @@ makeReactionMixtureThermo // Reaction thermo for sensible enthalpy -makeReactionMixtureThermo +makeReactionMixtureThermos ( psiThermo, psiReactionThermo, @@ -234,7 +234,7 @@ makeReactionMixtureThermo constGasHThermoPhysics ); -makeReactionMixtureThermo +makeReactionMixtureThermos ( psiThermo, psiReactionThermo, @@ -246,7 +246,7 @@ makeReactionMixtureThermo // Single-step reaction thermo for sensible enthalpy -makeReactionMixtureThermo +makeReactionMixtureThermos ( psiThermo, psiReactionThermo, @@ -258,7 +258,7 @@ makeReactionMixtureThermo // Reaction thermo for internal energy -makeReactionMixtureThermo +makeReactionMixtureThermos ( psiThermo, psiReactionThermo, @@ -267,7 +267,7 @@ makeReactionMixtureThermo constGasEThermoPhysics ); -makeReactionMixtureThermo +makeReactionMixtureThermos ( psiThermo, psiReactionThermo, @@ -279,7 +279,7 @@ makeReactionMixtureThermo // Single-step reaction thermo for internal energy -makeReactionMixtureThermo +makeReactionMixtureThermos ( psiThermo, psiReactionThermo, @@ -293,7 +293,6 @@ makeReactionMixtureThermo makeReactionMixtureThermo ( - psiThermo, psiReactionThermo, hePsiThermo, singleComponentMixture, @@ -302,7 +301,6 @@ makeReactionMixtureThermo makeReactionMixtureThermo ( - psiThermo, psiReactionThermo, hePsiThermo, singleComponentMixture, @@ -314,7 +312,6 @@ makeReactionMixtureThermo makeReactionMixtureThermo ( - psiThermo, psiReactionThermo, hePsiThermo, singleComponentMixture, @@ -323,7 +320,6 @@ makeReactionMixtureThermo makeReactionMixtureThermo ( - psiThermo, psiReactionThermo, hePsiThermo, singleComponentMixture, diff --git a/src/thermophysicalModels/reactionThermo/psiuReactionThermo/psiuReactionThermos.C b/src/thermophysicalModels/reactionThermo/psiuReactionThermo/psiuReactionThermos.C index 4e9173530d..cc62659bb9 100644 --- a/src/thermophysicalModels/reactionThermo/psiuReactionThermo/psiuReactionThermos.C +++ b/src/thermophysicalModels/reactionThermo/psiuReactionThermo/psiuReactionThermos.C @@ -54,7 +54,7 @@ namespace Foam // * * * * * * * * * * * * * * * * h-hu-Thermos * * * * * * * * * * * * * * * // -makeReactionThermo +makeReactionThermos ( psiThermo, psiuReactionThermo, @@ -67,7 +67,7 @@ makeReactionThermo specie ); -makeReactionThermo +makeReactionThermos ( psiThermo, psiuReactionThermo, @@ -80,7 +80,7 @@ makeReactionThermo specie ); -makeReactionThermo +makeReactionThermos ( psiThermo, psiuReactionThermo, @@ -93,7 +93,7 @@ makeReactionThermo specie ); -makeReactionThermo +makeReactionThermos ( psiThermo, psiuReactionThermo, @@ -107,7 +107,7 @@ makeReactionThermo ); -makeReactionThermo +makeReactionThermos ( psiThermo, psiuReactionThermo, @@ -120,7 +120,7 @@ makeReactionThermo specie ); -makeReactionThermo +makeReactionThermos ( psiThermo, psiuReactionThermo, @@ -133,7 +133,7 @@ makeReactionThermo specie ); -makeReactionThermo +makeReactionThermos ( psiThermo, psiuReactionThermo, @@ -146,7 +146,7 @@ makeReactionThermo specie ); -makeReactionThermo +makeReactionThermos ( psiThermo, psiuReactionThermo, @@ -159,7 +159,7 @@ makeReactionThermo specie ); -makeReactionThermo +makeReactionThermos ( psiThermo, psiuReactionThermo, @@ -173,7 +173,7 @@ makeReactionThermo ); -makeReactionThermo +makeReactionThermos ( psiThermo, psiuReactionThermo, @@ -186,7 +186,7 @@ makeReactionThermo specie ); -makeReactionThermo +makeReactionThermos ( psiThermo, psiuReactionThermo, @@ -199,7 +199,7 @@ makeReactionThermo specie ); -makeReactionThermo +makeReactionThermos ( psiThermo, psiuReactionThermo, @@ -212,7 +212,7 @@ makeReactionThermo specie ); -makeReactionThermo +makeReactionThermos ( psiThermo, psiuReactionThermo, diff --git a/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermos.C b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermos.C index d9123e25ea..270e4650e1 100644 --- a/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermos.C +++ b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermos.C @@ -60,7 +60,7 @@ namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -makeReactionThermo +makeReactionThermos ( rhoThermo, rhoReactionThermo, @@ -73,7 +73,7 @@ makeReactionThermo specie ); -makeReactionThermo +makeReactionThermos ( rhoThermo, rhoReactionThermo, @@ -86,7 +86,7 @@ makeReactionThermo specie ); -makeReactionThermo +makeReactionThermos ( rhoThermo, rhoReactionThermo, @@ -99,7 +99,7 @@ makeReactionThermo specie ); -makeReactionThermo +makeReactionThermos ( rhoThermo, rhoReactionThermo, @@ -112,7 +112,7 @@ makeReactionThermo specie ); -makeReactionThermo +makeReactionThermos ( rhoThermo, rhoReactionThermo, @@ -125,7 +125,7 @@ makeReactionThermo specie ); -makeReactionThermo +makeReactionThermos ( rhoThermo, rhoReactionThermo, @@ -139,7 +139,7 @@ makeReactionThermo ); -makeReactionThermo +makeReactionThermos ( rhoThermo, rhoReactionThermo, @@ -152,7 +152,7 @@ makeReactionThermo specie ); -makeReactionThermo +makeReactionThermos ( rhoThermo, rhoReactionThermo, @@ -165,7 +165,7 @@ makeReactionThermo specie ); -makeReactionThermo +makeReactionThermos ( rhoThermo, rhoReactionThermo, @@ -178,7 +178,7 @@ makeReactionThermo specie ); -makeReactionThermo +makeReactionThermos ( rhoThermo, rhoReactionThermo, @@ -191,7 +191,7 @@ makeReactionThermo specie ); -makeReactionThermo +makeReactionThermos ( rhoThermo, rhoReactionThermo, @@ -204,7 +204,7 @@ makeReactionThermo specie ); -makeReactionThermo +makeReactionThermos ( rhoThermo, rhoReactionThermo, @@ -221,7 +221,7 @@ makeReactionThermo // Multi-component thermo for internal energy -makeReactionMixtureThermo +makeReactionMixtureThermos ( rhoThermo, rhoReactionThermo, @@ -230,7 +230,7 @@ makeReactionMixtureThermo constGasEThermoPhysics ); -makeReactionMixtureThermo +makeReactionMixtureThermos ( rhoThermo, rhoReactionThermo, @@ -239,7 +239,7 @@ makeReactionMixtureThermo gasEThermoPhysics ); -makeReactionMixtureThermo +makeReactionMixtureThermos ( rhoThermo, rhoReactionThermo, @@ -248,7 +248,7 @@ makeReactionMixtureThermo constIncompressibleGasEThermoPhysics ); -makeReactionMixtureThermo +makeReactionMixtureThermos ( rhoThermo, rhoReactionThermo, @@ -257,7 +257,7 @@ makeReactionMixtureThermo incompressibleGasEThermoPhysics ); -makeReactionMixtureThermo +makeReactionMixtureThermos ( rhoThermo, rhoReactionThermo, @@ -266,10 +266,37 @@ makeReactionMixtureThermo icoPoly8EThermoPhysics ); +makeReactionMixtureThermos +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + multiComponentMixture, + constFluidEThermoPhysics +); + +makeReactionMixtureThermos +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + multiComponentMixture, + constAdiabaticFluidEThermoPhysics +); + +makeReactionMixtureThermos +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + multiComponentMixture, + constEThermoPhysics +); + // Reaction thermo for internal energy -makeReactionMixtureThermo +makeReactionMixtureThermos ( rhoThermo, rhoReactionThermo, @@ -278,7 +305,7 @@ makeReactionMixtureThermo constGasEThermoPhysics ); -makeReactionMixtureThermo +makeReactionMixtureThermos ( rhoThermo, rhoReactionThermo, @@ -287,7 +314,7 @@ makeReactionMixtureThermo gasEThermoPhysics ); -makeReactionMixtureThermo +makeReactionMixtureThermos ( rhoThermo, rhoReactionThermo, @@ -296,7 +323,7 @@ makeReactionMixtureThermo constIncompressibleGasEThermoPhysics ); -makeReactionMixtureThermo +makeReactionMixtureThermos ( rhoThermo, rhoReactionThermo, @@ -305,7 +332,7 @@ makeReactionMixtureThermo incompressibleGasEThermoPhysics ); -makeReactionMixtureThermo +makeReactionMixtureThermos ( rhoThermo, rhoReactionThermo, @@ -317,7 +344,7 @@ makeReactionMixtureThermo // Single-step reaction thermo for internal energy -makeReactionMixtureThermo +makeReactionMixtureThermos ( rhoThermo, rhoReactionThermo, @@ -331,7 +358,6 @@ makeReactionMixtureThermo makeReactionMixtureThermo ( - rhoThermo, rhoReactionThermo, heRhoThermo, singleComponentMixture, @@ -340,7 +366,6 @@ makeReactionMixtureThermo makeReactionMixtureThermo ( - rhoThermo, rhoReactionThermo, heRhoThermo, singleComponentMixture, @@ -349,7 +374,6 @@ makeReactionMixtureThermo makeReactionMixtureThermo ( - rhoThermo, rhoReactionThermo, heRhoThermo, singleComponentMixture, @@ -358,7 +382,6 @@ makeReactionMixtureThermo makeReactionMixtureThermo ( - rhoThermo, rhoReactionThermo, heRhoThermo, singleComponentMixture, @@ -367,55 +390,38 @@ makeReactionMixtureThermo makeReactionMixtureThermo ( - rhoThermo, rhoReactionThermo, heRhoThermo, singleComponentMixture, icoPoly8EThermoPhysics ); -makeReactionThermo +makeReactionMixtureThermo ( - rhoThermo, rhoReactionThermo, heRhoThermo, singleComponentMixture, - constTransport, - sensibleInternalEnergy, - hConstThermo, - rhoConst, - specie + constFluidEThermoPhysics +); + +makeReactionMixtureThermo +( + rhoReactionThermo, + heRhoThermo, + singleComponentMixture, + constAdiabaticFluidEThermoPhysics +); + +makeReactionMixtureThermo +( + rhoReactionThermo, + heRhoThermo, + singleComponentMixture, + constEThermoPhysics ); makeReactionThermo ( - rhoThermo, - rhoReactionThermo, - heRhoThermo, - singleComponentMixture, - constTransport, - sensibleInternalEnergy, - hConstThermo, - perfectFluid, - specie -); - -makeReactionThermo -( - rhoThermo, - rhoReactionThermo, - heRhoThermo, - singleComponentMixture, - constTransport, - sensibleInternalEnergy, - hConstThermo, - adiabaticPerfectFluid, - specie -); - -makeReactionThermo -( - rhoThermo, rhoReactionThermo, heRhoThermo, singleComponentMixture, @@ -428,7 +434,6 @@ makeReactionThermo makeReactionThermo ( - rhoThermo, rhoReactionThermo, heRhoThermo, singleComponentMixture, @@ -443,7 +448,7 @@ makeReactionThermo // Multi-component thermo for sensible enthalpy -makeReactionMixtureThermo +makeReactionMixtureThermos ( rhoThermo, rhoReactionThermo, @@ -452,7 +457,7 @@ makeReactionMixtureThermo constGasHThermoPhysics ); -makeReactionMixtureThermo +makeReactionMixtureThermos ( rhoThermo, rhoReactionThermo, @@ -461,7 +466,7 @@ makeReactionMixtureThermo gasHThermoPhysics ); -makeReactionMixtureThermo +makeReactionMixtureThermos ( rhoThermo, rhoReactionThermo, @@ -470,7 +475,7 @@ makeReactionMixtureThermo constIncompressibleGasHThermoPhysics ); -makeReactionMixtureThermo +makeReactionMixtureThermos ( rhoThermo, rhoReactionThermo, @@ -479,7 +484,7 @@ makeReactionMixtureThermo incompressibleGasHThermoPhysics ); -makeReactionMixtureThermo +makeReactionMixtureThermos ( rhoThermo, rhoReactionThermo, @@ -488,10 +493,37 @@ makeReactionMixtureThermo icoPoly8HThermoPhysics ); +makeReactionMixtureThermos +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + multiComponentMixture, + constFluidHThermoPhysics +); + +makeReactionMixtureThermos +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + multiComponentMixture, + constAdiabaticFluidHThermoPhysics +); + +makeReactionMixtureThermos +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + multiComponentMixture, + constHThermoPhysics +); + // Reaction thermo for sensible enthalpy -makeReactionMixtureThermo +makeReactionMixtureThermos ( rhoThermo, rhoReactionThermo, @@ -500,7 +532,7 @@ makeReactionMixtureThermo constGasHThermoPhysics ); -makeReactionMixtureThermo +makeReactionMixtureThermos ( rhoThermo, rhoReactionThermo, @@ -509,7 +541,7 @@ makeReactionMixtureThermo gasHThermoPhysics ); -makeReactionMixtureThermo +makeReactionMixtureThermos ( rhoThermo, rhoReactionThermo, @@ -518,7 +550,7 @@ makeReactionMixtureThermo constIncompressibleGasHThermoPhysics ); -makeReactionMixtureThermo +makeReactionMixtureThermos ( rhoThermo, rhoReactionThermo, @@ -527,7 +559,7 @@ makeReactionMixtureThermo incompressibleGasHThermoPhysics ); -makeReactionMixtureThermo +makeReactionMixtureThermos ( rhoThermo, rhoReactionThermo, @@ -539,7 +571,7 @@ makeReactionMixtureThermo // Single-step reaction thermo for sensible enthalpy -makeReactionMixtureThermo +makeReactionMixtureThermos ( rhoThermo, rhoReactionThermo, @@ -553,7 +585,6 @@ makeReactionMixtureThermo makeReactionMixtureThermo ( - rhoThermo, rhoReactionThermo, heRhoThermo, singleComponentMixture, @@ -562,7 +593,6 @@ makeReactionMixtureThermo makeReactionMixtureThermo ( - rhoThermo, rhoReactionThermo, heRhoThermo, singleComponentMixture, @@ -571,7 +601,6 @@ makeReactionMixtureThermo makeReactionMixtureThermo ( - rhoThermo, rhoReactionThermo, heRhoThermo, singleComponentMixture, @@ -580,7 +609,6 @@ makeReactionMixtureThermo makeReactionMixtureThermo ( - rhoThermo, rhoReactionThermo, heRhoThermo, singleComponentMixture, @@ -589,55 +617,38 @@ makeReactionMixtureThermo makeReactionMixtureThermo ( - rhoThermo, rhoReactionThermo, heRhoThermo, singleComponentMixture, icoPoly8HThermoPhysics ); -makeReactionThermo +makeReactionMixtureThermo ( - rhoThermo, rhoReactionThermo, heRhoThermo, singleComponentMixture, - constTransport, - sensibleEnthalpy, - hConstThermo, - rhoConst, - specie + constFluidHThermoPhysics +); + +makeReactionMixtureThermo +( + rhoReactionThermo, + heRhoThermo, + singleComponentMixture, + constAdiabaticFluidHThermoPhysics +); + +makeReactionMixtureThermo +( + rhoReactionThermo, + heRhoThermo, + singleComponentMixture, + constHThermoPhysics ); makeReactionThermo ( - rhoThermo, - rhoReactionThermo, - heRhoThermo, - singleComponentMixture, - constTransport, - sensibleEnthalpy, - hConstThermo, - perfectFluid, - specie -); - -makeReactionThermo -( - rhoThermo, - rhoReactionThermo, - heRhoThermo, - singleComponentMixture, - constTransport, - sensibleEnthalpy, - hConstThermo, - adiabaticPerfectFluid, - specie -); - -makeReactionThermo -( - rhoThermo, rhoReactionThermo, heRhoThermo, singleComponentMixture, @@ -650,7 +661,6 @@ makeReactionThermo makeReactionThermo ( - rhoThermo, rhoReactionThermo, heRhoThermo, singleComponentMixture, diff --git a/src/thermophysicalModels/specie/include/thermoPhysicsTypes.H b/src/thermophysicalModels/specie/include/thermoPhysicsTypes.H index 04cecc04ce..2c21afe0b5 100644 --- a/src/thermophysicalModels/specie/include/thermoPhysicsTypes.H +++ b/src/thermophysicalModels/specie/include/thermoPhysicsTypes.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-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,6 +35,9 @@ Description #include "specie.H" #include "perfectGas.H" #include "incompressiblePerfectGas.H" +#include "perfectFluid.H" +#include "adiabaticPerfectFluid.H" +#include "rhoConst.H" #include "hConstThermo.H" #include "janafThermo.H" @@ -120,6 +123,48 @@ namespace Foam 8 > icoPoly8HThermoPhysics; + typedef + constTransport + < + species::thermo + < + hConstThermo + < + perfectFluid + >, + sensibleEnthalpy + > + > + constFluidHThermoPhysics; + + typedef + constTransport + < + species::thermo + < + hConstThermo + < + adiabaticPerfectFluid + >, + sensibleEnthalpy + > + > + constAdiabaticFluidHThermoPhysics; + + typedef + constTransport + < + species::thermo + < + hConstThermo + < + rhoConst + >, + sensibleEnthalpy + > + > + constHThermoPhysics; + // thermo physics types based on sensibleInternalEnergy typedef @@ -188,6 +233,48 @@ namespace Foam >, 8 > icoPoly8EThermoPhysics; + + typedef + constTransport + < + species::thermo + < + hConstThermo + < + perfectFluid + >, + sensibleInternalEnergy + > + > + constFluidEThermoPhysics; + + typedef + constTransport + < + species::thermo + < + hConstThermo + < + adiabaticPerfectFluid + >, + sensibleInternalEnergy + > + > + constAdiabaticFluidEThermoPhysics; + + typedef + constTransport + < + species::thermo + < + hConstThermo + < + rhoConst + >, + sensibleInternalEnergy + > + > + constEThermoPhysics; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/bottomWater/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/bottomWater/thermophysicalProperties index c176c7cdea..c82346a41a 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/bottomWater/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/bottomWater/thermophysicalProperties @@ -17,7 +17,7 @@ FoamFile thermoType { type heRhoThermo; - mixture singleComponentMixture; + mixture pureMixture; transport const; thermo hConst; equationOfState rhoConst; diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/topAir/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/topAir/thermophysicalProperties index 347943812e..2721777f98 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/topAir/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/topAir/thermophysicalProperties @@ -18,7 +18,7 @@ FoamFile thermoType { type heRhoThermo; - mixture singleComponentMixture; + mixture pureMixture; transport const; thermo hConst; equationOfState perfectGas; diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/bottomAir/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/bottomAir/thermophysicalProperties index aa421a45ce..8309d666a8 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/bottomAir/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/bottomAir/thermophysicalProperties @@ -18,7 +18,7 @@ FoamFile thermoType { type heRhoThermo; - mixture singleComponentMixture; + mixture pureMixture; transport const; thermo hConst; equationOfState perfectGas;