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

UDF for sloshing

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 6, 2009, 11:35
Default UDF for sloshing
  #1
Alamedda
Guest
 
Posts: n/a
Hi every one ,

I'm modeling a sloshing of a rectangular tank on FLUENT 6.3 and I kind of need some help for the UDF defining it.

I want to simulate the sloshing from A to Z and and I'm facing problems in defining the source terms, the unsteady iteration, and what equations i need to activate.

on the experimental side, My tank is doing sinusoidal movements (right/left and up/down).

My biggest problem is the UDF. Mine is the following :

#include "udf.h" #include "stdio.h"

double x[ND_ND]; double PI=3.14159; real thetamax = (4*3.14159*2)/360; real frequence = 0.50 ; real phi=0;

DEFINE_SOURCE(xmom_source, c, t, dS, eqn)

{

real temps;

real omega, deromega;

real source_x;

temps = CURRENT_TIME;

C_CENTROID (x, c, t);

omega = thetamax*sin(temps*(2*PI)*frequence + phi);

deromega = thetamax*(frequence*(2*PI))*cos(temps*frequence*(2 *PI) + phi);

source_x = C_R(c,t)*(-9.8*sin(omega*temps)-x[1]*deromega-C_V(c,t)*omega-2*pow(omega, 2)*(x[0]-0.2));

dS[eqn] = 0;

return source_x;

}

DEFINE_SOURCE(ymom_source, c, t, dS, eqn)

{

real temps; real omega, deromega; real source_y;

temps = CURRENT_TIME;

C_CENTROID (x, c, t);

omega = thetamax*sin(temps*(2*PI)*frequence + phi);

deromega = thetamax*(frequence*(2*PI))*cos(temps*frequence*(2 *PI) + phi);

source_y = C_R(c,t)*(-9.8*cos(omega*temps)+(x[0]-0.2)*deromega+C_U(c,t)*omega-2*pow(omega, 2)*x[1]);

dS[eqn] = 0;

return source_y;

}

Thank you for responding.
  Reply With Quote

Old   November 13, 2013, 02:29
Default hii
  #2
New Member
 
Puneet
Join Date: Sep 2013
Posts: 14
Rep Power: 13
puneetnema is on a distinguished road
hii,did u get solution for ur problem,
i also need help regarding same and i m also not able to create udf
plz help me
puneetnema 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
VOF sloshing flow modisa FLUENT 0 April 24, 2008 16:36
Sloshing Lin FLUENT 1 September 7, 2007 07:11
Sloshing Prabodh FLUENT 0 May 1, 2006 10:36
sloshing Zaher CFX 8 March 27, 2004 18:02
sloshing baned FLUENT 0 September 19, 2003 04:53


All times are GMT -4. The time now is 18:07.