CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   Transient sinusoidal velocity inlet (

mrestrepo30 September 27, 2010 11:07

Transient sinusoidal velocity inlet
I'm trying to impose a sinusoidal velocity boundary condition in a cylinder, but instead of having the velocity magnitude changing in time (according to the sinusoidal eq), I only get my inlet profile to change into a sine wave.

I tried using different equations for defining my transient boundary condition, but the result is always the same: a sine profile at the entrance.

The UDF I'm using is below.

Is this the correct way to impose a transient boundary condition? does anyone have any suggestions?


#include "udf.h"

DEFINE_PROFILE(unsteady_velocity, thread, position)
face_t f;
real t = CURRENT_TIME;
real vel;

vel= 0.2+0.1*sin(t);

begin_f_loop(f, thread)

F_PROFILE(f, thread, position) = vel;
} end_f_loop(f, thread)


Trev September 27, 2010 11:17

An easy way around this would be to get hold of the de laval nozzle 2D tutorial which has a UDF that imposes a transient sinusoidal velocity profile at the inlet. Then modify it for your problem or see how the code is structured then modify your UDF.


mrestrepo30 September 27, 2010 12:03

Hi Trev,

I actually have the same structure, but the only thing that I changed is that instead of using pressure I'm imposing velocity. To do this I'm just reading the UDF into the velocity inlet BC... but it doesn't work.

All times are GMT -4. The time now is 22:21.