Mutation++ is a library for is an open-source library developed at the von Karman Institute for Fluid Dynamics, designed to couple with conventional CFD codes to provide thermodynamic, transport, chemistry, and energy transfer properties associated with subsonic to hypersonic flows. (See the project in: https://sync.vki.ac.be/mpp/mutationpp)
You need first to add mutation in you CMakeLists.txt of your module. One example is:
```
if (mutation++_FOUND)
target_link_libraries(name_of_module_2d
PRIVATE
mutation++::mutation++
)
endif()
```
Second, inside the `your_module/Solver.h`, you need to include the include file at the beginning of the file
```
#ifdef USE_MUTATIONPP
#include "mutation++/mutation++.h"
#endif
```
Also, you can define a pointer to your mixture in the public members of you solver:
```
#ifdef USE_MUTATIONPP
// transfort coefficient computation
Mutation::Mixture* m_mix;
#endif
```
Note the preprocessor directives in order to avoid having problems if you compile the code without mutation++.
In addition, you can initialise some of the options of your mixture through your settings.lua file, by adding the following in the `your_module/Solver.cpp`
```
#ifdef USE_MUTATIONPP
// Generate the default options for the He-H mixture
Mutation::MixtureOptions opts("He-H");
opts.setStateModel("EquilTP");
// Load the mixture with the new options
m_mix = new Mutation::Mixture(opts);
#endif
```
In this example, the He-H mixture is loaded and the stateModel is "EquilTP".
Once the mixture is initialised in the solver, you can call it in your iterator in order to obtain the transport coefficients. See the following example where we obtain the viscosity and the heavy thermal conductivity:
( This code would appear inside the iterator_yourmodule.cpp)
```
#ifdef USE_MUTATIONPP
double T=localTemperature;
double P=localPressure;
// We set the local temperature and pressure conditions
solver->m_mix->setState(&T,&P);
// With the pointer defined in the solver, we call the functions in mutation