|
[Sponsors] |
June 8, 2021, 07:05 |
error in code of velocity inlet UDF
|
#1 |
New Member
Suraj Shembekar
Join Date: Feb 2021
Location: India
Posts: 18
Rep Power: 5 |
hello all,
i am trying to interpret the UDF in ansys fluent 2019 but it shows the parse error in line no. 2. i think there is some mistake happened in defining PI... please help here is the code: # include "udf.h" define PI 3.141592654 DEFINE_PROFILE(inlet_velocity,th,i) { face_t f; begin_f_loop(f,th) double t = (CURRENT_TIME*2-floor(CURRENT_TIME*2))/2; //t is the local time within each period { if(t <= 0.218) F_PROFILE(f,th,i) = 0.5*sin(4*PI*(t+0.0160236)); else F_profile(f,th,i) = 0.1; } end_f_loop(f,th); } |
|
June 8, 2021, 12:20 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
It's #define.
__________________
"The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform" is NOT the error after compiling. It is the error after loading. To see compiler errors, look at your screen after you click "build". |
|
June 9, 2021, 01:11 |
|
#3 |
New Member
Suraj Shembekar
Join Date: Feb 2021
Location: India
Posts: 18
Rep Power: 5 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Transient Velocity Inlet (2d synthetic jet) UDF | akulagr | Fluent UDF and Scheme Programming | 4 | October 18, 2018 02:31 |
UDF paraboloid velocity inlet | rosco | FLUENT | 10 | June 2, 2017 09:01 |
3D velocity inlet UDF | zumaqiong | Fluent UDF and Scheme Programming | 2 | October 24, 2016 05:44 |
2D UDF for inlet y velocity | Keyu | Fluent UDF and Scheme Programming | 1 | April 26, 2016 06:01 |
Please check out my parallelized udf code | aleisia | Fluent UDF and Scheme Programming | 0 | June 10, 2011 17:16 |