CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Oscillating body Sloshing

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 16, 2016, 16:57
Default Oscillating body Sloshing
  #1
New Member
 
soheil radfar
Join Date: Jun 2016
Posts: 11
Rep Power: 10
soheilr is on a distinguished road
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;
}
}
Attached Images
File Type: jpg 2016-06-02_1-00-09.jpg (22.0 KB, 8 views)
Attached Files
File Type: c Oscillating Body.c (461 Bytes, 8 views)
soheilr is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 20:58.