|
[Sponsors] |
January 7, 2007, 09:41 |
How to use F_FLUX_M1 macro????
|
#1 |
Guest
Posts: n/a
|
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 |
|
January 7, 2007, 15:24 |
Re: How to use F_FLUX_M1 macro????
|
#2 |
Guest
Posts: n/a
|
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
|
|
January 9, 2007, 10:26 |
Re: How to use F_FLUX_M1 macro????
|
#3 |
Guest
Posts: n/a
|
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. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Macro Trouble -Winows Explorer Crashes with Macro | Martin Castillo | FLUENT | 1 | July 25, 2007 04:18 |
Macro problem | cfddummy | Siemens | 1 | April 9, 2007 12:37 |
macro not function! | guang ai | Siemens | 0 | July 25, 2004 18:53 |
Call a macro from a macro | Flav | Siemens | 2 | July 1, 2004 05:42 |
Bug in the DEFINE_ADJUST macro? | Senthil | FLUENT | 5 | September 3, 2002 22:26 |