|
[Sponsors] |
March 27, 2001, 18:22 |
UDF in fluent
|
#1 |
Guest
Posts: n/a
|
Hi,
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 |
|
March 29, 2001, 03:20 |
Re: UDF in fluent
|
#2 |
Guest
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.. Seyoung |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
fluent udf, saving data in udf | mohsen zendehbad | Fluent UDF and Scheme Programming | 15 | June 13, 2017 23:23 |
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 10:57 |
Can somebody send me a Fluent 6 UDF manual?? | KKLAU | FLUENT | 4 | April 14, 2004 16:37 |