diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/BasicChemistryModel/BasicChemistryModels.C b/src/thermophysicalModels/chemistryModel/chemistryModel/BasicChemistryModel/BasicChemistryModels.C index 3490df6d96..145fb9f174 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/BasicChemistryModel/BasicChemistryModels.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/BasicChemistryModel/BasicChemistryModels.C @@ -63,6 +63,13 @@ namespace Foam gasHThermoPhysics ); + makeChemistryModelType + ( + StandardChemistryModel, + psiReactionThermo, + PengRobinsonGasHThermoPhysics + ); + makeChemistryModelType ( StandardChemistryModel, @@ -120,6 +127,13 @@ namespace Foam gasHThermoPhysics ); + makeChemistryModelType + ( + StandardChemistryModel, + rhoReactionThermo, + PengRobinsonGasHThermoPhysics + ); + makeChemistryModelType ( StandardChemistryModel, @@ -177,6 +191,13 @@ namespace Foam gasHThermoPhysics ); + makeChemistryModelType + ( + TDACChemistryModel, + psiReactionThermo, + PengRobinsonGasHThermoPhysics + ); + makeChemistryModelType ( TDACChemistryModel, @@ -234,6 +255,13 @@ namespace Foam gasHThermoPhysics ); + makeChemistryModelType + ( + TDACChemistryModel, + rhoReactionThermo, + PengRobinsonGasHThermoPhysics + ); + makeChemistryModelType ( TDACChemistryModel, @@ -292,6 +320,13 @@ namespace Foam gasEThermoPhysics ); + makeChemistryModelType + ( + StandardChemistryModel, + psiReactionThermo, + PengRobinsonGasEThermoPhysics + ); + makeChemistryModelType ( StandardChemistryModel, @@ -350,6 +385,13 @@ namespace Foam gasEThermoPhysics ); + makeChemistryModelType + ( + StandardChemistryModel, + rhoReactionThermo, + PengRobinsonGasEThermoPhysics + ); + makeChemistryModelType ( StandardChemistryModel, @@ -407,6 +449,13 @@ namespace Foam gasEThermoPhysics ); + makeChemistryModelType + ( + TDACChemistryModel, + psiReactionThermo, + PengRobinsonGasEThermoPhysics + ); + makeChemistryModelType ( TDACChemistryModel, @@ -464,6 +513,13 @@ namespace Foam gasEThermoPhysics ); + makeChemistryModelType + ( + TDACChemistryModel, + rhoReactionThermo, + PengRobinsonGasEThermoPhysics + ); + makeChemistryModelType ( TDACChemistryModel, diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/makeChemistryReductionMethods.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/makeChemistryReductionMethods.C index 41ba970eba..ef04fb80d9 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/makeChemistryReductionMethods.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/makeChemistryReductionMethods.C @@ -40,6 +40,11 @@ namespace Foam makeChemistryReductionMethods(psiReactionThermo, constGasHThermoPhysics); makeChemistryReductionMethods(psiReactionThermo, gasHThermoPhysics); makeChemistryReductionMethods + ( + psiReactionThermo, + PengRobinsonGasHThermoPhysics + ); + makeChemistryReductionMethods ( psiReactionThermo, constIncompressibleGasHThermoPhysics @@ -62,6 +67,11 @@ namespace Foam makeChemistryReductionMethods(rhoReactionThermo, constGasHThermoPhysics); makeChemistryReductionMethods(rhoReactionThermo, gasHThermoPhysics); makeChemistryReductionMethods + ( + rhoReactionThermo, + PengRobinsonGasHThermoPhysics + ); + makeChemistryReductionMethods ( rhoReactionThermo, constIncompressibleGasHThermoPhysics @@ -86,6 +96,11 @@ namespace Foam makeChemistryReductionMethods(psiReactionThermo, constGasEThermoPhysics); makeChemistryReductionMethods(psiReactionThermo, gasEThermoPhysics); makeChemistryReductionMethods + ( + psiReactionThermo, + PengRobinsonGasEThermoPhysics + ); + makeChemistryReductionMethods ( psiReactionThermo, constIncompressibleGasEThermoPhysics @@ -108,6 +123,11 @@ namespace Foam makeChemistryReductionMethods(rhoReactionThermo, constGasEThermoPhysics); makeChemistryReductionMethods(rhoReactionThermo, gasEThermoPhysics); makeChemistryReductionMethods + ( + rhoReactionThermo, + PengRobinsonGasEThermoPhysics + ); + makeChemistryReductionMethods ( rhoReactionThermo, constIncompressibleGasEThermoPhysics diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/makeChemistryTabulationMethods.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/makeChemistryTabulationMethods.C index 56023c4cc3..60b12fea48 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/makeChemistryTabulationMethods.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/makeChemistryTabulationMethods.C @@ -39,6 +39,7 @@ namespace Foam // Chemistry solvers based on sensibleEnthalpy makeChemistryTabulationMethods(psiReactionThermo, constGasHThermoPhysics); makeChemistryTabulationMethods(psiReactionThermo, gasHThermoPhysics); + makeChemistryTabulationMethods(psiReactionThermo, PengRobinsonGasHThermoPhysics); makeChemistryTabulationMethods ( psiReactionThermo, @@ -62,6 +63,7 @@ namespace Foam makeChemistryTabulationMethods(rhoReactionThermo, constGasHThermoPhysics); makeChemistryTabulationMethods(rhoReactionThermo, gasHThermoPhysics); + makeChemistryTabulationMethods(rhoReactionThermo, PengRobinsonGasHThermoPhysics); makeChemistryTabulationMethods ( rhoReactionThermo, @@ -87,6 +89,7 @@ namespace Foam makeChemistryTabulationMethods(psiReactionThermo, constGasEThermoPhysics); makeChemistryTabulationMethods(psiReactionThermo, gasEThermoPhysics); + makeChemistryTabulationMethods(psiReactionThermo, PengRobinsonGasEThermoPhysics); makeChemistryTabulationMethods ( psiReactionThermo, @@ -110,6 +113,7 @@ namespace Foam makeChemistryTabulationMethods(rhoReactionThermo, constGasEThermoPhysics); makeChemistryTabulationMethods(rhoReactionThermo, gasEThermoPhysics); + makeChemistryTabulationMethods(rhoReactionThermo, PengRobinsonGasEThermoPhysics); makeChemistryTabulationMethods ( rhoReactionThermo, diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolvers.C b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolvers.C index 40e3873a98..3c3d01b869 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolvers.C +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolvers.C @@ -38,6 +38,7 @@ namespace Foam // Chemistry solvers based on sensibleEnthalpy makeChemistrySolverTypes(psiReactionThermo, constGasHThermoPhysics); makeChemistrySolverTypes(psiReactionThermo, gasHThermoPhysics); + makeChemistrySolverTypes(psiReactionThermo, PengRobinsonGasHThermoPhysics); makeChemistrySolverTypes ( psiReactionThermo, @@ -61,6 +62,7 @@ namespace Foam makeChemistrySolverTypes(rhoReactionThermo, constGasHThermoPhysics); makeChemistrySolverTypes(rhoReactionThermo, gasHThermoPhysics); + makeChemistrySolverTypes(rhoReactionThermo, PengRobinsonGasHThermoPhysics); makeChemistrySolverTypes ( rhoReactionThermo, @@ -84,6 +86,7 @@ namespace Foam // Chemistry solvers based on sensibleInternalEnergy makeChemistrySolverTypes(psiReactionThermo, constGasEThermoPhysics); makeChemistrySolverTypes(psiReactionThermo, gasEThermoPhysics); + makeChemistrySolverTypes(psiReactionThermo, PengRobinsonGasEThermoPhysics); makeChemistrySolverTypes ( psiReactionThermo, @@ -105,6 +108,7 @@ namespace Foam makeChemistrySolverTypes(rhoReactionThermo, constGasEThermoPhysics); makeChemistrySolverTypes(rhoReactionThermo, gasEThermoPhysics); + makeChemistrySolverTypes(rhoReactionThermo, PengRobinsonGasEThermoPhysics); makeChemistrySolverTypes ( rhoReactionThermo, diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C index 8af12d74e1..8bbf316fe7 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2023 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -43,6 +44,7 @@ namespace Foam makeChemistryReader(constGasHThermoPhysics); makeChemistryReader(gasHThermoPhysics); +makeChemistryReader(PengRobinsonGasHThermoPhysics); makeChemistryReader(constIncompressibleGasHThermoPhysics); makeChemistryReader(incompressibleGasHThermoPhysics); makeChemistryReader(icoPoly8HThermoPhysics); @@ -53,6 +55,7 @@ makeChemistryReader(constHThermoPhysics); makeChemistryReaderType(foamChemistryReader, constGasHThermoPhysics); makeChemistryReaderType(foamChemistryReader, gasHThermoPhysics); +makeChemistryReaderType(foamChemistryReader, PengRobinsonGasHThermoPhysics); makeChemistryReaderType ( foamChemistryReader, @@ -70,6 +73,7 @@ makeChemistryReaderType(foamChemistryReader, constHThermoPhysics); makeChemistryReader(constGasEThermoPhysics); makeChemistryReader(gasEThermoPhysics); +makeChemistryReader(PengRobinsonGasEThermoPhysics); makeChemistryReader(constIncompressibleGasEThermoPhysics); makeChemistryReader(incompressibleGasEThermoPhysics); makeChemistryReader(icoPoly8EThermoPhysics); @@ -80,6 +84,7 @@ makeChemistryReader(constEThermoPhysics); makeChemistryReaderType(foamChemistryReader, constGasEThermoPhysics); makeChemistryReaderType(foamChemistryReader, gasEThermoPhysics); +makeChemistryReaderType(foamChemistryReader, PengRobinsonGasEThermoPhysics); makeChemistryReaderType ( foamChemistryReader, diff --git a/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermos.C b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermos.C index 0c941d16c9..b2c15db652 100644 --- a/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermos.C +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermos.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation + Copyright (C) 2023 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -32,6 +33,7 @@ License #include "specie.H" #include "perfectGas.H" +#include "PengRobinsonGas.H" #include "hConstThermo.H" #include "janafThermo.H" #include "sensibleEnthalpy.H" @@ -181,6 +183,131 @@ makeReactionThermos specie ); + +// Peng Robinson +makeReactionThermos +( + psiThermo, + psiReactionThermo, + hePsiThermo, + homogeneousMixture, + constTransport, + sensibleEnthalpy, + hConstThermo, + PengRobinsonGas, + specie +); + +makeReactionThermos +( + psiThermo, + psiReactionThermo, + hePsiThermo, + inhomogeneousMixture, + constTransport, + sensibleEnthalpy, + hConstThermo, + PengRobinsonGas, + specie +); + +makeReactionThermos +( + psiThermo, + psiReactionThermo, + hePsiThermo, + veryInhomogeneousMixture, + constTransport, + sensibleEnthalpy, + hConstThermo, + PengRobinsonGas, + specie +); + + +// sutherlandTransport, hConstThermo + +makeReactionThermos +( + psiThermo, + psiReactionThermo, + hePsiThermo, + homogeneousMixture, + sutherlandTransport, + sensibleEnthalpy, + hConstThermo, + PengRobinsonGas, + specie +); + +makeReactionThermos +( + psiThermo, + psiReactionThermo, + hePsiThermo, + inhomogeneousMixture, + sutherlandTransport, + sensibleEnthalpy, + hConstThermo, + PengRobinsonGas, + specie +); + +makeReactionThermos +( + psiThermo, + psiReactionThermo, + hePsiThermo, + veryInhomogeneousMixture, + sutherlandTransport, + sensibleEnthalpy, + hConstThermo, + PengRobinsonGas, + specie +); + + +// sutherlandTransport, janafThermo + +makeReactionThermos +( + psiThermo, + psiReactionThermo, + hePsiThermo, + homogeneousMixture, + sutherlandTransport, + sensibleEnthalpy, + janafThermo, + PengRobinsonGas, + specie +); + +makeReactionThermos +( + psiThermo, + psiReactionThermo, + hePsiThermo, + inhomogeneousMixture, + sutherlandTransport, + sensibleEnthalpy, + janafThermo, + PengRobinsonGas, + specie +); + +makeReactionThermos +( + psiThermo, + psiReactionThermo, + hePsiThermo, + veryInhomogeneousMixture, + sutherlandTransport, + sensibleEnthalpy, + janafThermo, + PengRobinsonGas, + specie +); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Multi-component thermo for sensible enthalpy @@ -245,6 +372,15 @@ makeThermoPhysicsReactionThermos gasHThermoPhysics ); +makeThermoPhysicsReactionThermos +( + psiThermo, + psiReactionThermo, + hePsiThermo, + reactingMixture, + PengRobinsonGasHThermoPhysics +); + // Single-step reaction thermo for sensible enthalpy @@ -278,6 +414,15 @@ makeThermoPhysicsReactionThermos gasEThermoPhysics ); +makeThermoPhysicsReactionThermos +( + psiThermo, + psiReactionThermo, + hePsiThermo, + reactingMixture, + PengRobinsonGasEThermoPhysics +); + // Single-step reaction thermo for internal energy diff --git a/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermos.C b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermos.C index 1f09cb4272..9979c00eed 100644 --- a/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermos.C +++ b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermos.C @@ -33,6 +33,7 @@ License #include "specie.H" #include "perfectGas.H" +#include "PengRobinsonGas.H" #include "incompressiblePerfectGas.H" #include "hConstThermo.H" #include "janafThermo.H" @@ -222,6 +223,130 @@ makeReactionThermos specie ); +// Peng Robinson +makeReactionThermos +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + homogeneousMixture, + constTransport, + sensibleEnthalpy, + hConstThermo, + PengRobinsonGas, + specie +); + +makeReactionThermos +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + inhomogeneousMixture, + constTransport, + sensibleEnthalpy, + hConstThermo, + PengRobinsonGas, + specie +); + +makeReactionThermos +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + veryInhomogeneousMixture, + constTransport, + sensibleEnthalpy, + hConstThermo, + PengRobinsonGas, + specie +); + + +// sutherlandTransport, hConstThermo + +makeReactionThermos +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + homogeneousMixture, + sutherlandTransport, + sensibleEnthalpy, + hConstThermo, + PengRobinsonGas, + specie +); + +makeReactionThermos +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + inhomogeneousMixture, + sutherlandTransport, + sensibleEnthalpy, + hConstThermo, + PengRobinsonGas, + specie +); + +makeReactionThermos +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + veryInhomogeneousMixture, + sutherlandTransport, + sensibleEnthalpy, + hConstThermo, + PengRobinsonGas, + specie +); + + +// sutherlandTransport, janafThermo + +makeReactionThermos +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + homogeneousMixture, + sutherlandTransport, + sensibleEnthalpy, + janafThermo, + PengRobinsonGas, + specie +); + +makeReactionThermos +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + inhomogeneousMixture, + sutherlandTransport, + sensibleEnthalpy, + janafThermo, + PengRobinsonGas, + specie +); + +makeReactionThermos +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + veryInhomogeneousMixture, + sutherlandTransport, + sensibleEnthalpy, + janafThermo, + PengRobinsonGas, + specie +); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Multi-component thermo for internal energy @@ -382,6 +507,14 @@ makeThermoPhysicsReactionThermos constEThermoPhysics ); +makeThermoPhysicsReactionThermos +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + reactingMixture, + PengRobinsonGasEThermoPhysics +); // Single-step reaction thermo for internal energy @@ -394,7 +527,6 @@ makeThermoPhysicsReactionThermos gasEThermoPhysics ); - // Single-component thermo for internal energy makeThermoPhysicsReactionThermo @@ -581,6 +713,15 @@ makeThermoPhysicsReactionThermos constHThermoPhysics ); +makeThermoPhysicsReactionThermos +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + reactingMixture, + PengRobinsonGasHThermoPhysics +); + // Reaction thermo for sensible enthalpy makeThermoPhysicsReactionThermos diff --git a/src/thermophysicalModels/specie/include/reactionTypes.H b/src/thermophysicalModels/specie/include/reactionTypes.H index 9f6ba4812e..ef3a50a82c 100644 --- a/src/thermophysicalModels/specie/include/reactionTypes.H +++ b/src/thermophysicalModels/specie/include/reactionTypes.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2013 OpenFOAM Foundation + Copyright (C) 2023 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -50,6 +51,8 @@ namespace Foam typedef Reaction gasHReaction; + typedef Reaction PengRobinsonGasHReaction; + typedef Reaction constIncompressibleGasHReaction; @@ -71,6 +74,8 @@ namespace Foam typedef Reaction gasEReaction; + typedef Reaction PengRobinsonGasEReaction; + typedef Reaction constIncompressibleGasEReaction; diff --git a/src/thermophysicalModels/specie/include/thermoPhysicsTypes.H b/src/thermophysicalModels/specie/include/thermoPhysicsTypes.H index 7177d2f8d8..91b0f5b665 100644 --- a/src/thermophysicalModels/specie/include/thermoPhysicsTypes.H +++ b/src/thermophysicalModels/specie/include/thermoPhysicsTypes.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2023 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -37,6 +37,7 @@ Description #include "specie.H" #include "perfectGas.H" +#include "PengRobinsonGas.H" #include "incompressiblePerfectGas.H" #include "rPolynomial.H" #include "perfectFluid.H" @@ -91,6 +92,19 @@ namespace Foam > > gasHThermoPhysics; + typedef + sutherlandTransport + < + species::thermo + < + janafThermo + < + PengRobinsonGas + >, + sensibleEnthalpy + > + > PengRobinsonGasHThermoPhysics; + typedef constTransport < @@ -244,6 +258,19 @@ namespace Foam > > gasEThermoPhysics; + typedef + sutherlandTransport + < + species::thermo + < + janafThermo + < + PengRobinsonGas + >, + sensibleInternalEnergy + > + > PengRobinsonGasEThermoPhysics; + typedef constTransport < diff --git a/src/thermophysicalModels/specie/reaction/reactions/makeReactions.C b/src/thermophysicalModels/specie/reaction/reactions/makeReactions.C index f94ccfb491..0364766d6a 100644 --- a/src/thermophysicalModels/specie/reaction/reactions/makeReactions.C +++ b/src/thermophysicalModels/specie/reaction/reactions/makeReactions.C @@ -87,6 +87,7 @@ namespace Foam // sensible enthalpy based reactions makeReactions(constGasHThermoPhysics, constGasHReaction) makeReactions(gasHThermoPhysics, gasHReaction) + makeReactions(PengRobinsonGasHThermoPhysics, PengRobinsonGasHReaction) makeReactions ( constIncompressibleGasHThermoPhysics, @@ -105,6 +106,7 @@ namespace Foam makeReactions(constGasEThermoPhysics, constGasEReaction) makeReactions(gasEThermoPhysics, gasEReaction) + makeReactions(PengRobinsonGasEThermoPhysics, PengRobinsonGasEReaction) makeReactions ( constIncompressibleGasEThermoPhysics,