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

error in code of velocity inlet UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 8, 2021, 06:05
Default error in code of velocity inlet UDF
  #1
New Member
 
Suraj Shembekar
Join Date: Feb 2021
Location: India
Posts: 18
Rep Power: 5
aerosuraj1 is on a distinguished road
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);
}
aerosuraj1 is offline   Reply With Quote

Old   June 8, 2021, 11:20
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
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".
pakk is offline   Reply With Quote

Old   June 9, 2021, 00:11
Default
  #3
New Member
 
Suraj Shembekar
Join Date: Feb 2021
Location: India
Posts: 18
Rep Power: 5
aerosuraj1 is on a distinguished road
Quote:
Originally Posted by pakk View Post
It's #define.
thanks for reply sir

i tried it with #define

it helps to interpret the code

thank you sir !
aerosuraj1 is offline   Reply With Quote

Reply


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
Transient Velocity Inlet (2d synthetic jet) UDF akulagr Fluent UDF and Scheme Programming 4 October 18, 2018 01:31
UDF paraboloid velocity inlet rosco FLUENT 10 June 2, 2017 08:01
3D velocity inlet UDF zumaqiong Fluent UDF and Scheme Programming 2 October 24, 2016 04:44
2D UDF for inlet y velocity Keyu Fluent UDF and Scheme Programming 1 April 26, 2016 05:01
Please check out my parallelized udf code aleisia Fluent UDF and Scheme Programming 0 June 10, 2011 16:16


All times are GMT -4. The time now is 01:20.