CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Multi step transient UDF velocity profile problem (http://www.cfd-online.com/Forums/fluent/47183-multi-step-transient-udf-velocity-profile-problem.html)

 William177 January 31, 2008 10:47

Multi step transient UDF velocity profile problem

Hello,

The model is a 2D axi-symmetric with fluid flow over a disc. I am trying to have various combinations of velocity function across the inlet to the domain.

I am attempting to simulate a disc being pushed and pulled through the fluid.

Here's my source code:

/************************************************** ********************

UDF for specifying a transient velocity profile boundary condition ************************************************** *********************/

#include "udf.h"

{

} else if(t>1 && t<=2)

{

} else

{

---------------------------------------------------

The velocity profile should take the form of an initial steady increase in velocity to 10m/s @ t=1s followed by a constant velocity of 10m/s until t=2s. I then want the velocity to profile to have a negative gradient from t=2s. Unfortunately the velocity gradient remains positive, even with the negative sign.

Can anyone spot anything wrong with my UDF or offer any solutions?

I am fairly new to writing UDFs so any help is much appreciated.

Thanks very much.

William

 William177 February 3, 2008 07:47

Re: Multi step transient UDF velocity profile prob

Any hope on attaining a negative gradient for the velocity profile folks?

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