diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModels.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModels.C index 4c74aeeb4..df02dd6c4 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModels.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModels.C @@ -54,143 +54,122 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +#define makeSpecieInterfaceCompositionModel(Model, Thermo1, Thermo2) \ + \ + /* Composition at an interface with a multi-component mixture */ \ + makeSpecieInterfaceCompositionType \ + ( \ + Model, \ + heRhoThermo, rhoReactionThermo, \ + multiComponentMixture, Thermo1, \ + heRhoThermo, rhoReactionThermo, \ + multiComponentMixture, Thermo2 \ + ); \ + makeSpecieInterfaceCompositionType \ + ( \ + Model, \ + heRhoThermo, rhoReactionThermo, \ + reactingMixture, Thermo1, \ + heRhoThermo, rhoReactionThermo, \ + multiComponentMixture, Thermo2 \ + ); \ + \ + /* Composition at an interface with a reacting mixture */ \ + makeSpecieInterfaceCompositionType \ + ( \ + Model, \ + heRhoThermo, rhoReactionThermo, \ + multiComponentMixture, Thermo1, \ + heRhoThermo, rhoReactionThermo, \ + reactingMixture, Thermo2 \ + ); \ + makeSpecieInterfaceCompositionType \ + ( \ + Model, \ + heRhoThermo, rhoReactionThermo, \ + reactingMixture, Thermo1, \ + heRhoThermo, rhoReactionThermo, \ + reactingMixture, Thermo2 \ + ); + +#define makeInterfaceCompositionModel(Model, Thermo1, Thermo2) \ + \ + /* Composition at an interface with a pure mixture */ \ + makeInterfaceCompositionType \ + ( \ + Model, \ + heRhoThermo, rhoReactionThermo, \ + multiComponentMixture, Thermo1, \ + heRhoThermo, rhoThermo, \ + pureMixture, Thermo2 \ + ); \ + makeInterfaceCompositionType \ + ( \ + Model, \ + heRhoThermo, rhoReactionThermo, \ + reactingMixture, Thermo1, \ + heRhoThermo, rhoThermo, \ + pureMixture, Thermo2 \ + ); \ + \ + /* Composition at an interface with non-pure mixtures */ \ + makeSpecieInterfaceCompositionModel(Model, Thermo1, Thermo2) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + namespace Foam { using namespace interfaceCompositionModels; // Gas-side models - - // multi-component gas in the presence of a pure liquid - makeInterfaceCompositionType + makeInterfaceCompositionModel ( Saturated, - heRhoThermo, - rhoReactionThermo, - multiComponentMixture, gasEThermoPhysics, - heRhoThermo, - rhoThermo, - pureMixture, constFluidEThermoPhysics ); - - // reacting gas in the presence of a pure liquid - makeInterfaceCompositionType + makeInterfaceCompositionModel ( Saturated, - heRhoThermo, - rhoReactionThermo, - reactingMixture, - gasEThermoPhysics, - heRhoThermo, - rhoThermo, - pureMixture, - constFluidEThermoPhysics - ); - - // multi-component gas in the presence of a multi-component liquid - makeSpecieInterfaceCompositionType - ( - Saturated, - heRhoThermo, - rhoReactionThermo, - multiComponentMixture, constGasEThermoPhysics, - heRhoThermo, - rhoReactionThermo, - multiComponentMixture, constFluidEThermoPhysics ); - makeSpecieInterfaceCompositionType + makeSpecieInterfaceCompositionModel ( NonRandomTwoLiquid, - heRhoThermo, - rhoReactionThermo, - multiComponentMixture, - constGasEThermoPhysics, - heRhoThermo, - rhoReactionThermo, - multiComponentMixture, + gasEThermoPhysics, constFluidEThermoPhysics ); - - // reacting gas in the presence of a multi-component liquid - makeSpecieInterfaceCompositionType - ( - Saturated, - heRhoThermo, - rhoReactionThermo, - reactingMixture, - constGasEThermoPhysics, - heRhoThermo, - rhoReactionThermo, - multiComponentMixture, - constFluidEThermoPhysics - ); - makeSpecieInterfaceCompositionType + makeSpecieInterfaceCompositionModel ( NonRandomTwoLiquid, - heRhoThermo, - rhoReactionThermo, - reactingMixture, constGasEThermoPhysics, - heRhoThermo, - rhoReactionThermo, - multiComponentMixture, constFluidEThermoPhysics ); // Liquid-side models - - // multi-component liquid in the presence of a multi-component gas - makeSpecieInterfaceCompositionType + makeSpecieInterfaceCompositionModel ( Henry, - heRhoThermo, - rhoReactionThermo, - multiComponentMixture, constFluidEThermoPhysics, - heRhoThermo, - rhoReactionThermo, - multiComponentMixture, - constGasEThermoPhysics + gasEThermoPhysics ); - makeSpecieInterfaceCompositionType - ( - Raoult, - heRhoThermo, - rhoReactionThermo, - multiComponentMixture, - constFluidEThermoPhysics, - heRhoThermo, - rhoReactionThermo, - multiComponentMixture, - constGasEThermoPhysics - ); - - // multi-component liquid in the presence of a reacting gas - makeSpecieInterfaceCompositionType + makeSpecieInterfaceCompositionModel ( Henry, - heRhoThermo, - rhoReactionThermo, - multiComponentMixture, constFluidEThermoPhysics, - heRhoThermo, - rhoReactionThermo, - reactingMixture, constGasEThermoPhysics ); - makeSpecieInterfaceCompositionType + makeSpecieInterfaceCompositionModel + ( + Raoult, + constFluidEThermoPhysics, + gasEThermoPhysics + ); + makeSpecieInterfaceCompositionModel ( Raoult, - heRhoThermo, - rhoReactionThermo, - multiComponentMixture, constFluidEThermoPhysics, - heRhoThermo, - rhoReactionThermo, - reactingMixture, constGasEThermoPhysics ); } diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/BasicChemistryModel/BasicChemistryModels.C b/src/thermophysicalModels/chemistryModel/chemistryModel/BasicChemistryModel/BasicChemistryModels.C index c71217a5c..f0ee5ead8 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/BasicChemistryModel/BasicChemistryModels.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/BasicChemistryModel/BasicChemistryModels.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -82,6 +82,27 @@ namespace Foam icoPoly8HThermoPhysics ); + makeChemistryModelType + ( + StandardChemistryModel, + psiReactionThermo, + constFluidHThermoPhysics + ); + + makeChemistryModelType + ( + StandardChemistryModel, + psiReactionThermo, + constAdiabaticFluidHThermoPhysics + ); + + makeChemistryModelType + ( + StandardChemistryModel, + psiReactionThermo, + constHThermoPhysics + ); + makeChemistryModelType ( @@ -118,6 +139,27 @@ namespace Foam icoPoly8HThermoPhysics ); + makeChemistryModelType + ( + StandardChemistryModel, + rhoReactionThermo, + constFluidHThermoPhysics + ); + + makeChemistryModelType + ( + StandardChemistryModel, + rhoReactionThermo, + constAdiabaticFluidHThermoPhysics + ); + + makeChemistryModelType + ( + StandardChemistryModel, + rhoReactionThermo, + constHThermoPhysics + ); + makeChemistryModelType ( @@ -154,6 +196,27 @@ namespace Foam icoPoly8HThermoPhysics ); + makeChemistryModelType + ( + TDACChemistryModel, + psiReactionThermo, + constFluidHThermoPhysics + ); + + makeChemistryModelType + ( + TDACChemistryModel, + psiReactionThermo, + constAdiabaticFluidHThermoPhysics + ); + + makeChemistryModelType + ( + TDACChemistryModel, + psiReactionThermo, + constHThermoPhysics + ); + makeChemistryModelType ( @@ -190,6 +253,27 @@ namespace Foam icoPoly8HThermoPhysics ); + makeChemistryModelType + ( + TDACChemistryModel, + rhoReactionThermo, + constFluidHThermoPhysics + ); + + makeChemistryModelType + ( + TDACChemistryModel, + rhoReactionThermo, + constAdiabaticFluidHThermoPhysics + ); + + makeChemistryModelType + ( + TDACChemistryModel, + rhoReactionThermo, + constHThermoPhysics + ); + // Chemistry moldels based on sensibleInternalEnergy makeChemistryModelType @@ -227,6 +311,28 @@ namespace Foam icoPoly8EThermoPhysics ); + makeChemistryModelType + ( + StandardChemistryModel, + psiReactionThermo, + constFluidEThermoPhysics + ); + + makeChemistryModelType + ( + StandardChemistryModel, + psiReactionThermo, + constAdiabaticFluidEThermoPhysics + ); + + makeChemistryModelType + ( + StandardChemistryModel, + psiReactionThermo, + constEThermoPhysics + ); + + makeChemistryModelType ( @@ -263,6 +369,27 @@ namespace Foam icoPoly8EThermoPhysics ); + makeChemistryModelType + ( + StandardChemistryModel, + rhoReactionThermo, + constFluidEThermoPhysics + ); + + makeChemistryModelType + ( + StandardChemistryModel, + rhoReactionThermo, + constAdiabaticFluidEThermoPhysics + ); + + makeChemistryModelType + ( + StandardChemistryModel, + rhoReactionThermo, + constEThermoPhysics + ); + makeChemistryModelType ( @@ -299,6 +426,27 @@ namespace Foam icoPoly8EThermoPhysics ); + makeChemistryModelType + ( + TDACChemistryModel, + psiReactionThermo, + constFluidEThermoPhysics + ); + + makeChemistryModelType + ( + TDACChemistryModel, + psiReactionThermo, + constAdiabaticFluidEThermoPhysics + ); + + makeChemistryModelType + ( + TDACChemistryModel, + psiReactionThermo, + constEThermoPhysics + ); + makeChemistryModelType ( @@ -334,6 +482,27 @@ namespace Foam rhoReactionThermo, icoPoly8EThermoPhysics ); + + makeChemistryModelType + ( + TDACChemistryModel, + rhoReactionThermo, + constFluidEThermoPhysics + ); + + makeChemistryModelType + ( + TDACChemistryModel, + rhoReactionThermo, + constAdiabaticFluidEThermoPhysics + ); + + makeChemistryModelType + ( + TDACChemistryModel, + rhoReactionThermo, + constEThermoPhysics + ); } // ************************************************************************* // diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/makeChemistryReductionMethods.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/makeChemistryReductionMethods.C index e221f7bf3..23a8c9119 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/makeChemistryReductionMethods.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/makeChemistryReductionMethods.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -48,6 +48,13 @@ namespace Foam incompressibleGasHThermoPhysics ); makeChemistryReductionMethods(psiReactionThermo, icoPoly8HThermoPhysics); + makeChemistryReductionMethods(psiReactionThermo, constFluidHThermoPhysics); + makeChemistryReductionMethods + ( + psiReactionThermo, + constAdiabaticFluidHThermoPhysics + ); + makeChemistryReductionMethods(psiReactionThermo, constHThermoPhysics); makeChemistryReductionMethods(rhoReactionThermo, constGasHThermoPhysics); makeChemistryReductionMethods(rhoReactionThermo, gasHThermoPhysics); @@ -62,6 +69,13 @@ namespace Foam incompressibleGasHThermoPhysics ); makeChemistryReductionMethods(rhoReactionThermo, icoPoly8HThermoPhysics); + makeChemistryReductionMethods(rhoReactionThermo, constFluidHThermoPhysics); + makeChemistryReductionMethods + ( + rhoReactionThermo, + constAdiabaticFluidHThermoPhysics + ); + makeChemistryReductionMethods(rhoReactionThermo, constHThermoPhysics); // Chemistry solvers based on sensibleInternalEnergy @@ -78,6 +92,13 @@ namespace Foam incompressibleGasEThermoPhysics ); makeChemistryReductionMethods(psiReactionThermo, icoPoly8EThermoPhysics); + makeChemistryReductionMethods(psiReactionThermo, constFluidEThermoPhysics); + makeChemistryReductionMethods + ( + psiReactionThermo, + constAdiabaticFluidEThermoPhysics + ); + makeChemistryReductionMethods(psiReactionThermo, constEThermoPhysics); makeChemistryReductionMethods(rhoReactionThermo, constGasEThermoPhysics); makeChemistryReductionMethods(rhoReactionThermo, gasEThermoPhysics); @@ -92,6 +113,13 @@ namespace Foam incompressibleGasEThermoPhysics ); makeChemistryReductionMethods(rhoReactionThermo, icoPoly8EThermoPhysics); + makeChemistryReductionMethods(rhoReactionThermo, constFluidEThermoPhysics); + makeChemistryReductionMethods + ( + rhoReactionThermo, + constAdiabaticFluidEThermoPhysics + ); + makeChemistryReductionMethods(rhoReactionThermo, constEThermoPhysics); } diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/makeChemistryTabulationMethods.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/makeChemistryTabulationMethods.C index 2ac8c3960..6e0ff7e03 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/makeChemistryTabulationMethods.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/makeChemistryTabulationMethods.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -48,9 +48,15 @@ namespace Foam incompressibleGasHThermoPhysics ); makeChemistryTabulationMethods(psiReactionThermo, icoPoly8HThermoPhysics); + makeChemistryTabulationMethods(psiReactionThermo, constFluidHThermoPhysics); + makeChemistryTabulationMethods + ( + psiReactionThermo, + constAdiabaticFluidHThermoPhysics + ); + makeChemistryTabulationMethods(psiReactionThermo, constHThermoPhysics); makeChemistryTabulationMethods(rhoReactionThermo, constGasHThermoPhysics); - makeChemistryTabulationMethods(rhoReactionThermo, gasHThermoPhysics); makeChemistryTabulationMethods ( @@ -63,11 +69,17 @@ namespace Foam incompressibleGasHThermoPhysics ); makeChemistryTabulationMethods(rhoReactionThermo, icoPoly8HThermoPhysics); + makeChemistryTabulationMethods(rhoReactionThermo, constFluidHThermoPhysics); + makeChemistryTabulationMethods + ( + rhoReactionThermo, + constAdiabaticFluidHThermoPhysics + ); + makeChemistryTabulationMethods(rhoReactionThermo, constHThermoPhysics); // Chemistry solvers based on sensibleInternalEnergy makeChemistryTabulationMethods(psiReactionThermo, constGasEThermoPhysics); - makeChemistryTabulationMethods(psiReactionThermo, gasEThermoPhysics); makeChemistryTabulationMethods ( @@ -80,9 +92,15 @@ namespace Foam incompressibleGasEThermoPhysics ); makeChemistryTabulationMethods(psiReactionThermo, icoPoly8EThermoPhysics); + makeChemistryTabulationMethods(psiReactionThermo, constFluidEThermoPhysics); + makeChemistryTabulationMethods + ( + psiReactionThermo, + constAdiabaticFluidEThermoPhysics + ); + makeChemistryTabulationMethods(psiReactionThermo, constEThermoPhysics); makeChemistryTabulationMethods(rhoReactionThermo, constGasEThermoPhysics); - makeChemistryTabulationMethods(rhoReactionThermo, gasEThermoPhysics); makeChemistryTabulationMethods ( @@ -95,6 +113,13 @@ namespace Foam incompressibleGasEThermoPhysics ); makeChemistryTabulationMethods(rhoReactionThermo, icoPoly8EThermoPhysics); + makeChemistryTabulationMethods(rhoReactionThermo, constFluidEThermoPhysics); + makeChemistryTabulationMethods + ( + rhoReactionThermo, + constAdiabaticFluidEThermoPhysics + ); + makeChemistryTabulationMethods(rhoReactionThermo, constEThermoPhysics); } diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolvers.C b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolvers.C index 14743c8af..40cd5468b 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolvers.C +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolvers.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,9 +44,17 @@ namespace Foam makeChemistrySolverTypes ( psiReactionThermo, - incompressibleGasHThermoPhysics) - ; + incompressibleGasHThermoPhysics + ); makeChemistrySolverTypes(psiReactionThermo, icoPoly8HThermoPhysics); + makeChemistrySolverTypes(psiReactionThermo, constFluidHThermoPhysics); + makeChemistrySolverTypes + ( + psiReactionThermo, + constAdiabaticFluidHThermoPhysics + ); + makeChemistrySolverTypes(psiReactionThermo, constHThermoPhysics); + makeChemistrySolverTypes(rhoReactionThermo, constGasHThermoPhysics); makeChemistrySolverTypes(rhoReactionThermo, gasHThermoPhysics); makeChemistrySolverTypes @@ -60,6 +68,13 @@ namespace Foam incompressibleGasHThermoPhysics ); makeChemistrySolverTypes(rhoReactionThermo, icoPoly8HThermoPhysics); + makeChemistrySolverTypes(rhoReactionThermo, constFluidHThermoPhysics); + makeChemistrySolverTypes + ( + rhoReactionThermo, + constAdiabaticFluidHThermoPhysics + ); + makeChemistrySolverTypes(rhoReactionThermo, constHThermoPhysics); // Chemistry solvers based on sensibleInternalEnergy makeChemistrySolverTypes(psiReactionThermo, constGasEThermoPhysics); @@ -75,6 +90,14 @@ namespace Foam incompressibleGasEThermoPhysics ); makeChemistrySolverTypes(psiReactionThermo, icoPoly8EThermoPhysics); + makeChemistrySolverTypes(psiReactionThermo, constFluidEThermoPhysics); + makeChemistrySolverTypes + ( + psiReactionThermo, + constAdiabaticFluidEThermoPhysics + ); + makeChemistrySolverTypes(psiReactionThermo, constEThermoPhysics); + makeChemistrySolverTypes(rhoReactionThermo, constGasEThermoPhysics); makeChemistrySolverTypes(rhoReactionThermo, gasEThermoPhysics); makeChemistrySolverTypes @@ -88,6 +111,13 @@ namespace Foam incompressibleGasEThermoPhysics ); makeChemistrySolverTypes(rhoReactionThermo, icoPoly8EThermoPhysics); + makeChemistrySolverTypes(rhoReactionThermo, constFluidEThermoPhysics); + makeChemistrySolverTypes + ( + rhoReactionThermo, + constAdiabaticFluidEThermoPhysics + ); + makeChemistrySolverTypes(rhoReactionThermo, constEThermoPhysics); } diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C index fd48f1269..689f9211e 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,6 +44,9 @@ makeChemistryReader(gasHThermoPhysics); makeChemistryReader(constIncompressibleGasHThermoPhysics); makeChemistryReader(incompressibleGasHThermoPhysics); makeChemistryReader(icoPoly8HThermoPhysics); +makeChemistryReader(constFluidHThermoPhysics); +makeChemistryReader(constAdiabaticFluidHThermoPhysics); +makeChemistryReader(constHThermoPhysics); makeChemistryReaderType(foamChemistryReader, constGasHThermoPhysics); makeChemistryReaderType(foamChemistryReader, gasHThermoPhysics); @@ -54,7 +57,9 @@ makeChemistryReaderType ); makeChemistryReaderType(foamChemistryReader, incompressibleGasHThermoPhysics); makeChemistryReaderType(foamChemistryReader, icoPoly8HThermoPhysics); - +makeChemistryReaderType(foamChemistryReader, constFluidHThermoPhysics); +makeChemistryReaderType(foamChemistryReader, constAdiabaticFluidHThermoPhysics); +makeChemistryReaderType(foamChemistryReader, constHThermoPhysics); // Solid chemistry readers based on sensibleInternalEnergy @@ -64,6 +69,9 @@ makeChemistryReader(gasEThermoPhysics); makeChemistryReader(constIncompressibleGasEThermoPhysics); makeChemistryReader(incompressibleGasEThermoPhysics); makeChemistryReader(icoPoly8EThermoPhysics); +makeChemistryReader(constFluidEThermoPhysics); +makeChemistryReader(constAdiabaticFluidEThermoPhysics); +makeChemistryReader(constEThermoPhysics); makeChemistryReaderType(foamChemistryReader, constGasEThermoPhysics); makeChemistryReaderType(foamChemistryReader, gasEThermoPhysics); @@ -74,6 +82,9 @@ makeChemistryReaderType ); makeChemistryReaderType(foamChemistryReader, incompressibleGasEThermoPhysics); makeChemistryReaderType(foamChemistryReader, icoPoly8EThermoPhysics); +makeChemistryReaderType(foamChemistryReader, constFluidEThermoPhysics); +makeChemistryReaderType(foamChemistryReader, constAdiabaticFluidEThermoPhysics); +makeChemistryReaderType(foamChemistryReader, constEThermoPhysics); // Solid chemistry readers for solids based on sensibleInternalEnergy diff --git a/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermos.C b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermos.C index 3d0cab807..4230e5a64 100644 --- a/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermos.C +++ b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermos.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -341,6 +341,33 @@ makeThermoPhysicsReactionThermos icoPoly8EThermoPhysics ); +makeThermoPhysicsReactionThermos +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + reactingMixture, + constFluidEThermoPhysics +); + +makeThermoPhysicsReactionThermos +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + reactingMixture, + constAdiabaticFluidEThermoPhysics +); + +makeThermoPhysicsReactionThermos +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + reactingMixture, + constEThermoPhysics +); + // Single-step reaction thermo for internal energy @@ -568,6 +595,33 @@ makeThermoPhysicsReactionThermos icoPoly8HThermoPhysics ); +makeThermoPhysicsReactionThermos +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + reactingMixture, + constFluidHThermoPhysics +); + +makeThermoPhysicsReactionThermos +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + reactingMixture, + constAdiabaticFluidHThermoPhysics +); + +makeThermoPhysicsReactionThermos +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + reactingMixture, + constHThermoPhysics +); + // Single-step reaction thermo for sensible enthalpy diff --git a/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluidI.H b/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluidI.H index 5ed92330c..92e6a6763 100644 --- a/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluidI.H +++ b/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluidI.H @@ -231,15 +231,28 @@ inline Foam::perfectFluid Foam::operator== == static_cast(pf2) ); - const scalar Y1 = pf1.Y()/sp.Y(); - const scalar Y2 = pf2.Y()/sp.Y(); + if (mag(sp.Y()) < small) + { + return perfectFluid + ( + sp, + pf1.R_, + pf1.rho0_ + ); + } + else + { + const scalar Y1 = pf1.Y()/sp.Y(); + const scalar Y2 = pf2.Y()/sp.Y(); + const scalar oneByR = Y2/pf2.R_ - Y1/pf1.R_; - return perfectFluid - ( - sp, - 1.0/(Y2/pf2.R_ - Y1/pf1.R_), - Y2*pf2.rho0_ - Y1*pf1.rho0_ - ); + return perfectFluid + ( + sp, + mag(oneByR) < small ? great : 1/oneByR, + Y2*pf2.rho0_ - Y1*pf1.rho0_ + ); + } } diff --git a/src/thermophysicalModels/specie/include/reactionTypes.H b/src/thermophysicalModels/specie/include/reactionTypes.H index b58c3098b..ac63e792b 100644 --- a/src/thermophysicalModels/specie/include/reactionTypes.H +++ b/src/thermophysicalModels/specie/include/reactionTypes.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-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,6 +56,14 @@ namespace Foam typedef Reaction icoPoly8HReaction; + typedef Reaction constFluidHReaction; + + typedef Reaction + constAdiabaticFluidHReaction; + + typedef Reaction constHReaction; + + // internal ennergy based reactions typedef Reaction constGasEReaction; @@ -68,6 +76,13 @@ namespace Foam incompressibleGasEReaction; typedef Reaction icoPoly8EReaction; + + typedef Reaction constFluidEReaction; + + typedef Reaction + constAdiabaticFluidEReaction; + + typedef Reaction constEReaction; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/specie/reaction/reactions/makeReactions.C b/src/thermophysicalModels/specie/reaction/reactions/makeReactions.C index d6b9a3c0b..d07b8270f 100644 --- a/src/thermophysicalModels/specie/reaction/reactions/makeReactions.C +++ b/src/thermophysicalModels/specie/reaction/reactions/makeReactions.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -92,6 +92,13 @@ namespace Foam ) makeReactions(incompressibleGasHThermoPhysics, incompressibleGasHReaction) makeReactions(icoPoly8HThermoPhysics, icoPoly8HReaction) + makeReactions(constFluidHThermoPhysics, constFluidHReaction) + makeReactions + ( + constAdiabaticFluidHThermoPhysics, + constAdiabaticFluidHReaction + ) + makeReactions(constHThermoPhysics, constHReaction) makeReactions(constGasEThermoPhysics, constGasEReaction) makeReactions(gasEThermoPhysics, gasEReaction) @@ -102,6 +109,13 @@ namespace Foam ) makeReactions(incompressibleGasEThermoPhysics, incompressibleGasEReaction) makeReactions(icoPoly8EThermoPhysics, icoPoly8EReaction) + makeReactions(constFluidEThermoPhysics, constFluidEReaction) + makeReactions + ( + constAdiabaticFluidEThermoPhysics, + constAdiabaticFluidEReaction + ) + makeReactions(constEThermoPhysics, constEReaction) } // ************************************************************************* //