CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   Gravity function of time (

arapar March 8, 2008 14:49

Gravity function of time
Hi all

I want to model a cavity and the gravity should be a function of time. I use the following udf but it did not working and there are some errors:

#include "udf.h" #define w -49 #define A 1

DEFINE_ADJUST(gravity_variable,d) { real gravity[2]; real flow_time(); real time=0.0; time = RP_Get_Real ("flow_time"); gravity[0] = A*w* double cos (double time); gravity[1] = 0;

RP_Set_Real("gravity/x",gravity[0]); RP_Set_Real("gravity/y",gravity[1]); printf ("%g x-gravity\n", gravity[0]); printf ("%g y-gravity\n", gravity[1]); }

and the errors are: 1- make[1]:leaving directory "name of my directory/libudf/lnx86/3d"

and also I can't load in and I have this error: open_udf_library:No such file or directory

can you help me to fix this problem or if you have a udf in this regards acn you please send it for me.


All times are GMT -4. The time now is 06:03.