CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   can density be defined as function of pressure (http://www.cfd-online.com/Forums/fluent/31014-can-density-defined-function-pressure.html)

 H.M.Tang March 3, 2003 02:38

can density be defined as function of pressure

hello, i was puzzled by a problem in Fluent5.5. my question is "can density be defined as function of pressure in UDF ?" in fluent's help document,say" Some of the properties you can customize are density (as a function of temperature only)"why?

 J.W.Ryu March 3, 2003 21:37

Re: can density be defined as function of pressure

Fluid density is dependent on Temperature..... Ideal or incompressive ideal gas of material panel will follow pressure dependent density. PV=nRT..... If you have density as function of pressure, it will be better to make UDF. This can be selected at material panel too.

Thanks,

 H.M.Tang March 3, 2003 22:03

Re: can density be defined as function of pressure

i have made udf that density was defined as the function of pressure.but when i import the udf,a lot of errors happen.so i think the error maybe results from the inner arithmetic. the follow is the udf. #include "udf.h"

real density;

if(pressure>=6.0e+5)

density=98.326+3.0013e-5*pressure;

else

density=-0.74708+5.54545e-5*pressure+3.25103e-10*pressure*pressure;

return density;}

 J.W.Ryu March 4, 2003 11:15

Re: can density be defined as function of pressure

 Philipp Beierer March 5, 2003 02:20

Re: can density be defined as function of pressure

Do you get negative pressure values, if you calculate with roh=const? If yes, you have to limit the function to only positive values by adding something like:

if (pressure > 0.001)

...;

else

density=const_value;

By the way, how much do you expect the density to vary?

 H.M.Tang March 5, 2003 04:11

Re: can density be defined as function of pressure

Thank you for your advice. My CFD simulation is the helium ejector. The helium refrigerant flows through the ejector at almost constant temperature about 6K. The inlet high pressure is about 18atm, the inlet low pressure is about 1atm or below. The out back pressure is about 3atm. The density change is about 4.23932kg/m^3(6KĄ˘0.5atm), and 148.236kg/m^3(6KĄ˘18atm).So the relation between density and pressure is important, but the relation between density and temperature can be ignored.

 All times are GMT -4. The time now is 09:37.