|
[Sponsors] |
UDF file for defining density as fn of pressure |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 7, 2003, 08:30 |
UDF file for defining density as fn of pressure
|
#1 |
Guest
Posts: n/a
|
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 |
|
October 7, 2003, 09:04 |
Re: UDF file for defining density as fn of pressur
|
#2 |
Guest
Posts: n/a
|
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 |
|
October 8, 2003, 03:35 |
Re: UDF file for defining density as fn of pressur
|
#3 |
Guest
Posts: n/a
|
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 |
|
October 10, 2003, 11:09 |
Re: UDF file for defining density as fn of pressur
|
#4 |
Guest
Posts: n/a
|
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 |
|
October 13, 2003, 04:14 |
Re: UDF file for defining density as fn of pressur
|
#5 |
Guest
Posts: n/a
|
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 |
|
October 16, 2003, 04:18 |
Re: UDF file for defining density as fn of pressur
|
#6 |
Guest
Posts: n/a
|
...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 |
|
October 16, 2003, 04:22 |
Re: UDF file for defining density as fn of pressur
|
#7 |
Guest
Posts: n/a
|
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. |
|
October 16, 2003, 05:04 |
Re: UDF file for defining density as fn of pressur
|
#8 |
Guest
Posts: n/a
|
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.
|
|
November 11, 2003, 10:59 |
Re: UDF file for defining density as fn of pressur
|
#9 |
Guest
Posts: n/a
|
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
wmake compiling new solver | mksca | OpenFOAM Programming & Development | 14 | June 22, 2018 07:29 |
paraview installation woes | vex | OpenFOAM Installation | 15 | January 30, 2011 08:11 |
Problem installing on Ubuntu 9.10 -> 'Cannot open : No such file or directory' | mfiandor | OpenFOAM Installation | 2 | January 25, 2010 10:50 |
error while compiling the USER Sub routine | CFD user | CFX | 3 | November 25, 2002 16:16 |
Fluent 5.2, UDF and Pressure BC's | Alfonso Ferrandez | FLUENT | 0 | May 4, 2000 08:02 |