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

UDF Problem

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   March 4, 2004, 12:51
Default UDF Problem
  #1
ozgur
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)

}
  Reply With Quote

 


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
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


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