Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Compressible Liquid – Density

    • Max4
      Subscriber

      Hi,


      I´m dealing with a simulation considering the compression of the liquid. In Fluent, I can´t set a value of the Bulk Modulus depending on the pressure.



      Nevertheless, I can use "User defined" instead of "compressible liquid" in order to consider the density as function of pressure. I have found this (https://www.cfd-online.com/Forums/star-ccm/73840-user-defined-density.html)



      Instead of the pressure at inlet, I want to use the pressure inside the domain. Should the following UDF work? 



      When I tried to compile this UDF, I have this error:



      It is because of this (Exemple 4 - https://www.sharcnet.ca/Software/Fluent6/html/udf/node43.htm), i.e. I have to include a speed of sound function too?


      With a such function, are the density set as a different value at each cells depending on the pressure?


       


      Regards,


      Maxime


       

    • Rob
      Forum Moderator

      With that UDF you should be setting density on a cell basis. Just be careful with the macro as using pressure to set density outside the real/ideal gas models can make the solver less stable and mess with the continuity monitors. 

    • Max4
      Subscriber

      Hi,


      I found this in Fluent Manuel for setting density depending on pressure by using the Tait Equation. In my case, the bulk modulus is depending on pressure too. It is better to define the Bulk Modulus insteat of the density as function of pressure?




      The use of the option " compressible liquid " in Materials induce a less stable solver?

    • DrAmine
      Ansys Employee

      Compressible liquid is liquid which does not really have a strong pressure dependency which is the case for liquid. As my colleague said if you want to really resolve a strong compressible flow (say you want to re-implement the ideal EOS) then you need real gas model UDF.

    • Max4
      Subscriber

      Hi,


      Thank you for the answers.


      By using "compressible liquid" in Materials, the solver use the Tait Equation which define the density depending on the pressure. So, why can´t I use the above mentioned UDF? And why should I use the UDF for gas to consider a liquid ?


      It i´s certain that it will make the solver less stable, but by changing the under relaxation factors, it can improve the stability.

    • DrAmine
      Ansys Employee

      You can use it: We just highlighted the issues. For liquid the issues are not as relevant as for gases.

    • Max4
      Subscriber

      Ok thanks, but i have to write both UDF, i.e. for the density and speed of sound too?

    • DrAmine
      Ansys Employee

      Yes.

Viewing 7 reply threads
  • The topic ‘Compressible Liquid – Density’ is closed to new replies.
[bingo_chatbox]