From c066179ff13e7409b83aceab5504d559a83c9d95 Mon Sep 17 00:00:00 2001 From: Francesco Witte Date: Sun, 21 Jan 2024 12:37:22 +0100 Subject: [PATCH] Add a test with higher temperature combustion product that water fluid properties allow --- src/tespy/connections/connection.py | 1 + tests/test_components/test_combustion.py | 16 +++++++++++++++- .../test_networks/test_binary_incompressible.py | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/tespy/connections/connection.py b/src/tespy/connections/connection.py index 47466b01e..9bcc80260 100644 --- a/src/tespy/connections/connection.py +++ b/src/tespy/connections/connection.py @@ -926,6 +926,7 @@ def calc_results(self): "upper temperature limit of a mixture component. " "The resulting temperature might not be erroneous." ) + logger.warning(msg) else: try: if not self.x.is_set: diff --git a/tests/test_components/test_combustion.py b/tests/test_components/test_combustion.py index 7912781fb..298601099 100644 --- a/tests/test_components/test_combustion.py +++ b/tests/test_components/test_combustion.py @@ -9,7 +9,7 @@ SPDX-License-Identifier: MIT """ - +import pytest import shutil from tespy.components import CombustionChamber @@ -103,6 +103,20 @@ def test_CombustionChamber(self): str(round(self.c3.fluid.val['O2'], 4)) + '.') assert 0.0 == round(self.c3.fluid.val['O2'], 4), msg + def test_CombustionChamberHighTemperature(self): + instance = CombustionChamber('combustion chamber') + self.setup_CombustionChamber_network(instance) + + # connection parameter specification + air = {'N2': 0.8, 'O2': 0.2} + fuel = {'CH4': 1} + self.c1.set_attr(fluid=air, p=1, T=30, m=1) + self.c2.set_attr(fluid=fuel, T=30) + instance.set_attr(lamb=1) + self.nw.solve('design') + self.nw._convergence_check() + assert self.c3.T.val_SI == pytest.approx(2110, abs=0.1) + def test_DiabaticCombustionChamber(self): """ Test component properties of diabatic combustion chamber. diff --git a/tests/test_networks/test_binary_incompressible.py b/tests/test_networks/test_binary_incompressible.py index c5aa7be94..9683e71cd 100644 --- a/tests/test_networks/test_binary_incompressible.py +++ b/tests/test_networks/test_binary_incompressible.py @@ -51,4 +51,4 @@ def setup_method(self): self.nw.solve("design") def test_binaries(self): - self.nw._convergence_check() \ No newline at end of file + self.nw._convergence_check()