|
[Sponsors] |
March 9, 2004, 12:40 |
UDF ERROR
|
#1 |
Guest
Posts: n/a
|
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) { if(C_VOF(c,t_phase2)>0) { 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) fall_vel_drop=fall_vel_volweighted/vol_tot; printf("Volume average y_velocity of drop: %g\n",fall_vel_drop); begin_c_loop(c,thread) { F_PROFILE(c,thread,nv)=C_V(c,thread)-fall_vel_drop; } end_c_loop(c,thread) } |
|
March 9, 2004, 18:08 |
Re: UDF ERROR
|
#2 |
Guest
Posts: n/a
|
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 ap |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with UDF compiling for kTkLW model | Wantami | FLUENT | 0 | July 18, 2011 05:11 |
ParaView for OF-1.6-ext | Chrisi1984 | OpenFOAM Installation | 0 | December 31, 2010 06:42 |
Accessing phi from a fvPatchField at same patch | johndeas | OpenFOAM | 1 | September 13, 2010 20:23 |
Installation OF1.5-dev | ttdtud | OpenFOAM Installation | 46 | May 5, 2009 02:32 |
Problem with compile the setParabolicInlet | ivanyao | OpenFOAM Running, Solving & CFD | 6 | September 5, 2008 20:50 |