|
[Sponsors] |
January 18, 2006, 05:48 |
CURRENT_TIME macro
|
#1 |
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 |
|
January 20, 2006, 06:54 |
Re: CURRENT_TIME macro
|
#2 |
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 |
|
|
|
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 |