[Mesa-users] crashes at Psurf=1 Ba
Sho Shibata
s.shibata423 at gmail.com
Sat Nov 22 03:31:28 UTC 2025
Thank you for the comments.
I have checked EOS, and the density at the surface is around 10^{-11} g/cm^2, and I tested Tsurf=100 K, 300K, and 800 K. These should be inside the EOS domain. What is strange is that MESA works well both below and above Psurf = 1 Ba, but it crashes only when it tries to cross 1 Ba.
To check the borders of EOS tables, I turned off all EOS tables and used the ideal EOS.
In the inlist file, I set
&eos
use_OPAL_SCVH = .false.
use_FreeEOS = .false.
use_Skye = .false.
use_CMS = .false.
use_PC = .false.
So, MESA uses ideal EOS and does not switch to any other EOS tables. The borders of EOS tables are not the cause either.
The EOS error is obtained at
log10Rho 9.7696467619556160D-01
but, the interior density profile in the previous step ranges from 10^{-11} to 10^{-8}. So MESA is looking for an unrealistic density region. I think the EOS error is not the first cause of this crash. Something happens in the solver iteration progress, and it triggers this EOS error.
Sho Shibata
Department of Earth, Environmental and Planetary Sciences,
Rice University, Houston, TX, USA
Email: s.shibata423 at gmail.com
> 21.11.2025 20:39、Farag, Ebraheem <ebraheem.farag at yale.edu>のメール:
>
> The eos error spit out when your model first retries indicates some eos issue,
>
> k 95
> xa(j) equ_h1 1 7.1938774594784971D-01
> xa(j) equ_he3 2 1.7415464504652846D-34
> xa(j) equ_he4 3 2.8061225405215035D-01
> xa(j) equ_c12 4 1.0000000000000002D-99
> xa(j) equ_n14 5 1.0000000000000002D-99
> xa(j) equ_o16 6 1.0000000000000002D-99
> xa(j) equ_ne20 7 1.0000000000000002D-99
> xa(j) equ_mg24 8 1.0000000000000002D-99
> log10Rho 9.7696467619556160D-01
> log10T 1.9716543405538405D+00
>
> Potentially you are hitting an eos boundary? Perhaps check and confirm your model is not falling off the available eos in MESA, seehttps://docs.mesastar.org/en/latest/eos/overview.html. The first error suggests the eos is being queried outside of it's domain.
>
> -EbF
> From: Sho Shibata <s.shibata423 at gmail.com>
> Sent: Friday, November 21, 2025 9:19 PM
> To: Farag, Ebraheem <ebraheem.farag at yale.edu>
> Cc: Philip Mocz <pmocz at flatironinstitute.org>; Jeremy Sakstein via Mesa-users <mesa-users at lists.mesastar.org>
> Subject: Re: [Mesa-users] crashes at Psurf=1 Ba
>
> Hi,
>
> The attached file shows the first 1000 lines of the output.
>
> In extras_start_step, I calculate the next step's Psurf and output them like
>
> ---------------------
> Set boundary conditions:
> Times: 1000025.0142534898 1000028.3153213252 3.3010678353955778
> Surface temperature: 93.672200228723625
> Surface pressure: 0.69632028405282687
> ---------------------
>
> In this case, I try to change Psurf linearly from 0.3 Ba to 10 Ba from t=0 to t=1000 yr. Once a retry happens and the timestep gets shorter, I recalculate the next Psurf. The retries happen at model=17, 32, 39...
>
> Best,
> Sho
>
> 2025年11月21日(金) 19:57 Farag, Ebraheem <ebraheem.farag at yale.edu <mailto:ebraheem.farag at yale.edu>>:
> Can you add "report_ierr = .true.", and check if something gets spit out at the moment the model begins to timestep dive, rather than the last timestep? The last timestep is rarely informative.
>
> -EbF
> From: Mesa-users <mesa-users-bounces at lists.mesastar.org <mailto:mesa-users-bounces at lists.mesastar.org>> on behalf of Sho Shibata via Mesa-users <mesa-users at lists.mesastar.org <mailto:mesa-users at lists.mesastar.org>>
> Sent: Friday, November 21, 2025 8:50 PM
> To: Philip Mocz <pmocz at flatironinstitute.org <mailto:pmocz at flatironinstitute.org>>
> Cc: Jeremy Sakstein via Mesa-users <mesa-users at lists.mesastar.org <mailto:mesa-users at lists.mesastar.org>>
> Subject: Re: [Mesa-users] crashes at Psurf=1 Ba
>
> Hi Philip,
>
> I wrote Psurf = 1 bar in the email, but that was a typo. The crashes occur at Psurf = 1 Ba. The figure is correct. Sorry for the confusion.
>
> Yes, the timestep is becoming really small and in most cases MESA stops because of the too small timestep.
> The bellow is one of the error message.
>
> ----------------
> solver rejected trial model
> s% model_number 135
> s% solver_call_number 169
> nz 354
> s% num_retries 34
> dt 1.4937230988914816D+07
> log dt/secyer -3.2483387012067205D-01
>
> retry: max residual jumped -- give up in solver 135
> retry log10(dt/yr), log10(dt), retry_factor 1 135 -0.926894 6.572210 0.500000
> residual_norm > tol_residual_norm 135 9.4041696866144896D-03 1.0000000000000000D-08
> max_residual > tol_max_residual 135 4.8329438443848197D+01 1.0000000000000001D-05
> correction_norm > tol_correction_norm*coeff 135 2.1671809254193686D-04 3.0000000000000004D-07 1.0000000000000000D-02
> max_abs_correction > tol_max_correction*coeff 135 2.9765389377772104D-03 3.0000000000000001D-05 1.0000000000000000D-02
>
>
> ..... repeat this messages .....
>
>
> stopping because of problems dt < min_timestep_limit
> terminated evolution: cannot find acceptable model
> termination code: min_timestep_limit
> ----------------
>
> Best,
> Sho
>
> 2025年11月21日(金) 18:59 Philip Mocz <pmocz at flatironinstitute.org <mailto:pmocz at flatironinstitute.org>>:
> Hi Sho,
>
> It does look like something odd is going on right at 1 Ba
>
> Can you share what error messages you get when you crash? Is timestep becoming really small?
>
> Best,
> Philip
>
> On Fri, Nov 21, 2025, 7:54 PM Sho Shibata via Mesa-users <mesa-users at lists.mesastar.org <mailto:mesa-users at lists.mesastar.org>> wrote:
> Hi all,
>
> I'm running test simulations where I smoothly change the surface pressure while keeping the surface temperature fixed, using atm_option='fixed_Tsurf_and_Psurf'. I'm using MESA Version: mesa-24.08.1, and I use run_star_extras.f90 to implement the smooth change of Psurf, but no other modification.
> I am encountering unexpected crashes: MESA can evolve with a varying surface pressure, but the code consistently crashes exactly when the model attempts to cross P_surf = 1 bar. The attached figures show what I’m doing. Changing the fixed temperature does not shift the crash location—the failure always occurs at P_surf = 1 bar.
>
> I see a similar issue when varying T_surf with fixed P_surf, specifically when crossing T_surf = 1000 K.
>
> Initially, I suspected the EOS tables, so I reran the experiment using the ideal EOS (by turning off other EOS tables), but the crash still occurs.
>
> Do you have any idea what might be happening internally in MESA in this situation? And is there a way to resolve or work around this issue?
>
> For context, these tests involve a planetary-sized object—an atmosphere on a Moon-sized protoplanet—so the envelope is extremely thin. The imposed change is rapid, but the timescale itself should not be the root of the problem.
> Any advice or suggestions would be greatly appreciated. Thanks in advance for your help.
>
> Best regards,
> Sho Shibata
> _______________________________________________
> mesa-users at lists.mesastar.org <mailto:mesa-users at lists.mesastar.org>
> https://urldefense.com/v3/__https://lists.mesastar.org/mailman/listinfo/mesa-users__;!!DSb-azq1wVFtOg!Wig7tLQuDHlHxgddN8l0R6wshsctpY6atBNv6NpTKNt3dZ3b_Xnu2flgmR3Imum2iG_VS5Kvz8eGGEX8_xyg0alFQr6LHJU-$
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20251121/b37662f3/attachment.htm>
More information about the Mesa-users
mailing list