CURRENT_TIME error
Hi,
When i try to compile the example (se below) from the UDF manual for transient velocity profile i get a error that say that CURRENT_TIME is not declared. /************************************************** ** unsteady.c UDF for specifying a transient velocity profile boundary condition ************************************************** ***/ #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) = 4. + 2*sin(3.*t); } end_f_loop(f, thread) Anyone who have a solution for the problem? /Johan |
Re: CURRENT_TIME error
Hi,
I think the line including the time "t" might be written as: real t = RP_Get_Real(CURRENT_TIME). Hope it helps! Emma |
Re: CURRENT_TIME error
Have tried it now and I still get the error that looks like this: unsteady.c: line 12: CURRENT_TIME: undeclared variable
/************************************************ unsteady.c UDF for specifying a transient velocity profile boundary condition ***********************************************/ #include "udf.h" DEFINE_PROFILE(unsteady_velocity, thread, position) { face_t f; real t = RP_Get_Real(CURRENT_TIME); begin_f_loop(f, thread) { F_PROFILE(f, thread, position) = 4. + 2*sin(3.*t); } end_f_loop(f, thread) } /Johan |
Re: CURRENT_TIME error
sorry, I wrote something wrong! The current physical flow time can be obtained eihter directly by the solver macro "CURRENT_TIME" or indirectly by RP_Get_Real("flow-time")macro. hope it works!
Emma |
Re: CURRENT_TIME error
It seems to compile now. Thanks
/Johan |
All times are GMT -4. The time now is 13:32. |