11 November 2013 1 579 Report

I have written UDF for sinusoidal wall movement given to a 2-d rectangular tank of dimension (3*3), but after iteration it doesn't show any results or movement in water phase. I have tried different end time and taking time step size as 1e-5 and no. of time steps 1000,10000,100000 but for any case it shows 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;

}

More Puneet Nema's questions See All
Similar questions and discussions