# Simulation of sloshing by time varying gravity

 Register Blogs Members List Search Today's Posts Mark Forums Read

 August 19, 2005, 02:25 Simulation of sloshing by time varying gravity #1 Manoj Kumar Guest   Posts: n/a 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

 August 19, 2005, 02:29 Re: Simulation of sloshing by time varying gravity #2 Manoj Kumar Guest   Posts: n/a 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); }

 November 30, 2009, 21:01 #3 New Member   Saeed Abbasi Join Date: Sep 2009 Location: Iran Posts: 18 Rep Power: 9 Dear friend, I utilized your posts very much. I appreciate your activities. Thanks a lot. Saeed

 June 13, 2011, 03:34 gravity variation in Fluent? #4 New Member   Joyi Wang Join Date: Apr 2010 Posts: 8 Rep Power: 8 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.

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Lord Kelvin OpenFOAM Running, Solving & CFD 8 March 28, 2016 11:08 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 06:36 jonmec OpenFOAM Running, Solving & CFD 3 July 28, 2011 05:24 liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 19:07 Sascha Behrens FLUENT 0 December 1, 2005 10:08

All times are GMT -4. The time now is 19:26.