Skip to content

compressibleInterFoam crahes when compiled with gcc 11.4.0

Summary

The provided case crashes within the first 5 iterations due to "Negative initial temperature T0" when compiled with gcc 11.4.0. In contrast, when compiled with gcc 9.5.0 this problem doesn't occur.

Steps to reproduce

Run the case after initialization with blockMesh and setFields

Example case

compressibleInterFoam.zip

What is the current bug behaviour?

This problem only arised with 3D cases, a different 2D case ran perfectly

What is the expected correct behavior?

Compilation with gcc 9.5.0 runs stable

Relevant logs and/or images

Error log [1] [0] [0] [0] --> FOAM FATAL ERROR: (openfoam-2012) [0] Negative initial temperature T0: -180.035335774 [0] [0] From Foam::scalar Foam::species::thermo::T(Foam::scalar, Foam::scalar, Foam::scalar, Foam::scalar (Foam::species::thermo::*)(Foam::scalar, Foam::scalar) const, Foam::scalar (Foam::species::thermo::*)(Foam::scalar, Foam::scalar) const, Foam::scalar (Foam::species::thermo::*)(Foam::scalar) const) const [with Thermo = Foam::hConstThermo >; Type = Foam::sensibleEnthalpy; Foam::scalar = double; Foam::species::thermo = Foam::species::thermo >, Foam::sensibleEnthalpy>] [0] in file /home/itvcs/OpenFOAM/OpenFOAM-v2012/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 57.

Environment information

  • OpenFOAM version : v2012 commit 79e353b8
  • Operating system : Ubuntu 22.04.3 LTS
  • Hardware info : Intel 13th gen
  • Compiler : gcc 9.5.0 and 11.4.0

Possible fixes