Skip to content

Commit 520487d

Browse files
hazalkoomspeth
authored andcommitted
Fix incorrect ylabel in catalytic_combustion.py
- Corrects a typo where only Temperature was plotted but the axis was labeled as heat release rate. - Modifies the plot to use a single axis for Temperature. - Adds unique window titles (num) to figures to avoid identical Figure 1 names. - Added Mohamed Ahmed to AUTHORS.md. Closes #2154 - **Limited use of generative AI.** I fixed the issue following the suggested solution and used AI to assist in refining it.
1 parent ca538c8 commit 520487d

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

AUTHORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ update, please report on Cantera's
88
[Github issue tracker](https://github.com/Cantera/cantera/issues).
99

1010
- **Rounak Agarwal** [@agarwalrounak](https://github.com/agarwalrounak)
11+
- **Mohamed Ahmed** [@hazalkoom](https://github.com/hazalkoom) - Mansoura University
1112
- **David Akinpelu** [@DavidAkinpelu](https://github.com/DavidAkinpelu)
1213
- **Halla Ali** [@hallaali](https://github.com/hallaali)
1314
- **Emil Atz** [@EmilAtz](https://github.com/EmilAtz)

ext/yaml-cpp

Submodule yaml-cpp updated 393 files

samples/python/onedim/catalytic_combustion.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"""
1818

1919
import numpy as np
20+
2021
import matplotlib.pyplot as plt
2122
import cantera as ct
2223

@@ -144,16 +145,15 @@
144145
# %%
145146
# Temperature Profile
146147
# -------------------
147-
fig, ax = plt.subplots()
148+
fig, ax = plt.subplots(num="Temperature Profile")
148149
ax.plot(sim.grid, sim.T, color='C3')
149-
ax.set_ylabel('heat release rate [MW/m³]')
150-
ax.set(xlabel='distance from inlet [m]')
150+
ax.set(xlabel='distance from inlet [m]', ylabel='temperature [K]')
151151
plt.show()
152152

153153
# %%
154154
# Major Species Profiles
155155
# ----------------------
156-
fig, ax = plt.subplots()
156+
fig, ax = plt.subplots(num="Major Species Profiles")
157157
major = ('O2', 'CH4', 'H2O', 'CO2')
158158
states = sim.to_array()
159159
ax.plot(states.grid, states(*major).X, label=major)

0 commit comments

Comments
 (0)