CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

Multi step transient UDF velocity profile problem

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 31, 2008, 10:47
Default Multi step transient UDF velocity profile problem
  #1
William177
Guest
 
Posts: n/a
Hello,

Could anyone please offer some advice on perfecting this UDF.

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:

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

unsteady.c

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

#include "udf.h"

DEFINE_PROFILE(unsteady_velocity3, thread, position) { face_t f; real t = CURRENT_TIME;begin_f_loop(f, thread) if (t<=1)

{

F_PROFILE(f, thread, position) = 10*t;

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

{

F_PROFILE(f, thread, position) = 10;

} else

{

F_PROFILE(f, thread, position) = 30-(10*t);

} end_f_loop(f, thread) }

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

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

  Reply With Quote

Old   February 3, 2008, 07:47
Default Re: Multi step transient UDF velocity profile prob
  #2
William177
Guest
 
Posts: n/a
Any hope on attaining a negative gradient for the velocity profile folks?
  Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
please help UDF for velocity profile in y-directio raju Fluent UDF and Scheme Programming 6 April 13, 2019 00:21
UDF parallel velocity inlet profile Armengol FLUENT 3 September 30, 2009 16:08
Pressure profile UDF for unsteady-state problem? Mohsen Keshavarzian FLUENT 2 August 20, 2008 05:22
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 19:07
UDF problem : inlet velocity in cyl. coord. system Jongdae Kim FLUENT 0 June 15, 2004 12:21


All times are GMT -4. The time now is 13:37.