|
[Sponsors] |
URGENT HELP needed regarding UDF for droplet impact height and spreading values |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Ar
Join Date: Nov 2011
Posts: 2
Rep Power: 0 ![]() |
The following is a UDF that I am using to calculate the spreading radius and height of a droplet impingement on a surface. It is an axisymmetric problem and I am trying to evaluate the above values at every time-step.
#include <udf.h> DEFINE_EXECUTE_AT_END(execute_at_end) { real r[ND_ND]; real time=CURRENT_TIME; real temp, y,x; face_t f; cell_t c1; Thread *t, *t1; FILE *fp; c1=F_C1(f,t); t1=THREAD_T1(t); begin_c_loop(c1,t1) { temp=C_VOF(c1,t1); if(temp==0.5) { C_CENTROID(r,c1,t1); x=r[0]; y=r[1]; fp=fopen("spread ratio.txt","w"); fprintf(fp,"%5.10d %5.8d %5.8d",time,x,y); fclose(fp); } } end_c_loop(c1,t1) } Fluent compiles the UDF properly. I hook up the UDF it up at the Execute at end and initialize the solution. Then I am patching the liquid droplet with a velocity. Once I start iterating this is the error that Fluent pops up: Updating solution at time level N... Global Courant Number : 0.01 done. physical-dt 1.0000e-008 iter continuity x-velocity y-velocity time/iter 1 0.0000e+00 1.6108e-03 1.5012e-04 0:00:00 1 1 0.0000e+00 0.0000e+00 0.0000e+00 Error: FLUENT received fatal signal (ACCESS_VIOLATION) 1. Note exact events leading to error. 2. Save case/data under new name. 3. Exit program and restart to continue. 4. Report error to your distributor. Error Object: () PLEASE HELP!! This same problem was working properly without the UDF |
|
![]() |
![]() |
![]() |
Tags |
access_violation, droplet, height, radius, udf |
|
|