-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] T_mix_ph results depend strongly on T0 when water is involved #339
Comments
Hi, thank you for reporting this. Unfortunately, TESPy (dev version) currently only solves for pure gaseous mixtures or pure fluids in liquid, two-phase or gaseous phase. The only exception is condensation of water in a gasous stream. Since the enthalpy value in your example is is somewhere in the two-phase region of water, the newton algorithm does not find a solution. The reason why the Newton algorithm implemented for the fluid property functions does not throw an error is: Within the solving process of a network (especially at the beginning), the enthalpy/pressure values for some streams end up in regions that do not make much sense physically. If the function threw an error, the solving process would stop even if the overall network would still be solved later. There is already a warning message in place, maybe we can promote that from debug to info or warning. What do you think? Also, regarding the specific combination of values, you might be interested in the work @nkawerau is currently contributing (see #327). He is working on an implementation letting you choose between CoolProp and thermosteam, which is able to solve for multiphase mixtures. Have nice week! |
Hi Francesco, I think it makes sense to keep the function quiet during normal usage of TesPy. It would still be handy to access the logger information though. Where are the logs currently stored? Thanks. |
In your home folder there should be a folder .tespy/log or something like that. You an also change logging, I‘ll update this later, when I am at my computer again. |
Current behavior
The helper function
T_mix_ph
can return very different results depending on the starting value when H2O is part of the mixture (see example).Expected behavior
The function always returns the same value.
Proposed solution
The Newton algorithm should probably return NaN or None if it didn't converge.
Example
The text was updated successfully, but these errors were encountered: