CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

can density be defined as function of pressure

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 3, 2003, 02:38
Default can density be defined as function of pressure
  #1
H.M.Tang
Guest
 
Posts: n/a
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?
  Reply With Quote

Old   March 3, 2003, 21:37
Default Re: can density be defined as function of pressure
  #2
J.W.Ryu
Guest
 
Posts: n/a
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,
  Reply With Quote

Old   March 3, 2003, 22:03
Default Re: can density be defined as function of pressure
  #3
H.M.Tang
Guest
 
Posts: n/a
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"

DEFINE_PROPERTY(cell_density,cell,thread) {

real density;

real pressure=C_P(cell,thread);

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;}
  Reply With Quote

Old   March 4, 2003, 11:15
Default Re: can density be defined as function of pressure
  #4
J.W.Ryu
Guest
 
Posts: n/a
I testes your UDF, and confirmed that your UDF itself was no problem. Please ask your Fluent distributor...

  Reply With Quote

Old   March 5, 2003, 02:20
Default Re: can density be defined as function of pressure
  #5
Philipp Beierer
Guest
 
Posts: n/a
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?
  Reply With Quote

Old   March 5, 2003, 04:11
Default Re: can density be defined as function of pressure
  #6
H.M.Tang
Guest
 
Posts: n/a
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.
  Reply With Quote

Old   February 4, 2019, 01:36
Default Density as a function of position
  #7
New Member
 
RD
Join Date: Oct 2018
Posts: 8
Rep Power: 8
RD03 is on a distinguished road
Hi, I want to know whether we can define density as a function of position in UDF. In manual I have found that density can be defined only as a function of Temperature. Can it be changed?
RD03 is offline   Reply With Quote

Old   July 7, 2019, 01:53
Post are you sure?
  #8
New Member
 
Ali Gürcan
Join Date: Jun 2019
Posts: 7
Rep Power: 7
Daryun is on a distinguished road
Quote:
Originally Posted by RD03 View Post
Hi, I want to know whether we can define density as a function of position in UDF. In manual I have found that density can be defined only as a function of Temperature. Can it be changed?
Ansys Fluent User Guide

"6.3.4.3.3. Density Calculation
Density at the inlet plane is either constant or calculated as a function of temperature, pressure, and/or species mass/mole fractions, where the mass or mole fractions are the values you entered as an inlet condition."
Daryun is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to read pressure at discrete points paka OpenFOAM 16 April 28, 2020 08:26
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51
Does star cd takes reference pressure? monica Siemens 1 April 19, 2007 12:26
Solver and density function for high speed vapour christian OpenFOAM Running, Solving & CFD 17 April 12, 2007 03:41
Warning 097- AB Siemens 6 November 15, 2004 05:41


All times are GMT -4. The time now is 11:13.