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

some udf compliation issues need your help

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 29, 2021, 10:55
Default some udf compliation issues need your help
  #1
New Member
 
WB
Join Date: Jul 2021
Posts: 13
Rep Power: 5
BW1211 is on a distinguished road
Hello everyone,I am sorry to disturb you all, I want to ask you some udf compliation issues.
I have been simulating the ash deposition in a boiler through FLUENT, and a udf is used here. But what puzzles me is that the same udf compiles successfully on my laptop, but is can not compile well on the desktop. (The version of Fluent and VS is also the same in the two computers.).I have tried the following solutions, but the problems are still here.
(1) Change the installation location of VS in the udf.bat. (Many versions of VS have been tried: VS2010/2012/2013/2015)
(2) Add some sentences in the vcvars64.bat (set INCLUDE >> path.txtset LIB >> path.txtset PATH >> path.txt) and then add the path in the system environment.
(3) Open Fluent through VS command prompt.
There is no problem with udf itself, but it can not be compiled successfully on the desktop computer. This problem has troubled me for a long time. I hope to get your guidance.
Thank you for your patience to read these questions.
Wish you a happy life.
BW1211 is offline   Reply With Quote

Old   July 29, 2021, 11:12
Default
  #2
Senior Member
 
rupak504's Avatar
 
Lolita
Join Date: Aug 2016
Posts: 118
Rep Power: 10
rupak504 is on a distinguished road
Quote:
Originally Posted by BW1211 View Post
Hello everyone,I am sorry to disturb you all, I want to ask you some udf compliation issues.
I have been simulating the ash deposition in a boiler through FLUENT, and a udf is used here. But what puzzles me is that the same udf compiles successfully on my laptop, but is can not compile well on the desktop. (The version of Fluent and VS is also the same in the two computers.).I have tried the following solutions, but the problems are still here.
(1) Change the installation location of VS in the udf.bat. (Many versions of VS have been tried: VS2010/2012/2013/2015)
(2) Add some sentences in the vcvars64.bat (set INCLUDE >> path.txtset LIB >> path.txtset PATH >> path.txt) and then add the path in the system environment.
(3) Open Fluent through VS command prompt.
There is no problem with udf itself, but it can not be compiled successfully on the desktop computer. This problem has troubled me for a long time. I hope to get your guidance.
Thank you for your patience to read these questions.
Wish you a happy life.
Which version of fluent are you using ?
rupak504 is offline   Reply With Quote

Old   July 29, 2021, 15:02
Default
  #3
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Which errors do you get on your desktop where it fails?
__________________
"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   July 29, 2021, 21:17
Default
  #4
New Member
 
WB
Join Date: Jul 2021
Posts: 13
Rep Power: 5
BW1211 is on a distinguished road
Quote:
Originally Posted by rupak504 View Post
Which version of fluent are you using ?
Fluent 16.0 and VS 2010
BW1211 is offline   Reply With Quote

Old   July 29, 2021, 21:21
Default
  #5
New Member
 
WB
Join Date: Jul 2021
Posts: 13
Rep Power: 5
BW1211 is on a distinguished road
Quote:
Originally Posted by pakk View Post
Which errors do you get on your desktop where it fails?
The errors were reported as following, but it indeed work well on the laptop.
> Copied k:/detachresetudmreturnchange10.c to libudf111\src
Creating user_nt.udf file for 3ddp ...
(system "copy "D:\anzhuang\ansys\ANSYS Inc\v160\fluent"\fluent16.0.0\src\udf\makefile_nt. udf "libudf111\win64\3ddp\makefile" ")
已复制 1 个文件。
(chdir "libudf111")(chdir "win64\3ddp")# Generating ud_io1.h
detachresetudmreturnchange10.c
..\..\src\detachresetudmreturnchange10.c(183) : error C2275: “real”: 将此类型用作表达式非法
D:\anzhuang\ansys\ANSYS Inc\v160\fluent\fluent16.0.0\src\main\global.h(174 ) : 参见“real”的声明
..\..\src\detachresetudmreturnchange10.c(183) : error C2146: 语法错误: 缺少“;”(在标识符“FD”的前面)
..\..\src\detachresetudmreturnchange10.c(183) : error C2065: “FD”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(183) : error C2065: “FPO”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(183) : error C2065: “vgas”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(183) : error C2065: “force_s”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(183) : error C2065: “force_v”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(184) : error C2275: “cell_t”: 将此类型用作表达式非法
d:\anzhuang\ansys\ansys inc\v160\fluent\fluent16.0.0\src\storage\mem_grid. h(124) : 参见“cell_t”的声明
..\..\src\detachresetudmreturnchange10.c(184) : error C2146: 语法错误: 缺少“;”(在标识符“c”的前面)
..\..\src\detachresetudmreturnchange10.c(184) : error C2065: “c”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(186) : error C2065: “vgas”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(186) : error C2065: “c”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(186) : error C2065: “c”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(186) : error C2065: “c”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(187) : error C2065: “vgas”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(190) : error C2065: “FD”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(190) : error C2065: “vgas”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(191) : error C2065: “force_s”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(191) : error C2065: “FD”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(192) : error C2065: “FPO”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(193) : error C2065: “force_v”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(193) : error C2065: “FPO”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(195) : error C2065: “FD”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(196) : error C2065: “FPO”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(197) : error C2065: “force_s”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(198) : error C2065: “force_v”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(209) : error C2065: “force_s”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(209) : error C2065: “force_v”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(244) : error C2275: “real”: 将此类型用作表达式非法
D:\anzhuang\ansys\ANSYS Inc\v160\fluent\fluent16.0.0\src\main\global.h(174 ) : 参见“real”的声明
..\..\src\detachresetudmreturnchange10.c(244) : error C2146: 语法错误: 缺少“;”(在标识符“A”的前面)
..\..\src\detachresetudmreturnchange10.c(244) : error C2065: “A”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(244) : error C2109: 下标要求数组或指针类型
..\..\src\detachresetudmreturnchange10.c(245) : error C2065: “A”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(245) : error C2109: 下标要求数组或指针类型
..\..\src\detachresetudmreturnchange10.c(245) : error C2065: “A”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(245) : error C2109: 下标要求数组或指针类型
..\..\src\detachresetudmreturnchange10.c(245) : error C2065: “A”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(245) : error C2109: 下标要求数组或指针类型
..\..\src\detachresetudmreturnchange10.c(254) : error C2065: “A”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(254) : error C2109: 下标要求数组或指针类型
..\..\src\detachresetudmreturnchange10.c(254) : error C2065: “A”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(254) : error C2109: 下标要求数组或指针类型
..\..\src\detachresetudmreturnchange10.c(254) : error C2065: “A”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(254) : error C2109: 下标要求数组或指针类型
..\..\src\detachresetudmreturnchange10.c(254) : error C2065: “A”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(254) : error C2109: 下标要求数组或指针类型
..\..\src\detachresetudmreturnchange10.c(254) : error C2065: “A”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(254) : error C2109: 下标要求数组或指针类型
..\..\src\detachresetudmreturnchange10.c(254) : error C2065: “A”: 未声明的标识符
..\..\src\detachresetudmreturnchange10.c(254) : error C2109: 下标要求数组或指针类型
..\..\src\detachresetudmreturnchange10.c(254) : error C2198: “sqrt”: 用于调用的参数太少

Done.
BW1211 is offline   Reply With Quote

Old   July 30, 2021, 02:40
Default
  #6
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
do you have
Code:
#include "udf.h"
in the very first line of your code?
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ 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 for vapor pressure anuarun Fluent UDF and Scheme Programming 13 June 23, 2024 14:12
UDF loading issues xinquanzhoucn Fluent UDF and Scheme Programming 1 February 10, 2013 19:53
UDF programming fullmonty FLUENT 5 June 30, 2011 03:40
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 05:03
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 05:01


All times are GMT -4. The time now is 14:55.