Summary
Some detonation problems that run fine in CEA2 fail with an unconverged equilibrium solver.
Reproduction
- Interface: confirmed with legacy, python interfaces
- Minimal input / steps (attach .inp if relevant):
reac
oxid O2 wt=1
fuel C2H4 wt=1
prob det phi=0.4 t,k=298.15 p,bar=4
outp short
end
Expected behavior
Compute a solution consistent with CEA2, within solver tolerances.
Actual behavior
ERROR: DETON: Equilibrium solver did not converge
WARNING: Singular update matrix encountered at iteration 2
WARNING: Singular update matrix encountered at iteration 1
WARNING: Singular update matrix encountered at iteration 1
WARNING: Singular update matrix encountered at iteration 1
WARNING: Singular update matrix encountered at iteration 1
WARNING: Singular update matrix encountered at iteration 1
WARNING: Singular update matrix encountered at iteration 1
WARNING: Singular update matrix encountered at iteration 1
WARNING: Singular update matrix encountered at iteration 1
CRITICAL: EqSolver_solve: Too many singular matrices encountered.
Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG IEEE_OVERFLOW_FLAG IEEE_UNDERFLOW_FLAG IEEE_DENORMAL
STOP 1
Environment
- OS: Ubuntu + gfortran 13.3, Win 11 + Intel oneAPI 2025.3
- CEA version/commit: 3.0.3 / 358065a
Additional context
There is some weirdness:
- Building with gfortran using the core preset, the example problem gives multiple "ERROR: DETON: Equilibrium solver did not converge" messages but ultimately converges but the solution doesn't quite match CEA2 in some respects.
- Building with gfortran using the dev preset, the example problem produces the result listed above in "What actually happened". Intel builds on Windows also produce this result, with the exception of the fpe output.
- The attached testDetIssueHPPT.py replicates the initial guess HP problem and the TP problem that fails to converge on the first pass through the iteration loop in detonation.f90, using values that correspond to the sample problem listed in the Reproduction section. But the python HPPT example converges, unlike detonation.f90. Calling a detonation problem from the python interface produces the same unconverged equilibrium solution as does the legacy interface.
- Zeroing soln%dln_n and soln%dln_T in the EqSolver_solve initialization section after line 1950 of equilibrium.f90 appears to fix the issue. The sample problem converges with results that match CEA2, as do other problems that produced similar behavior. I'm not necessarily proposing this as a fix because I don't understand why it works.
testDetIssueHPPT.py
Summary
Some detonation problems that run fine in CEA2 fail with an unconverged equilibrium solver.
Reproduction
reac
oxid O2 wt=1
fuel C2H4 wt=1
prob det phi=0.4 t,k=298.15 p,bar=4
outp short
end
Expected behavior
Compute a solution consistent with CEA2, within solver tolerances.
Actual behavior
ERROR: DETON: Equilibrium solver did not converge
WARNING: Singular update matrix encountered at iteration 2
WARNING: Singular update matrix encountered at iteration 1
WARNING: Singular update matrix encountered at iteration 1
WARNING: Singular update matrix encountered at iteration 1
WARNING: Singular update matrix encountered at iteration 1
WARNING: Singular update matrix encountered at iteration 1
WARNING: Singular update matrix encountered at iteration 1
WARNING: Singular update matrix encountered at iteration 1
WARNING: Singular update matrix encountered at iteration 1
CRITICAL: EqSolver_solve: Too many singular matrices encountered.
Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG IEEE_OVERFLOW_FLAG IEEE_UNDERFLOW_FLAG IEEE_DENORMAL
STOP 1
Environment
Additional context
There is some weirdness:
testDetIssueHPPT.py