Skip to the content.

For instructions on building the KineticGas C++ library, see the installation guide.

A basic example showing initialization of a model is found in cppExamples/basic.cpp, the cppExamples directory also contains a CMakeLists.txt showing how to obtain the required headers for the KineticGas library, as well as link the library to your program.

Initializing a model

To initialize a model, include the appropriate header file, and specify the components to model with a comma separated string, as

#include "MieKinGas.h"

int main(){
    MieKinGas mie("HE,NE"); // Mixture of helium and neon.
}

The component identifiers used are equivalent to the file names of the fluid files, and are summarised here

Computing properties

The interfaces for property calculations are more or less equivalent to those used in Python. The major differences you should be aware of are

Selecting transfer length models

Use the methods

In addition, the enum TransferLengthModel in utils.h may be useful if you don’t like remembering keys. The enum is used everywhere internally, and it is heavily recommended to use it instead of manually specifying , in case keys for different models are changed in the future