FormingWorlds / JANUS

1-D prescribed atmosphere model of planetary atmospheres that makes use of the SOCRATES radiative transfer code.
https://fwl-janus.readthedocs.io
Apache License 2.0
1 stars 0 forks source link

Mixing ratios become wrong beyond the critical point #2

Open Ryan-Boukrouche opened 8 months ago

Ryan-Boukrouche commented 8 months ago

Both Aeolus and the standalone general adiabat crash beyond the critical point of water, at different places depending on how we set the composition...

Cases tried so far: Ts = 650 K ; p(N2) = 1e5 Pa ; p(H2O) = p_sat(Ts) => P_surf = 578 bars. This worked fine using vol_mixing but crashed using vol_partial. Ts = 700 K ; p(N2) = 1e5 Pa ; p(H2O) = p_sat(Ts) => P_surf = 1045 bars. This crashes with both vol_mixing and vol_partial.

It goes wrong inside the dlnT_dlnP_d routine of the general adiabat, the eta_vol = atm.x_gas[vol][idx] / atm.xd[idx] goes NaN because xd goes to 1e-10 and x_gas[H2O] goes far beyond 1.

timlichtenberg commented 1 month ago

Possibly linked to #1.