1D counterflow pressure stepping instability?

37 views
Skip to first unread message

Chris N

unread,
Sep 18, 2025, 12:57:36 PMSep 18
to Cantera Users' Group
I'm wondering if it even makes sense to try and run the 1D counterflow solver for ideal gas cases with very high pressures (something like 60 MPa). Obviously gases are supercritical at such pressures and the ideal gas assumption would generate deviations from reality. I was surprised though that I had trouble even stepping the solution up into that pressure regime. I've attached a script that attempts to walk up the pressure and when it fails it writes out the temperature field. It doesn't look like the flame is particularly thin, which is what I thought might have been happening as the pressure increased. Also attached is the solution right before the solver failed to converge.  
run_allstar_pressure_scan.py
allstar_rcm1.yaml
temperature_failed_i65_P009.38MPa.png
flamelet_64_P009.29MPa.yaml

Ray Speth

unread,
Oct 31, 2025, 2:46:35 PMOct 31
to Cantera Users' Group
Hi Chris,

Thanks for sharing this example of a case where the 1D solver struggles.

I spent a bit of time looking at what's happening, and found a few things that may be of interest. The failure mode here comes from cases where the solver hits the limit on number of time steps taken without being able to solve the steady-state problem. It seems like it ends up in a place where only relatively small timesteps can be taken (in the 1e-5 to 1e-4 s range), and you don't get the usual pattern of acceleration where the solver is able to start taking much larger time steps as a prelude to success at solving the steady-state problem.

I tried using a timestep callback to collect the solution after each successive timestep, and found that what seems to be happening is that within the timestepping period, the solution starts to become very sharp at some location within the grid, for example with the temperature changing by 2000 K between successive grid points. This led me to think that it might be beneficial to try regridding within the time stepping process, instead of only regridding after a successful steady-state solve. There doesn't seem to be a great way to do this right now, but I set something up by catching the exception raised when timestepping fails, where I then regrid the flame and use that as the initial condition for a new call to the solver. With this approach, I was able to get solutions up to 15 MPa, higher than the ~7 MPa cases that seemed to be the limit with your approach of incrementally increasing the pressure, though it's certainly far from perfect. I've attached my script for reference.

Regards,
Ray
temporal_regridding.py
Reply all
Reply to author
Forward
0 new messages