CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   modification of UDF (http://www.cfd-online.com/Forums/fluent/43383-modification-udf.html)

ammi January 18, 2007 06:59

modification of UDF
 
Hi

i have a udf that cause motion along x-direction of a solid body(2d problem).

#include "udf.h"

DEFINE_CG_MOTION(vel_comp,dt,vel,omega,time,dtime)

{ real freq = 34.0; real w = 2.0 * M_PI * freq; real Xcomp = 0.004511;

NV_S(vel, = ,0.0); NV_S(omega, = ,0.0); vel[0] = w * Xcomp * cos (w * time);

}

howto change it cause the motion along y direction . please reply

ammi reddy

Sujith January 18, 2007 11:47

Re: modification of UDF
 
change vel[0] to vel [1]

sujith

ammi January 18, 2007 22:35

Re: modification of UDF
 
thanx it is working


All times are GMT -4. The time now is 00:04.