CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums

Linking FLUENT with visual C++ (Tested on 32Bit OS)

Register Blogs Community New Posts Updated Threads Search

Rating: 4 votes, 3.75 average.

Linking FLUENT with visual C++ (Tested on 32Bit OS)

Posted February 12, 2011 at 11:10 by Amir
Updated September 14, 2012 at 09:26 by Amir

In general, there are 2 different ways to link FLUENT with VC++. In both methods, we need to add fluent to system path which can be easilly done via executing "setenv.exe" which is in FLUENT installation folder.

1) non-permanent method:

In this method, we need to launch FLUENT by VC++ command prompt (which can be found in tools folder of VC++) by simply typing fluent.
In this method, we have to launch FLUENT in this manner whenever we want to compile a UDF.

2) permanent method:

In this method we can link FLUENT with VC++ forever and FLUENT can be started normally via double-clicking its shortcut! The below instruction should be done once and then everything would be OK for further use.

- add below variables to path (user variables):

C:\Program Files\Microsoft Visual Studio 8(Here is your version)\VC\bin;
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE

- Finally, add the new variables to the system variables.

variable name : INCLUDE
variable value : C:\Program Files\Microsoft Visual Studio 8\VC\include

variable name : LIB
variable value : C:\Program Files\Microsoft Visual Studio 8\VC\lib

Obviously, the above paths are just examples; you have to find corresponding folder paths in your system and then add them accordingly.

PS: To change or add new variables to your system path follow this:
get properties of "my computer" -> advance system settings -> environment variables.

Enjoy!
Posted in Uncategorized
Views 6650 Comments 4 Edit Tags Email Blog Entry
« Prev     Main     Next »
Total Comments 4

Comments

  1. Old Comment
    sumit_raised's Avatar
    Hello Amir,

    I am extremely excited after reading your thread which corresponds a little to my concern i.e. CFD Automation.

    I am a Novice here and I know that I will not take much time to understand the basics of it.

    May I know which programming language is accepted by Fluent and CFX?
    And do we write UDF to solver alone or can be written to meshing and boundary conditions?

    Thanking you.
    permalink
    Posted June 20, 2012 at 08:47 by sumit_raised sumit_raised is offline
  2. Old Comment
    Amir's Avatar
    Quote:
    Originally Posted by sumit_raised View Comment
    Hello Amir,

    I am extremely excited after reading your thread which corresponds a little to my concern i.e. CFD Automation.

    I am a Novice here and I know that I will not take much time to understand the basics of it.

    May I know which programming language is accepted by Fluent and CFX?
    And do we write UDF to solver alone or can be written to meshing and boundary conditions?

    Thanking you.
    Hi,

    The programming language for FLUENT is C and it can be used to have some modifications in both solvers or BCs. but for automation you will need an input file (journal file) which can be generated via any program.

    Bests,

    Amir
    permalink
    Posted June 20, 2012 at 08:55 by Amir Amir is offline
  3. Old Comment
    A CFD free user's Avatar
    Hello Amir
    Thank you for your comments but I tried the second method many times and no healing was found. I received the below error continuously:

    'nmake' is not recognized as an internal or external command,operable program or batch file.


    P.s: I have a windows 7 professional 64 bit with Fluent 64 bit. I also installed both Visual Studio 8 and 10 versions.
    I simply added the four addresses (according to my case) to environment variable and then executed the file "Setenv.exe". Regarding to the first method, I didn't find "tools folder" in my VC++, so I just tried the second method.
    I'll be very very grateful if you give me a hand to get rid of this problem. I can interpret my UDF file but because it's a big one I need to compile it.
    Good luck
    permalink
    Posted April 3, 2013 at 03:08 by A CFD free user A CFD free user is offline
  4. Old Comment
    Amir's Avatar
    Quote:
    Originally Posted by A CFD free user View Comment
    Hello Amir
    Thank you for your comments but I tried the second method many times and no healing was found. I received the below error continuously:

    'nmake' is not recognized as an internal or external command,operable program or batch file.


    P.s: I have a windows 7 professional 64 bit with Fluent 64 bit. I also installed both Visual Studio 8 and 10 versions.
    I simply added the four addresses (according to my case) to environment variable and then executed the file "Setenv.exe". Regarding to the first method, I didn't find "tools folder" in my VC++, so I just tried the second method.
    I'll be very very grateful if you give me a hand to get rid of this problem. I can interpret my UDF file but because it's a big one I need to compile it.
    Good luck
    Hi,

    Firstly, you can find VC++ tools and command prompt from start menu and program list. If it's not useful, you have to use other tools in 64bit OS, I think you've got to use SDK too. As stated, these procedures were tested on 32bit OS; so you can find more precise notes for your purpose.
    Take a look here: (http://www.cfd-online.com/Wiki/Fluen...ows_7_64bit.3F)

    Bests,
    permalink
    Posted April 3, 2013 at 05:13 by Amir Amir is offline
    Updated May 25, 2013 at 05:04 by Amir
 

All times are GMT -4. The time now is 19:23.