Plot thermodynamic and transport data vs. temperature for a plasma of H2, O2, N2, Ar, He in LTE.#

This example plots the thermodynamic and transport data of H2, O2, N2, Ar, and He as a function of temperature.

References data#

Tags: transport H2 O2 N2 Ar He plasma thermal conductivity electrical conductivity viscosity

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"
)
data_Ar_Boulos2023 = ThermoTransportDataReader(
    gas_name="Ar", pressure_atm=1, source="Boulos2023"
)
data_He_Boulos2023 = ThermoTransportDataReader(
    gas_name="He", pressure_atm=1, source="Boulos2023"
)

datas = [
    data_H2_Boulos2023,
    data_N2_Boulos2023,
    data_O2_Boulos2023,
    data_Ar_Boulos2023,
    data_He_Boulos2023,
]

# Plot options for all the plots.
plot_options = [
    {"ls": "-", "lw": 4, "color": "black", "label": r"$\mathregular{H_2}$"},
    {"ls": "-", "lw": 3, "color": "red", "label": r"$\mathregular{N_2}$"},
    {"ls": "-", "lw": 2, "color": "blue", "label": r"$\mathregular{O_2}$"},
    {"ls": "-", "lw": 3, "color": "green", "label": r"$\mathregular{Ar}$"},
    {"ls": "-", "lw": 3, "color": "orange", "label": r"$\mathregular{He}$"},
]

Plot all physical properties vs. temperature.#

physical_properties = ["rho", "cp", "h", "kappa", "sigma", "mu"]

for physical_property in physical_properties:
    fig, ax = plt.subplots(figsize=(12, 8), layout="constrained")

    for data, options in zip(datas, plot_options):
        data.plot(
            x="T",
            y=physical_property,
            fig_ax=(fig, ax),
            show=False,
            yscale="log" if physical_property in ["rho", "h", "sigma"] else "linear",
            ax_title="1 atm, LTE, Boulos2023",
            **options,  # type: ignore
        )

    ax.legend()
    plt.show()
  • Mass density $\mathregular{[kg.m^{-3}]}$ vs. Temperature $\mathregular{[K]}$, 1 atm, LTE, Boulos2023
  • Heat capacity at constant pressure $\mathregular{[J.kg^{-1}.K^{-1}]}$ vs. Temperature $\mathregular{[K]}$, 1 atm, LTE, Boulos2023
  • Mass enthalpy $\mathregular{[J.kg^{-1}]}$ vs. Temperature $\mathregular{[K]}$, 1 atm, LTE, Boulos2023
  • Thermal conductivity $\mathregular{[W.m^{-1}.K^{-1}]}$ vs. Temperature $\mathregular{[K]}$, 1 atm, LTE, Boulos2023
  • Electrical conductivity $\mathregular{[S.m^{-1}]}$ vs. Temperature $\mathregular{[K]}$, 1 atm, LTE, Boulos2023
  • Dynamic viscosity $\mathregular{[Pa.s]}$ vs. Temperature $\mathregular{[K]}$, 1 atm, LTE, Boulos2023

Total running time of the script: (0 minutes 1.230 seconds)