Skip to content

Real gas in compressible solver

Douglas Serson requested to merge feature/CFS-RealGas into master

This MR introduces the possibility of using different equations of state in the compressible solver to account for real gas effects.

The diff is relatively large because I had to pass a SessionReader object to the Riemann solver and this change propagated throughout the code. Apart from this, all changes are restricted to the compressible solver. More specifically, the most important changes are:

  • I moved DiffusionLDGNS to the compressible solver, since it is specific to this solver and now requires information from the VariableConverter.
  • The variable converter now delegates some of the transformations to a new EquationOfState class. This uses a factory allowing to easily introduce new equations of state (so far I have implemented ideal gas, van der Waals, Redlich-Kwong and Peng-Robinson).
  • Several places where it was assumed that we have an ideal gas were modified to make sure all transformations are done through the VariableConverter (or directly from an EquationOfState object).
  • The speed of sound for the Roe average state for the Riemann solvers had to be modified.
  • I created a new boundary condition which automatically converts pressure, temperature and Mach number to the conserved variables, since these conversions are only straightforward for an ideal gas.

Although the tests I ran used the HLLC Riemann solver, I expect most solvers should work with this, except for ExactToro and Roe (which I did not modify).

Merge request reports