From b9d7740e1f184e515b1b3ff4cdaff28a1e46e822 Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Mon, 9 Apr 2018 09:52:38 +0100 Subject: [PATCH] reactingEulerFoam: Update and instantiate interface composition models The nonRandomTwoLiquid and Roult interface composition models have been instantiated (and updated so that they compile), and a fuller set of multi-component liquids and multi-component and reacting gases have been used. The selection name of the saturated and nonRandomTwoLiquid models have also been changed to remove the capitalisation from the first letter, as is consistent with other sub-models that are not proper nouns. --- .../InterfaceCompositionModels.C | 82 ++++++++++++++++++- .../NonRandomTwoLiquid/NonRandomTwoLiquid.C | 2 +- .../NonRandomTwoLiquid/NonRandomTwoLiquid.H | 2 +- .../Saturated/Saturated.H | 2 +- .../constant/phaseProperties | 2 +- .../constant/phaseProperties | 2 +- .../constant/phaseProperties | 2 +- 7 files changed, 87 insertions(+), 7 deletions(-) diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModels.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModels.C index 422276d65..4c74aeeb4 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-2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -58,6 +58,8 @@ namespace Foam { using namespace interfaceCompositionModels; + // Gas-side models + // multi-component gas in the presence of a pure liquid makeInterfaceCompositionType ( @@ -99,6 +101,46 @@ namespace Foam multiComponentMixture, constFluidEThermoPhysics ); + makeSpecieInterfaceCompositionType + ( + NonRandomTwoLiquid, + heRhoThermo, + rhoReactionThermo, + multiComponentMixture, + constGasEThermoPhysics, + heRhoThermo, + rhoReactionThermo, + multiComponentMixture, + constFluidEThermoPhysics + ); + + // reacting gas in the presence of a multi-component liquid + makeSpecieInterfaceCompositionType + ( + Saturated, + heRhoThermo, + rhoReactionThermo, + reactingMixture, + constGasEThermoPhysics, + heRhoThermo, + rhoReactionThermo, + multiComponentMixture, + constFluidEThermoPhysics + ); + makeSpecieInterfaceCompositionType + ( + NonRandomTwoLiquid, + heRhoThermo, + rhoReactionThermo, + reactingMixture, + constGasEThermoPhysics, + heRhoThermo, + rhoReactionThermo, + multiComponentMixture, + constFluidEThermoPhysics + ); + + // Liquid-side models // multi-component liquid in the presence of a multi-component gas makeSpecieInterfaceCompositionType @@ -113,6 +155,44 @@ namespace Foam multiComponentMixture, constGasEThermoPhysics ); + makeSpecieInterfaceCompositionType + ( + Raoult, + heRhoThermo, + rhoReactionThermo, + multiComponentMixture, + constFluidEThermoPhysics, + heRhoThermo, + rhoReactionThermo, + multiComponentMixture, + constGasEThermoPhysics + ); + + // multi-component liquid in the presence of a reacting gas + makeSpecieInterfaceCompositionType + ( + Henry, + heRhoThermo, + rhoReactionThermo, + multiComponentMixture, + constFluidEThermoPhysics, + heRhoThermo, + rhoReactionThermo, + reactingMixture, + constGasEThermoPhysics + ); + makeSpecieInterfaceCompositionType + ( + Raoult, + heRhoThermo, + rhoReactionThermo, + multiComponentMixture, + constFluidEThermoPhysics, + heRhoThermo, + rhoReactionThermo, + reactingMixture, + constGasEThermoPhysics + ); } // ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/NonRandomTwoLiquid/NonRandomTwoLiquid.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/NonRandomTwoLiquid/NonRandomTwoLiquid.C index 4a2af750c..ff640f378 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/NonRandomTwoLiquid/NonRandomTwoLiquid.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/NonRandomTwoLiquid/NonRandomTwoLiquid.C @@ -155,7 +155,7 @@ update const volScalarField& Tf ) { - volScalarField W(this->thermo_.composition().W()); + volScalarField W(this->thermo_.W()); volScalarField X1 ( diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/NonRandomTwoLiquid/NonRandomTwoLiquid.H b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/NonRandomTwoLiquid/NonRandomTwoLiquid.H index d9b688aad..c9a9019be 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/NonRandomTwoLiquid/NonRandomTwoLiquid.H +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/NonRandomTwoLiquid/NonRandomTwoLiquid.H @@ -110,7 +110,7 @@ class NonRandomTwoLiquid public: //- Runtime type information - TypeName("NonRandomTwoLiquid"); + TypeName("nonRandomTwoLiquid"); // Constructors diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Saturated/Saturated.H b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Saturated/Saturated.H index 9f2c2e623..1e1eba3d2 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Saturated/Saturated.H +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Saturated/Saturated.H @@ -82,7 +82,7 @@ protected: public: //- Runtime type information - TypeName("Saturated"); + TypeName("saturated"); // Constructors diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnEvaporatingReacting/constant/phaseProperties b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnEvaporatingReacting/constant/phaseProperties index 1cbcbc71c..887820e22 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnEvaporatingReacting/constant/phaseProperties +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnEvaporatingReacting/constant/phaseProperties @@ -137,7 +137,7 @@ interfaceComposition ( (gas in liquid) { - type Saturated; + type saturated; species ( H2O ); Le 1.0; saturationPressure diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporating/constant/phaseProperties b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporating/constant/phaseProperties index 98af514ee..7d88afcf0 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporating/constant/phaseProperties +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporating/constant/phaseProperties @@ -137,7 +137,7 @@ interfaceComposition ( (gas in liquid) { - type Saturated; + type saturated; species ( H2O ); Le 1.0; saturationPressure diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporatingDissolving/constant/phaseProperties b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporatingDissolving/constant/phaseProperties index 10a402fc0..f97b0c7f4 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporatingDissolving/constant/phaseProperties +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporatingDissolving/constant/phaseProperties @@ -138,7 +138,7 @@ interfaceComposition ( (gas in liquid) { - type Saturated; + type saturated; species ( water ); Le 1.0; saturationPressure