Ansys Common Fluids Examples
Last update: 16.07.2025Introduction
A number of examples are available to help with understanding how to use the CFF API.
C++ examples
- Reading Case and Data Files using C++ API
- Writing Case and Data Files using C++ API
- Reading Settings Using C++ API
- Writing Files with Parallel Compression Enabled Using C++ API
- Reading Discrete Phase Model (DPM) Particle Data Using C++ API
C examples
Reading Case and Data Files using C++ API
This example demonstrates how to use the CFF I/O SDK to read case and results files. To use it, you must provide the CFF case and data files on the command line:
We recommend using the option to read data by zone. The functions that do this are in the following file:
Additional files illustrate how to read data by range:
Read data by element:
Writing Case and Data Files using C++ API
The following example demonstrates how to use the CFF API to write case and results files.
The function uses data that is made available from some functions in a separate utility source file.
Writing Files with Parallel Compression Enabled Using C++ API
This example demonstrates how to use the CFF API to export case and results data using parallel compression.
Reading Settings Using C++ API
This example demonstrates how to use the CFF API to read settings from a cas.h5 file.
Reading Discrete Phase Model (DPM) Particle Data Using C++ API
This example demonstrates how to use the CFF API to read discrete phase model (DPM) particle data. To execute this example, you must supply a data file that has DPM particle data in it. Ansys Fluent writes such data files for cases in which an injection is defined, and the files are in a compatible format by default.
Reading a CFF file Using C API
This example demonstrates how to use the CFF API wrapper in C code to read a CFF file:
Writing a CFF File Using C API
This example demonstrates how to use the CFF API wrapper in C code to write a CFF file: