Skip to content

Commit

Permalink
Add a warning message for out of bound mixture tempertures
Browse files Browse the repository at this point in the history
  • Loading branch information
fwitte committed Jan 21, 2024
1 parent e2b22c1 commit 4b4ccf1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/tespy/connections/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
from tespy.tools.fluid_properties.functions import dT_mix_ph_dfluid
from tespy.tools.fluid_properties.functions import p_sat_T
from tespy.tools.fluid_properties.helpers import get_number_of_fluids
from tespy.tools.fluid_properties.helpers import get_mixture_temperature_range
from tespy.tools.global_vars import ERR
from tespy.tools.global_vars import fluid_property_data as fpd
from tespy.tools.helpers import TESPyConnectionError
Expand Down Expand Up @@ -917,7 +918,14 @@ def calc_results(self):
)
logger.error(msg)
_converged = False

else:
_, Tmax = get_mixture_temperature_range(self.fluid_data)
if self.T.val_SI > Tmax:
msg = (
"The temperature value of the mixture is above the "
"upper temperature limit of a mixture component. "
"The resulting temperature might not be erroneous."
)
else:
try:
if not self.x.is_set:
Expand Down

0 comments on commit 4b4ccf1

Please sign in to comment.