|
[Sponsors] |
January 12, 2018, 13:28 |
Compile Fluent UDF with Windows 10
|
#1 |
New Member
Join Date: Jan 2018
Posts: 12
Rep Power: 8 |
Hi everyone,
In this thread I would like to share a kind of guide for those who'd want to compile Fluent user defined function (UDF) in Windows 10, based on my experience of course. There are some similar threads on UDF compiling, but mostly they are from some years ago and thus not easily applicable for Windows 10. Windows 10 is a 64-bit OS, which often has some compatibility issues with Fluent. The most common one is the error "'nmake' is not recognized as an internal or external command, operable program or batch file". (see https://www.cfd-online.com/Wiki/Flue...tch_file.22.3F). The issue can be resolved by installing the Microsoft Visual Studio, which will "provide" the missing 'nmake' file. In most online threats on this matter, older versions of Visual Studio and Visual C++ are mentioned. For example, in the Fluent FAQ available in this website (https://www.cfd-online.com/Wiki/Fluent_FAQ), Visual C++ 2008 and VS 2010 are mentioned (recommended). However, the newest versions of actually works well and thus you should go for it. The VS 2017 community version can be downloaded for free. The main idea is the same as the one explained for Windows 7 (see first https://www.cfd-online.com/Wiki/Flue...ows_7_64bit.3F). The differences are:
The following video can be of great help to those who are not familiar with the above mentioned steps: https://www.youtube.com/watch?v=xt2hnE9_LdM. So, to those who starts from ANSYS installation, the main step will be: 1. Install ANSYS 2. Install Microsoft Visual Studio 2017. Make sure to select the Windows options (see the above youtube video). 3. Set the environmental variables. 4. Run Fluent from x64 Native Tools Command Prompt for VS 2017. PS: I already had the Visual C++ 2008 and Visual Studio 2010 installed in my PC (as suggested for Windows 7) when I finally succeeded with this method. However, I am quite sure that in the end they played no role at all since I am running from the x64 Native Tools Command Prompt for VS 2017. If you still face the same problem after those steps I mention above, you may try installing Visual C++ 2008 and Visual Studio 2010 as well. I hope this small guide can help you all, and you don't have to face the hardship I went through. Any correction and further suggestion are welcomed. Daniel |
|
February 19, 2018, 17:20 |
Thanks a lot
|
#2 |
New Member
Jing
Join Date: Feb 2013
Posts: 25
Rep Power: 13 |
I've been stuck with this problem for quite a long time.
Thank you so much for your help. I followed your step and everything finally works. |
|
October 17, 2018, 09:35 |
|
#3 |
Member
Oula
Join Date: Apr 2015
Location: United Kingdom
Posts: 81
Rep Power: 11 |
Hi Daniel
Thank you so much for sharing this guideline. I followed the instructions in the video, but still same problem. I'm using ANSYS v160. Please help. Regards Oula |
|
October 17, 2018, 10:51 |
|
#4 | |
Member
Oula
Join Date: Apr 2015
Location: United Kingdom
Posts: 81
Rep Power: 11 |
Quote:
what do you mean by this: It is respectively C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools and C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bi n\Hostx64\x64. The main idea here is that the entry should point to the location where 'nmake.exe' is located. The another entry is the same (C:\Program Files\ANSYS Inc\v172\fluent\ntbin\win64). so in the path what do I need to type in? and what do you mean by the another entry? do you mean two entries for the path? Thank you Regards Oula |
||
October 22, 2018, 06:27 |
|
#5 |
Member
Oula
Join Date: Apr 2015
Location: United Kingdom
Posts: 81
Rep Power: 11 |
Dear all,
I'm getting the following error when compiling the UDF in fluent. Does anyone have any idea why? I'm using ANSYS 18.2 and VS 2017. 'xcopy' is not recognized as an internal or external command, operable program or batch file. Copied M:\Transient_Simulation -2018/M:\Transient_Simulation -2018\my_function.c to libudf\src Creating user_nt.udf file for 3ddp_host ... (system "copy "C:\PROGRA~1\ANSYSI~1\v182\fluent"\fluent18.2.0\sr c\udf\makefile_nt.udf "libudf\win64\3ddp_host\makefile" ") 1 file(s) copied. (chdir "libudf")(chdir "win64\3ddp_host")Creating user_nt.udf file for 3ddp_node ... (system "copy "C:\PROGRA~1\ANSYSI~1\v182\fluent"\fluent18.2.0\sr c\udf\makefile_nt.udf "libudf\win64\3ddp_node\makefile" ") 1 file(s) copied. (chdir "libudf")(chdir "win64\3ddp_node") Done. Opening library "M:\Transient_Simulation -2018\libudf"... Error at host: The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform (win64). The system cannot find the file specified. M:\Transient_Simulation -2018\libudf\win64\3ddp_host\libudf.dll Error at Node 0: The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform (win64). The system cannot find the file specified. M:\Transient_Simulation -2018\libudf\win64\3ddp_node\libudf.dll Error: The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform (win64).\n\nThe system cannot find the file specified. \n\nM:\Transient_Simulation -2018\libudf\win64\3ddp_host\libudf.dll Error Object: #f Thank you Oula |
|
October 22, 2018, 23:00 |
|
#6 | |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
Quote:
best regards |
||
October 23, 2018, 05:45 |
|
#7 |
Member
Oula
Join Date: Apr 2015
Location: United Kingdom
Posts: 81
Rep Power: 11 |
Hi AlexanderZ
How to know which file has xcopy? does this mean that the nmake file problem has been solved and this a different problem that I need to deal with?. I did my search and found in a website that this error might be caused by the Visual Studio lose it's path. Regards Oula |
|
October 25, 2018, 12:44 |
|
#8 |
Member
Oula
Join Date: Apr 2015
Location: United Kingdom
Posts: 81
Rep Power: 11 |
Hi everyone
For people who is experiencing the "xcopy" error when building a UDF function in Fluent, check out the link below https://www.researchgate.net/post/UD...d8ab281f7fb92b Regards Oula |
|
February 7, 2020, 08:12 |
UDF compile in win10
|
#9 |
New Member
elaf
Join Date: May 2013
Posts: 15
Rep Power: 13 |
Hi
I got this error message when I tried to compile my udf. I have win 10 64 VS 2017 professional. The udf traing to load is compiled for current 3d platforms win64 The file could not fined I idea please to sort out this issue Regards. |
|
February 10, 2020, 00:54 |
|
#10 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
show your code
__________________
best regards ****************************** press LIKE if this message was helpful |
|
May 11, 2020, 04:00 |
udf compile in window
|
#11 |
New Member
Patil
Join Date: May 2019
Location: Delhi, India
Posts: 2
Rep Power: 0 |
i had installed vc 15 and ANSYS Fluent 2019 R2 in my system and define the environment variable like below:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\1033;C:\Program Files\ANSYS Inc\v194\fluent\ntbin\win64 after doing all these I'm getting the following error. (system "copy "C:\PROGRA~1\ANSYSI~1\v194\fluent"\fluent19.4.0\sr c\udf\makefile_nt.udf "libudf\win64\3d_host\makefile" ") 1 file(s) copied. (chdir "libudf")(chdir "win64\3d_host")'nmake' is not recognized as an internal or external command, operable program or batch file. Creating user_nt.udf file for 3d_node ... (system "copy "C:\PROGRA~1\ANSYSI~1\v194\fluent"\fluent19.4.0\sr c\udf\makefile_nt.udf "libudf\win64\3d_node\makefile" ") 1 file(s) copied. (chdir "libudf")(chdir "win64\3d_node")'nmake' is not recognized as an internal or external command, operable program or batch files. I'm using ANSYS Fluent 2019 R2. can anyone help me regarding this. Thanks in advance. |
|
May 11, 2020, 04:43 |
|
#12 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
run VS console first
run Fluent FROM VS console
__________________
best regards ****************************** press LIKE if this message was helpful |
|
May 11, 2020, 06:55 |
|
#13 |
New Member
Patil
Join Date: May 2019
Location: Delhi, India
Posts: 2
Rep Power: 0 |
||
May 12, 2020, 10:37 |
|
#14 |
Member
Join Date: Jun 2017
Posts: 55
Rep Power: 11 |
Hi guys,
If you're still having trouble compiling UDFs, try this video. It worked really well for me and I've never had a problem since. You need to use the same VS version as in the video. https://www.youtube.com/watch?v=l4wcXAQ5IGY |
|
May 12, 2020, 10:41 |
Compilation
|
#15 |
Senior Member
|
The issue is the registry editing access; got to do with user access. You need to start Developer Command prompt of VS using Right-Click and Run As Administrator. Then start Fluent from that command prompt.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
May 13, 2020, 23:29 |
Compilation
|
#16 |
New Member
seyf
Join Date: May 2020
Posts: 5
Rep Power: 6 |
Thank you so much! The mentioned paths finally worked for me. I have VS 2019 and ANSYS v170 Student Licence.
Important: When installing VS, do not forget to select Windows "Universal Windows Platform Development". I had forgotten this step... |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
A Problem of Fluent Interpreted UDF: parse error | knight | Fluent UDF and Scheme Programming | 25 | August 16, 2018 11:26 |
How you can manage to compile your UDF with Windows 7 64bit | sega | Fluent UDF and Scheme Programming | 3 | March 23, 2017 10:18 |
looking for instructions on how to compile an udf in windows OS | Srinivasa Rao | Fluent UDF and Scheme Programming | 2 | May 22, 2015 11:00 |
Inability to compile udf in fluent | stefanos | FLUENT | 1 | December 20, 2011 07:56 |
Fluent on Microsoft Windows Server 2003, possible? | IvanCFD | FLUENT | 0 | February 10, 2011 05:45 |