|
[Sponsors] |
July 17, 2006, 15:49 |
Question about UDF
|
#1 |
Guest
Posts: n/a
|
Hello, everyone. Now I am writing a UDF to define the source term in UDS. I have the unsteady term defined as follows: DEFINE_UDS_UNSTEADY(uns_time,c,mix_thread,i,apu,su ) { cell_t c; Thread *mix_thread; real physical_dt; int i=0;
/*find the threads for the gas-bubble(secondary phase)*/ thread_g=THREAD_SUB_THREAD(mix_thread,s_col); /*secondary phase*/ void_g=C_VOF(c,thread_g); /*gas volume fraction*/ physical_dt=RP_Get_Real("physical-time-step"); *apu=-1/3*void_g/physical_dt; /*implicit part*/ phi_old=C_STORAGE_R(c,thread_g,SV_VOF_M1(i)); *su=1/3*phi_old/physical_dt; /*explicit part*/ } And then I want to use it in another macro called DEFINE_SOURCE in the same c file. Could I use apu and su directly? Need I use the User-defined Memory to store them first? Thanks in advance. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
A simple UDF question | Pirooz Darabi | FLUENT | 0 | October 31, 2007 15:22 |
Yet another UDF question. | Bee | FLUENT | 0 | October 9, 2006 03:46 |
Basic question: UDF for wall heat flux | Carl | FLUENT | 1 | August 5, 2006 19:01 |
UDF question | Ryan | FLUENT | 2 | July 5, 2006 14:54 |
A question about the dynamic mesh UDF | Tango | FLUENT | 1 | November 27, 2003 02:56 |