—
Plot thermo data vs. temperature for a plasma of H2, O2 or N2 in LTE.#
This example plots the thermo data of H2, O2 and N2 as a function of temperature.
The data for mass enthalpy, density, and heat capacity are compared to reference data from the literature.
References data#
The reference data for the mass enthalpy, density, and heat capacity at 1 atm are taken from:
Import the required libraries.#
import matplotlib.pyplot as plt
import seaborn as sns
from rizer.io.thermo_transport_data_reader import ThermoTransportDataReader
# Set the style of the plots.
sns.set_theme("talk")
Load reference data.#
data_H2_Boulos2023 = ThermoTransportDataReader(
gas_name="H2", pressure_atm=1, source="Boulos2023"
)
data_N2_Boulos2023 = ThermoTransportDataReader(
gas_name="N2", pressure_atm=1, source="Boulos2023"
)
data_O2_Boulos2023 = ThermoTransportDataReader(
gas_name="O2", pressure_atm=1, source="Boulos2023"
)
Plot the mass enthalpy vs. temperature.#
fig, ax = data_H2_Boulos2023.plot(
x="T",
y="h",
show=False,
label=r"$\mathregular{H_2}$",
ls="-",
lw=4,
color="black",
)
data_N2_Boulos2023.plot(
x="T",
y="h",
fig_ax=(fig, ax),
show=False,
label=r"$\mathregular{N_2}$",
ls="--",
lw=3,
color="red",
)
data_O2_Boulos2023.plot(
x="T",
y="h",
fig_ax=(fig, ax),
show=False,
label=r"$\mathregular{O_2}$",
ls=":",
lw=3,
color="blue",
)
ax.set_yscale("log")
ax.legend()
plt.show()
![Mass enthalpy $\mathregular{[J.kg^{-1}]}$ vs. Temperature $\mathregular{[K]}$, Gas: O2, pressure: 1 atm, Source: Boulos2023](../../_images/sphx_glr_plot_Boulos2023_thermo_data_in_LTE_001.png)
Plot the density vs. temperature.#
fig, ax = data_H2_Boulos2023.plot(
x="T",
y="rho",
show=False,
label=r"$\mathregular{H_2}$",
ls="-",
lw=4,
color="black",
)
data_N2_Boulos2023.plot(
x="T",
y="rho",
fig_ax=(fig, ax),
show=False,
label=r"$\mathregular{N_2}$",
ls="--",
lw=3,
color="red",
)
data_O2_Boulos2023.plot(
x="T",
y="rho",
fig_ax=(fig, ax),
show=False,
label=r"$\mathregular{O_2}$",
ls=":",
lw=3,
color="blue",
)
ax.set_yscale("log")
ax.legend()
plt.show()
![Mass density $\mathregular{[kg.m^{-3}]}$ vs. Temperature $\mathregular{[K]}$, Gas: O2, pressure: 1 atm, Source: Boulos2023](../../_images/sphx_glr_plot_Boulos2023_thermo_data_in_LTE_002.png)
Plot the heat capacity vs. temperature.#
fig, ax = data_H2_Boulos2023.plot(
x="T",
y="cp",
show=False,
label=r"$\mathregular{H_2}$",
ls="-",
lw=4,
color="black",
)
data_N2_Boulos2023.plot(
x="T",
y="cp",
fig_ax=(fig, ax),
show=False,
label=r"$\mathregular{N_2}$",
ls="--",
lw=3,
color="red",
)
data_O2_Boulos2023.plot(
x="T",
y="cp",
fig_ax=(fig, ax),
show=False,
label=r"$\mathregular{O_2}$",
ls=":",
lw=3,
color="blue",
)
ax.set_yscale("log")
ax.legend()
plt.show()
![Heat capacity at constant pressure $\mathregular{[J.kg^{-1}.K^{-1}]}$ vs. Temperature $\mathregular{[K]}$, Gas: O2, pressure: 1 atm, Source: Boulos2023](../../_images/sphx_glr_plot_Boulos2023_thermo_data_in_LTE_003.png)
Total running time of the script: (0 minutes 0.745 seconds)