CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   About UDF compiling issues: 'nmake' (http://www.cfd-online.com/Forums/fluent-udf/47783-about-udf-compiling-issues-nmake.html)

Haoyin Shan April 2, 2008 10:51

About UDF compiling issues: 'nmake'
 
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.


sabbasi_mr October 5, 2009 22:03

Thanks for this help. You solved my problem.
:)

wlt_1985 April 12, 2011 03:05

Quote:

Originally Posted by Haoyin Shan
;149606
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.


Dear Haoyin Shan,

What is MSVC and what is its value? How to confirm it is added?

Thanks a lot.

Best regards.

NLao April 12, 2011 03:20

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

Eng.M.Badr January 12, 2012 18:34

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

mali28 January 13, 2012 07:56

Quote:

Originally Posted by Eng.M.Badr (Post 339106)
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


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.

papteo January 13, 2012 08:48

Quote:

Originally Posted by Eng.M.Badr (Post 339106)
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

As Haoyin Shan do not forget to open Fluent through the command window of the VS C++!!

mactech001 January 2, 2013 11:49

problem in starting fluent...
 
Quote:

Originally Posted by Haoyin Shan
;149606
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.


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?


All times are GMT -4. The time now is 04:38.