|
[Sponsors] |
July 27, 2012, 19:24 |
Compiling UDF in windows 7
|
#1 |
Member
Join Date: May 2009
Posts: 58
Rep Power: 17 |
I have problem compiling UDFs in windows 7.
Has anyone knows a step by step instruction to figure it out? I tried this one, did not work. Can you explain the instruction in details? Install Visual Studio. Most of the time the Visual C++ 2008 Express Edition [3] is recommended. On my system it even works with the new Visual Studio 2010 Professional Release Candidate [4]. Set the correct environment variables. Browse your way through the Windows system control to 'System'. There you will find a section 'Advanced system settings'. In the following dialog go to the 'Advanced' tabulator and click on 'Environment variables' (lower right corner). Go through the 'System variables' list and search for the 'Path' entry. Add the following to the variable: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin;C:\Program Files\ANSYS Inc\v120\fluent\ntbin\win64. Adjust this entry to your system concerning the installation directories! The Visual Studio entry should point to the location where 'nmake' is located. Install a Software Development Kit (SKD) for 64bit systems. This may be the difference between 32bit and 64bit systems. I have used the .NET Framework 2.0 Software Development Kit (SDK) (x64) from 2006 [5] because it is explicitly for 64bit systems and I was not sure if more recent versions are for 64bit systems as well. Start FLUENT from the SDK command prompt. Do not use the Visual Studio command prompt, use the SDK command prompt! Go to the directory your case is in and type 'fluent'. |
|
August 13, 2012, 01:41 |
|
#2 |
Senior Member
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18 |
Hi,
you've been walking a long long road man!!! Sorry but Almost all of the steps you mentiond are futile! Do As I say: 1-Install Visual studio 2008(you already did it!) 2-Start Fluent by this version command prompt. And you are there!! Now you can compile your UDF directly within Fluent. Good luck. |
|
August 13, 2012, 14:28 |
|
#3 | |
Member
Join Date: May 2009
Posts: 58
Rep Power: 17 |
Thank you for your response.
I did what you told me but I did not get anywhere. Have you tried that with ANSYS, FLUENT Version 13.0? Because I tried and did not work. Please help me in compiling the UDF in windows 7, Its very important for me. Thanks. Quote:
|
||
August 13, 2012, 14:58 |
|
#4 | |
Senior Member
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18 |
Quote:
Regardless how much effort you put on running parallel or etc. Try with Fluent 6.3 and be sure you will make it! Let me know about the process. Goodluck. |
||
August 14, 2012, 14:13 |
|
#5 |
New Member
Frederik
Join Date: Apr 2010
Posts: 18
Rep Power: 16 |
I was in the same boat a couple of months ago. What you have do to is basically all described there :
http://www.cfd-online.com/Wiki/Fluen...with_Fluent_13 Since you already made the changes to your system variables, all that you have to do is edit the udf.bat file (can't remember exact location - search for it) Hope that helps! |
|
August 15, 2012, 08:51 |
|
#6 |
New Member
Join Date: Jun 2009
Posts: 15
Rep Power: 17 |
I already have Microsoft Visual Studio installed. Should I reinstall
|
|
August 15, 2012, 10:13 |
|
#7 |
New Member
Frederik
Join Date: Apr 2010
Posts: 18
Rep Power: 16 |
Having Microsoft Visual Studio installed is good. No need to reinstall.
Like I said: modify the udf.bat file that setups your compulation environment. You can locate it using the Fluent launcher (see the Environment tab, look for something like : C:\Program Files\ANSYS Inc\v130\fluent\ntbin\win64\udf.bat). Open that file and edit it : 1) Add, before the reference to MS VC 9.0 : set MSVC_DEFAULT=%ProgramFiles%\Microsoft Visual Studio 10.0 if exist "%MSVC_DEFAULT%\vC\vcvarsall.bat" set MSVC=%MSVC_DEFAULT% if not "%MSVC%" == "" goto msvc_env10 2) Then, scroll to the bottom and add : :msvc_env10 set MSVC_VERSION=10 call "%MSVC%\VC\vcvarsall.bat" amd64 goto msvc_end Adjust every values according to your system setup (ie x84 vs x64, paths, etc) and you should be done. Good luck. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
compiling udf at window Nt(64BIT) | noa | FLUENT | 3 | July 30, 2014 00:01 |
CFX11 + Fortran compiler ? | Mohan | CFX | 20 | March 30, 2011 19:56 |
error compiling UDF on windows x64 | Andres | FLUENT | 0 | February 12, 2009 16:22 |
Udf compiling problem | ranjit | FLUENT | 6 | February 15, 2007 14:19 |
Udf compiling problem | ranjit | FLUENT | 1 | January 26, 2007 11:03 |