CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT

Need help: strange problem of unsteady B.C. UDF

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

LinkBack Thread Tools Display Modes
Old   April 11, 2003, 19:03
Default Need help: strange problem of unsteady B.C. UDF
Z. T.
Posts: n/a

In my project, a unsteady velocity condition is applied to the outlet. I used piece-wise function:

1) In the first half period(T=0.02s), it is sine function: v(t)=-21.87*sin(314.16*t) ('-' means outflow direction);

2) In the second half period, velocity magnitude is zero.

I made a UDF as follows:

#include "udf.h"

DEFINE_PROFILE(unsteady_velocity, thread, position) {

face_t f;

real t;

real t1;

int t2;

t = RP_Get_Real("flow-time");

t1 = t*10000.0;

t2 = ((int)t1)%200;

begin_f_loop(f, thread)


if (0 < t2 <= 100 )

F_PROFILE(f, thread, position) = -21.87*sin(314.16*t);

if (100 < t2 <= 200 )

F_PROFILE(f, thread, position) = 0.0;


end_f_loop(f, thread)


In this UDF, modulus operation is used to describe the perodic behavior. The time step size is 0.0004s. After I prescribed it as B.C. and perform calculation, the monitor for outlet shown that velocity manitude is always zero. I don't know what lead to this problem. Does it lie in wrong flow time when UDF is called? Any suggestion is appreciated. Thanks!

  Reply With Quote


Thread Tools
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF compiling problem in Flient 6.3 jeevan kumar FLUENT 3 June 29, 2017 19:00
A problem about 'printf' and 'Message' in UDF. LICH Fluent UDF and Scheme Programming 2 May 2, 2013 02:45
Problem with my udf july Fluent UDF and Scheme Programming 3 June 20, 2010 06:56
Problem with implicit unsteady solver CCMuser STAR-CCM+ 2 March 3, 2010 12:20
Unsteady Inlet B.C. Using UDF - Segmentation #@$! James Hart FLUENT 0 December 17, 2001 03:20

All times are GMT -4. The time now is 16:41.