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

UDF compilation through nmake

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By yorelchr

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 4, 2013, 19:37
Default UDF compilation through nmake
  #1
Senior Member
 
christine
Join Date: Jul 2009
Location: europe
Posts: 125
Rep Power: 17
yorelchr is on a distinguished road
hello everyone,

I am trying to sort out problems with UDF, but no way.
I'm using FLUENT 13 and I have installed Microsoft Visual Studio 10.0
I have windows XP, 32bit.

I have encountered many problems, I could fix part of them thanks to some similar problems I have found on this forum, but it is not enough.

When opening Fluent from Microsoft Visual Studio prompt command, now I can build and load my library directly from the fluent panel. But if I do a "nmake" from the prompt, it does not work and gives me :
makefile(49): fatal error U 1050: you need to define the environmental variable FLUENT_INC. It is important for me to build the library in this way because, I will work with a UDF calling a source file in Fortran, and this can't be done through the FLuent panel.

At first, I couldn't even build and load from fluent, but I followed this :
http://www.cfd-online.com/Forums/fluent-udf/47783-about-udf-compiling-issues-nmake.html where the link http://www.cfd-online.com/Wiki/Fluen...at_is_wrong.3F explains :

Quote:
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 only things that was not ok for me is about the last entry : C:\Program Files\ANSYS Inc\v120\fluent\ntbin\win64, I don't have any win64. And I also add : C:\Programmi\Microsoft Visual Studio 10.0\VC so the path to vcvarsall.bat script is ok (I saw that on the same link)

Maybe going back from the beginning could also be helpful:
about the directories :
My work directory should contain : *.cas, *.dat, udf.c. Should I create manually the libudf and libudf/src directories or the nmake should do it itself? about the makefile and user_nt.udf? I took them from the ANSYS Inc\v130\fluent\fluent13.0.0\src directory and modified the user_nt.udf as mentionned in the Makefile_nt.udf file that I renamed as makefile.
Is there anything else to do?

All I could read about udf in the forum couldn't give me the final solution. I also tried to run the \Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat but nothing happens.

Thank you for any help!!
yorelchr is offline   Reply With Quote

Old   February 5, 2013, 01:17
Default
  #2
Senior Member
 
SSL
Join Date: Oct 2012
Posts: 226
Rep Power: 15
msaeedsadeghi is on a distinguished road
Oh, it's owfull but have done that.
In 32Bit windows I prefer to use visual studio 2005, so easy to be connected with Ansys Fluent.
msaeedsadeghi is offline   Reply With Quote

Old   February 5, 2013, 09:27
Default
  #3
Senior Member
 
christine
Join Date: Jul 2009
Location: europe
Posts: 125
Rep Power: 17
yorelchr is on a distinguished road
thank you for your reply !!!!

Did you have anything "special" to do? edit udf.bat or something of this kind?
where should I go to define the environmental variable FLUENT_INC?
yorelchr is offline   Reply With Quote

Old   February 5, 2013, 10:03
Default
  #4
Senior Member
 
christine
Join Date: Jul 2009
Location: europe
Posts: 125
Rep Power: 17
yorelchr is on a distinguished road
ok, if someone is interested, I think I have the solution for the fatal error U1050 : you need to define the environmental variable FLUENT_INC

From a Microsoft Visual Studio 10.0 prompt command, I went into the \ANSYS_INC\v130\fluent\ntbin\ntx86 directory and launched setenv.exe ...I clicked on "ok" in the box that appeared. Then I re-boot the computer and now, I don't have this error message anymore; I have another one ... I am trying to fix it. Else, I come back here !!!
Rui_27 likes this.
yorelchr is offline   Reply With Quote

Old   March 26, 2013, 09:52
Default
  #5
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 23
vasava will become famous soon enough
About environmental variables you can run 'setenv' file to set the environmental variable. The file is in the fluent installation directory. Then launch Fluent from CMD Shell of Microsoft Windows SDK v7.0. It should work fine.

If this does not work I suggest you switch to VS2008. I have been in same mess before. Installing VS2008 got me out of it.

All the best.
vasava is offline   Reply With Quote

Reply

Tags
environmental variables, nmake, udf


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
Ansys Fluent 13.0 UDF compilation problem in Window XP (32 bit) Yogini Fluent UDF and Scheme Programming 7 October 3, 2012 08:24
udf u1064 nmake ali FLUENT 3 October 15, 2010 12:32
UDF compilation problem -- "undeclared variable" Henrik Ström FLUENT 1 September 21, 2005 06:25
UDF compilation error Szabolcs Varga FLUENT 2 April 14, 2004 11:12
Compiled UDF / Compilation problem mikhail FLUENT 1 October 13, 2000 07:12


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