CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   udf for rectangular tank sloshing (https://www.cfd-online.com/Forums/fluent-udf/126735-udf-rectangular-tank-sloshing.html)

puneetnema November 25, 2013 07:14

udf for rectangular tank sloshing
 
yar plz somebody help me...once again i m posting the same problem

hii
i have written udf for sinusoidal wall movement given to a 2-d rectangular tank of dimension (1.2*0.6),but after iteration it is not showing any results or movement in water phase. i have tried for different end time and taking time step size as 1e-5 and no. of time steps 1000,10000,100000 but for any case showing no result.
attached udf.
#include"udf.h"
#define A 0.05 /* Amplitude=0.05m/s2*/
#define w 1.5 /*angular velocity*/
real AlnrX;
DEFINE_ADJUST(Accl,domain)
{
real t;
t=RP_Get_Real("flow-time);
AlnrX=A*sin(w*t);/*SINUSOIDAL MOTION*/
printf("Time=%f\n,t);
printf(Acceleration=%f\n",AlnrX);
}
DEFINE_SOURCE(xmom_source,cell.thread,ds,eqn)
{
double pos[ND_ND];
double rho;
real source;
C_CENTROID(pos,cell,thread);
rho=C_R(cell,thread);/*DENSITY*/
ds[eqn]=0.0;
source=-AlnrX*rho; /*momentum source term*/
return source;
}


All times are GMT -4. The time now is 23:50.