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/)
-   -   Compiling UDF in windows 7 (http://www.cfd-online.com/Forums/fluent-udf/105333-compiling-udf-windows-7-a.html)

amir2920 July 27, 2012 18:24

Compiling UDF in windows 7
 
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'.

syavash August 13, 2012 00:41

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.

amir2920 August 13, 2012 13:28

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:

Originally Posted by syavash (Post 376731)
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.


syavash August 13, 2012 13:58

Quote:

Originally Posted by amir2920 (Post 376855)
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.

Why you don't try fluent 6.3? Fluent version 13 is very hard to handle even in installation.
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.

fchan August 14, 2012 13:13

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!

vnm August 15, 2012 07:51

I already have Microsoft Visual Studio installed. Should I reinstall

fchan August 15, 2012 09:13

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.


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