|
[Sponsors] |
Simulation of sloshing by time varying gravity |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 19, 2005, 03:25 |
Simulation of sloshing by time varying gravity
|
#1 |
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, 03:29 |
Re: Simulation of sloshing by time varying gravity
|
#2 |
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: 20
Rep Power: 17 |
Dear friend, I utilized your posts very much.
I appreciate your activities. Thanks a lot. Saeed |
|
June 13, 2011, 04:34 |
gravity variation in Fluent?
|
#4 |
New Member
Joyi Wang
Join Date: Apr 2010
Posts: 8
Rep Power: 16 |
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. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Extrusion with OpenFoam problem No. Iterations 0 | Lord Kelvin | OpenFOAM Running, Solving & CFD | 8 | March 28, 2016 12:08 |
Superlinear speedup in OpenFOAM 13 | msrinath80 | OpenFOAM Running, Solving & CFD | 18 | March 3, 2015 06:36 |
Orifice Plate with a fully developed flow - Problems with convergence | jonmec | OpenFOAM Running, Solving & CFD | 3 | July 28, 2011 06:24 |
Could anybody help me see this error and give help | liugx212 | OpenFOAM Running, Solving & CFD | 3 | January 4, 2006 19:07 |
influence of time step in insationary simulation | Sascha Behrens | FLUENT | 0 | December 1, 2005 10:08 |