UDF file for defining density as fn of pressure
Hi all
Does anyone have a UDF where I can define the density as a function of pressure. I need to make water compressible Thanks |
Re: UDF file for defining density as fn of pressur
Hi!
It should look pretty much the same as the UDF that relates density to temerature (look in UDF manual - examples/tutorial). But I'm not shure if fluent allows this kind of relation. I've tried to do this for cavitation simulation but it did't work. Maybe you'll have better luck since you probabilly don't have so significant changes in density... regards MATEUS |
Re: UDF file for defining density as fn of pressur
I guess it could look something like:
DEFINE_PROPERTY(cell_density,cell,thread) { real density; real pressure = C_P(cell,thread); if( pressure > 1E-08 ) // to ensure that you have only positive pressure values density = "your function"; else density = "your lowest value (of course, previous function should be continuous)"; return density; } Philipp |
Re: UDF file for defining density as fn of pressur
Hi!
I found this sentance in Fluent documentation... "density (as a function of temperature only)", but i'm not totally convinsed that it's impossible... REGARDS mateus |
Re: UDF file for defining density as fn of pressur
Hi,
I had the same problem. The Fluent support team said : "it cannot be done". Unfortunately the density cannot be given as a function of pressure. regards Alexandre |
Re: UDF file for defining density as fn of pressur
...never say never. Have you tried yourself or did you just ask the "support team"?
I agree that you face some problems when you have large density variations in situ. However, if these are relatively minor, it should work. I'm saying this as I was actually able to successfully model a liquid with a desity variation of about 5%. Regards Philipp |
Re: UDF file for defining density as fn of pressur
you're right ...
... but I tried to add a covolume term to the ideal gas law and it failed. I must agree that my case was totally different from yours. After this failure I asked the support. |
Re: UDF file for defining density as fn of pressur
Hi, once I tried to define the density as un udf and I assure you that it doesn't work. More than this I asked Fluent support from France and they know that it is impossible. Try to write your density as an udf and to rewrite your equation as an udf. Good luck.
|
Re: UDF file for defining density as fn of pressur
Hi Philipp
This sounds like exactly what I want to do (compress water with a 5% density variation) How did you do this....did you add your own udf? Thanks in advance |
All times are GMT -4. The time now is 02:44. |