Cloudy: Open-Source Plasma Simulation Code
- Cloudy is an open-source plasma simulation and spectral synthesis code that models ionization, chemical, and thermal states in astrophysical environments.
- It employs modular databases and collisional-radiative frameworks, enabling high-resolution diagnostics across X-ray, optical, and radio bands.
- The code integrates advanced molecular networks and time-dependent methods to simulate diverse applications from H II regions to planetary nebulae.
Cloudy is an open-source plasma simulation code and spectral synthesis code that self-consistently solves the ionization, chemical, and thermal state of material exposed to an external radiation field or other source of heating, and predicts emission and absorption spectra from the X-ray through the IR and radio. In the 2013 release it was described as applicable over densities – and temperatures from the CMB up to ; later work also characterized it as an open-source, 1D photoionization/PDR code whose recent development has emphasized collisional-radiative modeling, externalized data resources, and X-ray microcalorimeter readiness (1302.44852002.05821Chatzikos et al., 2023).
1. Scope, releases, and architectural trajectory
Cloudy’s stated application domain spans H II regions, planetary nebulae, active galactic nuclei, photodissociation regions, X-ray dissociation regions, molecular clouds, accretion disks, the intergalactic medium, and laboratory plasmas. A major architectural transition occurred by the 2017 release, when atomic, ionic, and molecular level data were exported from the C++ source into external ASCII databases in cloudy/data/, notably [stout](https://www.emergentmind.com/topics/stout), chianti, lamda, h-like, and he-like. This reorganization was designed so that species could be added or updated by editing data files and toggling entries in “masterlist” files, without modifying the core code. The same release reported that, with all databases set to “maximum,” Cloudy predicts more than an order of magnitude more lines than the 2013 release, while default UV/optical line density increased by up to over most of that bandpass. The 2023 release then formalized an annual cadence, enabled by migration from Subversion/Trac to Git/GitLab, so that each snapshot receives a new C YY version number and a short release paper rather than a multi-year major-review cycle. The 2025 release continued this pattern with major extensions to X-ray, atomic, and molecular capabilities (Ferland et al., 2017Chatzikos et al., 2023Gunasekera et al., 1 Aug 2025).
This release history also tracks a shift in Cloudy’s design priorities. Earlier releases emphasized broad physical scope, dusty molecular environments, and solver robustness. Later releases concentrated on database modularity, higher-fidelity atomic structure, and observatory-driven precision requirements, especially for XRISM, Athena, JWST, Roman, the Habitable Worlds Observatory, and NewAthena. This suggests a development model in which Cloudy remains a general plasma code while increasingly exposing instrument-specific controls and higher-resolution microphysics.
2. Physical formulation and numerical machinery
At its core, Cloudy solves coupled equations for ionization balance, chemistry, thermal balance, level populations, and radiative transfer. In the 2013 release, ionization balance for ion stage was written as
while chemical evolution for a neutral or molecular species was expressed schematically as
Thermal equilibrium is imposed by , with heating and cooling assembled from photoionization, recombination, line emission, free–free processes, gas–grain interactions, chemical reactions, cosmic rays, Compton terms, and related channels. Continuum transfer is written as
and line transfer uses an escape-probability formalism with
0
The code iterates over a strongly coupled nonlinear loop involving level populations, ionization, chemistry, grain charge and temperature, energy balance, and radiative transfer until global convergence is achieved (1302.44852002.05821).
Later descriptions sharpened this into a collisional-radiative framework that bridges three regimes: the low-density “two-level” or coronal approximation, intermediate-density full CRM, and high-density LTE via Saha–Boltzmann. For H I at 1, the 2017 release identified characteristic densities of 2 and 3. H- and He-like sequences are treated with many resolved levels plus collapsed levels at high 4, while more complex ions draw on external databases such as CHIANTI and Stout. Time dependence is also available in an experimental mode through
5
so Cloudy is not restricted to strict steady state, although several applications still rely on equilibrium assumptions.
3. Databases, formats, and data-driven accuracy
Cloudy’s predictive fidelity is heavily data-limited, and several papers are explicitly about database modernization. The 2022 CHIANTI interoperability work introduced a Python 3 script, chianti2oldChianti.py, to convert CHIANTI version 10.0.1 into the older version 7.1 format expected by Cloudy. The script traverses .elvlc, .wgfa, and .scups files, rewrites level and radiative data into the fixed-width “Ch7” schema, and transforms .scups collisional data into .splups using interpolation in Burgess–Tully space. During this conversion, numerical values of observed or theoretical energies, gf, and Aij are not changed; only the tabulation format is altered. In the “noai” option, which drops levels above the ionization limit, the resulting database is approximately 6 larger than Ch7 but approximately 7 smaller than full Ch10. When inserted into Cloudy, the updated data yielded notable spectral changes, including [O IV] 25.8863 μm intensity increasing by +47 % in low-density limits, [Ne V] 24.3109 μm decreasing by –44 %, [Ne V] 14.3178 μm decreasing by –52 %, and several Fe XII lines increasing by +0.37–0.43 dex in time-dependent cooling models (Gunasekera et al., 2022).
The 2023 release generalized this database-centered strategy. CHIANTI was upgraded from version 7 to 10; by default, auto-ionizing levels above each species’ ionization limit are omitted to control runtime and memory. H8 energies were updated to Komasa et al. (2016), H–H9 collisional data default to Lique et al. (2015), and the LAMDA-upgraded database now supplies levels, Einstein 0 values, and collision rates for molecules including HF, CF1, HC2N, ArH3, HCl, HCN, CN, CH, CH4, and SiS. The same release reported that, in PDR models, the 5 H6 line strength changes by approximately 7 relative to C17, and that abundance profiles of molecules such as HF and CF8 shift appreciably. By the 2025 release, the in-house Stout database for the carbon isoelectronic sequence had been expanded to 590 fine-structure levels per ion, with special handling for N II, O III, and Fe XXI (Chatzikos et al., 2023Gunasekera et al., 1 Aug 2025).
A recurring implication is that Cloudy’s numerical framework and its physical predictions are inseparable from the curation, precision, and interoperability of external atomic and molecular data.
4. The microcalorimeter era and high-resolution X-ray synthesis
One of the clearest recent themes is Cloudy’s adaptation to microcalorimeter spectroscopy. A 2020 update improved H-like K9 energies for elements with 0 by replacing hydrogenic ionization potentials with NIST values to eight significant figures and adding a fourth-order polynomial correction to the Bohr-scaled level spacing. Pre-correction deviations from NIST ranged from approximately 1 at 2 to approximately 3 at 4; post-correction residuals are 5 for low 6 and at most 7 at 8, corresponding to a precision gain of about 9 at carbon up to about 0 at zinc. A 2021 patch then replaced Si II–XI and S II–XIII fluorescence K1 energies with laboratory measurements from Hell et al. (2016), producing a substantially improved fit to Chandra/HETG spectra of Vela X-1, with the fit statistic changing from 2 to 3 for 4 degrees of freedom (Chakraborty et al., 2020Camilloni et al., 2021).
The 2024 one-electron extension carried this further by resolving hydrogenic Lyman lines into 5-resolved fine-structure components. For XRISM, the relevant resolving power was stated as 6, with the mission delivering roughly 7–8 depending on energy. Cloudy was extended so that the H-like Lyman series is split into 9 populations at run time, using level energies computed from a Dirac baseline with Lamb-shift and recoil corrections, benchmarked against NIST to 0. In synthetic spectra at 1 resolution, Fe XXVI Ly2 and Ly3 are split by approximately 4, and Ca XX Ly5 by approximately 6. The 2025 release formalized user access through the command Database H-like Lyman extra resolution R, whose default threshold is R=0.25 eV, and also introduced Blnd 11, a built-in blend containing all lines with energies in the range 7–8 (Gunasekera et al., 2024Gunasekera et al., 1 Aug 2025).
These X-ray upgrades also created new diagnostics. In the resolved-doublet formalism, the optically thin limit gives
9
while increasing optical depth drives the ratio toward unity. A related Ly0/Ly1 ratio declines sharply around 2–3. In XRISM observations of Cen X-3, a measured ratio
4
was mapped, through Cloudy models, to 5 (Gunasekera et al., 2024). This suggests that Cloudy’s recent X-ray development is not merely a refinement of line lists but a shift toward column-density, turbulence, and pumping diagnostics that were inaccessible when the Lyman series was treated as unresolved blends.
5. Molecular networks, non-LTE line formation, and chemistry extensions
Cloudy’s molecular capabilities have also expanded substantially. The SiS update integrated 32 formation and 10 destruction reactions for neutral SiS from RATE12, plus four additional constant-rate reactions from Zanchet et al. (2018). The ground electronic state 6 is represented with rotational levels 7, with term energies
8
where 9 and 0. Cloudy now includes de-excitation rates for collisions with H1, H, and He, combined through
2
In the standard h2_orion_hii_pdr.in H II-to-PDR model, this yielded a predicted SiS column density 3, with several rotational transitions lying in ALMA bands and peak surface brightnesses of order 4–5 (Shaw et al., 2023).
The 2023 and 2025 releases broadened this approach from individual molecules to network-level chemistry. The 2023 release noted that gas-phase reaction rates are drawn from UDfA (RATE12) and KiDA and are capped at high temperature to avoid unphysical runaway rates. The 2025 release then added 21 Si-bearing species, 229 Ti-related reactions, and 14 phosphorus-containing species. It reported energy levels and collisional data for SiS, SiO, and SiC6 from LAMDA; 230 fine-structure levels, 223 radiative transitions, and 444 collisions with ortho- and para-H7 for TiO; and molecular lines predicted for PN, PO8, and PH9. That release also stated that only 47 of 191 Cloudy molecules currently have internal levels and predicted lines, and explicitly identified full internal structure and non-LTE treatment for all species as a future target (Chatzikos et al., 2023Gunasekera et al., 1 Aug 2025).
A common misconception is that Cloudy’s molecular component is secondary to its ionized-gas machinery. The recent SiS, TiO, and P-bearing work suggests otherwise: molecular chemistry, collisional rates, and line transfer are now integral to Cloudy’s use in cool-star, PDR, circumstellar, and exoplanet-atmosphere contexts.
6. Interfaces, representative applications, and known limitations
Cloudy is frequently embedded in larger workflows. The PLUTO–Cloudy Interface (TPCI) couples PLUTO’s HD/MHD update to Cloudy’s equilibrium microphysics through an operator-split iteration: PLUTO advances the hydrodynamics, Cloudy then computes mean molecular weight, net heating rate, and optionally radiative acceleration along a 1D slice, and PLUTO updates the pressure through
0
Validation problems included a weak D-type ionization front, a coronal shock, Strömgren-sphere formation, and the evaporating atmosphere of HD 209458 b. In the hot-Jupiter test, the steady transonic wind reached a sonic point near 1 and a mass-loss rate 2, in very good agreement with the comparison model. The same study also identified a clear limitation: because TPCI assumes equilibrium at each step, R-type ionization fronts faster than microphysical times are not treated correctly (Salz et al., 2015).
Specific Cloudy applications illustrate both capability and constraint. In modeling the circumstellar gas around the white dwarf Gaia J061136931, the gas was represented as a 1D “cylinder” with a blackbody source of 4 and 5, radial extent from 6 to 7, and a constant hydrogen density of 8. Most emission lines were found to be saturated, with line ratios approaching the thermal limit, so only lower limits could be derived: the tightest density bound came from Si I 9, yielding 0, and the total gas mass was bounded below by 1. The same work explicitly noted limitations arising from radial-only transfer, constant density, assumed scale height, assumed edge-on geometry, and use of a blackbody rather than a TLUSTY atmosphere (Xu et al., 2024).
Cloudy has also been used to test astrophysical hypotheses. In models of close-in transiting exoplanets, 1D coronal-equilibrium slabs with 2 and 3–4 produced UV–optical optical depths of only 5 and transit depths 6, implying that shocked stellar-wind gas is too highly ionized to explain the observed 7 UV transit depths. By contrast, thermal-equilibrium slabs of planetary gas with 8 and 9 gave equilibrium temperatures from approximately 00 to approximately 01 and predicted strong opacity in X-rays, Ly02, C II, Si III, Mg II, Mg I, Ca II, He I 03, and stacked radio/sub-mm bands (Turner et al., 2016).
The time-dependent mode provides a further extension beyond equilibrium use. In a recombining planetary-nebula test, with a 04 H-burner central-star track, gas density 05, and graphite dust, the electron temperature fell from approximately 06 to below 07 in 08, while hydrogen remained approximately 09 ionized at 10 (Hoof et al., 2020). The roadmap described in the 2025 release includes extending the C-like Stout framework to additional isoelectronic sequences, improving continuum-lowering theory for 11, linking gas-phase depletion to dust-phase abundances, and providing observatory-specific initialization files such as JWST.ini, Roman.ini, and HWO.ini (Gunasekera et al., 1 Aug 2025). Taken together, these examples show Cloudy as a mature but still explicitly evolving framework: highly general, heavily data-driven, and increasingly specialized where current instruments demand laboratory-level precision.