Skip to content

Commit

Permalink
Add a test with higher temperature combustion product that water flui…
Browse files Browse the repository at this point in the history
…d properties allow
  • Loading branch information
fwitte committed Jan 21, 2024
1 parent 4b4ccf1 commit c066179
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/tespy/connections/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
16 changes: 15 additions & 1 deletion tests/test_components/test_combustion.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
SPDX-License-Identifier: MIT
"""

import pytest
import shutil

from tespy.components import CombustionChamber
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tests/test_networks/test_binary_incompressible.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ def setup_method(self):
self.nw.solve("design")

def test_binaries(self):
self.nw._convergence_check()
self.nw._convergence_check()

0 comments on commit c066179

Please sign in to comment.