You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Crash in PhaseDiagram.binary_vle for nitrogen/propane mixture at 126.58 K #361
When calculating a binary vapor-liquid equilibrium (VLE) phase diagram for a mixture of nitrogen and propane using the PC-SAFT equation of state, the code crashes at a specific temperature (126.58 K).
Here is the minimal reproducible example that triggers the crash:
fromfeosimportParameters, EquationOfState, PhaseDiagramfromsi_unitsimport*substances= ["nitrogen", "propane"]
parameters=Parameters.from_json(substances, 'esper2023.json', binary_path='bauer2026_binary.json')
eos=EquationOfState.pcsaft(parameters)
# The crash occurs on the following linedia=PhaseDiagram.binary_vle(eos, temperature_or_pressure=126.58*KELVIN, npoints=501)
thread '<unnamed>' (99962) panicked at crates/feos-core/src/phase_equilibria/phase_diagram_binary.rs:271:24:
index out of bounds: the len is 100 but the index is 100
---------------------------------------------------------------------------
PanicException Traceback (most recent call last)
Cell In[4], line 9
6 parameters = Parameters.from_json(substances, 'esper2023.json', binary_path='bauer2026_binary.json')
7 eos = EquationOfState.pcsaft(parameters)
----> 9 dia = PhaseDiagram.binary_vle(eos, temperature_or_pressure=126.58*KELVIN, npoints=501)
PanicException: index out of bounds: the len is 100 but the index is 100
Activity