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
Some of the mp1 tests are failing when calculating g using the subst.state() function, but do fine when calculating subst.g(). The value returned by g() is consistent with the theoretical h-Ts value.
It happens to be for the test case in the multiphase region. I can see that you note in there # Gibbs energy is constant across an equilibrium phase transition. I think it would just boil down to a decision about how you'd really want that value to be produced. I have no opinion, because I am not well versed on the underlying theory here. The only thing I would have strong feelings about is that subst.state()['g'] should match subst.g().
Also of note this only fails for R-134 in the test code but passes for water, but that's only because of level of the tolerances. There is a small variance in the actual water data as well. In both cases the discrepancy is quite small though.
jranalli
changed the title
Accuracy issue in mp1.py when calculating g via state.
Discrepancy in results mp1.py when calculating g via state() vs using g().
Dec 18, 2024
Some of the mp1 tests are failing when calculating g using the
subst.state()
function, but do fine when calculatingsubst.g()
. The value returned byg()
is consistent with the theoretical h-Ts value.It happens to be for the test case in the multiphase region. I can see that you note in there
# Gibbs energy is constant across an equilibrium phase transition
. I think it would just boil down to a decision about how you'd really want that value to be produced. I have no opinion, because I am not well versed on the underlying theory here. The only thing I would have strong feelings about is thatsubst.state()['g']
should matchsubst.g()
.Also of note this only fails for R-134 in the test code but passes for water, but that's only because of level of the tolerances. There is a small variance in the actual water data as well. In both cases the discrepancy is quite small though.
Code to demonstrate:
The text was updated successfully, but these errors were encountered: