|
[Sponsors] |
January 9, 2004, 03:05 |
CURRENT_TIME error
|
#1 |
Guest
Posts: n/a
|
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 |
|
January 9, 2004, 04:44 |
Re: CURRENT_TIME error
|
#2 |
Guest
Posts: n/a
|
Hi,
I think the line including the time "t" might be written as: real t = RP_Get_Real(CURRENT_TIME). Hope it helps! Emma |
|
January 9, 2004, 04:58 |
Re: CURRENT_TIME error
|
#3 |
Guest
Posts: n/a
|
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 |
|
January 9, 2004, 05:30 |
Re: CURRENT_TIME error
|
#4 |
Guest
Posts: n/a
|
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 |
|
January 9, 2004, 05:46 |
Re: CURRENT_TIME error
|
#5 |
Guest
Posts: n/a
|
It seems to compile now. Thanks
/Johan |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh | gschaider | OpenFOAM Community Contributions | 300 | October 29, 2014 18:00 |
c++ libraries and solver compiling | vaina74 | OpenFOAM Installation | 13 | February 3, 2012 17:43 |
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug | unoder | OpenFOAM Installation | 11 | January 30, 2008 20:30 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 17:51 |
user defined function | cfduser | CFX | 0 | April 29, 2006 10:58 |