|
[Sponsors] |
May 9, 2006, 11:22 |
A short UDF
|
#1 |
Guest
Posts: n/a
|
I am just trying to extract the y-velocity at x=0. Please note that when I use v=F_V(f,t) or F_U(f,t) instead of v=cte, I receive the following error. The line x=0 is within the domain, defined by using Surface menu.
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: () ================================================== ========= #include "udf.h" DEFINE_ADJUST(data_extract_from_jet,d) { real xx[ND_ND]; /* this will hold the position vector */ real x, y, u, v; Thread *t; face_t f; FILE *fp; fp = fopen("jet.dat","w"); thread_loop_f(t,d) /* loop over the Thread of Faces t in the domain */ { begin_f_loop(f,t) /*loop over the faces (f) of the Thread of Faces */ { F_CENTROID(xx,f,t); x = xx[0]; y = xx[1]; if( x==0) { v=F_V(f,t); fprintf(fp, "\n x=%g y=%g\n vc=%g\n", x, y, v); } } end_f_loop(f,t) } fclose(fp); } |
|
May 24, 2006, 11:43 |
Re: A short UDF
|
#2 |
Guest
Posts: n/a
|
why dont use a DEFINE_ON_DEMAND function?
|
|
May 24, 2006, 11:56 |
Re: A short UDF
|
#3 |
Guest
Posts: n/a
|
Thanks for your reply. Both Define_adjust and On Demand work. I guess the peroblem is from somewhere else.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic Mesh UDF | Qureshi | FLUENT | 7 | March 23, 2017 07:37 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 22:14 |
How to add a UDF to a compiled UDF library | kim | FLUENT | 3 | October 26, 2011 21:38 |
short udf | amir | FLUENT | 0 | May 25, 2006 14:26 |
UDF, UDF, UDF, UDF | Luc SEMINEL | Main CFD Forum | 0 | November 25, 2002 04:01 |