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

UDF loading

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By minhoabc

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 17, 2017, 11:45
Default UDF loading
  #1
New Member
 
James Kim
Join Date: Mar 2017
Posts: 13
Rep Power: 9
minhoabc is on a distinguished road
Hello,

I'm trying to compile body force udf function (example from the manual) in Fluent 16.2 Windows 10 Visual Studio 2017 and as everyone can imagine, been following the already discussed UDF compiling issue. However, I wasn't successful even though I've tried almost every written procedures found in the forum so I thought I might try step by step, and there were couple questions came up and if anyone can help, I would be very grateful.

So when I build the library, the building would be successful, but apparently, the libudf.dll file is missing, and from the reading on forum, it seems like the libudf.dll file should be created automatically if I compile the udf... right?

So if I grab the libudf.dll file from somewhere else, (from addon files) apparently Fluent use that file in the compiling process without any problem, except that the source file and the libudf.dll file doesn't match and the compilation would fail. That's how I got to the hypothesis(?) that the libudf.dll file must be automatically made when I build the library.

If anyone could help or give me any hints regarding this issue, I would be very grateful for your help.

Thank you and have a good day!

James
chaitanyaarige likes this.
minhoabc is offline   Reply With Quote

Old   April 20, 2017, 02:02
Default You need the following
  #2
New Member
 
Chaitanya
Join Date: Aug 2013
Location: Mumbai
Posts: 18
Rep Power: 13
chaitanyaarige is on a distinguished road
1. A inbuilt C++ compiler
2. Download Visual Studio 2015.
3. Install -> Custom selection, Choose Programming language.
4. Uncheck all others.

5. After successful installation:
In this folder you need to find,
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat


6. Then switch to folder
C:\Program Files\ANSYS Inc\v180\fluent\ntbin\win64

find udf.bat

7. Open this in notepad++

8. Find the following lines

echo trying to find MS C compiler, version 140....

set MSVC_DEFAULT=%ProgramFiles(x86)%\Microsoft Visual Studio 14.0
if exist "%MSVC_DEFAULT%\VC\vcvarsall.bat" set MSVC=%MSVC_DEFAULT%
if not "%MSVC%" == "" goto msvc_env140

Thanks,
Krige
chaitanyaarige is offline   Reply With Quote

Old   April 20, 2017, 10:54
Default
  #3
New Member
 
James Kim
Join Date: Mar 2017
Posts: 13
Rep Power: 9
minhoabc is on a distinguished road
It seems like switching folder did the job.

Thank you sir!

James
minhoabc is offline   Reply With Quote

Reply


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
Fluent Radiation/porous media Schmitt pierre-Louis FLUENT 26 September 1, 2016 11:29
(FLUENT)failed loading UDF source file sincity FLUENT 2 March 18, 2011 09:47
UDF Error while loading Sujay S FLUENT 8 November 12, 2007 23:30
I need UDF help. S.Whitney FLUENT 0 October 15, 2007 12:29
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 05:01


All times are GMT -4. The time now is 01:28.