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

density change with pressure

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 24, 2015, 04:09
Default density change with pressure
  #1
Member
 
Lida
Join Date: Apr 2015
Posts: 39
Rep Power: 10
chem engineer is on a distinguished road
Hi everyone
I modeled a gas flow in a pipeline.because of the lack of availability of proper boundary condition in outlet I should use outflow boundary condition in outlet, so i have to use incompressible model and in fact the flow is incompressible.so I can't use ideal gas model and choose floating choice in operating condition.but because of the high pressure change in the pipeline I should verify density change with pressure.all of fluent models for changing density in material tab is are functions of temperature.so I wrote a udf for density changing with pressure and i interpreted it and there was no problem.but when I run the program, it stops in first iteration and shows the following error:

Error: Floating point error: invalid number
Error object: #f

and this is my udf:

#include "udf.h"

DEFINE_PROPERTY(cell_density, cell, thread)
{
real ro;
real press = C_P(cell, thread);

ro=1.8495e-6*press;
return ro;
}

the inlet pressure is 1723689 pa.

I will be really thankful if anyone could help me with this problem
chem engineer is offline   Reply With Quote

Old   September 24, 2015, 06:51
Default
  #2
Senior Member
 
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 12
Bruno Machado is on a distinguished road
just to be sure this is not the problem, can you try to compile it? sometimes, interpreted UDFs does not work properly.
Bruno Machado is offline   Reply With Quote

Old   September 24, 2015, 14:01
Default
  #3
Member
 
Lida
Join Date: Apr 2015
Posts: 39
Rep Power: 10
chem engineer is on a distinguished road
Quote:
Originally Posted by Bruno Machado View Post
just to be sure this is not the problem, can you try to compile it? sometimes, interpreted UDFs does not work properly.
I compiled the udf and tried to run the program but again there was the same error.
chem engineer is offline   Reply With Quote

Old   September 26, 2015, 11:57
Default
  #4
Member
 
Lida
Join Date: Apr 2015
Posts: 39
Rep Power: 10
chem engineer is on a distinguished road
is there any other idea or anyone else who could help me with this problem??
chem engineer is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
small density change for isothermal flows hz283 OpenFOAM 1 April 6, 2013 11:05
Water subcooled boiling Attesz CFX 7 January 5, 2013 04:32
Density below atmospheric pressure Mohsin FLUENT 0 August 6, 2010 05:58
Hydrostatic pressure in 2-phase flow modeling (CFX4.2) HB &DS CFX 0 January 9, 2000 14:19
Hydrostatic pressure in 2-phase flow modeling (long) DS & HB Main CFD Forum 0 January 8, 2000 16:00


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