Emission and spectra
The lines of a solve, their photon emissivity coefficients split into excitation and recombination, line ratios and a synthetic spectrum.
import numpy as npimport plasma_plots
import opencr
plasma_plots.set_backend("plotly") # interactive figures, embedded in the docsplasma_plots.set_math("latex") # formulas in the figures typeset as LaTeX
model = opencr.load_model("hydrogen/atomic/basic", n_max=16)conditions = opencr.Conditions(2.0, 1e19, densities={"H(n=1)": 1e19, "H+": 1e19})result = model.solve_steady_state(conditions)emission() returns every line with its vacuum wavelength (or air, with air=True), emissivity and power. The Balmer lines:
lines = result.emission(air=True)balmer = lines.where(lines["lower"] == "H(n=2)", drop=True).isel(line=slice(0, 5))for line in balmer["line"].values: row = balmer.sel(line=line) print( f"{str(row['label'].values):6s} {float(row['wavelength']):8.2f} nm {float(row['emissivity']):.3e} photons/m^3/s" )H-α 656.28 nm 8.873e+20 photons/m^3/sH-β 486.13 nm 8.122e+19 photons/m^3/sH-γ 434.05 nm 1.184e+19 photons/m^3/sH-δ 410.17 nm 2.349e+18 photons/m^3/sH-ε 397.01 nm 7.599e+17 photons/m^3/sExcitation and recombination
Section titled “Excitation and recombination”In a quasi-static solve each line’s emissivity is . At 2 eV excitation from the ground state makes most of H-α, even with as many protons as atoms:
pec = result.photon_emissivity_coefficients().sel(line="A:3-2")print(pec.to_series())driverH(n=1) 8.831861e-18H+ 4.103634e-20Name: pec, dtype: float64Recombination takes over below about 1.2 eV, where excitation across 12 eV dies out:
data = opencr.scan(model, conditions, electron_temperature=np.geomspace(0.5, 20, 20))halpha = data["pec"].sel(line="A:3-2")with plasma_plots.figure(title="H-α photon emissivity coefficient") as fig: for driver, name in (("H(n=1)", "excitation"), ("H+", "recombination")): halpha.sel(driver=driver).plasma.plot.lineout( ax=fig[0], title="", xlabel="$T_e$ [eV]", label=name ) fig[0].set_xscale("log") fig[0].set_yscale("log") fig[0].set_ylabel("PEC [m$^3$/s]") fig[0].legend()Loading figure…
A line ratio
Section titled “A line ratio”The Balmer decrement H-α/H-β depends on density, which makes it a diagnostic:
densities = np.geomspace(1e16, 1e21, 15)ratio = opencr.scan(model, conditions, effective=False, electron_density=densities)balmer_ratio = ratio["emissivity"].sel(line="A:3-2") / ratio["emissivity"].sel( line="A:4-2")with plasma_plots.figure(title="Balmer decrement at 2 eV") as fig: balmer_ratio.plasma.plot.lineout(ax=fig[0], title="", xlabel="$n_e$ [m$^{-3}$]") fig[0].set_xscale("log") fig[0].set_ylabel("H-α / H-β")Loading figure…
A synthetic spectrum
Section titled “A synthetic spectrum”The lines Doppler broadened at the gas temperature and an instrumental width of 0.2 nm:
spectrum = result.emission_spectrum(np.linspace(360.0, 670.0, 4000), fwhm=0.2, air=True)with plasma_plots.figure(title="Balmer series") as fig: spectrum.plasma.plot.lineout(ax=fig[0], title="") fig[0].set_yscale("log") fig[0].set_ylabel("spectral power [W m$^{-3}$ nm$^{-1}$]") fig[0].set_ylim(spectrum.max() * 1e-5, spectrum.max() * 2)Loading figure…