CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Time dependant gravity (http://www.cfd-online.com/Forums/fluent/110679-time-dependant-gravity.html)

harikrishnan_k December 18, 2012 04:00

Time dependant gravity
 
Hi all,

I am simulating sloshing in a fuel tank using VOF. I want to provide time dependant gravity to simulate vibration. Could you please help on this?

Thanks and regards,
Hari

sicfred December 19, 2012 11:53

Hi!

1) you have to define an UDF for the time dependant gravity (Source Term). If you know the equation of time, lets say g=sin(pi*t) you can use this UDF:

#include "udf.h"
#define w 3.141592654 /* Frequency of the vibration in rad/s */

#define A 4.0 /* Maximum aceleration */
#define Durac 5.0 /* Duration of the vibrationin seconds */



DEFINE_SOURCE(GravDin,c,t,dS,eqn)
{
real time;
real source;

time=CURRENT_TIME;

if(time<Durac)

source=A*sin(w*time)*C_R(c,t);

else

source=0;

return source;
}

2) Interpret this UDF.
3)In cell zone conditions enable source terms, then go to source terms and select momentum equation -->UDF---> and select GravDin.
4)You can define more than one source terms in the same UDF, just copying and changing the name of the source, for example GravDinX (for gravity in the x direction)



Hope it hepls you.

harikrishnan_k December 24, 2012 10:09

Hello sicfred,
Thanks for your reply. I do not have a proper function for the vibration profile (Random vibration). I was told that Fluent has an option to provide gravity w.r.t time as a table format and could be downloaded from the users portal. I could not get it from the users portal. Please help me if you have a clue on this.

Thanks and regards,
Hari


All times are GMT -4. The time now is 23:08.