We have an exciting announcement about badges coming in May 2025. Until then, we will temporarily stop issuing new badges for course completions and certifications. However, all completions will be recorded and fulfilled after May 2025.
General

General

How to use C++ code in Ansys Fluent UDFs?

    • FAQFAQ
      Participant

      Since Fluent 18.0 it is possible to use C++ code in a User-Defined Function (UDF). When compiling the source code from within Fluent, it sets the compiler flags automatically based on the file extension. When the source files have the file extension *.cpp the flags are set for C++. When the file extension is just *.c it uses flags for C99. The supported C++ standard depends on the used compiler and can not be influenced from within Fluent when using gcc on Linux or Visual Studio on Windows. Keywords: Fluent; UDF; user-defined function; functions; C++; Cpp; standard; version