# How Phase change with reactingTwoEulerFoam/reactingMultiphaseEulerFoam works?

 Register Blogs Members List Search Today's Posts Mark Forums Read

 December 5, 2017, 10:32 How Phase change with reactingTwoEulerFoam/reactingMultiphaseEulerFoam works? #1 New Member   Join Date: Dec 2017 Posts: 5 Rep Power: 8 Dear All, I am currently trying to model phase change (condensation and evaporation) with reactingTwoPhaseEulerFoam and reactingMultiphaseEulerFoam in OpenFoam 5.0. I would like to know why in the tutorial multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporatingDissolving/ the Hf values are set to -1.3435e+07 and -1.5879e+07 for vapor and liquid water and how the phase change model is working ? It is explained in the User guide that Hf is suppose to be the heat of fusion and then i don't understand why these values are so high and negative (as the Heat of fusion of the water is 333 000 J/Kg and the Heat of vaporization is 2 257 000 J/Kg). As far as i understand looking into the code (InterfaceCompositionPhaseChangePhaseSystem.C) , the model is trying to : Compute the temperature at the interface of 2 phases thanks to the formula through a newton algorithm. Compute the saturation pressure and then the mass fraction thanks to the the To do so the program should compute which is done in Foam::InterfaceCompositionModel::L with : Code:  forAll(p, celli) { L[celli] = localThermo.Ha(p[celli], Tf[celli]) - otherLocalThermo.Ha(otherP[celli], Tf[celli]); } As i am using thermo -> hconst, the localThermo.Ha term should be determined by Foam::hConstThermo::Ha which returns : Code:  return Cp_*T + Hf_ + EquationOfState::H(p, T); Then as my equations of state used are perfectFluid and perfectGas i understand that Then i understand that in my case but i still don't understand these values. Moreover i don't understand, if it is an energy balance done on the interface, why the equation use instead of . I have as well looked in the tutorial bubbleColumnEvaporating where the thermo model is set to janaf (although it is not the model that i want to use) but once again i don't understand why the coefficient h for the H2O gas is set to : I should model the injection of water inside a hot gas. As a first step i tried to validate the condensation and evaporation. I would like to understand how the model is really working and if what i understood so far is correct. Thanks a lot in advance! Chad Kummi, nikitin-pro and Lang like this.

 December 2, 2019, 18:01 #2 Member   Stanley John Join Date: Sep 2018 Posts: 79 Rep Power: 7 Hi, Did you figure of out things? I am trying to model phase change of water because of a pressure drop. So I understand I have to use the theinterfaceCompositionPhaseChangeTwoPhaseSystem I am having trouble defining the thermophysical properties of water and steam I do not understand the definition of these files in bubbleColumnEvaporating tutorial. How would do the same for water phase change: PHP Code:  /*--------------------------------*- C++ -*----------------------------------*\   =========                 |   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox    \\    /   O peration     | Website:  https://openfoam.org     \\  /    A nd           | Version:  6      \\/     M anipulation  | \*---------------------------------------------------------------------------*/ FoamFile {     version     2.0;     format      ascii;     class       dictionary;     location    "constant";     object      thermophysicalProperties.gas; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // thermoType {     type            heRhoThermo;     mixture         multiComponentMixture;     transport       sutherland;     thermo          janaf;     equationOfState perfectGas;     specie          specie;     energy          sensibleInternalEnergy; } inertSpecie air; species (     air     H2O ); H2O {     specie     {         molWeight       18.0153;     }     thermodynamics     {         Tlow            200;         Thigh           3500;         Tcommon         1000;         highCpCoeffs    ( 3.03399 0.00217692 -1.64073e-07 -9.7042e-11 1.68201e-14 -30004.3 4.96677 );         lowCpCoeffs     ( 4.19864 -0.00203643 6.5204e-06 -5.48797e-09 1.77198e-12 -30293.7 -0.849032 );     }     transport     {         As              1.67212e-06;         Ts              170.672;     } } air {     specie     {         molWeight       28.9596;     }     thermodynamics     {         Tlow            200;         Thigh           3500;         Tcommon         1000;         highCpCoeffs    ( 3.57304 -7.24383e-04 1.67022e-06 -1.26501e-10 -4.20580e-13 -1047.41 3.12431 );         lowCpCoeffs     ( 3.09589 1.22835e-03 -4.14267e-07 6.56910e-11 -3.87021e-15 -983.191 5.34161 );     }     transport     {         As              1.67212e-06;         Ts              170.672;     } } // ************************************************************************* //   PHP Code:  /*--------------------------------*- C++ -*----------------------------------*\   =========                 |   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox    \\    /   O peration     | Website:  https://openfoam.org     \\  /    A nd           | Version:  6      \\/     M anipulation  | \*---------------------------------------------------------------------------*/ FoamFile {     version     2.0;     format      ascii;     class       dictionary;     location    "constant";     object      thermophysicalProperties.liquid; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // thermoType {     type            heRhoThermo;     mixture         pureMixture;     transport       const;     thermo          hConst;     equationOfState perfectFluid;     specie          specie;     energy          sensibleInternalEnergy; } species (     air     H2O ); inertSpecie H2O; "(mixture|H2O)" {     specie     {         molWeight       18.0153;     }     equationOfState     {         R           3000;         rho0        1027;     }     thermodynamics     {         Hf          -1.5879e+07;         Cp          4195;     }     transport     {         mu          3.645e-4;         Pr          2.289;     } } air {     specie     {         molWeight   28.9;     }     equationOfState     {         R           3000;         rho0        1027;     }     thermodynamics     {         Hf          0;         Cp          4195;     }     transport     {         mu          3.645e-4;         Pr          2.289;     } } // ************************************************************************* //  

 July 3, 2020, 09:39 Evaporation #3 New Member   Michael Join Date: May 2020 Posts: 3 Rep Power: 6 Hi Mr. Turbulence Did you manage to get an answer to your question ? I am trying to simulate water evaporation If I set the Hf value to zero for my gas phase I receive the same results compared to an experiment. The User guide says that Hf is the heat of fusion but the Code says that it is the heat of formation. I am confused.

 July 6, 2020, 03:14 #4 New Member   Join Date: Dec 2017 Posts: 5 Rep Power: 8 Hi Michaelfoam, I moved on some other project and didn't went further these questions but this activity is coming back and i still didn't figure it out. I guess, looking at the equations into the code that these value shoumld be the Heat of fusion of the water (333 000 J/Kg) and the Heat of vaporization (2 257 000 J/Kg). In the tutorial multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporatingDissolving/ the Hf values are set to -1.3435e+07 and -1.5879e+07 for vapor and liquid water which is quite strange number to set but the difference of H is almost the same (2e6). Could you share the validation you made setting Hf = 0?

 July 23, 2020, 15:37 #5 New Member   Michael Join Date: May 2020 Posts: 3 Rep Power: 6 Hi Mr.Turbulence, Sorry for my late answer. I will evaluate my Work in a few weeks after that I can share it. Does anybody know how Ha is calculated if I use eConst instead of hConst? Mr.Turbulence likes this.

 April 29, 2021, 04:04 #6 New Member   JungHoon Lee Join Date: Apr 2019 Posts: 8 Rep Power: 7 Hello Mr. Turbulence and Michaelfoam, sorry that it is pretty old post but I am currently doing my work in evaporation simulation using reactingTwophaseEulerFoam as you guys did. And I am facing the same problem with Hf value. Since it seems really wierd to me as well. Could you please share any ideas you have? Thanks a lot in advance!

 April 29, 2021, 04:09 #7 Member   Stanley John Join Date: Sep 2018 Posts: 79 Rep Power: 7 The latent heat has to be specified through Hf to get correct mass transfer. The latent heat in the code is eventually computed through difference in enthalpies. PHP Code:  /*--------------------------------*- C++ -*--------- Reciprocal polynomial-------------------------*\   =========                 |   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox    \\    /   O peration     | Website:  https://openfoam.org     \\  /    A nd           | Version:  6      \\/     M anipulation  | \*---------------------------------------------------------------------------*/ FoamFile {     version     2.0;     format      ascii;     class       dictionary;     location    "constant";     object      thermophysicalProperties.liquid; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //  thermoType {     type            heRhoThermo;     mixture         pureMixture;     transport       const;     thermo          eConst;     equationOfState rPolynomial;     specie          specie;     energy          sensibleInternalEnergy; } //species (   water);  mixture  {      specie     {         molWeight       18.0153;     }     equationOfState     {    //      rho 920;          C (0.001278 -2.1055e-06 3.9689e-09 4.3772e-13 -2.0225e-16); // need to find a better fit off by 10 kg/m^3     }     thermodynamics     {         Cv          3526;         Hf           -1.5658e+07;     }     transport     {         mu          0.1839239e-3;         Pr          1.178;     } }   PHP Code:  /*--------------------------------*- C++ -*----------------------------------*\   =========                 |   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox    \\    /   O peration     | Website:  https://openfoam.org     \\  /    A nd           | Version:  dev      \\/     M anipulation  | \*---------------------------------------------------------------------------*/ FoamFile {     version     2.0;     format      ascii;     class       dictionary;     location    "constant";     object      thermophysicalProperties.gas; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //  thermoType {     type            heRhoThermo;     mixture         pureMixture;//multiComponentMixture;     transport       sutherland;     thermo          eConst;     equationOfState perfectGas;     specie          specie;     energy          sensibleInternalEnergy; }   mixture {     specie     {         molWeight       18.0153;     }     thermodynamics     {         Cv          1701;         Hf          -1.3145e+07;     }     transport     {         As              1.67212e-06;         Ts              170.672;     } }  

 April 29, 2021, 05:30 #8 New Member   JungHoon Lee Join Date: Apr 2019 Posts: 8 Rep Power: 7 Hi sjohn2, thank you for the reply. I am still confused since as Mr. Turbulence said the values are seemed wierd. And why does it have different values for H2O in liquid and H2O in gas. I mean these values are niether for the heat of fusion nor the heat of vaporization of H2O. I am guessing that if they are refering to same value i.e. the latent heat of vaporization, they should have same value and maybe in different sign. Also sign of the values are still confusing. Why do they have same negative sign? I appreciate any comments! Thanks!

April 30, 2021, 22:11
#9
Member

Stanley John
Join Date: Sep 2018
Posts: 79
Rep Power: 7
Quote:
 Originally Posted by ssitank Hi sjohn2, thank you for the reply. I am still confused since as Mr. Turbulence said the values are seemed wierd. And why does it have different values for H2O in liquid and H2O in gas. I mean these values are niether for the heat of fusion nor the heat of vaporization of H2O. I am guessing that if they are refering to same value i.e. the latent heat of vaporization, they should have same value and maybe in different sign. Also sign of the values are still confusing. Why do they have same negative sign? I appreciate any comments! Thanks!
Heat of formation for water and steam are different. Latent heat can be obtained as a difference between the two. Check out Thermodynamics by Cengel and Latent heat can also be found as as a difference between the enthalpies of water and steam based on the thermophysical models one has specified.

For heat of formation calculation check:
http://www.tfd.chalmers.se/~hani/kur...t_CAPPELLI.pdf

Last edited by sjohn2; April 30, 2021 at 22:13. Reason: aw