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

Compiling UDF in windows 7

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 27, 2012, 18:24
Default Compiling UDF in windows 7
  #1
Member
 
Join Date: May 2009
Posts: 58
Rep Power: 8
amir2920 is on a distinguished road
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'.
amir2920 is offline   Reply With Quote

Old   August 13, 2012, 00:41
Default
  #2
Senior Member
 
Syavash
Join Date: Apr 2010
Location: Tehran, Karaj
Posts: 216
Rep Power: 8
syavash is on a distinguished road
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 is offline   Reply With Quote

Old   August 13, 2012, 13:28
Default
  #3
Member
 
Join Date: May 2009
Posts: 58
Rep Power: 8
amir2920 is on a distinguished road
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 View Post
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 is offline   Reply With Quote

Old   August 13, 2012, 13:58
Default
  #4
Senior Member
 
Syavash
Join Date: Apr 2010
Location: Tehran, Karaj
Posts: 216
Rep Power: 8
syavash is on a distinguished road
Quote:
Originally Posted by amir2920 View Post
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.
syavash is offline   Reply With Quote

Old   August 14, 2012, 13:13
Default
  #5
New Member
 
Frederik
Join Date: Apr 2010
Posts: 18
Rep Power: 7
fchan is on a distinguished road
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!
fchan is offline   Reply With Quote

Old   August 15, 2012, 07:51
Default
  #6
vnm
New Member
 
Join Date: Jun 2009
Posts: 15
Rep Power: 8
vnm is on a distinguished road
I already have Microsoft Visual Studio installed. Should I reinstall
vnm is offline   Reply With Quote

Old   August 15, 2012, 09:13
Default
  #7
New Member
 
Frederik
Join Date: Apr 2010
Posts: 18
Rep Power: 7
fchan is on a distinguished road
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.
fchan 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
compiling udf at window Nt(64BIT) noa FLUENT 3 July 29, 2014 23:01
CFX11 + Fortran compiler ? Mohan CFX 20 March 30, 2011 18: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


All times are GMT -4. The time now is 10:18.