|
[Sponsors] |
March 4, 2004, 12:51 |
UDF Problem
|
#1 |
Guest
Posts: n/a
|
Hi all,
I have written an UDF (attached below) in order to calculate the volume weighted falling velocity of my free falling droplet, and use this velocity as the velocity inlet boundary condition. With this UDF, I hope to fix my falling drop in the calculation domain, so I can use a smaller domain, which is refined at the 2-phase interface on the drop. The UDF is interpreted succesfully, but the problem is, when I try to hook it at the velocity inlet BC panel, the program hangs like it gets into an infinite loop. So I have to kill the fluent session. Does any one have a suggestion about that? Thanks in advance, here is the UDF: #include "udf.h" #include "sg_mphase.h" DEFINE_PROFILE(fall_velocity,thread,nv) { real fall_vel_drop; real fall_vel_volweighted; real vol_tot; face_t f; cell_t c; Thread *t_phase2=THREAD_SUB_THREAD(thread,1); begin_c_loop(c, t_phase2) { fall_vel_volweighted += C_V(c,t_phase2)*C_VOLUME(c,t_phase2); vol_tot += C_VOLUME(c,t_phase2); } end_c_loop(c, t_phase2) fall_vel_drop=fall_vel_volweighted/vol_tot; printf("Volume average y_velocity of drop: %g\n",fall_vel_drop); begin_f_loop(f,thread) { F_PROFILE(f,thread,nv)=fall_vel_volweighted/vol_tot; } end_f_loop(f,thread) } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM | Rizwan | Fluent UDF and Scheme Programming | 40 | March 18, 2018 06:05 |
Problem with my udf | july | Fluent UDF and Scheme Programming | 3 | June 20, 2010 06:56 |
UDF problem | mansha goraya | FLUENT | 0 | October 29, 2007 00:31 |
udf compiling problem | akr | FLUENT | 3 | August 22, 2007 07:14 |
UDF problem | chiseung | FLUENT | 4 | January 10, 2002 09:58 |