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

About UDF compiling issues: 'nmake'

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree9Likes
  • 8 Post By Haoyin Shan
  • 1 Post By sabbasi_mr

Reply
 
LinkBack Thread Tools Display Modes
Old   April 2, 2008, 10:51
Default About UDF compiling issues: 'nmake'
  #1
Haoyin Shan
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.

  Reply With Quote

Old   October 5, 2009, 22:03
Smile
  #2
New Member
 
Saeed Abbasi
Join Date: Sep 2009
Location: Iran
Posts: 18
Rep Power: 7
sabbasi_mr is on a distinguished road
Thanks for this help. You solved my problem.
ravindersingh likes this.
sabbasi_mr is offline   Reply With Quote

Old   April 12, 2011, 03:05
Default
  #3
Senior Member
 
raymond
Join Date: Nov 2009
Posts: 149
Rep Power: 7
wlt_1985 is on a distinguished road
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.
wlt_1985 is offline   Reply With Quote

Old   April 12, 2011, 03:20
Default
  #4
New Member
 
Join Date: Nov 2010
Posts: 7
Rep Power: 6
NLao is on a distinguished road
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
NLao is offline   Reply With Quote

Old   January 12, 2012, 18:34
Unhappy
  #5
New Member
 
M.Badr
Join Date: Jan 2012
Posts: 1
Rep Power: 0
Eng.M.Badr is on a distinguished road
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
Eng.M.Badr is offline   Reply With Quote

Old   January 13, 2012, 07:56
Lightbulb
  #6
Senior Member
 
Join Date: Jun 2011
Posts: 108
Rep Power: 6
mali28 is on a distinguished road
Quote:
Originally Posted by Eng.M.Badr View Post
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.
mali28 is offline   Reply With Quote

Old   January 13, 2012, 08:48
Default
  #7
Member
 
Theodoros Papadopoulos
Join Date: Mar 2011
Posts: 36
Rep Power: 6
papteo is on a distinguished road
Quote:
Originally Posted by Eng.M.Badr View Post
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++!!
papteo is offline   Reply With Quote

Old   January 2, 2013, 11:49
Default problem in starting fluent...
  #8
Senior Member
 
Join Date: Nov 2009
Posts: 125
Rep Power: 7
mactech001 is on a distinguished road
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?
__________________
Thank you for your kind attention.

Kind regards,
mactech001
Currently using: ANSYS v13
mactech001 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
udf compiling error concerning 'nmake' Violet Fluent UDF and Scheme Programming 6 October 23, 2012 06: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 07:12


All times are GMT -4. The time now is 09:42.