|
[Sponsors] |
Need help: strange problem of unsteady B.C. UDF |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 11, 2003, 20:03 |
Need help: strange problem of unsteady B.C. UDF
|
#1 |
Guest
Posts: n/a
|
Hello:
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! zheng |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
A problem about 'printf' and 'Message' in UDF. | LICH | Fluent UDF and Scheme Programming | 2 | May 2, 2013 03:45 |
Problem with my udf | july | Fluent UDF and Scheme Programming | 3 | June 20, 2010 07:56 |
Problem with implicit unsteady solver | CCMuser | STAR-CCM+ | 2 | March 3, 2010 12:20 |
UDF compiling problem in Flient 6.3 | jeevan kumar | FLUENT | 2 | February 25, 2009 01:43 |
Unsteady Inlet B.C. Using UDF - Segmentation #@$! | James Hart | FLUENT | 0 | December 17, 2001 03:20 |