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

UDF Compiling

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 26, 2017, 10:51
Question UDF Compiling
  #1
Member
 
MayTheFlowBeWithYou's Avatar
 
I have to remain anonymous, I'm sorry.
Join Date: Jun 2017
Location: The Netherlands, Delft University of Technology
Posts: 48
Rep Power: 9
MayTheFlowBeWithYou is on a distinguished road
Dear CFD-Online community,

I know its been asked about a million times, but I need help to compile UFDs in Fluent.

I installed ANSYS 18.1 and Visual Studio 2017 (in that order).

The message I get when I want to make the library is as follows:

(chdir "plzwork")(chdir "win64\2ddp")'nmake' is not recognized as an internal or external command, operable program or batch file.

During my search for a solution I found mentions of some kind of Visual Studio command prompt and that launching fluent from that might fix the issue. I cannot find this thing at all.

I also found mentions of setting environment variables to fix the issue:

name: Include

value: C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include

Second:

name: Lib

value: C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib\x64;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\lib;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib

Third:

name: Libpath

value: C:\Windows\Microsoft.NET\Framework64\v3.5;C:\Windo ws\Microsoft.NET\Framework64\v2.0.50727;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\lib;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib


Fourth:

name: Path

value: C:\Program Files\ANSYS Inc\v140\fluent\ntbin\win64;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin;C:\Windows\Microsoft.NET\Framework64\v3 .5;C:\Windows\Microsoft.NET\Framework64\v2.0.50727 ;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcpackages;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin


The problem with this is that C:\Program Files\Microsoft SDKs does not exist on my PC (along with some other paths that also don't exist).

I also found that using Visual Studio 2012 Professional could work, but I can't find anything other than 2017, its like Microsoft decided to be a d*ck and destroy all previous versions.

Can anyone please help me with this problem? I desperately need this to work.

Last edited by MayTheFlowBeWithYou; June 27, 2017 at 03:14.
MayTheFlowBeWithYou is offline   Reply With Quote

Old   June 27, 2017, 08:28
Post
  #2
Member
 
MayTheFlowBeWithYou's Avatar
 
I have to remain anonymous, I'm sorry.
Join Date: Jun 2017
Location: The Netherlands, Delft University of Technology
Posts: 48
Rep Power: 9
MayTheFlowBeWithYou is on a distinguished road
The problem is that apparently Visual Studio 2017 Community cannot work with Fluent at all, it will never work.

I opted to get Visual Studio 2010 Professional from a "different" source (I cannot find any other way to obtain it). Now everything seems to work.
MayTheFlowBeWithYou is offline   Reply With Quote

Old   July 25, 2017, 12:43
Default UDF Compiling
  #3
New Member
 
Join Date: Apr 2014
Posts: 11
Rep Power: 12
pivalse is on a distinguished road
There is a Knowledge Resource on the ANSYS compiler that addresses the issue.
(Resource #2049257 --> https://support.ansys.com/AnsysCusto...%20SYS/2049257)

The instruction set is quite detailed, even though it boils down to replacing the udf.bat file with a new version specifically for VS 2017 Community (the free one). The udf.bat file is used to set the ENVIRONMENT variables and tell FLUENT where to find the Visual Studio tools to compile C routines.

In my case, it required an additional tweak, since FLUENT could not find "nmake". The solution is to find the folder that contains "nmake" under "C:\Program Files (x86)\Visual Studio" (make sure to choose the correct x86 or x64 depending on your system). Copy that location into the ENVIRONMENT VARIABLE (PATH) to let the system know where to find it.

You will have to log out and log in again (or better, restart) to make that change take effect.

It worked for me.
pivalse 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
fluent udf error while compiling: unknown type name __locale_t aditya.pandare Fluent UDF and Scheme Programming 3 April 12, 2014 14:52
ERROR in compiling UDF stefanos Fluent UDF and Scheme Programming 1 April 25, 2012 07:37
Problem with compiling the UDF raghu mohan Fluent UDF and Scheme Programming 10 December 16, 2011 23:34
udf compiling problem akr FLUENT 3 August 22, 2007 07:14
On Compiling a UDF David Chabot FLUENT 5 May 20, 2005 09:13


All times are GMT -4. The time now is 21:32.