This PR adds a try/except to Material.set_state_with_volume that ensures that the root finding procedure doesn't fail just because brentq tries a pressure that is outside the range of validity of the EoS.
The tweak causes one of the existing tests to fail (because it was designed to test the failure case!). That test has now been replaced with one that would have previously failed.
This PR adds a try/except to Material.set_state_with_volume that ensures that the root finding procedure doesn't fail just because brentq tries a pressure that is outside the range of validity of the EoS.
The tweak causes one of the existing tests to fail (because it was designed to test the failure case!). That test has now been replaced with one that would have previously failed.