-
-
January 30, 2019 at 5:39 pm
Inims
SubscriberI want to write UDF and apply in my simulation. Do I use Notepad or any C Language programme. I already have Codeblocks. However, when I try to compile the UDF, I get the message ''udf.h is not in library and hence the programme will not compile. Please what do I do?
-
January 30, 2019 at 7:56 pm
Max4
SubscriberHi,
What version of ANSYS are you using ?
In this discussion, there is a screenshot of the compiler compatibility provided in the Ansys Installation Manual for different Ansys release and how to install Visual Studio : /forum/forums/topic/ansys-19-0-visual-studio-intel-parallel-studio-xe-version-required-for-upfs/. I followed this method and it had worked for me.
For writing your UDF, you can either use Visual Studio directly or write it in the Editor of Windows (txt file-format) and change the format with .c instead of .txt. Then you can compile or interpret the UDF in Fluent.
Regards,
Maxime
-
January 31, 2019 at 6:15 am
Amine Ben Hadj Ali
Ansys EmployeeYou find your answer. You need a C compiler. Codeblock is not supported. -
January 31, 2019 at 4:41 pm
Inims
SubscriberHi Max4,
Thanks for your response.
I use Ansys version 18.1 and 17.0 on another Linux machine.
From your explanation, does it mean I do not require to install Visual Studio if I decide to use Editor of Window.
Can I use Notepad and write the UDF then save in .C
-
January 31, 2019 at 7:18 pm
Max4
SubscriberHi,
You must install Visual Studio because it has a C-Compiler that is necessary to compile or interpret UDFs. For the installation, please follow the method described in the link I sent you in order to select the right packages when installing Visual Studio.Â
You can either use the Editor of Windows or Notepad if you can save it in .c. Moreoever, you can write the UDF with Visual Studio too.
Â
Please mark it as solution if your problem is solved.
Â
Regards,
Maxime
Â
-
- The topic ‘Writing UDF’ is closed to new replies.
-
3074
-
977
-
906
-
858
-
792
© 2025 Copyright ANSYS, Inc. All rights reserved.