|
[Sponsors] |
March 6, 2009, 11:35 |
UDF for sloshing
|
#1 |
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. |
|
November 13, 2013, 02:29 |
hii
|
#2 |
New Member
Puneet
Join Date: Sep 2013
Posts: 14
Rep Power: 13 |
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 |
|
|
|
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 |