CalebBell / thermo

Thermodynamics and Phase Equilibrium component of Chemical Engineering Design Library (ChEDL)
MIT License
594 stars 114 forks source link

Prevent division by zero in betas_liquid methods #84

Closed RoryKurek closed 2 years ago

RoryKurek commented 2 years ago

Three methods in EquilibriumState would raise a ZeroDivisionError when called with no liquid phases present.

CalebBell commented 2 years ago

Hi Rory, Good catch! Thank you. I also added unit tests for this behavior to prevent this from happening again: https://github.com/CalebBell/thermo/commit/61034be6b9200e592bdae7712386e311285c0b5d

Sincerely, Caleb