Skip to content

Commit 021c21c

Browse files
committed
Fix: Only exergy analysis in the tests (Update v0.0.4)
1 parent e7e9966 commit 021c21c

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

examples/heatpump/hp_tespy.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from tespy.connections import Connection, PowerConnection
1414
from tespy.networks import Network
1515

16-
from exerpy import ExergoeconomicAnalysis, ExergyAnalysis
16+
from exerpy import ExergyAnalysis
1717

1818
# Reference environment conditions
1919
p0 = 101300
@@ -106,7 +106,7 @@
106106
nw.print_results()
107107

108108
# Exergy analysis
109-
ean = ExergyAnalysis.from_tespy(nw, T0, p0, split_physical_exergy=True)
109+
ean = ExergyAnalysis.from_tespy(nw, T0, p0, split_physical_exergy=False)
110110

111111
fuel = {"inputs": ["e1"], "outputs": []}
112112

@@ -120,7 +120,8 @@
120120
ean.export_to_json("examples/heatpump/hp_tespy.json")
121121
df_component_results.to_csv("examples/heatpump/hp_components_tespy.csv")
122122

123-
# Exergoeconomic analysis
123+
# Set split_physical_exergy=True in order to conduct exergoeconomic analysis
124+
"""# Exergoeconomic analysis
124125
exergoeco_analysis = ExergoeconomicAnalysis(ean)
125126
126127
# Component Z factors [EUR/h] - directly specified
@@ -147,3 +148,4 @@
147148
all_costs = {**component_costs, **boundary_costs}
148149
exergoeco_analysis.run(all_costs, Tamb=T0)
149150
exergoeco_analysis.exergoeconomic_results()
151+
"""

tests/test_tespy_examples.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66

77
path = os.path.join(os.path.dirname(__file__), "..", "examples")
88
examples = pathlib.Path(path).glob("**/*tespy.py")
9-
examples = [
10-
e for e in examples if "hp_cascade" not in os.path.basename(e) and "simple_steam_cycle" not in os.path.basename(e)
11-
]
129

1310

1411
@pytest.mark.parametrize("script", examples)

0 commit comments

Comments
 (0)