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

URGENT HELP needed regarding UDF for droplet impact height and spreading values

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 28, 2011, 16:45
Default URGENT HELP needed regarding UDF for droplet impact height and spreading values
  #1
New Member
 
Ar
Join Date: Nov 2011
Posts: 2
Rep Power: 0
skel_1 is on a distinguished road
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
skel_1 is offline   Reply With Quote

Reply

Tags
access_violation, droplet, height, radius, udf


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



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