CFD Online Logo CFD Online URL
Home > Forums > FLUENT

How to use F_FLUX_M1 macro????

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   January 7, 2007, 10:41
Default How to use F_FLUX_M1 macro????
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
  Reply With Quote

Old   January 7, 2007, 16:24
Default Re: How to use F_FLUX_M1 macro????
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
  Reply With Quote

Old   January 9, 2007, 11:26
Default Re: How to use F_FLUX_M1 macro????
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.

  Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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

All times are GMT -4. The time now is 22:34.