|
[Sponsors] |
May 26, 2006, 10:55 |
Segmentation Violation
|
#1 |
Guest
Posts: n/a
|
Hello Guys, I want to obtain a coefficient diffusion value with the following UDF code:
__________________________________________________ #include "udf.h" #include "sg.h" #include "mem.h" DEFINE_ON_DEMAND(cor_diff) { Domain *d; Domain *sd; Thread *t, *tc0; face_t f; cell_t c; int ID =6; real diff1[3]; real fra_mas[3], dens=0.; real A[ND_ND],ds,es[ND_ND],A_by_es,dr0[ND_ND],dr1[ND_ND]; d = Get_Domain(1); sd = Get_Domain(2); t = Lookup_Thread(sd,ID); begin_f_loop(f,t) { tc0 = THREAD_T0(t); c = F_C0(f,t); INTERIOR_FACE_GEOMETRY(f,tc0,A,ds,es,A_by_es,dr0,d r1); diff1[0] = C_DIFF_EFF(c,tc0,0); dens = C_R(c,tc0); fra_mas[0] = F_YI(c,tc0,0); C_UDMI(c,t,0) = dens*diff1[0]*fra_mas[0]*dr0[0]*2; } end_f_loop(f,t) } _________________________________________ but after I have compiled this function and run as "execute on demand" I obtain the error "segmentation violation"... Which error I have made? Thank you for your answers. Axel |
|
May 26, 2006, 12:19 |
Re: Segmentation Violation
|
#2 |
Guest
Posts: n/a
|
Please check whether you are trying to access something which does not exist as yet. You may be knowing, this is a common error when you try to access a memory that does not exist!
Swarup. |
|
May 26, 2006, 13:16 |
Re: Segmentation Violation
|
#3 |
Guest
Posts: n/a
|
I noted that when I consider the face loop (also with nothing inside it) there is this error... I am trying to use an other loop...
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Segmentation violation | louiza | FLUENT | 16 | June 27, 2017 16:41 |
Segmentation Violation | Corentin | FLUENT | 1 | February 13, 2011 02:07 |
Defining Multiphase by text and by gui = different result and Segmentation Violation | RPJones | FLUENT | 0 | June 9, 2009 17:24 |
segmentation violation | wasan | FLUENT | 0 | December 23, 2008 12:37 |
SEGMENTATION VIOLATION | Arif | FLUENT | 3 | May 27, 2003 09:24 |