-
-
Notifications
You must be signed in to change notification settings - Fork 404
Description
The loglevel in the 1D solver generates errors when set to anything greater than 7. This is because the call to the toArray() that is now used in the save() method in the Sim1D class has a call to updateThermo(), which when the loglevel is greater than 7 involves a swapping of the solution vector with the residual vector via the saveResidual() method. So the updateThermo() gets called on a vector that is not valid/consistent thermodynamic state (instead it's just filled with residuals), and this generates an error. In the case I saw it was because it thought the temperature was 0 somewhere.
I'm not sure what to do to resolve this. The call to toArray() seems necessary, and the only thing I can think of right now is that some other argument could be added like a update_thermo=true default argument and then the saveResidual() could somehow activate this argument to prevent the crash from happening.
I'll open up a PR and fix it if any better suggestions are made.
- Cantera version: Dev branch
- OS: Ubuntu 24.04