Skip to content
Projects
Release 0.1.0

OpenCR

Collisional-radiative models with traceable data — populations, effective rates, emission and spectra of low-temperature plasmas, starting with atomic hydrogen.
import opencr
model = opencr.load_model("hydrogen/atomic/basic")
conditions = opencr.Conditions(
electron_temperature=2.0, # eV
electron_density=1e18, # m^-3
densities={"H(n=1)": 1e19, "H+": 1e18}, # the drivers, m^-3
)
result = model.solve_steady_state(conditions)
result.populations["H(n=3)"] # m^-3
result.emission().sel(line="A:3-2") # H-alpha
result.reduction.effective_rate("H(n=1)", "H+") # S_CR in m^3/s
  • Explicit physics. States, reactions and rate models are plain Python objects, independent of the numerics. Every model lists its states, reactions, sources and assumptions in a manifest.
  • Traceable data. Every reaction carries its reference, units, conversions, validity, uncertainty and licence. Cross sections come from plasmacoll; third-party data are never bundled.
  • Three solves. Quasi-static excited states with effective rate and photon emissivity coefficients, closed steady states (ionization balance, quasi-neutral), and population coefficients.
  • Verified. Saha–Boltzmann and coronal limits, detailed balance with any energy distribution, and effective coefficients within 10% of ADAS in the core of its range.