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?