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

Trouble with compiling UDFs in FLUENT

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

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 13, 2014, 08:12
Default
  #21
Member
 
Peter Aestas
Join Date: Dec 2013
Posts: 64
Rep Power: 9
aestas is on a distinguished road
Quote:
Originally Posted by Afshin2008 View Post
One more

I'm using ANSYS 15 and Windows 7 Ultimate, I installed VS2012,

Thanks
Afshin
In the folder of VS2012 program, can you find "visual studio tools"? In it there is visual studio x64 win64 command, open it ,and copy the fluent path ,paste in it, open fluent in it.
1111.jpg
aestas is offline   Reply With Quote

Old   October 5, 2014, 00:26
Default
  #22
New Member
 
Tanuja
Join Date: Aug 2014
Posts: 7
Rep Power: 9
icemcfd13 is on a distinguished road
Dear all;

I have set the environment variables as suggested by messi.

my udf library gets built with absolutely no problem but when i try to load it, i get the following error

ERROR 193

Please help me.
icemcfd13 is offline   Reply With Quote

Old   October 5, 2014, 00:29
Default
  #23
New Member
 
Tanuja
Join Date: Aug 2014
Posts: 7
Rep Power: 9
icemcfd13 is on a distinguished road
Dear all,

I have set the environment variables as suggested by messi.

I have no problem building the udf library but when I click the "load" button, i get the following error

ERROR 193.

Please help me.
icemcfd13 is offline   Reply With Quote

Old   October 9, 2014, 04:11
Default
  #24
Member
 
ad
Join Date: Apr 2014
Posts: 75
Rep Power: 9
adi.ptb is on a distinguished road
add "C:\Windows\System32" to your path variables
adi.ptb is offline   Reply With Quote

Old   August 28, 2016, 04:15
Default
  #25
New Member
 
Green
Join Date: Apr 2016
Posts: 27
Rep Power: 7
hjxy2012 is on a distinguished road
I had the same question with you. And after I set all these environment variables and restart my system it worked well. Thank you.
hjxy2012 is offline   Reply With Quote

Old   May 26, 2017, 03:14
Smile
  #26
New Member
 
zhang bing
Join Date: Feb 2012
Posts: 4
Rep Power: 11
codezhang is on a distinguished road
This is common because the version of visual studio you have installed is not supported by Fluent. But you can solve it by modify the udf.bat file as follows:

1) Run Fluent Launcher, and get the path of udf.bat from Environment table, for example:

Code:
D:\ANSYS Inc\v180\fluent\ntbin\win64\udf.bat
2) Open the udf.bat using notepad or other text file editor.

3) Add new lines for your visual studio version, for example vs2017(vc141):

Code:
...
echo trying to find MS C compiler, version 141....
set MSVC_DEFAULT=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build
if exist "%MSVC_DEFAULT%\vcvarsall.bat" set MSVC=%MSVC_DEFAULT%
if not "%MSVC%" == "" goto msvc_env141
...
:msvc_env141
set MSVC_VERSION=141
call "%MSVC%\vcvarsall.bat" x86_amd64
goto ms_c_end
...
"..." means other file contents

This modification will help Fluent to find where is the vcvarsall.bat.

4) Save file and run fluent.

You do not need to modify any system environment variable.
fadnavismehul likes this.
codezhang is offline   Reply With Quote

Old   October 27, 2017, 05:33
Default
  #27
New Member
 
Meisam
Join Date: Oct 2017
Posts: 4
Rep Power: 5
Meisam1300 is on a distinguished road
Quote:
Originally Posted by cp703 View Post
When you say you're starting from MSVS Command Prompt, what exactly are you typing into the command prompt?
Hi Christina,
I got an error very similar to yours. Did you fix it? I appreciate it if you share your remedy.
Thanks.
Meisam1300 is offline   Reply With Quote

Old   January 27, 2018, 22:29
Default
  #28
New Member
 
jyothsna k
Join Date: May 2014
Posts: 18
Rep Power: 9
jyothsna k is on a distinguished road
Thank you very much Messi
jyothsna k is offline   Reply With Quote

Old   June 1, 2018, 03:22
Default
  #29
New Member
 
Mehul Fadnavis
Join Date: Mar 2017
Posts: 2
Rep Power: 0
fadnavismehul is on a distinguished road
This really works!
I have spent so much time trying to find a way.
Thanks a lot

Quote:
Originally Posted by codezhang View Post
This is common because the version of visual studio you have installed is not supported by Fluent. But you can solve it by modify the udf.bat file as follows:

1) Run Fluent Launcher, and get the path of udf.bat from Environment table, for example:

Code:
D:\ANSYS Inc\v180\fluent\ntbin\win64\udf.bat
2) Open the udf.bat using notepad or other text file editor.

3) Add new lines for your visual studio version, for example vs2017(vc141):

Code:
...
echo trying to find MS C compiler, version 141....
set MSVC_DEFAULT=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build
if exist "%MSVC_DEFAULT%\vcvarsall.bat" set MSVC=%MSVC_DEFAULT%
if not "%MSVC%" == "" goto msvc_env141
...
:msvc_env141
set MSVC_VERSION=141
call "%MSVC%\vcvarsall.bat" x86_amd64
goto ms_c_end
...
"..." means other file contents

This modification will help Fluent to find where is the vcvarsall.bat.

4) Save file and run fluent.

You do not need to modify any system environment variable.
fadnavismehul is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Environment variables- to solve problems in compiling UDF in Fluent Modest Cat Fluent UDF and Scheme Programming 39 May 18, 2016 10:33
Error while compiling udf in fluent 13.0.0 siddharth12 FLUENT 0 December 3, 2013 16:46
Possible Bug in pimpleFoam (or createPatch) (or fluent3DMeshToFoam) cfdonline2mohsen OpenFOAM 3 October 21, 2013 09:28
Compiling UDFs under Windows XP Hannah FLUENT 3 February 13, 2005 08:16
Compiling and Running UDFs on an IBM Power3 S. Hollman FLUENT 0 January 6, 2005 11:23


All times are GMT -4. The time now is 20:51.