CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   access violation error (https://www.cfd-online.com/Forums/fluent/43733-access-violation-error.html)

J.Y.Shin February 13, 2007 03:07

access violation error
 
I want to set the wall boundary condition as Tw=Tadjacent+10. Following UDF not working(access violation error), would yoou tell me why? ----------------------------------------------------------- #include "udf.h"

DEFINE_PROFILE(face_temp_grad, thread, position) { face_t f; cell_t c; Thread *tf; int ID=3 ; Domain *d;

begin_f_loop(f,thread) {

tf=Lookup_Thread(d,ID); c=F_C0(f,tf); F_PROFILE(f,thread,position)=C_T(c,tf)+10.0;

/* c=F_C0(f,thread); F_PROFILE(f,thread,position)=C_T(c,thread)+10.0; */ } end_f_loop(f,thread) }


Rizwan February 13, 2007 10:40

Re: access violation error
 
try this

#include "udf.h"

DEFINE_PROFILE (face_temp_grad, thread, position) {

face_t f; cell_t c; Thread *tf; int ID=3 ; Domain *d;

begin_f_loop(f,thread) {

tf=Lookup_Thread(d,ID);

c=F_C0(f,tf);

F_PROFILE(f,thread,position)=C_T(c,tf)+10.0;

end_f_loop (f,thread) }

}

J.Y.Shin February 13, 2007 20:06

Re: access violation error
 
What's the difference between my program and yours. Let me know, please...

Rizwan February 13, 2007 22:30

Re: access violation error
 
did it work or not? i havent done any changess except removing the comment and puttng a closing brace and it worked for me. Thanks


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