Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Energy conservation/balance in mixture multiphase

    • Amir
      Subscriber

      Hello,

      I have a finished simulation with the attached domain. used mixture model, lee condensation/evaporation with piece-wise linear for saturation temperature of humid air. ran for 250s and converged.

      Initial Condition: Chamber at 15C with 80% RH

                                 Air inside the pipe 17C with 80% RH

                                 Soil and pipe at 17C

      Final Condition: Chamber at average 20.48C with 0.66% RH

                                Air inside the pipe at average 20.19C with 0.67% RH

                                Soil and pipe at average 17.09C

       

      My questions are:

      1-How the average temperature of soil went up not down?

      2-When calculating MASS INTEGRAL of TOTAL ENERGY and selecting all parts, should not the initial and final values be the same? these values are not similar in my simulation!

      3-when calculating MASS INTEGRAL of TOTAL ENERGY for ALL PARTS EXCEPT CHAMBER, I expected the difference between initial and final values to be equal to the energy added to the Chamber part, but its not the case! what am I missing?

    • SRP
      Ansys Employee

      Hi,

      The properties of the soil itself, such as its thermal conductivity and specific heat capacity, can also impact how it responds to changes in temperature. Depending on these properties, the soil may have absorbed heat from the surrounding air and pipe, leading to an increase in its temperature over time.

      The discrepancy you observed in the mass integral of total energy between the initial and final values for all parts in your simulation could be due to various reasons. One possible explanation is that there might be errors or inaccuracies in the modeling assumptions or boundary conditions used in your simulation setup.

      This discrepancy could arise from several factors such as incomplete energy transfer modeling, unaccounted heat losses or gains within certain components, or inaccuracies in boundary conditions affecting specific parts of the system differently.

      Can you share more details on the boundary conditions?

      • Amir
        Subscriber

         

        Boundary Conditions:

                The chamber and soil outter walls have zero thickness and zero heat flux.

                The rest of the walls (interior walls and those between soil and pipe, and pipe and fluid) have zero thickness and thermaly coupled.

                Internal fan has constant pressure jump profile with 60 Pa (pushes the fluid down from left and the flow gets circulated counter-clockwise).

         

                I repeated the simulation with all the fluid zones (chamber and inside the pipe) having same initial temp, and soil and pipe zones having the same initial temp. With Dry Air and Humid Air.

                For Dry Air there was no discrepancy: heat transfer was from hotter zones to the colder and at the end, Total Energy lost by hotter zones(soil and pipe) is equal to the total energy gained by the colder zones. Total Energy and Enthalpy were also same initially and at the end of simulation.

                For Humid Air, there was discrepancies: Total Energy lost by hotter zone was not equal to the total energy gained by the colder zone. Change in system total energy and enthalpy was the same, but they were not conserved!

                Two cases of Humid Air:

                1-Air at 15C with 80%RH and solid at 27C went to —->>>> Air at avg 26.3C and 7%RH and solid at avg 26.9C. 137.9g of Liquid Water was generated. The change for both Total Energy and Total Enthalpy was: -3.4e+08J.

                2-Air at 27C and 80%RH and solid at 15C went to—->>>> Air at avg 29.6C with 14%RH and solid at avg 15.22C. 535.3g of liquid water was generated. The change for both Total Energy and Total Enthalpy was: -7.2e+08J.

         

         

    • Amir
      Subscriber

      I repeated this simulation with different conditions. This time all fluid zones had same initial temperature and RH, soil and pipe also had same initial temperature:

      1-Dry Air and no Condensation/Evaporation; Total energy and total enthalpy were conserved and energy gained by cold zone was equal to the energy lost by hot zone.

      2- Humid Air with Condensation; Total energy and total enthalpy were NOT conserved, BUT both of them changed by the exact same amount (-7e+08J for one case). Energy gained by cold zone was NOT equal to the energy lost by hot zone.

      I used mixture multiphase model with Lee Evaporation/condensation and a piecewise-linear profile for saturation temperature of vapor. Could that be causing these discrepencies?

      I am trying to repeat the simulation with UDF for saturation temperature, but in the meanwhile I would appreciate experts' comments on this.

    • Amir
      Subscriber

      I have repeated this simultion with UDF for calculating the saturation temperature of water vapor.

      Again, total energy and total enthalpy are not conserved, with both changing by same amount.

      I defined the saturation temperature according to Antione equation: T = B/(A - log10(vapor_presure)) - C

      Does anyone have any idea what could be wrong with my simulation?

    • Rob
      Forum Moderator

      Have you accounted for flow entering/leaving the domain? How good is the solution mass balance?

      • Amir
        Subscriber

        There is no Inlet/Outlet in my domain and it is a closed system. There is only an internal fan.

        For mass, if I use reports->volume integrals-> then "Mass" or "mass-integral" for each phase is as follows: PH-1 is water-liquid and PH-2 is humid-air

        Initial Mass:

        Air Domain Mass (mix): 5.317779 KG

        Air Domain Mass (ph-1): 0   

        Air Domain Mass (ph-2): 5.317779 KG   

        Air Domain Mass Intg (ph-2): 5.317779 KG

        Liquid Water Mass Intg (ph-1): 0

        Final:

        Air Domain Mass (mix): 28.99604 KG

        Air Domain Mass (ph-1): 23.66091 KG

        Air Domain Mass (ph-2): 5.335128 KG

        Air Domain Mass Intg (ph-2): 28.83929 KG

        Liquid Water Mass Intg (ph-1): 156.7507 g

        Some final values look too big.

    • Rob
      Forum Moderator

      Possibly, what density model did you use for the vapour species/mixture?

      • Amir
        Subscriber

    • Rob
      Forum Moderator

      And for the species? 

      • Amir
        Subscriber

    • Rob
      Forum Moderator

      OK, so as the gas density changes and vapour condenses where does the volume come from or go? 

      • Amir
        Subscriber

        The volume that Liquid Water is going to occupy as it gets generated?

        My thought was that as it is a closed system, then as liquid water is formed and occupies some volume, the gas phase would have less volume to occupy and that would cause gas pressure to go up.

    • Rob
      Forum Moderator

      Why would it: which part of the gas density allows for volume change? If you condense water from vapour how much volume moves from the gas phase relative to volume to the liquid phase? 

    • Amir
      Subscriber

      Yes you are right, vapor is having constant density... should I write udf for that as well or one of available models would be enough?

    • Rob
      Forum Moderator

      Have a look at ideal gas. 

      • Amir
        Subscriber

        Thank you Rob, I am running the simulation with Ideal Gas model for mixture phase properties.

        Generally for Total energy and enthalpy of the system (and other properties), what is the acceptable range of uncertainty that values can change within? Is it related to residuals?

        What should I aim for? The exact match or some discrepancy would be acceptable?

      • Amir
        Subscriber

        I repeated the simulation with Ideal Gas models for mixture properties.

        Now I want to calculate the total mass of condensate (liquid water), which of these options are the one that I should use: phase-1 is liquid water.

      • Amir
        Subscriber

        Does it matter which density model I use for the condensate(liquid water)?

    • Rob
      Forum Moderator

      I'd expect some level of error based on solution convergence and mesh. That should be small, but I can't give a figure. 

      • Amir
        Subscriber

         

        So I repeated this simulation with Ideal Gas laws for the density and other properties of the mixture and constant density for liquid water. after 100s physical time the results are as below:

        Air energy change:+1.5e+06 J

        Solid(Soil and pipe) energy change: +0.3e+06 J

        Whole system energy change:+0.2e+06 J

        Liquid water generated:101g which would have released 0.227e+06 J latent heat.

        something still do not add up: where did the energy gained by air come from? can we say when the vapor content of the humid air cools down to reach dew point it releases this energy? if so, would it be possible to calculate or make an estimation for the amount of this energy?

         

    • Rob
      Forum Moderator

      It will matter what you set the density to: how else is the solver going to know how much volume to add to the domain? 

      • Amir
        Subscriber

        Yes sorry I meant if constat density would be good enough?

    • Rob
      Forum Moderator

      Energy should be conserved. If you have phase change on, what are the relative enthalpies of the vapour and liquid? 

      • Amir
        Subscriber

         

        standard state enthalpy water liquid: -2.858e+08 J/Kgmol

        standard state enthalpy water vapor: -2.418e+08 J/Kgmol

         

    • Rob
      Forum Moderator

      And have they got the same reference temperature? 

      • Amir
        Subscriber

        yes 24.85C for liquid and 25C for vapor.

    • Rob
      Forum Moderator

      What are the masses start & end of the simulation? 

       

      • Amir
        Subscriber

        initial:

        Air Domain Mass (mix): 4.939134 Kg

        Air Domain Mass (ph-1-water liquid): 0

        Air Domain Mass (ph-2-humid air): 4.939134 Kg

        final:

        Air Domain Mass (mix): 4.925512 Kg

        Air Domain Mass (ph-1): 0.1016616 Kg

        Air Domain Mass (ph-2): 4.82385 Kg

    • Rob
      Forum Moderator

      Shouldn't the phase change account for 4.47e6 J ?   Not sure what's going on, how good is the convergence? Which multiphase model are you using? 

      • Amir
        Subscriber

         

        For phase change I was assuming for each gram of vapor to liquid 2259J is released(is not it?!)

        Did you mean 4.4e+7J/Kgmol? if we take 4.4e+07 J/Kgmol, then with 18.02g molar weight of water it would be 0.244e+07 J/Kg or 0.244e+4 J/g = 2440 J/g, so for 101 grams it release 0.246e+06J (close to what I was considering).

        The residuals are attached for 100s and 600s. I am using mixture model with Lee evaporation/condensation, UDF written according to Antoine Equation for saturation pressure.

         

    • Rob
      Forum Moderator

      Energy release is the difference in the formation enthalpies. 

      • Amir
        Subscriber

        yes, so if we take the difference between SSEs of liquid and vapor mentioned above, it would be 0.44e+08 J/Kgmol = 0.244e+07 J/Kg = 0.244e+04 J/g. Then 101g water liquid would release 246440J = 0.246e+06J, right? but it is still far less than the energy added to Air 1.5e+06J...

        The total energy of the system seems to be conserved with 0.01% error. But the amount of energy added to air is like 67% of initial air energy, and I do not know where has it come from!

    • Rob
      Forum Moderator

      Oops, misread kmol....   There is a request in the system to make it J/kmol and not kgmol which is an American way of writing kmol.... 

      I don't know where the extra energy is from without going through the whole model, and I'm not able to do that because of the way the Forum works. If you check energy over the whole simulation time how does it tie up? 

      • Amir
        Subscriber

         

         

        for 600s:

        whole system (fluid and solid) total energy is conserved with 0.02% difference.

        Air domain energy (mix) has 2.4% difference.

        Air domain energy (ph-1 liquid water) has 0.6% difference. [117 g liquid water generated]

        Air domain energy (ph-2 humid air) has 79% difference!!! [35C with 80% RH goes to 15.8C with 0.0015% RH]

        Solid domain energy has 0.03% difference. [from 15C to 15.098C]

        whole system energy change: 0.36e+06J 

        whole system enthalpy change: 0.32e+06J 

        mixture energy change: -0.05e+06J      

        mixture enthalpy change: -0.099e+06J    

        phase-1(liquid water) energy change: -0.4e+06J  

        phase-1(liquid water) enthalpy change: -0.4e+06J 

        phase-2(humid air) energy change: 1.8e+06J   

        phase-2(humid air) enthalpy change: 1.8e+06J  

        solid energy change: 0.4e+06J 

        solid enthalpy change: 0.4e+06J

         

    • Rob
      Forum Moderator

      OK, so over 600s you're seeing near complete condensation of the liquid. With a mass and energy balance as above. Now, how does the mass and energy balance look during the simulation?  Ie have some time steps not converged well leading to a problem, or is it a slower issue in that you're losing a small amount per step? 

      • Amir
        Subscriber

        The majority of difference happens in the first 100s. For 600s phase-2 energy change is 1.8e+06J with 117g liquid generated, and for the first 100s it is 1.5e+06J with 101g liquid generated. 

        Solution converged at 14780th iteration (739th time step---0.739s physical time). The earliest .out file that is saved is for 1s physical time and the results are as below:

        After 1s:

        whole system energy change: 0.008e+06 J

        whole system enthalpy change: 0.009e+06J 

        mixture energy change: 0.0044e+06J

        mixture enthalpy change: 0.0049e+06J

         phase-1(liquid water) energy change: 0.019e+06J

        phase-1(liquid water) enthalpy change: 0.019e+06J

        phase-2(humid air) energy change: 0.033e+06J

        phase-2(humid air) enthalpy change: 0.034e+06J

        solid energy change: 0.003e+06J

        solid enthalpy change: 0.003e+06J

        liquid water generated: 1.8 gram which means 0.0043e+06 J energy released from phase change.

         

        After 2s:

        whole system energy change: 0.0077e+06J 

        whole system enthalpy change: 0.0083e+06J 

        mixture energy change: 0.00049e+06J      

        mixture enthalpy change: 0.0011e+06J    

        phase-1(liquid water) energy change: 0.027e+06J  

        phase-1(liquid water) enthalpy change: 0.027e+06J 

        phase-2(humid air) energy change: 0.065e+06J   

        phase-2(humid air) enthalpy change: 0.066e+06J  

        solid energy change: 0.007e+06J 

        solid enthalpy change: 0.007e+06J

        liquid water generated 4.7 gram would released: 0.011e+06 J.

         

        After 100s:

        whole system energy change: 0.26e+06J 

        whole system enthalpy change: 0.18e+06J 

        mixture energy change: -0.08e+06J      

        mixture enthalpy change: -0.11e+06J    

        phase-1(liquid water) energy change: 0.02e+06J  

        phase-1(liquid water) enthalpy change: 0.02e+06J 

        phase-2(humid air) energy change: 1.5e+06J   

        phase-2(humid air) enthalpy change: 1.5e+06J  

        solid energy change: 0.29e+06J 

        solid enthalpy change: 0.29e+06J

        Liquid water generated:101g which would have released 0.227e+06 J.

         

        After 200s:

        whole system energy change: 0.71e+06J 

        whole system enthalpy change: 0.27e+06J 

        mixture energy change: -0.06e+06J      

        mixture enthalpy change: -0.105e+06J    

        phase-1(liquid water) energy change: -0.036e+06J  

        phase-1(liquid water) enthalpy change: -0.036e+06J 

        phase-2(humid air) energy change: 1.76e+06J   

        phase-2(humid air) enthalpy change: 1.73e+06J  

        solid energy change: 0.37e+06J 

        solid enthalpy change: 0.37e+06J

        Liquid water generated:116g which would have released 0.283e+06 J.

         

        Looking at results abow, it seems the main change in phase-2 energy and enthalpy happen during the first 100s. it also changes after that, but 83% of change happens in the first 100s. phase-2 energy and enthalpy are those that won't add up with the rest of results.

    • Rob
      Forum Moderator

      And how is the convergence in that period?

      • Amir
        Subscriber

    • Rob
      Forum Moderator

      So, uncertain as I can't read what Fluent is doing. 

      • Amir
        Subscriber

        is the residulas waht you asked about the convergence?

    • Rob
      Forum Moderator

      Yes, and those graphs aren't overly easy to read. Also, look at the rates of mass & heat transfer on the monitors. Very simply, I can only offer you pointers on things to do to work out what's going on in your model. So, if the bulk of the problem is the first few seconds you can focus on the flow etc in that period. 

      • Amir
        Subscriber

        Ploting residuals seperately, it seems the Energy and H2O-phase-2 do not decline as others. Any suggestions on them? would it be good idea if I reduce the criteria for them and run it again?

    • Rob
      Forum Moderator

      Have a look at the guidance re the values in the training materials (Learning).  Also look at the graphs, what happens in the first 100 time steps? I can see the lower band of the solid block of black is below where we'd expect to see good result, but not if all time steps are converged. 

      Similarly, I don't know how the results look. Which multiphase model are you using, how well resolved is the condensate etc. 

      • Amir
        Subscriber

        OK, if instead of calculating ph-1 and ph-2 energies, I use mixture phase energy they add up very well and are conserved with good accuracy.

        Could it be that I got something wrong?

        in the attached pictures, why the energy of mixture is not equal to the sum of energy for phase-1 and phase-2?

    • Rob
      Forum Moderator

      Couple of suggestions from a colleague. Set the gas enthalpy as zero & liquid to suit; basically you just want to be worried about the latent heat as there are no reactions. Which multiphase model are you using? 

      • Amir
        Subscriber

        Thanks for the suggestion. I am using mixture model, if it solves only one energy equation then I can only track the energy of mixture(ph-1 and ph-2 together) right? If I only consider energy of mixture they are in agreement, but when I add energy of ph-1 and ph-2 seperately that is where they do not add up.

    • Rob
      Forum Moderator

      OK, try Eulerian. That gives you two sets of energy and momentum equations. 

Viewing 25 reply threads
  • The topic ‘Energy conservation/balance in mixture multiphase’ is closed to new replies.