CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Simple UDF problem (https://www.cfd-online.com/Forums/fluent/41996-simple-udf-problem.html)

Leigh August 11, 2006 04:36

Simple UDF problem
 
Hello all,

I have a small problem, that im sure is not difficult to solve, but i cant get my head around it. Im using the following udf to produce a vibrating wall.

#include "udf.h"

DEFINE_CG_MOTION(wave, dt, vel, omega, time, dtime) { vel[0]=0.00004*sin(5*time); } It all works fine on a vertical boundary moving normal to itself, but i dont know how to alter the code so that I can use it on a horizontal boundary moving normal to itself.

Any ideas? Thanks Leigh

cadaei August 11, 2006 09:02

Re: Simple UDF problem
 
vel[0] represents the velocity in x-direction. change this to vel[1] or vel[2] for the y and z directions

Leigh August 11, 2006 09:41

Re: Simple UDF problem
 
Thanks alot, much appreciated!!

Leigh


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