|
[Sponsors] |
April 2, 2008, 11:51 |
About UDF compiling issues: 'nmake'
|
#1 |
Guest
Posts: n/a
|
Hi, all,
Lots of users find it is hard at the beginning of UDF use. Most of the time, there is an error: ************************ 'nmake' is not recognized as an internal or external command, operable program or batch file. 'nmake' is not recognized as an internal or external command, operable program or batch file. ************************ This is just the problem of binding between FLUENT and VC++. To know more about this problem, firstly please refer to following post. http://www.cfd-online.com/Wiki/Fluen...at_is_wrong.3F http://www.cfd-online.com/Forum/flue...cgi?read=47472 gives a long solution about how to solve this problem, but my experience following this did not give me a solution. So I have to find my own way. Followings are my solution. 1. No matter Microsoft Visual Studio professional or express version, they both work fine with FLUENT. As long as it has C++, you could bind it with FLUENT and use it to compile UDF. 2. After installing Microsoft Visual Studio professional or express version, you could check the Environmental variables from 'my computer ---> properties ----> advanced tab', on the bottom part u have environment variables and system variables. Generally on installing, the environmental variables are added for MSVC, check to make sure that this is added. Generally, you need not do anything about this. 3. The most important thing is try to open FLUENT in Visual Studio Command Prompt, which is in 'Start-All programs-Microsoft Visual Studio-Microsoft Visual Studio Tools-Visual Studio Command Prompt'. Then type FLUENT in the command window, FLUENT is starting. Now you can close the Visual Studio Command Prompt, it does not impact the compiling of UDF. That is it. Very simple, remember to open FLUENT in the Visual Studio Command Prompt, you will be always OK. |
|
October 5, 2009, 23:03 |
|
#2 |
New Member
Saeed Abbasi
Join Date: Sep 2009
Location: Iran
Posts: 20
Rep Power: 17 |
Thanks for this help. You solved my problem.
|
|
April 12, 2011, 04:05 |
|
#3 | |
Senior Member
raymond
Join Date: Nov 2009
Posts: 149
Rep Power: 17 |
Quote:
Dear Haoyin Shan, What is MSVC and what is its value? How to confirm it is added? Thanks a lot. Best regards. |
||
April 12, 2011, 04:20 |
|
#4 |
New Member
Join Date: Nov 2010
Posts: 7
Rep Power: 16 |
Hi Haoyin Shan,
I have coded a UDF that iterates over each cell on the face and whether it falls witihin a given circle either sets the velocity as, say 30 m/s, and if it does not sets the velocity as 0 m/s. However, I want to set the cell as a wall boundary condition if it does not fall within a given circle instead of being 0 m/s. Is there a way to do this? I am using the define_profile macro. If more info is needed, I am more than happy to reply Thanks for any help you wish to offer to me Lao |
|
January 12, 2012, 18:34 |
|
#5 |
New Member
M.Badr
Join Date: Jan 2012
Posts: 1
Rep Power: 0 |
Hi,Guys
I m a beginner with fluent,so can anybody help me, I have a problem in build files of C++ in Fluent which is 'nmake' is not recognized as an internal or external command, operable program or batch file. 'nmake' is not recognized as an internal or external command, operable program or batch file. Done. but as u see he said that build has been done, so i go to load step to continue it give me another error Opening library "libudf"... Error: open_udf_library: The system cannot find the file specified. thank u in advance |
|
January 13, 2012, 07:56 |
|
#6 | |
Member
Join Date: Jun 2011
Posts: 86
Rep Power: 15 |
Quote:
You have to make sure that both the UDF .c file and the case and data files are in the same directory before you begin compiling the UDF. Also make sure that the folder in which you have the .c and case and data files do not have a space or - in the folder name. Same goes for the case and data file and .c file. No spaces and no - Replace space and - with an underscore if there are any. |
||
January 13, 2012, 08:48 |
|
#7 | |
Member
Theodoros Papadopoulos
Join Date: Mar 2011
Posts: 36
Rep Power: 15 |
Quote:
|
||
January 2, 2013, 11:49 |
problem in starting fluent...
|
#8 | |
Senior Member
Join Date: Nov 2009
Posts: 125
Rep Power: 17 |
Quote:
I can't open FLUENT from the VC command prompt. It claims to be: not an internal or external command. Do you when i open the VC command prompt, i should change directory to the fluent directory and start fluent from the fluent directory please?
__________________
Thank you for your kind attention. Kind regards, mactech001 Currently using: ANSYS v13 |
||
October 18, 2017, 04:10 |
|
#9 | |
New Member
chenzhonghua
Join Date: Oct 2017
Posts: 1
Rep Power: 0 |
Quote:
I have done the things u told, installing Visual Studio 2010, changing the enviroment available and using visual studio command prompt to start fluent. But when i load the udf, it still came out the message:Opening library "E:\ex151\libudf"... Error: The UDF library you are trying to load (libudf) is not compiled for 3ddp on the current platform (win64). 系统找不到指定的文件。 E:\ex151\libudf\win64\3ddp\libudf.dll Error: The UDF library you are trying to load (libudf) is not compiled for 3ddp on the current platform (win64).\n\n系统找不到指定的文件。 \n\nE:\ex151\libudf\win64\3ddp\libudf.dll Error Object: #f how can i do? Thanks for you answer. |
||
October 18, 2017, 21:54 |
|
#10 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
You have to compile the library first using source .c file, than load it
Best regards |
|
October 19, 2017, 09:44 |
|
#11 | |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Quote:
1. Compile the UDF. (Click 'build'.) 2. Load the UDF. You are showing the result of step 2, and the code in red shows that something went wrong in the compilation. So something went wrong in step 1. To know what went wrong, you have to show the result of step 1. |
||
February 14, 2019, 00:59 |
|
#12 |
New Member
Aabir Das
Join Date: Oct 2017
Posts: 3
Rep Power: 9 |
Just install ansys 18.2 version or higher, the problem will be solved. In the previous versions you have to start the fluent from the command prompt of visual studio, then UDF has to be compiled.
|
|
February 14, 2019, 03:36 |
|
#13 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Installing the newer version can help, but does not always.
If the UDF code is wrong, then no version of Fluent can handle it. |
|
February 14, 2019, 11:34 |
|
#14 |
New Member
Aabir Das
Join Date: Oct 2017
Posts: 3
Rep Power: 9 |
If the code is wrong than nobody can help, so it's assumed that UDF code is correct.
|
|
February 14, 2019, 12:46 |
|
#15 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
That is a very big assumption, given how many questions there are on this forum that have a problem in the code.
Other people reading your statement that don't know that there is a problem in their code might get the idea that the new version will solve their problem, but they can be disappointed. |
|
November 4, 2019, 19:05 |
Environment Variables
|
#16 |
New Member
dan
Join Date: Jan 2017
Posts: 24
Rep Power: 9 |
Does anyone know exactly what env vars MS studio sets up? I edited some of mine, and have to figure out which ones I am missing.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
udf compiling error concerning 'nmake' | Violet | Fluent UDF and Scheme Programming | 6 | October 23, 2012 07:27 |
Statically Compiling OpenFOAM Issues | herzfeldd | OpenFOAM Installation | 21 | January 6, 2009 10:38 |
what does nmake is invalid command [nmake] mean? | chunying | FLUENT | 0 | December 21, 2007 05:30 |
'nmake'-error when compiling an UDF | Ted | FLUENT | 4 | February 15, 2007 19:56 |
NMAKE COMMANDIN COMPILING | svh | FLUENT | 2 | September 30, 2004 08:12 |