|
[Sponsors] |
February 27, 2008, 07:08 |
UDF : problem with c_face_loop
|
#1 |
Guest
Posts: n/a
|
Hello,
I try to find a value of velocity of the mesh before the boundary. I've already written this UDF, but I always have a SEGMENTATION VIOLATION ... #include "udf.h" #include "mem.h" DEFINE_PROFILE(condition_limite_haut_air_z, t, index) { Thread *t1, *t2, *t3, *tf; real vitesse_avant; face_t f,f1; cell_t c,c0,c1,c2,c3; int n = 0; vitesse_avant = 0; begin_f_loop(f, t) { c0 = F_C0(f,t); c1 = F_C1(f,t); if (c1=NULL) { c = c0; } else { c = c1; } c_face_loop(c, t1, n) { f1 = C_NODE(c,t1,n); tf = C_FACE_THREAD(c,t1,n); if (f1 != f) { vitesse_avant = vitesse_avant + F_W(f1,tf); } } vitesse_avant = vitesse_avant/3; if (vitesse_avant < 0) { F_PROFILE(f, t, index) = 0; } else { F_PROFILE(f, t, index) = -vitesse_avant; } } end_f_loop(f, t) } After some researches, I've found that the problem comes from the c_face_loop. Can somebody help me? Thanks Quentin |
|
February 28, 2008, 07:05 |
Re: UDF : problem with c_face_loop
|
#2 |
Guest
Posts: n/a
|
Hello Quentin,
you use the thread pointer t1 in the c_face_loop, but I can't see the initialization of t1. I would you use t1=Lookup_Thread(d,index); function and then a begin_c_loop(c,t1) to iterate through the cells. Regards, Greg |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM | Rizwan | Fluent UDF and Scheme Programming | 40 | March 18, 2018 07:05 |
what's the problem with my udf | zzyan | FLUENT | 0 | November 4, 2010 04:56 |
Problem with my udf | july | Fluent UDF and Scheme Programming | 3 | June 20, 2010 07:56 |
udf compiling problem | akr | FLUENT | 3 | August 22, 2007 08:14 |
UDF problem | chiseung | FLUENT | 4 | January 10, 2002 10:58 |