Simulation of sloshing by time varying gravity
Hi I am trying to simulate sloshing in a tank. I tried solving the problem by adding a source term in the momentum equation using following code..
#include "udf.h" #define pie 3.141592654 DEFINE_SOURCE(cell_x_source, cell, thread, dS, eqn) { real source; /* source term */ source=(-0.15)*pow((2*pie/1.70),2)*C_R(cell,thread)*sin((2*pie/1.70)*CURRENT_TIME); dS[eqn] = 0.; return source; } I compared my results with published experimental and CFD results, and found that the change in freesurface with time is not matching. Now I want to solve the problem by using a time varying gravity. Is follwing code sufficient ? #include "udf.h" #DEFINE g 9.81 #DEFINE pie 3.14 #DEFINE timeperiod 1.70 DEFINE_ADJUST(my_adjust,d) { M_gravity[ND_ND]=g*sin((2*pie/timeperiod)*CURRENT_TIME); } Thanks Manoj |
Re: Simulation of sloshing by time varying gravity
The codes are ..
#include "udf.h" #define pie 3.141592654 DEFINE_SOURCE(cell_x_source, cell, thread, dS, eqn) { real source; /* source term */ source=(-0.15)*pow((2*pie/1.70),2)*C_R(cell,thread)*sin((2*pie/1.70)*CURRENT_TIME); dS[eqn] = 0.; return source; } and #include "udf.h" #DEFINE g 9.81 #DEFINE pie 3.14 #DEFINE timeperiod 1.70 DEFINE_ADJUST(my_adjust,d) { M_gravity[ND_ND]=g*sin((2*pie/timeperiod)*CURRENT_TIME); } |
Dear friend, I utilized your posts very much.
I appreciate your activities. Thanks a lot. Saeed |
gravity variation in Fluent?
Hi, for the second method, I've tried to implement your code in Fluent 6.3 but it can not recognize the item "M-gravity".
Does anyone know the definition of gravity in Fluent code,? I can't find it in the udf manual. |
All times are GMT -4. The time now is 02:10. |