From 4b4ccf1220d5aaf199f46db6eca99036f08a853b Mon Sep 17 00:00:00 2001 From: Francesco Witte Date: Sun, 21 Jan 2024 12:27:42 +0100 Subject: [PATCH] Add a warning message for out of bound mixture tempertures --- src/tespy/connections/connection.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/tespy/connections/connection.py b/src/tespy/connections/connection.py index 3c58eeafe..47466b01e 100644 --- a/src/tespy/connections/connection.py +++ b/src/tespy/connections/connection.py @@ -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 @@ -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: