Skip to content

Commit

Permalink
Merge branch 'docs/fix-gas-turbine-example' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
fwitte committed Jun 27, 2024
2 parents 95196fe + 5ad9ee8 commit 659efdb
Show file tree
Hide file tree
Showing 10 changed files with 1,641 additions and 1,666 deletions.
548 changes: 274 additions & 274 deletions docs/_static/images/basics/gas_turbine_fuel_composition.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
206 changes: 103 additions & 103 deletions docs/_static/images/basics/gas_turbine_fuel_composition_darkmode.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
680 changes: 332 additions & 348 deletions docs/_static/images/basics/gas_turbine_oxygen.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
398 changes: 191 additions & 207 deletions docs/_static/images/basics/gas_turbine_oxygen_darkmode.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
990 changes: 495 additions & 495 deletions docs/_static/images/basics/gas_turbine_parametric.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
472 changes: 236 additions & 236 deletions docs/_static/images/basics/gas_turbine_parametric_darkmode.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion docs/whats_new/v0-7-5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ v0.7.5 - Under development
Documentation
#############
- The Rankine cycle example has been adopted to integrate a T-s diagram of the
process into the results.
process into the results
(`PR #514 <https://github.com/oemof/tespy/pull/514>`__).
- A bug in the results plot of the gas turbine example has been fixed
(`PR #522 <https://github.com/oemof/tespy/pull/522>`__).

Other Features
##############
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ addopts = """
--pyargs
--ignore=docs/conf.py
--ignore=docs/scripts
--ignore=docs/_build
"""
testpaths = [
"src/",
Expand Down
2 changes: 1 addition & 1 deletion src/tespy/networks/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -2209,7 +2209,7 @@ def iterinfo_tail(self, print_results=True):
"""Print tail of convergence progress."""
num_iter = self.iter + 1
clc_time = self.end_time - self.start_time
num_ips = num_iter / clc_time if clc_time > 1e-10 else np.Inf
num_ips = num_iter / clc_time if clc_time > 1e-10 else np.inf
msg = '-' * 7 + '+------------' * 7
logger.progress(100, msg)
msg = (
Expand Down
6 changes: 5 additions & 1 deletion tutorial/basics/gas_turbine.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
fig, ax = plt.subplots(2, 2, figsize=(16, 8), sharex='col', sharey='row')

ax = ax.flatten()
[a.grid() for a in ax]
[(a.grid(), a.set_axisbelow(True)) for a in ax]

i = 0
for key in data:
Expand All @@ -145,6 +145,8 @@
nw.solve('design')
T3 += [c3.T.val]

T3 = T3[::-1]

# reset to base value
c3.fluid.is_set.remove("O2")
c3.set_attr(T=1200)
Expand All @@ -153,6 +155,7 @@

ax.scatter(data * 100, T3, s=100, color="#1f567d")
ax.grid()
ax.set_axisbelow(True)

ax.set_ylabel('Turbine inlet temperature in °C')
ax.set_xlabel('Oxygen mass fraction in flue gas in %')
Expand Down Expand Up @@ -185,6 +188,7 @@
ax.scatter(data, CH4, s=100, color="#1f567d", label="CH4 mass fraction")
ax.scatter(data, H2, s=100, color="#18a999", label="H2 mass fraction")
ax.grid()
ax.set_axisbelow(True)
ax.legend()

ax.set_ylabel('Mass fraction of the fuel in %')
Expand Down

0 comments on commit 659efdb

Please sign in to comment.