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

UDF compilation error code: 126

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By Adrae
  • 1 Post By 1988
  • 1 Post By dongshancfd

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 11, 2016, 05:54
Default UDF compilation error code: 126
  #1
New Member
 
Adrae
Join Date: Jul 2016
Posts: 8
Rep Power: 10
Adrae is on a distinguished road
When I try to load a UDF (user-defined -> functions -> compiled -> load ), I get : error code: 126. Does anyone know what that means and how to solve this problem ?
I have a FLUENT version of 17.1
Thank you very much,
Adrae
Adrae is offline   Reply With Quote

Old   August 22, 2016, 11:12
Default
  #2
New Member
 
poya
Join Date: Jun 2013
Posts: 7
Rep Power: 13
poya0070 is on a distinguished road
Hi
Just like You
when i try to load my UDF in Fluent 17.1 this error code has been shown(I was already load this UDF with Flunet 14.5 Without problem)
poya0070 is offline   Reply With Quote

Old   August 22, 2016, 11:33
Default
  #3
New Member
 
Adrae
Join Date: Jul 2016
Posts: 8
Rep Power: 10
Adrae is on a distinguished road
Hello,
I think you don't have the right compiler,
Try downloading Visual Studio 2015.
Adrae
poya0070 likes this.
Adrae is offline   Reply With Quote

Old   April 17, 2017, 07:17
Default
  #4
Member
 
Dmitry Volkind
Join Date: Jan 2010
Location: Ekaterinburg, Russia
Posts: 64
Rep Power: 16
dvolkind is on a distinguished road
Hello everyone!

I would like to add, that one possible reason of error code 126 is version mismatch. I.e. if you compile your code in Fluent R18.0, it will throw an error if you try to load it in R17.2.
dvolkind is offline   Reply With Quote

Old   April 17, 2018, 12:55
Default
  #5
Senior Member
 
Ali reza
Join Date: Mar 2014
Posts: 110
Rep Power: 12
1988 is on a distinguished road
Quote:
Originally Posted by Adrae View Post
When I try to load a UDF (user-defined -> functions -> compiled -> load ), I get : error code: 126. Does anyone know what that means and how to solve this problem ?
I have a FLUENT version of 17.1
Thank you very much,
Adrae
The solution is deleting the libudf file that you have from the old version and compile it again with the new version. I have visual studio 2017 and I use Fluent 17.2. I had the same error as I brought my UDF and fluent files from the older version. By just deleting the old library and compile the udf in the new version of Fluent everything is solved.
Papes likes this.
1988 is offline   Reply With Quote

Old   April 17, 2018, 22:27
Default
  #6
New Member
 
Pan Aniu
Join Date: Mar 2018
Location: Wuhan
Posts: 7
Rep Power: 8
dongshancfd is on a distinguished road
Quote:
Originally Posted by Adrae View Post
When I try to load a UDF (user-defined -> functions -> compiled -> load ), I get : error code: 126. Does anyone know what that means and how to solve this problem ?
I have a FLUENT version of 17.1
Thank you very much,
Adrae
I have the same problem in the same computer and software environments recently. My solution is the same as 1988 and it works. You can try it.
Papes likes this.
dongshancfd is offline   Reply With Quote

Old   May 28, 2018, 04:47
Default
  #7
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 23
vasava will become famous soon enough
I have come across this 126 error recently, especially since updating to Fluent-19. As recommended, deleting the libudf helps overcome the problem.

Now, I see the 126 error only when I read a case made in earlier fluent versions with Fluent-19. There is no issue if read Fluent-16 case with Fluent-17 or 18.

I installed VS2008 5 or 6 years back on recommendation of Ansys. Since then I have never have had any issues so bad that I have to update VS.
vasava is offline   Reply With Quote

Old   October 29, 2018, 19:20
Default
  #8
New Member
 
Chunrong Zhao
Join Date: Oct 2018
Posts: 3
Rep Power: 8
Chunrong is on a distinguished road
Quote:
Originally Posted by 1988 View Post
The solution is deleting the libudf file that you have from the old version and compile it again with the new version. I have visual studio 2017 and I use Fluent 17.2. I had the same error as I brought my UDF and fluent files from the older version. By just deleting the old library and compile the udf in the new version of Fluent everything is solved.
Hi 1988,

It didn't work when I used your method. I have visual studio 2017 and Fluent 19.1 and 18.2.

For your information, here is my UDF:

#include "udf.h"

DEFINE_CG_MOTION(as,dt,vel,omega,time,dtime)
{

NV_S(vel, =, 0.0);
NV_S(omega, =, 0.0);
/*reset velocities*/


vel[0]=200.0*sin(50.0*time);
/*compute velocity formula*/

Message ("time = %f, x_velocity = %g\n", time, vel[0]);

}

many thanks,
Chunrong
Chunrong 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
UDF Compilation Error - Loading Library - COMMON Problem! Help! robtheslob Fluent UDF and Scheme Programming 8 July 24, 2015 01:53
WILLING TO PAY/ FREELANCER REQUIRED / small UDF coding force loads over body / 6DOF acasas CFD Freelancers 1 January 23, 2015 08:26
Udf Compilation problem mystical_kaledioscope Fluent UDF and Scheme Programming 0 July 22, 2014 15:52
UDF Compilation mystical_kaledioscope Fluent UDF and Scheme Programming 0 July 21, 2014 12:37
UDF compilation/ platform issue! Help!! :s lmarf88 Fluent UDF and Scheme Programming 4 April 11, 2014 14:11


All times are GMT -4. The time now is 08:50.