CFD Online Logo CFD Online URL
Home > Forums > FLUENT

UDF in fluent

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

LinkBack Thread Tools Display Modes
Old   March 27, 2001, 18:22
Default UDF in fluent
Posts: n/a

I am a graduate student modeling the flow of air through a rotary valve in an IC engine using fluent. I have the following question. The pressure at the outlet varies as the density of air changes. I would like to use this value of density at the current time step to calculate the pressure at the next time step. I am able to write out the density values into a *.out file. Could someone please tell me how I could read this value back into my UDF and calculate the pressure for the next time step.

Thanks.... -Krishna
  Reply With Quote

Old   March 29, 2001, 03:20
Default Re: UDF in fluent
Seyoung Oh
Posts: n/a
In your case, it's better to use a "C_UDMI" function. By using that you can write a density values in a memory stack and use it in your UDF. So, writing the density values into a file and reading it from the file is not required.

Your UDF can be,

DEFINE_ADJUST() { Thread *t=Lookup_Thread(domain,outlet_id)

/* you can find the outlet id in fluent menu-define-boundary condition */ begin_c_loop(c,t) {

C_UDMI(c,t,0)=C_R(c,t); /* write values in memory stack */ }


/* use it to update the pressure */ DEFINE_PROFILE() { F_P(f,t)= C_UDMI(c,t,0)*R*T; /* exam. p=rho*R*T */ }

And don't forget to select a adjust function in the fluent menu(defined-function Hooks-Adjust function) to update the density at every time step.

Good luck..


  Reply With Quote


Thread Tools
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
fluent udf, saving data in udf mohsen zendehbad Fluent UDF and Scheme Programming 13 March 21, 2014 16:36
Transient pressure UDF for parallel fluent droberts Fluent UDF and Scheme Programming 5 October 11, 2010 04:13
Using Fluent with a UDF frm a remote m/c aarti FLUENT 2 September 11, 2008 19:53
UDF problem caused by various version of Fluent Yurong FLUENT 3 January 15, 2006 11:57
Can somebody send me a Fluent 6 UDF manual?? KKLAU FLUENT 4 April 14, 2004 16:37

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