|
[Sponsors] |
June 16, 2016, 16:57 |
Oscillating body Sloshing
|
#1 |
New Member
soheil radfar
Join Date: Jun 2016
Posts: 11
Rep Power: 10 |
Hi,
I am trying to simulate 2D tank sloshing with maximum rotation amplitude of 4.0 deg. How should I model the rotation of tank with udf? Below is my written udf about this issue. Please provide me your help on this udf. King Regards! #include <stdio.h> #include <math.h> #include "udf.h" DEFINE_CG_MOTION(Oscillating_body, dt, vel, omega, time, dtime) { real ampl,max_amp,omg; /* reset velocities */ NV_S (vel, =, 0.0); NV_S (omega, =, 0.0); /* motion */ max_amp = 0.0698 ; /* amplitude of rotation in radians (4.0 deg) */ omg = 2.0; /* angular frequency */ ampl = omega[2] * time; if (ampl < max_amp) { omega[2] = omg; } else if (ampl >= max_amp) { omega[2] = -omg; } } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Oscillating Tank Sloshing | soheilr | FLUENT | 1 | March 12, 2018 02:28 |
How to calculate oscillating roll of 2D body (with variable amplitude and omega) | lavrov | OpenFOAM Running, Solving & CFD | 0 | March 19, 2015 07:31 |
oscillating body force | olivier | FLUENT | 4 | April 12, 2005 10:56 |
oscillating body | fred | FLUENT | 1 | April 1, 2005 14:41 |
how to model an oscillating body? | ghaedi | FLUENT | 1 | December 25, 2004 05:27 |