CFD Online Logo CFD Online URL
Home > Forums > FLUENT

UDF loading

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

Like Tree1Likes
  • 1 Post By minhoabc

LinkBack Thread Tools Display Modes
Old   April 17, 2017, 10:45
Default UDF loading
New Member
James Kim
Join Date: Mar 2017
Posts: 13
Rep Power: 2
minhoabc is on a distinguished road

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!

chaitanyaarige likes this.
minhoabc is offline   Reply With Quote

Old   April 20, 2017, 01:02
Default You need the following
New Member
Join Date: Aug 2013
Location: Mumbai
Posts: 15
Rep Power: 6
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

chaitanyaarige is offline   Reply With Quote

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

Thank you sir!

minhoabc is offline   Reply With Quote


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
Fluent Radiation/porous media Schmitt pierre-Louis FLUENT 26 September 1, 2016 10: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 11: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 10:27.