Fluids

Fluids

phase change tutorial details

    • mossaied2
      Subscriber

      Hello,


      I found this tutorial (https://studentcommunity.ansys.com/file/download/562c86f6-123a-4cfc-b1b4-a8d40120e625/) that I believe it is made by some ansys staff. This tutorial is testing thermal phase-change module in ansys, although the details are not clear. I believe the inlet is defined as "mass-flow inlet" but how about the output? I made it "outflow" since I do not know the BC at the outlet but it diverges and always I see "reversed backflow in 60 faces on outflow" while solving. Also to what value should I set the gauge pressure at the inlet. the operating pressure is shown to be 108 bar in the tutorial, so should I set the gauge pressure at the inlet to 108-101=7bars? sorry my background basically in electrical engineering and also I am new to ansys so I have some difficulties.


      Thanks  

    • DrAmine
      Ansys Employee

      Gauge pressure on pressure inlet or massflow inet is not used for subsonic flow. It is just here to initialize from it nothing more. Never use outflow boundary condition for non developed flows. Just use pressure outlet.

    • mossaied2
      Subscriber

      Thanks sir for the reply. Actually, it is not clear from the tutorial what should be the pressure at the outlet and I do not know how to estimate it.


      Also I know that saturated water liquid at 590 k should evaporate at 108 bar, so where should I put that value, should I put it in the operating pressure ? or in mass-flow-rate input as a gauge pressure?


      I appreciate if this tutorial was really from Ansys, to lead me a more detailed resource that contains the steps of building that model


      Thanks  


       


       

    • Karthik R
      Administrator

      Hello,


      As pointed by Amine, please use pressure outlet BC instead of outflow. When you change this boundary condition to pressure outlet, you should have a dialog box when you can input the values of pressure. By default, it will have a 0 gauge pressure. If your operating pressure is set to 101325 Pa, 0 gauge pressure means that your outlet is open to atmosphere. If you want to read more about operating and gauge pressure, please refer to the fluent users guide for this information. 


      Based on the tutorial, please change the operating pressure to 108 bar and if you still use 0 pa as outlet pressure, then the fluid pressure at the outlet is 108 bar. This is what you should be doing.


      Please let us know if you have any questions.


      Thanks.


      Best,


      Karthik

    • Raef.Kobeissi
      Subscriber

      Gauge pressure is the pressure of operation above under hydrostatic atmospheric pressure:


      Absolute pressure = Atmospheric pressure + Gauge pressure

    • mossaied2
      Subscriber

      Thank you all for the valuable replies


      I wanna confirm with you what I have done in the BC setup to avoid any problem


      inlet:


      mass-flow-inlet 


      Supersonic/Initial Gauge Pressure (pascal) : 0 


      phase-1 (water-liquid) Mass Flow Rate 3 kg/s  - temperature 590 K


      phase-2 (water-vapor) Mass Flow Rate 0 kg/s - temperature 590 K


       


      outlet:


      pressure-outlet


      Gauge Pressure (pascal) : 0 


      Backflow Direction Specification Method: Direction Vector ( ???? actually I think there is no backflow in that example )


      phase-1 (water-liquid) - temperature 590 K


      phase-2 (water-vapor) - temperature 590 K


       


      Operating Conditions


      Operating Pressure (pascal) : 1.08e7


      Operating Temperature (K) : 590


       


      Initialization from inlet


       


      Controls are defaults


       


      other setups are:


      Models: Eulerian with Thermal Phase Change Model 


      Viscous model: Laminar ( ????? The Viscous model is not mentioned in the tutorial)


       


      The simulation with these settings is running now, plz if you see something wrong direct me to stop and change it 


      Thanks


       


       

    • DrAmine
      Ansys Employee

      Do not forget to include buoyancy effects. 

    • mossaied2
      Subscriber

      Hi 


      With the default controls the simulation diverge, then when I reduce them to 0.01 (each control is set to 0.01) the convergence was very slow as expected but the continuity residual seems to stabilize at a very high value of 5.14e4!!!. All other residuals are below 1e-3. The mesh (as I think) is fine with ~500,000 nodes and the model is 2D axisummetric


      Any help would be appreciated!


      Thanks

    • DrAmine
      Ansys Employee

      Please post a screenshot of the deployed solution methods.

    • mossaied2
      Subscriber

      Here is the solution method screenshot  



       


      Here is my operating conditions. The flow is parallel to the axis of the cylinder (x-axis) so the gravity in -x directions. It is 2D axisymmetric model.



      inlet BCs (mixture (scr-shot1) , 



       phase-1 (scr-shot2,3),




      and phase-2 (scr-shot4,5))




      outlet BCs (mixture (scr-shot1) ,  



      phase-1 scr-shot2,3




      and phase-2 (scr-shot4,5,6)) - as you see in scr-shot6 I suppress the backflow although I am getting backflow in my simulations



      The backflow message


       





      The kind of convergence curves I am getting after more than 50000 iterations



      I am really sorry for this lots of pictures reply, and thanks in advance for your understanding

    • DrAmine
      Ansys Employee

      1/Species an Operating density. Choose zero here for example as you have only one outlet and the pressure at outlet is known


      2/Use Body Force Weighted or PRESTO! for pressure interpolation


      3/Use Coupled Solver with Pseudo-Transient option


      4/@10.8 MPa is the saturation temperature 589.95 K. Please check you inflow B.C for water as you are coming already here with 590 K.

    • mossaied2
      Subscriber

      Hi Mr Amine


      I have set successfully step 2 and 3 




      for step 1 (1/Species an Operating density. Choose zero here for example as you have only one outlet and the pressure at outlet is known)


      actually, I did not understand what to do exactly 




      for step 4, according to the tutorial I set the saturation temperature at 590 in the evaporation-condensation model as follows 



      so do you mean I should define the inlet temperature just below this value, e.g. 589.5 (although in the tutorial the water was entered at 590)?


       


       



      How should I set the related setting of Boussinesq model in operating conditions, namely operating temperature and variable density parameter 


      I have read this fluent help (https://www.sharcnet.ca/Software/Fluent6/html/ug/node572.htm#eq-boussinesq) regarding Boussinesq and I understood that I should change the density of materials as Boussinesq. So for water as an example, I already defined the density as constant to 998.2 kg/m3 , should I change it to Boussinesq and put gain 998.2 kg/m3 and doing the same for vapor?. 





       


      Finally, there is another difference between my model and the model of the tutorial. In the tutorial, the Latent heat as standard enthalpy was set as 2.28e7 j/kg. mol while in fluent material settings it is -2.858412e+08 j/kg.mol for water and -2.418379e+08 j/kg.mol for vapor. I think I should change the -2.858412e+08 of the water to -2.28e7 and keep the one of vapor as it is, am I right?


       




      Thanks in advance and willing to see your valuable response 


       

    • DrAmine
      Ansys Employee

      First of all: you are referring to something which is not a tutorial. It was just an example and not a tutorial.


      1/For pure component flow the pressure and temperature are not independent anymore under the phase dome. Saying that for the operating pressure you are using there is dedicated saturation temperature. You can understand my answer as remark based on the input of operating pressure.


      2/If you are not using Boussinesq as density formulation ignore Boussinesq Reference temperature. 


      3/You can make it more easier for you if you set the standard stater enthalpy for water to zero and putting all latent heat on the vapor side: Only the difference does matter for cases not involving chemical reactions. 

    • mossaied2
      Subscriber

      Thanks for the reply Mr Amin, I really appreciate your fast responses


      and I am really sorry for using the word "tutorial" instead of "example" I just do not know the difference 




      I am now setting densities as constants with no Boussinseq


      also I set latent heat of enthalpy of water to 0 as you advised and set it to 2.28e+07 j/kg.mol (with no negative sign) 


      but still I have divergence in the continuity residual, after 1000 iteration it was around 5.4688e+03 and the curve show slow increase!




      Also I have doubts regarding the saturation pressure corresponding to 590 K saturation temperature. How can I tell Ansys that the saturation pressure is 108 bar?. Or if I can't set the saturation pressure to 108 bar, can I know what exact saturation pressure that ansys will consider when solving the problem, so that I can set the operating pressure to the same value?


       


      Thanks in advance

    • DrAmine
      Ansys Employee

      Set the operating pressure 108 bar and setup all other material properties to the ones @Saturation temperature @108 bar and use that temperature as the reference temperature for the materials.. ANSYS Fluent will look into the saturaton temperature you are defining /using under Mass Transfer model.

    • mossaied2
      Subscriber

      That is a great idea Mr Amine,


      I have a small question, now the properties of water and vapor at the saturation temp should be the same? 


      I came to that conclusion since that website http://www.spiraxsarco.com/Resources/Pages/Steam-Tables/wet-steam.aspx that calculates the properties of water at different saturation temp/pressure needs the percentage of dryness of the vapor. I noticed that if I entered the minimum percentage ~0 of dryness (means the evaporation just started and the steam is very wet) the properties are almost identical to saturated water. In that case, I found myself putting almost the same properties for both water-liquid and water-vapor except for the standard state of enthalpy.


      Plz correct me if I am wrong?

    • DrAmine
      Ansys Employee
      They should not be the same as you are above the critical point . You have to provide different input for density viscosity heat capacity and heat conductivity
    • mossaied2
      Subscriber

       


      Thanks a lot Mr Amine, I realized my mistake and corrected that as follows: I provided to ansys the characteristics of water at 373.15 (saturated water) and added the properties of steam at the same temperature 373.15 (saturated steam)


      Then I realized another mistake. I calculated the Reynolds number and found it high (42104.05) while I was setting the viscosity as laminar! So I decreased the mass flow rate to get Re=1500 (<2300 used for laminar) but still the solution diverges, so what other knobs should I play with?


      Also if I wanna keep the same flow rate of 3 kg/s (Re=42104.05) which turbulent model best fits? at least guys give me expectations. I tried K-epsilon but now after 5000 iterations, all the residuals are under 2e-3 except continuity it is around 2 !!!


       

    • DrAmine
      Ansys Employee

      You can go for any turbulence model with automated wall treatment (e.g. SST or RKE with EWT).  Please check if the mass transfer is done from liquid to vapor and not from vapor to liquid. 


       


      I guess we have still a mistake in your setup but as ANSYS Employee I cannot check your case so you need to rely on non-ANSYS staff here to have your case checked or you post once again all relevant information here. 

    • mossaied2
      Subscriber

      Thanks for the reply Mr Amine


      here are all the steps that I followed in building this model


      General settings


       


      2- Multiphase model



      3- Energy included



      4- Viscous model



      5- Water liquid properties 



      6- Vapor properties



      7- Inlet BC - mixture



      8- Inlet BC - water momentum



      9- Inlet BC - water temperature



      10- Inlet BC - vapor momentum



      11- Inlet BC - vapor temperature



      12- Outlet BC - mixture



      13- Outlet BC - water momentum



      14- Outlet BC - water temperature



      15- Outlet BC - vapor momentum



      16- Outlet BC - vapor temperature



      17- Outlet BC - vapor backflow



      18- Operating Conditions



      19- Solution methods 




      20- Solution initializations (compute from all zones)




      21- residual monitors 



      22- solution controls (all set to 0.01)




      23- convergence curves (all below e-3 except continuity ~42)


    • DrAmine
      Ansys Employee

      Check the saturation temperature in your phase change model. The temperature at inlet is equal to saturation temperature that does not make a sense for me and this means you have immediate evaporation in the next cell near the inlet.

    • mossaied2
      Subscriber

      One point I have some doubts about is the calculation of the standard state of enthalpy of both materials. The reference for that was that NIST table (https://www.nist.gov/sites/default/files/documents/srd/NISTIR5078-Tab1.pdf) I took the latent heat at Tsat=100C in kJ/kg (it is exactly 2256.4) and multiply it by the Molecular Weight of water (the value is defined in ansys, it is exactly 18.01534 kg/k.mol) to produce the Standard State of Enthalpy in J/kg.mol as ansys requires (the multiplication gives 4.066e7). For water I set the value to 0 and for vapor I set it to the calculated value of 4.066e7 as Mr Amine pointed out to before 


      I doubt also the sign of that Standard State of Enthalpy, previously I found ansys set the default values in negatives (-2.85e8 for liquid and -2.418e8 for vapor) while based on my understanding when I put 0 for water I should be +4.066e7 for vapor


      Thanks 

    • DrAmine
      Ansys Employee
      Yes only the difference does matter for non reactive case.
    • mossaied2
      Subscriber

      Thanks Mr Amine


      How can I verify that the mesh is fine enough? may be this is the problem


      Thanks

    • DrAmine
      Ansys Employee

      Eulerian-Eulerian approach would not have the same mesh requirement as if you are using VOF to cature the interface. So you can still have medium to coarse mesh to capture properly the source terms but do not exaggerate with mesh resolution.

    • mossaied2
      Subscriber

      Actually I exaggerate the mesh and only converges when the power input was too low after 800 iterations, when I increase the power, it exceeds 1900 and still vf-phase-2 > 1e-3 !!!


      Is there any ansys tutorial solved in details similar to this, I found many but for static fluid (in a container) but not a moving one?


       


       


       

    • mossaied2
      Subscriber

      I think my calculation of Enthalpy is wrong!  


      I multiplied latent heat 2256400 J/kg by Molecular weight 18.01534 kg/k.mol the results should be 4.066e7 J/k.mol ???? not J/kg.mol ???? as ansys requires, can somebody plz correct me and show me how I get the latent heat in J/kg.mol?


      The way I did what I did is based on 2 ansys forums but seems I have a big misunderstanding 


      I searched google many times to find some tables that define enthalpy in J/kg.mol but no luck so far, so I am sorry if my question is a naive one this due to the different background


      Thanks

    • DrAmine
      Ansys Employee

      kmol is kgmol = 1000 mol(s). 

    • mossaied2
      Subscriber

      Thanks all for your valuable advises so far


      Today I was trying VOF rather than Elurian, I used SIMPLE method, set high order term relaxation, changed the sat temp to 300C, and relaxation factors are set to defaults.  Other settings are almost the same setting as before and I get convergence - all the residuals are below 1e-3Although when I checked the mass-flow-rate at the output I found it pretty high compared to the one at the inlet (3 kg/s at inlet, 5.2 kg/s at outlet). Also there is an error in the mass-flow-rate of the vapor at the outlet, I put the an amount of heat that should produce 0.05 kg/s although the flow I got is 0.07. Am I missing something in the BCs that I did not set properly?


      BTW I am using mass-flow-rate inlet, pressure-outlet  


      Here the report fluxes of ansys


                               mixture


                        Mass Flow Rate               (kg/s)





                                 inlet                    3


                                outlet           -5.2842192


                     




                                   Net           -2.2842192


                               phase-2


                        Mass Flow Rate               (kg/s)





                                 inlet                   -0


                                outlet         -0.071132826


                     




                                   Net         -0.071132826


       


      Thanks 

    • DrAmine
      Ansys Employee
      You are complicating the debugging here. The model u are niw deploying is not suitable and is not worth trying to dig deeper here why y have mass imbalance. Stick to Eulerian.
    • mossaied2
      Subscriber

      The Eulerian Mr Amine did not converge and I debugged and tried many tricks but no luck so far. I just read a paper that uses VOF so I though it might be a good track. OK if we go back to Eulerian, I doubt that the transition from one material to another may be the reason behind the divergence. For example the density of water is ~1000 while it is <1 for vapor, this huge change may be causing some problems to the solver. Do I need some UDF to  relax that change I mean if the solver changes the density say from 1000 to 1 when T>Tsat , I think I can make a UDF to change it gradually with temp. For example if the density following a segmoid function centered at Tsat with minimum being density of vapor and max being density of water, this might help to have a convergence 


      Plz if this is a good direction so what is the main steps to start the UDF? if it is not what other tricks should I apply, or what settings you guys think is the problem


      Thanks

    • DrAmine
      Ansys Employee
      I created based on the input a test case and it running for me. The case is 2d axissymmetric (Please check this). Convergence is as expected fair but not excellent as it heat up a saturated inflow but I am not getting the problems you have. My monitors for integral if mass transfer is equal to vapour mass at outlet and is depicting a constant trend after 7000 iterations.
    • mossaied2
      Subscriber

      Thanks Mr Amine


      From what source you are getting the material properties, e.g density, latent heat, specific Heat, etc. at saturated water-vapor? I guess also you calculated the latent heat? can you plz tell me at what saturation temperature you set the material properties, I wanna check if I am calculating the latent heat correctly or not?


      Preferably can you plz highlight the settings for each step? 


      Also I could not understand "My monitors for integral if mass transfer is equal to vapour mass at outlet


      I think I am setting 2D Axisymmetric, plz check the following image if I am setting correctly



       


      Thanks


        


       

    • mossaied2
      Subscriber

      Also Mr Amine, what is the number of nodes you have in your mesh


      I have 412,212 nodes, 410006 elements is that enough? do you have finer mesh in your case?



      Thanks 

    • DrAmine
      Ansys Employee
      Nist web book for material properties. I just created a geo as in the example deploying axis symmetry. A quick mesh with 1 mm face size. I created two monitors one for flux of vapor mass at outlet and one for volume integral of mass transfer rate .
    • mossaied2
      Subscriber

      Does it matter which is material is the primary phase? 


      Can you plz specify the following based on the model you created


      1- Saturation / outlet / inlet temperature of each phase? 


      2- Initialization, is from all-zones, inlet, etc.?


      3- what patch values you assigned to the following


         a) mixture pressure


         b) phase-1 temp


         c) phase-2 temp


      I wanna create what you created to easily detect my error

    • mossaied2
      Subscriber

      Also, did you use the default controls values during the whole 7000 iterations, Mr Amine?

    • DrAmine
      Ansys Employee
      1/ saturation temperature
      2/inlet
      3/nothing
      4/yes. Coupled pseudo transient with 1 ms
    • mossaied2
      Subscriber

      I am still getting high value for the continuity, it stabilizes around 27 not between 10-2 and 10-3 like yours, Mr Amine. Although all other residuals are under 10-3. Here is a screenshot of the convergence curves



      How much error you get in the mass-flow-rate of the vapor, I mean theoretically you were expecting some value so how close what you got to this theoretical value?


      what are the best settings for "virtual mass", "Drag", "Lift", "Wall lubrication", "Turbulent Dispersion", "Turbulent Interaction", "Surface tension", "interfacial area"? I left them to the defaults


       

    • DrAmine
      Ansys Employee
      I left drag to default and lift to Tomiyama all others are none. Surface tension required for drag is from just. Do not use surface tension force. This example us really ill posed it just but it runs..

      The mass error is small.
    • mossaied2
      Subscriber

      just to confirm Mr Amine, I set lift to default and lift to Tomiyama but I could not set all others to "none" like your example because when I choose "Thermal phase change" as evaporation-condensation model the "Heat" tap changes automatically to "two-resistance".


      How about the "From/To Phase Factor" did you left them to the default values of 1?


      Thanks

    • mossaied2
      Subscriber

      Hi Mr Amine, when I set Drag to default and Lift to Tomiyama and all others to "none"  (except interfacial area I kept it to default "ia-symmetric" - there is no "none" option there) I got the following error when I start running 


      Error at Node 0: Lift-Tomiyama: Please set value for surface tension !


      Error at Node 1: Lift-Tomiyama: Please set value for surface tension !


      Error at Node 2: Lift-Tomiyama: Please set value for surface tension !


      Error at Node 3: Lift-Tomiyama: Please set value for surface tension !


       


      I googled for that error with no value till the moment, any help would be appreciated!


       


      Thanks


       


       

    • DrAmine
      Ansys Employee
      I meant with non I did not choose anything. You need to provide surface tension coefficient. Work with coarse mesh like I did.
    • mossaied2
      Subscriber

      Thanks Mr Amine, I coarsened my mesh as you pointed out previously. 


      if I wanna monitor the pressure to be sure it is = saturation pressure what monitor should I use


      now I set two volume monitors for water-liquid total pressure; one for max and one for min (there were other options like dynamic pressure), is the total pressure the one responsible for the evaporation? or should I choose other options?


      Thanks


       

    • DrAmine
      Ansys Employee

      Why do you need that? 

    • mossaied2
      Subscriber

      I wanna check if evaporation is really taking place Mr Amine


      I have changed the geo to a very simple 3D rectangle 0.01x0.01x0.04 m3, with a coarse mesh. Then, I applied a certain amount of heat on the upper wall so that at saturation temp I should get 0.05 Kg/s vapor at the outlet. I followed all the advices posted so far and I think I got good agreement and I wanna check if this is really working or not.


      First, all the residuals are below 10-3 except continuity it stabilizes around 20! although the mass flow rate of the vapor at the outlet was 0.0436 Kg/s


      here are the convergence curves 



      vapor mass flow rate at outlet



      what makes me skeptical (besides continuity residual) is the pressure across the model, its max is 0.26e6 Pa while the water requires 10.8 MPa to evaporate??? here are the pressure contours



      Thanks

    • mossaied2
      Subscriber

      Also another question regarding this new geo, if it was right, can I tune it to increase the mass flow of vapor at outlet so that it matches the theoretical results


      Thanks

    • DrAmine
      Ansys Employee
      1/You are looking to gauge relative pressure.
      2/No
      3/My geo is 2d axis symmetry
      4/Please understand that the example us just an example focus rather on a real problem.
Viewing 47 reply threads
  • You must be logged in to reply to this topic.