CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   How to use F_FLUX_M1 macro???? (https://www.cfd-online.com/Forums/fluent/43255-how-use-f_flux_m1-macro.html)

Asghari January 7, 2007 09:41

How to use F_FLUX_M1 macro????
 
Hi all;

There is a macro calling F_FLUX_M1 for calculating face flux in previous time step . But whenever i use from this macro, I am encountered Access violation error. How can i remedy this problem? Erroe takes place in this lines in UDF presented in following:

thread_loop_c(t,domain) { int i=1; begin_c_loop(c,t) ; { C_UDMI(c,t,1)=0.0 ; c_face_loop (c,t,i) { f= C_FACE(c,t,i) ; tf= C_FACE_THREAD(c,t,i) ; C_UDMI(c,t,1)=C_UDMI(c,t,1)+F_FLUX_M1(f,tf); } } end_c_loop (c,t) }

Please help me.

Thanks in advance for everybody reply my question .

Mehdi Asghari

Bogdan January 7, 2007 15:24

Re: How to use F_FLUX_M1 macro????
 
remove the line where you set i=1; in C the array index starts from 0. And also because C_FACE_THREAD returns a pointer, check the pointer returned (for example if((tf=C_FACE_THREAD(c,t,i))!=NULL) { bla bla } And also I think you should use C_UDMI(c,t,0) and not C_UDMI(c,t,1) Regards

Asghari January 9, 2007 10:26

Re: How to use F_FLUX_M1 macro????
 
Ok, But this error is arised ,when i use from F_FLUX_M1, For example,whenever i use from F_FLUX macro , i don't face with access violation, have you access to fluent center ? can you ask how to be use F_FLUX_M1 macro?

I am appreciated you for this help.

Thank's alot.



All times are GMT -4. The time now is 04:35.