CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

CURRENT_TIME macro

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 18, 2006, 05:48
Default CURRENT_TIME macro
  #1
Makaveli
Guest
 
Posts: n/a
I am trying to write a time dependant udf using the CURRENT_TIME macro, however when I interpret the udf fluent gives an error decribing CURRENT_TIME as an undeclared variable.

My udf code:

#include "udf.h"

DEFINE_PROFILE(unsteady_velocity, thread, position)

{ face_t f;

real t = CURRENT_TIME;

begin_f_loop(f, thread)

{ F_PROFILE(f, thread, position) = 20. + 5.0*sin(10.*t); }

end_f_loop(f, thread) }

However if I use the Equivalent RP Macro, i get don't receive an error.

My new code: #include "udf.h"

DEFINE_PROFILE(unsteady_velocity, thread, position) {

face_t f;

real t;

t = RP_Get_Real("flow-time");

begin_f_loop(f, thread) {

F_PROFILE(f, thread, position) = 20. + 5.0*sin(10.*t); }

end_f_loop(f, thread) }

Can some explain to me how I am using the CURRENT_TIME macro wrong please so I can avoid these errors
  Reply With Quote

Old   January 20, 2006, 06:54
Default Re: CURRENT_TIME macro
  #2
HS
Guest
 
Posts: n/a
Hm... Check that you have flow.h located in the right directory. It should be in the same directory as udf.h I guess. The CURRENT_TIME macro is defined in there and udf.h should link to it automatically.

/Henrik
  Reply With Quote

Reply


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 Off
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 00:40.