CLOUDY: Photoionization Code for Plasmas
- CLOUDY is a comprehensive open-source photoionization code that models astrophysical plasmas using a modular architecture and extensive atomic, ionic, and molecular data.
- It employs advanced methods including collisional-radiative models, detailed radiative transfer, and time-dependent non-LTE solutions to simulate diverse physical regimes.
- Recent enhancements such as refined Lyman-α splitting, updated inner-shell line predictions, and expanded molecular networks strengthen its multiwavelength diagnostic capabilities.
The photoionization code CLOUDY is a widely used open-source spectral synthesis tool for modeling the physical and chemical properties of astrophysical plasmas under a variety of excitation mechanisms, including irradiation by stellar, AGN, or laboratory sources. CLOUDY self-consistently solves for the ionization state, thermal balance, atomic/molecular level populations, and emitted spectrum of gas and dust over an extensive range of densities, temperatures, radiation fields, and geometries. It is distinguished by its comprehensive atomic, ionic, and molecular databases, sophisticated radiative transfer solvers, flexible scripting interface, and ongoing integration of state-of-the-art microphysics.
1. Architecture and Microphysical Modules
CLOUDY employs a modular architecture characterized by the separation of codes and atomic/molecular data. All major atomic and molecular data sets—including H- and He-like iso-electronic sequences, the Stout, CHIANTI, and LAMDA databases for atoms, ions, and molecules—are maintained in external files with masterlists controlling their inclusion and granularity (Ferland et al., 2017). This design allows rapid updates and expansion, as seen in the recent augmentation of the C-like iso-sequence to 590 levels per ion and systematic incorporation of high-reliability level energies, transition probabilities, and collision strengths (Gunasekera et al., 1 Aug 2025). Species, level truncation, and collision data can be adjusted with run-time commands (e.g., database stout levels maximum). Among the key physics modules are:
- Collisional-Radiative Models (CRM): Employed for H- and He-like ions, now extended to most complex ions. CRM rate equations are solved either in steady-state () or time-dependent form for all relevant level populations , including all pertinent spontaneous, collisional, and photo processes (Hoof et al., 2020).
- Photoionization and Recombination: Solved zone-by-zone for arbitrary SEDs, using two-level or multi-level approximations as indicated by density and ion complexity (Ferland et al., 2017).
- Radiative Transfer: Escape-probability formalism is used for optically thick lines, now extended to resolve Ly fine-structure components for X-ray observation compatibility (Gunasekera et al., 1 Aug 2025).
- Grain and Molecule Physics: Detailed models for mixed grain types (graphite, silicate, ISM/SMC/LMC) and, increasingly, for an extended molecular network relevant to exoplanet atmospheres and circumstellar environments.
- Time-Dependent and Non-LTE Solutions: Enables the modeling of dynamically evolving or non-equilibrium scenarios, such as recombining planetary nebulae or laboratory laser-driven plasmas (Hoof et al., 2020, Rathee et al., 18 Nov 2025).
The code is optimized for high-performance computing, including SIMD vectorization, multi-core parallelism, and efficient memory access (Hoof et al., 2020).
2. Physical Regimes and Processes Modeled
CLOUDY can model a diversity of astrophysical and laboratory environments, from HII regions in low-metallicity dwarfs to AGN narrow-line regions, planetary nebulae, novae, starburst-driven nebulae, and strongly irradiated laboratory plasmas (Newman et al., 6 Jan 2025, Devereux, 2015, Rathee et al., 18 Nov 2025, Woodward et al., 18 Apr 2024, Polles et al., 2018). The relevant physical regimes include:
- Density Regimes: Ranging from coronal ( cm), through the CRM regime (up to cm), up to LTE/Saha domains at extreme densities.
- Radiation Fields: Arbitrary SEDs (stellar, AGN, composite, or experiment-derived) can be specified and are critical for configuration of ionization and temperature structures.
- Chemical Complexity: The code supports a full suite of elements, isotopes, and molecules, with depletion and dust treatment following, e.g., Jenkins (2009).
- Geometry: 1D slab, spherical, cylindrical (truncated-sphere), and multi-component arrangements—including two-zone and covering-factor schemes for asymmetric or clumpy sources (Pandey et al., 2022, Woodward et al., 18 Apr 2024).
- Gas Dynamics and External Forces: Self-gravity and external potentials can be modeled via the hydrostatic equilibrium extension, incorporating non-thermal supports like B-fields and cosmic rays (Ascasibar et al., 2010).
The photoionization parameter or ionizing photon flux is central in setting model scaling, with all key ion fractions, level populations, and electron temperatures determined self-consistently.
3. Configuration, Input Parameters, and Scripting
CLOUDY employs a robust command syntax and can be fully controlled via input scripts or modern Python interfaces (e.g., pyCloudy) (Aksaker et al., 20 Oct 2025). The typical input parameters include:
- Radiation Source: Defined by SED tables or analytic forms (
table AGN,blackbody,table SED starburst ...etc.). - Density and Geometry: Set by
hden,radius, and geometry commands (e.g.,sphere,cylinder) as well as power-law or constant profiles for both density and filling factor (Pandey et al., 2022, Woodward et al., 18 Apr 2024). - Chemical Abundances: Solar, ISM, or user-overridden for specific elements; can be scaled, depleted, or set per observed ratios.
- Dust/Grain Parameters: Activated via
grainscommands with selectable properties. - Stopping Criteria: User-specified in terms of temperature, column density, electron density, or shell thickness.
- Iterative Convergence and Grids: Full n-dimensional parameter grids are supported; batch operation is efficient and fully parallel (Polles et al., 2018, Aksaker et al., 20 Oct 2025).
- Specialized Physics:
constant pressure,gravity, or chemistry network activators allow inclusion of hydrostatic, gravitational, or detailed molecule formation effects.
Example input scripts are provided for all major regimes: BLR and NLR AGN, nova ejecta, low-Z HII regions, PN shells, and laboratory slab targets (Ferland et al., 2017, Polles et al., 2018, Rathee et al., 18 Nov 2025).
4. Model Outputs, Diagnostics, and Line Predictions
CLOUDY returns a rich set of outputs, including:
- Ionization and Level Populations: For every zone, key ionic fractions, level populations, and molecular abundances.
- Thermal Structures: Electron temperature, pressure, and energy transfer terms.
- Predicted Emission-Line Spectra: Line intensities (absolute and relative to diagnostic lines, e.g., H), covering UV to far-IR and X-ray bands—including, from v25, fine-structure resolved Ly, updated K/K, and new blends for features like the 1 keV bump (Gunasekera et al., 1 Aug 2025).
- Continuum Components: Calculated for transmitted, nebular, and total outputs, facilitating generation of realistic SEDs for synthesis and comparison to observations (Newman et al., 6 Jan 2025).
- Efficiency and Convergence Metrics: Inform on numerical accuracy, iteration counts, and convergence flags.
Model results are directly compared to observed line ratios, absolute fluxes, and continua, with quantitative fits via minimization over spectral, photometric, and morphometric observables (Aksaker et al., 20 Oct 2025, Pandey et al., 2022, Woodward et al., 18 Apr 2024).
5. Capabilities, Limitations, and Inter-Code Comparisons
Direct code-to-code comparisons have shown that, when configured with identical SEDs, geometry, abundances, and atomic data, CLOUDY v17 and later tracks MAPPINGS V at ≲0.1 dex in all major optical diagnostics ([N II]/H, [O I]/H, [O III]/H), although [S II] predictions may differ by 0.1–0.3 dex due to differing atomic data (Zhu et al., 2023). This supports the suitability of CLOUDY for AGN NLR, BLR, and HII region modeling provided internal inputs are controlled. Some limitations persist:
- Forbidden Lines With Dust: Emergent forbidden-line predictions can be unreliable when dust radiative transfer is activated due to coupling bugs (Devereux, 2015).
- UV and X-ray Modeling: Ly fine structure and inner-shell line predictions are only accurate in releases from 2025 onward (Gunasekera et al., 1 Aug 2025).
- High-Density and Non-LTE Regimes: Full CRM and dense-matter effects are only recently implemented, and continuum lowering in dense plasma remains uncertain up to 20–30% (Rathee et al., 18 Nov 2025).
- Grain/Molecule Treatment: Grain heating, destruction probabilities, and comprehensive chemistry for exoplanet atmospheres are under ongoing expansion (Gunasekera et al., 1 Aug 2025).
Nevertheless, continuous code validation against laboratory data, direct comparison to other photoionization codes, and cross-matching with direct observations and spectroscopic databases underpin the code’s reliability.
6. Recent Enhancements and Development Trajectory
The 2025 release (C25.00) introduces major advances:
- Lyman- Fine-Structure Splitting: -resolved doublet treatment, enabling accurate modeling at microcalorimeter spectral resolution for XRISM and NewAthena (Gunasekera et al., 1 Aug 2025).
- Inner-Shell Line Updates: Complete overhaul of K/K energies and implementation of standard line blends for X-ray spectral analysis.
- Molecular Network Extensions: Inclusion of 20 new Si-bearing molecules, 66 TiO lines, and multiple P-bearing species, advancing capabilities for JWST, ALMA, and exoplanet studies.
- Database and Performance Scaling: C-like iso-sequence now at 590 levels, with per-species granularity; OpenMP and vectorization deliver further grid-scaling (Ferland et al., 2017, Gunasekera et al., 1 Aug 2025).
- Planned Features: -resolved models for more iso-sequences, grain-gas phase coupling via Jenkins , and integration with GRMHD flows for on-the-fly emission calculation.
A direct implication is that CLOUDY’s fidelity and coverage in UV, optical, IR, and X-ray diagnostics is undergoing rapid enhancement, with targeted support for new generations of observatories and spectroscopic datasets.
7. Applications and Scientific Impact
CLOUDY is integral to a wide array of astrophysical research:
- AGN and Starburst Modeling: Delineation of NLR, BLR, and HII-region diagnostics over a wide metallicity, ionization parameter, and density range (Zhu et al., 2023, Moloney et al., 2014).
- Transient Phenomena: Modeling of novae, PNe, and laboratory photoionized plasmas (e.g. predicting elemental yields, nebular ages, and transient spectral evolution) (Pandey et al., 2022, Rathee et al., 18 Nov 2025).
- Galaxy Evolution: Synthesis of nebular and continuum SEDs for high- galaxy population models, comparison with JWST and SDSS diagnostics, and integration within SPS frameworks (Newman et al., 6 Jan 2025).
- Exoplanet Atmospheres and ISM Chemistry: Anticipated expansion of complex molecule modeling and grain composition to meet the needs of exoplanet atmospheric retrievals (Gunasekera et al., 1 Aug 2025).
- Fundamental Plasma Physics: Benchmarking against laboratory experiments to validate atomic rate data, radiative transfer, and non-equilibrium plasma behavior under extreme irradiation (Rathee et al., 18 Nov 2025).
The code’s extensibility, accuracy, and detailed documentation position it as a reference platform for next-generation multiwavelength spectral modeling.
In summary, CLOUDY is a mature, actively-developed, physically comprehensive photoionization and plasma code, supporting both steady-state and dynamic simulations across the cosmic range from stellar winds to AGN to laboratory plasmas. Its ongoing evolution is shaped by both the pace of atomic/molecular data refinement and emerging observational frontiers (Gunasekera et al., 1 Aug 2025, Hoof et al., 2020, Ferland et al., 2017, Zhu et al., 2023, Polles et al., 2018, Woodward et al., 18 Apr 2024, Pandey et al., 2022).