CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   UDF ERROR (

ozgur March 9, 2004 13:40

Hi all,

I am getting the following error, when I'm making VOF simulation of a free falling drop:

Error: > (greater-than): invalid argument [2]: wrong type [not a number] Error Object: nan

The error comes after the second time step. The UDF is hooked in the fluid BC panel, fixed values, y-velocity. What I want to do is to calculate fall velocity of the drop, and substract this value from the corresponding velocity component of all cells in the domain. The resulting picture then represents the flow field with respect to a refrence frame moving with the drop.

Thanks in advance for any help

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=0; real vol_tot=0; 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_2D(c,t_phase2);

vol_tot += C_VOLUME_2D(c,t_phase2);

} } end_c_loop(c, t_phase2)


printf("Volume average y_velocity of drop: %g\n",fall_vel_drop);




} end_c_loop(c,thread)


ap March 9, 2004 19:08

I recently had the same problem with a UDS, when I enable the source term.

Someone told me it's a divergence problem. Actually, setting the verbose option of the solver to 2, I saw the momentum equation residual is "Not a Number" from the beginning of the second iteration. Try to check if this happens to you too.

I'm still working to solve this problem.

Hi :)


All times are GMT -4. The time now is 00:57.