Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Put both the C source file and header files (if used) into the same folder as the case and data files.
    1. If you're running from WorkBench, put these files into dp0\FFF\Fluent.
       
  2. Unload previously compiled UDFs first to avoid potential errors. (This step can be skipped if the compiled method in the case did not use a UDF.)
    1. Define > Define UDF > Manager, unload previous compiled UDF library. 
    2. Define->Define UDF-> User Defined scaler, User Defined memory.  Give Fluent the correct number of UDS and UDMI if used. Just like what is done in interpreted method.

       

  3. Build a UDF library: Define-> Define UDF -> Compiled. Select the C source and header files, click “Build”. Fluent then will start compiling, errors are reported if any. Warnings can be ignored.

     

  4. Then click “Load”, then all the variables that are returned, execution, initialization, or etc. should be shown that they are successfully loaded.
     

  5. The rest is similar to interpreted method:
     

  6. NOTE: functions from compiled UDF are differed by ending with ::libudf. Functions from interpreted method does not have that.
     

We would like to credit Shengzhi He for writing this guide.