Hazy 1
Hazy 1
Software: Copyright © 1978-2023 Gary J. Ferland and others. All rights reserved.
The software described in this documentation (C LOUDY) is subject to a FreeBSD-style software license
contained in the file license.txt in the root directory of the distributed files. The list of co-authors is
given in the file others.txt in the same directory. Use of this program is not restricted provided each
use is acknowledged upon publication. The bibliographic reference to this version of C LOUDY is “version
xx.xx of the code last described Clo.” The version number, shown here as “xx.xx”, should be given. This
version number, along with a complete citation, can be found by executing the code with the print citation
command included in the input script.
C LOUDY is an evolving code. You should confirm that you have the most recent version of the code by
checking the web site www.nublado.org. The code has a discussion board with emailing list. This will have
announcements of any updates to the code.
Portions of the documentation have been published, and are copyrighted by, the American Astronomical
Society, the Astronomical Society of the Pacific, and the Royal Astronomical Society. The remainder of the
documentation is subject to the following FreeBSD format documentation license:
Documentation: Copyright © 1978–2023 Gary J. Ferland and others. All rights reserved.
Redistribution and use of the documentation (all parts of H AZY and the Quick Start Guide) in source
(LATEX) and ‘compiled’ forms (PDF, PostScript, HTML and so forth) with or without modification, are
permitted provided that the following conditions are met:
1. Redistributions of source code (LATEX) must retain the above copyright notice, this list of conditions
and the following disclaimer as the first lines of the file license doc.txt in the root directory
unmodified.
2. Redistributions in compiled form (converted to PDF, PostScript, XML, HTML and other formats)
must reproduce the above copyright notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
This documentation is provided by the C LOUDY project “as is” and any express or implied warranties,
including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose
are disclaimed. In no event shall the C LOUDY project be liable for any direct, indirect, incidental, special,
exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or
services; loss of use, data, or profits; or business interruption) however caused and on any theory of
liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way
out of the use of this documentation, even if advised of the possibility of such damage.
Cover image: The dawn of a new day, representing Cloudy’s migration between development platforms and
new development plans. Photo by Federico Respini on Unsplash.
CONTENTS
1 INTRODUCTION 1
1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 What must be specified . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2.1 Incident radiation field . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2.2 Chemical Composition . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2.3 Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.4 Velocity Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 The input deck . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 What is computed and reported . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 DEFINITIONS 7
2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 Radiation fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2.1 Incident radiation field . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2.2 Diffuse radiation field . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2.3 Transmitted radiation field . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2.4 Reflected radiation field . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3 Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3.1 Illuminated and shielded faces of the cloud . . . . . . . . . . . . . . . 10
2.3.2 Depth and radius . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.3.3 Covering factor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.3.4 Open vs. closed geometry . . . . . . . . . . . . . . . . . . . . . . . . 10
2.3.5 Filling factor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.3.6 Hydrogen density . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.3.7 Column densities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.3.8 Matter-bounded and radiation-bounded geometries . . . . . . . . . . . 13
2.4 Intensity & luminosity cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.4.1 Luminosity case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.4.2 Intensity case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.4.3 The units of the predicted emission lines . . . . . . . . . . . . . . . . 14
2.5 “Species”, how we specify atoms, ions, molecules, and their spectra . . . . . . . 14
iii
iv CONTENTS
2.5.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.5.2 How we specify species and spectra . . . . . . . . . . . . . . . . . . . 15
2.5.3 How we specify spectral lines . . . . . . . . . . . . . . . . . . . . . . 16
2.5.4 What species are you using? . . . . . . . . . . . . . . . . . . . . . . . 17
2.6 Air vs vacuum wavelengths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3 INTRODUCTION TO COMMANDS 19
3.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.2 Command format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.2.1 Input and Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.2.2 Command-line format. . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.2.3 Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.2.4 Number of commands. . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.2.5 Output as input. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.2.6 Syntax used in this document . . . . . . . . . . . . . . . . . . . . . . 21
3.2.7 and, because nobody ever reads this document. . . . . . . . . . . . . . . 22
3.2.8 The continue option . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.2.9 Numerical input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.2.10 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.2.11 Hidden commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.2.12 Commands for experimental parts of the code . . . . . . . . . . . . 24
3.2.13 Log vs linear quantities . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.2.14 The help command . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.2.15 An example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.3 Reading and Writing Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.4 The Search Path for Input Files . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.5 The init command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.6 Random numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
7 CHEMICAL COMPOSITION 67
7.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
7.2 Absolute abundances and scale factors . . . . . . . . . . . . . . . . . . . . . . 67
7.3 Precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
7.4 Abundances he c. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
7.4.1 Arbitrary abundances . . . . . . . . . . . . . . . . . . . . . . . . . . 70
7.4.2 Setting all at once . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
7.4.3 Abundance “filename.abn” – using tables of abundances . . . . . . . . 70
7.4.4 Older solar abundances . . . . . . . . . . . . . . . . . . . . . . . . . 72
7.4.5 Grains, gas-phase depletions, and quantum heating . . . . . . . . . . . 72
7.4.6 Interactions between the abundances and grains commands . . . . . . 75
7.5 Abundances starburst, Z=10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
7.6 Abundances isotopes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
7.7 Element name [scale, abundance, isotopes, off, log, table] . . . . . . . . . . . . . 77
7.7.1 Element name scale . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
7.7.2 Element name abundance . . . . . . . . . . . . . . . . . . . . . . . . 77
7.7.3 Element name isotopes . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Setting the D/H ratio . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Setting the 12C/13C ratio . . . . . . . . . . . . . . . . . . . . . . . . 78
7.7.4 Element isotopes all . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
7.7.5 Element name ionization . . . . . . . . . . . . . . . . . . . . . . . . 78
7.7.6 Element name off . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
7.7.7 Element limit off -12 . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
7.7.8 Element name table . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
7.8 Fluctuations abundances, period, max, min, phase . . . . . . . . . . . . . . . . . 80
7.9 Grains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
7.9.1 Using the built-in grain types . . . . . . . . . . . . . . . . . . . . . . 82
CONTENTS vii
8 DENSITY LAWS 97
8.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
8.2 Constant density, pressure, gas pressure . . . . . . . . . . . . . . . . . . . . . . 97
8.2.1 Constant density . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
8.2.2 Constant gas pressure [index = −1.1] . . . . . . . . . . . . . . . . . . 98
8.2.3 Constant pressure [no continuum, no abort] . . . . . . . . . . . . . . . 98
8.2.4 Constant pressure set 6.5 . . . . . . . . . . . . . . . . . . . . . . . . . 99
8.2.5 Constant pressure timescale = 2.3e9 s, alpha=-1 . . . . . . . . . . . . 99
8.2.6 The reset option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
8.3 Gravity [options] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
8.3.1 Gravity [spherical, plane-parallel] . . . . . . . . . . . . . . . . . . . 99
8.3.2 Gravity external [Mass = 10 M⊙ , extent = 3 parsecs, powerlaw = -2] . 100
8.4 Dark [options] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
8.4.1 Dark NFW virial radius = 18 [characteristic radius = 17] . . . . . . . . 100
8.5 Dlaw [options] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
8.5.1 dlaw p1, p2, p3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
8.5.2 Dlaw wind . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
8.5.3 Dlaw table [depth, radius] . . . . . . . . . . . . . . . . . . . . . . . . 102
8.6 Fluctuations density period . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
8.7 Globule [density =2, depth =16, power =2] . . . . . . . . . . . . . . . . . . . . . 103
8.8 hden 5.6, [proportional to R -2,. . . ] . . . . . . . . . . . . . . . . . . . . . . . . . 103
8.8.1 Power-law dependence on radius . . . . . . . . . . . . . . . . . . . . 103
8.8.2 Clouds extending to infinity . . . . . . . . . . . . . . . . . . . . . . . 104
8.8.3 Power-law dependence on depth . . . . . . . . . . . . . . . . . . . . . 104
8.8.4 Power-law dependence on column density . . . . . . . . . . . . . . . 104
viii CONTENTS
9 GEOMETRY 107
9.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
9.2 Age 44 years [off] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
9.3 Aperture commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
9.3.1 Aperture [slit, beam] . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
9.3.2 Aperture size 2.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
9.3.3 Aperture covering factor 0.6 . . . . . . . . . . . . . . . . . . . . . . . 109
9.4 Clumping factor = 0.05 [index =-1] . . . . . . . . . . . . . . . . . . . . . . . . 109
9.5 Covering factor 0.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
9.6 Cylinder log semi height =9.12 . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
9.7 Distance 3.2 linear parsecs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
9.8 Filling factor = 0.05 [index =-1] . . . . . . . . . . . . . . . . . . . . . . . . . . 111
9.9 Illumination angle 45 deg [radians] . . . . . . . . . . . . . . . . . . . . . . . . . 112
9.10 Radius r(inner) [r(outer), thickness; parsec; linear] . . . . . . . . . . . . . . . . 112
9.11 Sphere [options] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
9.11.1 Sphere expanding or static . . . . . . . . . . . . . . . . . . . . . . . . 113
9.12 Stop depth. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
9.13 Stop thickness. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
REFERENCES 327
LIST OF FIGURES
xxv
xxvi LIST OF FIGURES
LIST OF TABLES
16.1 Other quantities which can be added as columns in save species. . . . . . . . . . . 233
16.2 Trace convergence keywords and routines . . . . . . . . . . . . . . . . . . . . . . 239
16.3 Trace Keywords and Effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
17.1 Commands with vary option. Entries “var” are explained in Section 17.10. . . . . . 245
17.2 Optimizer results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
A.1 The definition of each of the material types hardwired into Cloudy. . . . . . . . . . 313
A.2 The various choices for the enthalpy function hardwired in Cloudy. . . . . . . . . . 314
A.3 The various choices for the minimum charge hardwired in Cloudy. . . . . . . . . . 314
A.4 The various expressions for the electron affinity hardwired in Cloudy. . . . . . . . 314
A.5 The various choices for the inverse attenuation length. . . . . . . . . . . . . . . . . 314
A.6 The various expressions for the photoelectric yield hardwired in Cloudy. . . . . . . 314
A.7 The various choices for splitting up the grain emissions. . . . . . . . . . . . . . . . 314
xxvii
xxviii LIST OF TABLES
A.8 The expressions for the ro-vibrational distribution of H2 formed on various grain
surfaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
A.9 Example of a mixed medium file for fluffy silicate. . . . . . . . . . . . . . . . . . 316
A.10 Allowed choices for the mixing law. . . . . . . . . . . . . . . . . . . . . . . . . . 317
B.1 Example of an ascii file, derived from the kwerner.ascii file. . . . . . . . . . . . . . 323
INTRODUCTION
1.1 Overview
C LOUDY is a microphysics code. It is designed to simulate physical conditions within clouds
ranging from the intergalactic medium to the high-density LTE and STE limits. The range of
temperatures extends from the CMB temperature up to 1.001 × 1010 K and the physical state
ranges between fully molecular to bare nuclei. It predicts the thermal, ionization, and chemical
structure of a cloud which lies with these limits, and predicts its observed spectrum.
This document describes the input, output, and assumptions for the code. It fully defines the
commands used to drive the program. Part 2 gives details about the program structure, its output,
the computational environment, and how to call C LOUDY as a sub-program of other programs.
The methods, approximations, and assumptions used by C LOUDY are outlined in Part 3 of this
document, although this part, like C LOUDY itself, is still under construction. The Quick Start
Guide summarizes these three volumes and gives a general overview of the simulations.
Many environments are encountered in which dilute gas is heated and ionized by the radiation
field striking the gas. Under these circumstances it is possible to predict the physical conditions
(that is, the distribution of ionization, density, and temperature) across the cloud, and its resulting
spectrum, in a unique and self-consistent manner. This is done by simultaneously solving the
equations of statistical and thermal equilibrium, equations that balance ionization-neutralization
processes, and heating-cooling processes, respectively. The graduate text Osterbrock and Ferland
(2006, hereafter AGN3) describe the physics governing such environments and Ferland (2003)
provides additional details on current research topics.
The instructions for downloading and setting up the code are on the web site www.nublado.org.
We maintain a discussion board at cloudyastrophysics.groups.io where questions can be posted.
1
2 CHAPTER 1. INTRODUCTION
C LOUDY. These result from the specification of only a) the shape and intensity of the external
radiation field striking a cloud, b) the chemical composition and grain content of the gas, and c)
the geometry of the gas, including its radial extent and the dependence of density on radius. The
following subsections describe the general philosophy of the specification of each.
Shape of the external radiation field The shape of the spectral energy distribution (SED) should
be fully specified between a frequency of 10 MHz (λ ≈ 29.98 m – this is the lowest
frequency observable with LOFAR) and an energy of 7.354 × 106 Ryd (hν = 100 MeV) if
possible.2 A physically-motivated radiation field spanning the full energy range should be
specified if possible. This can be specified as a fundamental form (such as blackbody
emission, optically thin bremsstrahlung emission, or a power law with optional exponential
cutoff), interpolated from tables of points, or as the radiation field transmitted through a
cloud and predicted by previous calculations. Additionally, a set of built-in radiation fields
(for instance, emission from many model atmospheres, the observed Crab Nebula spectral
energy distribution (SED), or several typical AGN SEDs) can be specified as look-up tables.
Intensity or luminosity of the external radiation field The intensity of the external radiation
field striking the cloud must be specified. This can be given either as the flux striking a unit
surface area of cloud or as luminosity radiated by the central object into 4π sr. The code
must be able to derive the flux of photons (cm−2 s−1 ) striking the illuminated face of the
cloud. There are many commands that set these. Two cases, the intensity and luminosity
cases, can be used to set the strength of the radiation field. These are described in the next
Chapter.
Combining several radiation fields Up to 100 different radiation fields can be included as part
of the total field striking the cloud. There must be exactly the same number of shape and
luminosity specifications. The code will stop if there are not.
go to the fully molecular limit (H in H2 and C or O in CO). Although the default composition is
solar several other standard mixtures can easily be specified and an arbitrary composition can be
entered.
1.2.3 Geometry
The geometry is always 1D spherical but can be made effectively plane parallel by making the
inner radius much larger than the thickness of the cloud. The default is for the gas to have constant
density and to fully fill its volume Other pressure laws and strongly clumped clouds can be
computed as well.
C LOUDY normally assumes an open geometry, or one in which the gas has a very small
covering factor (these terms are defined in the following chapter and in section 5.9 of AGN3).
This can be changed with the sphere (see section 9.11) command which sets the covering factor to
a large enough value for light escaping the cloud in the direction towards the central object to
always interact gas on the other side. This is a closed geometry. Line photons which cross the
central hole interact with line-absorbing gas on the far side if sphere static is set but do not
interact (because of a Doppler shift due to expansion) if sphere expanding is set. This case is the
default when sphere is specified.
Suppose that the code has been compiled to create the executable cloudy.exe. Then, the model
described by the parameters in this input file could be computed by typing the following at the
command prompt:
cloudy.exe -r simple
Note that on many Linux systems the command will have to be written as
./cloudy.exe -r simple
for system security. The file simple.in will be read for input and the output will be in the file
simple.out.
The www.nublado.org web site has many more details about running this version of C LOUDY in
the page RunCode.
It is also possible for a larger program to drive C LOUDY directly by treating it as a subroutine.
See RunCode for more details.
identifying label and wavelength for each spectral line. The third column is the log of the
luminosity [erg s−1 ] or intensity [erg cm−2 s−1 ] of the emission line, and the last column gives its
intensity relative to the reference line. The reference line is Hβ by default and other emission lines
can be chosen with the normalize command. The third column will be either the luminosity or
intensity. The luminosity (energy radiated by a shell of gas covering Ω sr of the central object) is
predicted if the incident radiation field is specified as a luminosity. The line intensity 4πJ (the
energy emitted per square centimeter of the gas slab) is predicted if the incident radiation field is
specified as an intensity. If the geometry is spherical but the incident radiation field is specified as
an intensity then the line intensities will be expressed per unit area at the inner radius. Only the
strongest emission lines are printed; the relative intensity of the weakest line to print is adjusted
with the print faint command.
The last pages of the output gives some averages of the ionization fractions over the slab, the
optical depths in various lines and continua, and other properties of the nebula.
There is a vast amount of information that is computed but not given in the standard output file.
Special output files are created with the save commands described below.
6 CHAPTER 1. INTRODUCTION
Chapter 2
DEFINITIONS
2.1 Overview
This section defines many of the quantities used by C LOUDY. I try to follow standard notation,
such as that used by Mihalas (1978) or AGN3. Other parts of this document goes into many of
these quantities in greater detail.
This document has the following typographic conventions; filename, variable, command,
jargon, experimental commands, variable name, and routine name.
7
8 CHAPTER 2. DEFINITIONS
Reflected
Diffuse
illuminated face
shielded face
Incident Transmitted
Figure 2.1: Several of the radiation fields that enter in the calculations.
field usually dominates the local intensity. As a result the diffuse fields can be treated by lower
order approximations in a photoionized cloud than in a stellar atmosphere.
2.3 Geometry
In the simplest case the geometry is spherical, or plane parallel if the inner radius is much larger
than the thickness of the cloud. The summary at the end of the calculation will say whether the
2.3. GEOMETRY 9
Figure 2.2: This incident (dashed) and reflected (solid) radiation fields, as computed by
agn blr albedo.in in the test suite.
10 CHAPTER 2. DEFINITIONS
geometry was plane parallel (the ratio of the thickness to the inner radius, ∆r/ro < 0.1), a thick
shell (∆r/ro < 3), or spherical (∆r/ro ≥ 3).
Complex geometries are done by using Cloudy to compute volume elements within a much
larger cloud. An example is the Cloudy 3D code, available from sites.google.com/site/cloudy3d
and described in Morisset (2006) and Morisset and Stasinska (2008). Cloudy 3D was used to
compute the images shown on the cover and in Figure 2.3. The RAINY3D code is another
example (Moraes and Diaz, 2009).
Open geometry. An open geometry is one in which the covering factor of the gas is small. All
radiation that escapes from the illuminated face of the cloud, towards the source of
continuous radiation, then escapes from the system without further interaction with gas.
This is thought to be the case in, for example, the broad-line region of active nuclei or a
blister H II region. In this case Lβ and higher hydrogen Lyman lines and ionizing radiation
2.3. GEOMETRY 11
Cloudy_3D
I(λ) / I(Hβ)
Through the slit
HeI 0.160
HeII 0.006
[NII] 0.355
[OII] 0.663
[OIII] 5.913
PV Diagrams
Line Profiles
http://sites.google.com/site/cloudy3d/
Image by: Nahiely Flores, Jonnathan Reyes, Juan Venancio Hernández & Christophe Morisset
Figure 2.3: A 3-color image of a Hourglass-type nebula, obtained by running Cloudy 3D. Colors
are [N II] (orange) and [O III] (green) emission. Emission line profiles are shown for [N II] lines.
Intensities through any given slit can be obtained. Position-velocity diagrams are obtained as well
as channel maps, for any line. Emission line surface brightness maps are also available for any line
computed by C LOUDY. Statistical tools to analyze emission line properties are also provided.
12 CHAPTER 2. DEFINITIONS
Inner Radius r 0
Outer Radius
Depth ∆r
Figure 2.4: This figure shows the two limiting cases that can be assumed. The star is the source of
ionizing radiation and the shaded area represents the cloud. An open geometry is the default, and a
closed geometry will be computed if the sphere command (see section 9.11) is entered.
produced by recombinations can escape from the nebula. This geometry is the default and
will be assumed if the sphere command is not specified.
Closed geometry. Emission-line gas covers ∼4π sr as seen by the central object in a closed
geometry. The central object is small relative to the nebula then all diffuse fields which
escape from the illuminated face of the cloud in the direction towards the central object will
go on to strike the far side of the nebula. This geometry is implicitly assumed in most
calculations of planetary nebulae and H II regions. This geometry will be assumed if the
sphere command (see section 9.11) is entered.
Static vs. expanding. The sphere command has two optional arguments, static and expanding.
This determines how emission-line photons which cross the central hole and strike the far
side of the shell interact with the gas. The static option says to assume that the shell is
stationary so that all lines interact across the nebula. In this case hydrogen Lyman line
interaction should ensure that Case B is reached (AGN3 Section 4.2). If the nebula is
expanding then the continuum photons that cross the central hole will interact with gas on
the far side but the expansion velocity of the shell ensures that diffuse line photons do not.
In this case the expanding option should be set. This second case is the default when
sphere is specified with no options.
Don’t panic! These geometrical considerations (open vs closed, static vs expanding) make
only second-order differences in the predicted emission-line spectrum, generally at the
≈10% level, largely because of the different treatments of the radiative transfer of the
diffuse fields. If you are concerned about which geometry to use, try both, and compare the
results. The differences are usually small.
assumed to be a vacuum. The specific effects of a filling factor are described by Osterbrock and
Flather (1959) and in AGN3 section 5.9.
where f (r) is the filling factor. I try to consistently use lower case n for a volume density (cm−3 )
and an upper case N for a column density (cm−2 ).
Matter-bounded geometry. The cloud is said to be matter bounded if the outer limit to the H+
region is marked by the outer edge of the cloud. In this case the cloud is ionized throughout
and is optically thin to the incident radiation field. In a matter-bounded cloud the intensity
or luminosity of an optically thin recombination line is set by the product of volume and
density (called the emission measure n2V , AGN3, Section 8.1) and is not directly related to
the luminosity of the ionizing continuum.
Radiation-bounded geometry. The cloud is said to be radiation bounded if the outer limit to the
H+ region is defined by a hydrogen ionization front so both warm ionized and cold neutral
regions exist. The H+ region is optically thick to the hydrogen-ionizing radiation and has
absorbed nearly all of it. In this case the intensity or luminosity of a recombination line is
set by the luminosity of the ionizing continuum with relatively little dependence on cloud
properties.
Our naming convention melds a bit of each of these fields because a single set of rules must apply
to all species.
The species are taken from a number of databases and a large number of commands control how
they are used. These commands are described in the Section beginning on page 135 below. The
commands controling output options for the species are described in the Section starting on page
231 below.
A spectrum is a collection of photons. Examples that might appear in the literature are H I or
C IV. It is not convenient to use these labels in computer input/output. We adopted the following
rules.
• Labels are case sensitive, to distinguish between the molecule CO and the atom Co.
• At present we do not use _ to indicate subscripts, or ˆ to indicate charge.
• Molecules are written pretty much as they appear in texts. H2 , CO, and H− would be written
as “H2”, “CO”, and “H-”.
• Atoms are the element symbol by itself. Examples are “H” or “He” and not the atomic
physics notation H0 or He0 .
• Ions are given by “+” followed by the net charge. Examples are “He+2” or “Fe+22” and not
the correct atomic physics notation, He2+ or Fe22+ . The latter would clash with notation for
molecular ions. “C2+” indicates C+ 2 in our notation.
• We use ˆ to specify isotopes, with ˆ and the atomic weight placed before the atom to which it
refers. For example, “ˆ13CO” is the carbon monoxide isotopologue 13 CO.
• The save species labels all (page 235) command will produce a file containing the full list
of species labels.
• We follow a modified atomic physics notation for the spectrum. H I, He II, and C IV are the
spectra emitted by H0 , He+ , and C3+ . In atomic physics the notation “H I” indicates a
collection of photons while H0 is a baryon. Emission lines replace the Roman numeral with
an integer. Examples are H 1 λ 4861Å, He 2 λ 4686Å, and C 4 λ 1549Å.
The spaces between the element and integer are significant. The spectrum label fills four
characters so there are two spaces within H 1, one space within Si 2, and no spaces within
Fe16.1
• To summarize, atomic hydrogen would be referenced as “H” while the Lα line would be
“H I”. The distinction is important because, depending on how it is formed, Lα can trace
either H0 or H+ .
1 Itis not safe to copy/paste these labels from the PDF file. Tests show that only one space is rendered. Try this
experiment with the H 1. Copy/paste it into a text editor like vi. There will be one space. The original LaTex was
correct and had two.
16 CHAPTER 2. DEFINITIONS
• The save line labels command (page 219 will create a file listing all spectral lines predicted
by the code, along with a brief comment.
• The internal structure of a species, and associated cooling / emission, are computed using
external databases, as described in the section beginning on page 135. We use our own Stout
database, along with the Chianti (Dere et al. (1997); Landi et al. (2012)) and Lamda, the
Leiden Atomic and Molecular Database (www.strw.leidenuniv.nl/ moldata/, Schöier et al.
(2005)) databases.
• Each databases has its own “masterlist” file that specifies which models to use. The
masterlist file follows the notation used within the databases. For Chianti and Stout, the
internal structure of C3+ , which produces C IV emission, is called “c 4”. The water
molecule in Lamda is referenced as “H2O”.
• If a particular species is specified in more than one masterlist file we will use Stout if it
exists, then Chianti, followed by Lamda.
Sometimes specifying the label and the wavelength is not enough to find a unique match for the
line. One example is the H I 4.65247 µm line, which can be either the 7 → 5 or 35 → 7 line since
they have exactly the same wavelength. To disambiguate the match, you can optionally supply the
indices of the lower and upper level (in that order), or the energy of the lower level (in cm−1 ), as
shown below:
2.5. “SPECIES”, HOW WE SPECIFY ATOMS, IONS, MOLECULES, AND THEIR SPECTRA17
Only one of these methods can be used. Both methods have their advantages and disadvantages.
Using the level indices guarantees a unique match, but the level indices can change if the data set
changes (in the case of Stout, Chianti, or LAMDA) or if you use a different number of resolved
levels in the iso sequences. The energy of the lower level on the other hand is more stable (e.g.,
changing the number of resolved levels for the iso sequences will not change the energy, but
changing the data set could change it). The tolerance of the energy match may not be strict enough
to disambiguate the lines in all cases (a match is declared if the relative difference is less than
10−6 , which may be insufficient for very close multiplet components). The necessary information
can be found in the save line labels output. Note that disambiguation is not supported for all lines.
If the save line labels output does not contain entries for index and Elow, than this type of
disambiguation is not supported for that line. In the excerpt shown below, disambiguation is
supported for the first line, but not the second.
To clarify this, if you want to disambiguate a correct line that supports disambiguation from an
incorrect line that does not support disambiguation, it will work as expected. But the other way
around it will not work.
Nothing else may appear on the line except a comment starting with a comment character as is
shown in the examples above. In general it is best to do a copy / paste of a line identification from
the C LOUDY output (e.g., the line list produced with the save line labels command) but remember
that species labels that are longer than 4 characters must be enclosed in double quotes.
test
species print
You can generate a list of all species labels by running the following input deck:
test
save species labels "test.slab"
test
save line labels "test.llab"
The following is an example using species labels to report the column densities of several ions
and molecules, together with the visual extinction:
18 CHAPTER 2. DEFINITIONS
INTRODUCTION TO COMMANDS
3.1 Overview
This section introduces the commands that drive C LOUDY. The following chapters group the
commands together by purpose. Individual commands are discussed after examples of their use.
This section begins by outlining conditions that are assumed by default and then goes on to
discuss the various classes of commands (i.e., those that set the incident radiation field,
composition, or the geometry).
Keeping this document parallel with the code is a very high priority. In case of any confusion,
please consult the original source. The commands are parsed by the series of routines that have
names beginning with “parse”. The list of routines can be seen by listing the files parse*.cpp.
The second half of the name indicates the command that is parsed by that routine.
C LOUDY is designed so that a reasonable set of initial conditions to be assumed by default so
that a minimum number of commands are needed to drive it. These default conditions are
summarized in Table 3.1, which also lists the commands that change each assumption.
The code is also designed to check that its assumptions are not violated. It should complain if
problems occur, if its limits are exceeded, or if the input parameters are unphysical. It may print a
series of warnings, cautions, or notes if some limit was exceeded or physical assumption violated.
19
20 CHAPTER 3. INTRODUCTION TO COMMANDS
the input stream is entered using the subroutine calls described in a section of Part 2 of this
document. In either case, this input stream must contain all the commands needed to drive the
program. The command format is the same whether used as a stand-alone program or as a
subroutine.
1 This
will be changed in a future version of the code such that also all characters of the keywords will be checked.
2 Before
version 92 a colon (“:”) could also mark an end of line. This character is needed to specify a path in the
Windows environment and is no longer an end-of-line indicator.
3.2. COMMAND FORMAT 21
3.2.3 Units
Most commands use cgs units. In a few cases common astronomical nomenclature can be entered
(i.e., the luminosity can be specified as erg s−1 , in solar units, or even magnitudes). This syntax
varies from command to command so it is important that the units be checked carefully.
These square brackets indicate only that the parameters are optional. The brackets should not be
placed on the command line. They will be totally ignored if they occur. The above example would
actually be entered as follows:
# following gives flux density at energy of 0.1824 Ryd
f(nu) = -12.456 at .1824 Ryd
#
# the luminosity command with linear keyword
luminosity 2e38 solar linear
#
# the phi(h) command with the range option
phi(h) = 12.867 range 0.1 to 0.2 Ryd
Underscores indicate a space. Most commands and keywords require four character matches to
be recognized. Keywords which start with a letter (i.e. A−−Z) must start following a space (or
22 CHAPTER 3. INTRODUCTION TO COMMANDS
other non-alphabetic character) in order to be recognized. Only one space is needed between
words.
The following is an example with the commands written as they are shown in this document:
# blackbody with T=5e4 K, in strict TE
blackbody 5e4 K lte
#
# use ISM radiation field
table ism
readability. The strings “T=1000000K”, “1000000”, and “T=1E6” are equivalent. A period or full
stop (“.”) by itself is interpreted as a character, not numeral or number.
Default values are often available. As an example, the power law command has three
parameters, the last two being optional. The following are all acceptable (but not equivalent)
forms of the command;
The last version uses the default cutoffs, i.e., none. If optional parameters are omitted they must
be omitted from right to left; numbers must appear in the expected order.
Note that implicit negative signs (for instance, for the slope of the power law) do not occur in
any of the following commands.
Table 3.2 shows how various typed input numbers will be interpreted. The first column gives
the typed quantity, the second its interpretation, and the third the explanation.
3.2.10 Comments
Comments may be entered among the input data in several ways. Comments can be entered at the
end of a command line after a sharp sign (“#”) or a double sharp sign (“##”). Anything on a line
after one of these characters is completely ignored. This can be used to document parameters on a
line. Any line beginning with a # or ## is also a comment and the entire line is ignored. Any
comment starting with a single sharp sign is “visible”, which means that it is echoed in the main
output and also included in the file optimal.in (see Sect. 17.7.1). Comments starting with a
double sharp sign are “hidden” comments and will be omitted in the main output and the file
optimal.in. There is also a title command, to enter a title for the simulation.
3.2.12
Commands for experimental parts of the code
The code is in continuous development. When new versions are released there will be new or
experimental parts of the code that are still being developed or which have not been fully
debugged. The newly-developed physics is not included in a calculation which uses the default
conditions. The commands which exercise these new features are included in this document and
are indicated in two ways. First by the symbol in the section header, and second by a grey
background. You are welcome to give these commands a try but should not expect robust results.
Temperature. C LOUDY will interpret a temperature as a log if the number is less than or equal to
10 and the linear temperature if it is greater than 10. Many commands have the optional
keyword linear to force numbers below 10 to be interpreted as the linear temperature rather
than the log.
Other parameters. The pattern for other quantities is not as clear as for the case of temperature.
Often quantities are interpreted as logs if negative, but may be linear or logs if positive
(depending on the command). Many commands have the keywords log and linear to force
one or the other interpretation to be used.
Using the new notation 10ˆ3.5 as a linear number is equivalent to the form 3.5 log, and will be
required to replace the log keyword in future versions of C LOUDY.
3.2.14
The help command
This command prints helpful information about Cloudy and exits. Don’t expect much as yet,
beyond a recommendation to read this document!
3.2.15 An example
Specific commands to set boundary conditions for a simulation are discussed in the following
sections. As a minimum, the hydrogen density, the shape and intensity of the incident radiation
field, and possibly the starting radius, must be specified to compute a model. As an example, a
simple model of a planetary nebula could be computed by entering the following input stream.
title "this is the input stream for a planetary nebula"
#
# set the temperature of the central star
3.3. READING AND WRITING FILES 25
The user can override or extend the default search path. This is described in more detail below in
Section 3.4.
As stated before, C LOUDY will always write output files in the local directory. If you try to
supply a different path between double quotes (i.e., a file in a subdirectory or an absolute path) the
code will abort, as in the following example:
The search path described above will also be used when C LOUDY is reading data files from its
distribution. This allows the user to place modified data files in the local directory and leave the
files in the main data directory untouched. This is useful if you want to limit the scope of the
modification to the current run only (to be precise, all subsequent runs in the directory that
contains the modified file). One example would be when you want to alter the resolution of the
C LOUDY frequency mesh by modifying the file continuum mesh.ini (see Section 4.5.3 in
Part 2 of H AZY). If you place the modified file in the local directory, it will only affect runs in that
directory and not globally.
These methods should also work under Mac OS X. The environment variable will be read when
the code starts up and then override the standard setting compiled into the code. If you
subsequently undefine the environment variable, the code will revert back to using the standard
search path.
The environment value CLOUDY DATA PATH supports a search path with multiple
components, similar to the search paths used in UNIX. You can supply multiple directory paths,
separated by a colon (’:’) on UNIX and Mac systems, or separated by a semicolon (’;’) on
Windows systems. When Cloudy searches for a file, it will search in each of the component
directories until it finds the file. The search will be done in the same order as they were defined in
the environment variable. The code will not do a recursive descent into subdirectories of the
search path components. The examples shown above would be equivalent to the default setting as
the special path ‘‘.’’ is shorthand for the local directory, irrespective of where you are.
When you modify the search path, you should realize that the default data directory must always
be part of the search path. The code will not function otherwise! It is also strongly recommended
to keep the local directory as part of the search path. To simplify this, C LOUDY supports the
special path component ‘‘+’’ which will be expanded to the default search path for that release.
A typical example would be this:
export CLOUDY_DATA_PATH="+:/path/to/local_data"
This search path would consist of the default search path (i.e., the local directory and the C LOUDY
data directory) followed by a custom directory /path/to/local data where you can store
local files, such as stellar atmosphere grids, or custom grain opacity files. This avoids “polluting”
the standard data directory and also makes it easier to port the files from one release to the next.
3.5. THE INIT COMMAND 27
You can make multiple local data directories and combine them in custom sequences. One
example would be one directory containing general local files, while the other contains files
specifically needed for a non-standard spectral resolution run (such as binary stellar atmosphere
grids, or grain opacity files). Such an example could look like this:
export CLOUDY_DATA_PATH="/path/to/non_standard_data:+:/path/to/local_data"
Note that we put /path/to/non standard data up front (this is the directory containing
data for a non-standard spectral resolution). This assures that the non-standard resolution version
of a file is picked up first, before the standard version.
The current version of the code would only include those elements present in version 84 if the
command
init "c84.ini"
A series of *.ini files are included in the data directory included in the C LOUDY distribution.
Do an ls *.ini within the data directory to list the available files. Note that not all these files
are init files, e.g., continuum mesh.ini is not an init file in the sense we discussed here.
Comments at the start of the files describe their purpose.
4 http://xoshiro.di.unimi.it.
Chapter 4
4.1 Overview
The incident radiation field should be defined between the low-frequency limit to the code,
10 MHz, corresponding to a wavelengths of 29.98 m, and the high-energy limit of
7.354 × 106 Ryd, corresponding to an energy of 100 MeV. The shape and its intensity or
luminosity are usually specified independently. There are many ways to do this.
29
30 CHAPTER 4. THE INCIDENT RADIATION FIELD
Figure 4.1: The spectrum of the Orion H II region / PDR at a point near the H0 - H2 transition.
The left panel shows the fine continuum and is taken from Figure 20 of Shaw et al. (2005) It shows
the extinction of the stellar SED by absorption lines formed in the gas. The right panel shows the
coarse continuum for a cloud stopping at this point and mainly shows the extinguished stellar SEC
also with dust and gas emission.
be. This is all described in Section 4.5.3 in Part 2 of this document. The resolution of the coarse
continuum for a particular model can also be changed with the set continuum resolution
command described on page 291. If you change the continuum resolution you will need to
recompile the stellar continuua and grain opacities so that their energy grid agrees with that used
by the code.
The resolving power of the fine continuum is established at the start of a calculation. It needs to
resolve lines, so the resolution depends on the lowest possible kinetic temperature and any
turbulence that may be present. The set fine continuum command described on page 292 can also
adjust this resolution.
Two quantities, the shape and intensity, specify a single component of the incident radiation field.
The shape gives the form of the spectral energy distribution but not its intensity. The intensity can
be specified as either the energy striking the illuminated face of the cloud, referred to as the
intensity case, or both the source luminosity and the distance separating the source and the cloud.
The latter is referred to as the luminosity case. The shape and intensity are specified
independently in most cases, although some commands specify both (the command specifying the
cosmic microwave background is an example of the latter).
In much of the following discussion we will refer to both luminosity and intensity commands as
simply intensity commands. The distinction between the luminosity and intensity cases is
discussed further on page 13.
4.4. COMBINING SEVERAL RADIATION FIELDS 31
The 5 × 105 K blackbody has a total luminosity of 1037.3 erg s−1 while the power-law has a total
luminosity of 1037.2 erg s−1 .
because the CMB command enters both the shape and intensity of the cosmic microwave
background. In this example it comes after the blackbody command specifies a shape, but before
the luminosity command specifies the luminosity of the blackbody. As a result the intensity
implicitly entered by the CMB command will apply to the hot blackbody rather than the cosmic
microwave background and the luminosity command will then incorrectly set the intensity of the
cosmic background blackbody shape. This problem cannot occur if the shape and intensity
commands are always kept together as in the previous example. The code should produce a
warning if shape and luminosity commands are mixed together with a command that enters both.
32 CHAPTER 4. THE INCIDENT RADIATION FIELD
1 Restrictions
on the number of tables that could be entered existed in C LOUDY versions 73 and before, but have
been lifted. Restrictions on which types of continua could be combined existed in C LOUDY versions 67 and before,
but have been lifted.
Chapter 5
5.1 Overview
All commands setting the intensity or luminosity of the incident radiation field are defined in this
Chapter.
33
34 CHAPTER 5. INCIDENT RADIATION FIELD LUMINOSITY
the extra numbers are interpreted as logs. If you want to set the lower limit of the range to the low
energy limit 3.040 × 10−9 Ryd of the incident radiation field, but want to supply your own upper
limit, you can enter 0 followed by the upper limit if you use linear numbers, or −10 followed by
the upper limit if you use log numbers (−10 is actually any number ≤ log(3.040 × 10−9 Ryd)).
If range total, or simply range or total, appears with no parameters then the full energy range
considered by the program, 3.040 × 10−9 Ryd to 7.354 × 106 Ryd, will be used. In this case the
number is the total integrated (bolometric) intensity or luminosity.
The following shows examples of the range option for the luminosity command. By default the
luminosity command has a single parameter, the log of the luminosity [erg s−1 ] in
hydrogen-ionizing radiation (1 Ryd ≤ hν < 7.354 × 106 Ryd). The “;” symbol is used to terminate
the line in one case.
The absolute visual magnitude MV is approximately related to the monochromatic luminosity per
octave at 5550 Å by (Allen, 1976, page 197)
The conversion between monochromatic luminosity per octave νLν and absolute visual magnitude
MV is approximate, with typical errors of roughly a percent. This is because C LOUDY assumes
that the V filter has an isophotal wavelength of 5550Å and does not actually integrate over the
incident radiation field using a V -filter transmission function.
This is a luminosity command.
5.5. ENERGY DENSITY 5E4 K [LINEAR] 35
This set of commands sets the shape of the Balmer continuum to that of a hot blackbody, sets the
intensity to the Habing value, and then extinguishes all hydrogen-ionizing radiation, as is assumed
in the PDR literature.
This is an intensity command.
Q (H) Φ (H)
U≡ 2
≡ (5.4)
4π ro n (H) c n (H) c
(AGN3, equation 14.7, page 357). Here ro is the separation [cm] between the center of the source
of ionizing radiation and the illuminated face of the cloud, n(H) [cm−3 ] is the total1 hydrogen
density (ionized, neutral, and molecular) at that point, c is the speed of light, Q(H) [s−1 ] is the
number of hydrogen-ionizing photons emitted by the central object, and Φ(H) [cm−2 s−1 ] is the
surface flux of ionizing photons at the illuminated face. The number on the command line is
interpreted as the log of U unless the keyword linear appears. The ionization parameter is a useful
quantity in plane-parallel, low-density, constant-density, models, because of homology relations
between models with different photon and gas densities but the same ionization parameter (see
Davidson, 1977).
This is an intensity command.
1 Before
version 65 of the code the electron density was used rather than the hydrogen density. Before version 75
n(H) was the atomic/ionic hydrogen density, and did not include molecules.
5.10. LUMINOSITY 38.3 [SOLAR, TOTAL, RANGE, LINEAR] 37
The default range is over hydrogen-ionizing energies (1Ryd ≤ hν ≤ 7.354 × 106 Ryd). The range
option can be used to adjust the values of ν1 and ν2 .
If the optional keyword solar appears the number is the log of the total luminosity relative to
the sun. It is the log of the total luminosity if the keyword total appears. If the linear keyword is
also used then the quantity will be the luminosity itself and not the log. The range option cannot
be used if the luminosity is the total luminosity or it is specified in solar units. It will be ignored if
it appears.
The following are examples of the luminosity command.
Q (H) R2star π Fν
Z ν2
Φ (H) ≡ ≡ 2 dν[cm−2 s−1 ] (5.6)
4 π ro2 ro ν1 hν
and is proportional to the optical depth in excited lines, such as the Balmer lines (Ferland et al.,
1979; AGN3). The range option can be used to change the default energy range, given by the
values of ν1 and ν2 .
This is an intensity command.
The default energy range is 1 Ryd to 7.354 × 106 Ryd and the range option can be used to change
the energy bounds ν1 and ν2 . The photon flux (the number of photons per unit area of cloud
surface) can be specified with the phi(H) command3 .
This is a luminosity command.
cm−2 s−1 Hz−1 ) of the current to the previous radiation field is given by the first number on the
command line. It is assumed to be the linear ratio unless it is less than or equal to zero, in which
case it is interpreted as a log. If the keyword log appears then the positive number is interpreted as
the log of the ratio.
The second parameter is the energy in Rydbergs where the previous radiation field is evaluated
and the optional third parameter is the energy where the current radiation field is evaluated. If the
second energy is not entered then the same energy is used for both. The following is an example
of using the ratio command to simulate the spectral energy distribution of a typical quasar.
blackbody 5e4 K # the big blue bump
ionization parameter -2 # its ionization parameter
table power law #an alpha =-1 power law
# now set intensity of power law relative to bump at 1 Ryd
ratio 0.001 at 1 Ryd
This command was introduced to provide a mechanism to specify the optical to X-ray spectral
index αox . This is defined here as in Zamorani et al. (1981), except for a difference in sign
convention. Here αox is the spectral index which would describe the continuum between 2 keV
(147 Ryd) and 2500Å (0.3645 Ryd) if the continuum could be described as a single power-law,
that is, !αox
fν (2 keV) ν2 keV
= = 403.3αox . (5.8)
fν 2500 Å ν
2500 Å
The definition of αox used here is slightly different from that of Zamorani et al. since implicit
negative signs are never used by C LOUDY. Typical AGN have αox ∼ −1.4. If X-rays are not
present then αox = 0.
The ratio command has an optional keyword, alphaox, which allows αox to be specified
directly. If the keyword appears then only one parameter is read, the value of αox . A generic AGN
spectral energy distribution could be produced with the following,
blackbody 5e4 K # the big blue bump
ionization parameter -2
table power law # an alpha =-1 power law
ratio alphaox -1.4 # set alpha_ox of the X-ray and UV continua
Note that αox may (or may not) depend on the luminosity of the quasar, as described by Avni and
Tananbaum (1986). The solid line in their Figure 8 corresponds to
Lo
αox = −1.32 − 0.088 × log (5.9)
1028 erg s−1 Hz−1
where they define Lo as the monochromatic optical luminosity at 2500Å in the source rest frame,
and we assume H0 = 50 and q0 = 0. Other fits are given by Worrall et al. (1987):
Lo
αox = −1.11 − 0.111 × log (5.10)
1027 erg s−1 Hz−1
and by Wilkes et al. (1994):
Lo
αox = −1.53 − 0.11 × log . (5.11)
1030.5 erg s−1 Hz−1
40 CHAPTER 5. INCIDENT RADIATION FIELD LUMINOSITY
However, La Franca et al. (1995) find no dependence of αox on luminosity. Avni et al. (1995) find
a complicated luminosity dependence. Clearly this is an area of active research.
N.B. The net incident radiation field may have a smaller than specified ratio of current to total
incident radiation field, since the command specifies the ratio of the current to the previous
incident radiation fields, not the ratio of current to total incident radiation field. The ionization
parameter will be slightly larger than specified for the same reason.
In general, it is probably better to use the AGN command rather than this command.
This is neither a luminosity nor intensity command—the units of the previous radiation field
carry over to this command.
5.16 xi -0.1
Tarter et al. (1969); Krolik et al. (1981); Kallman and Bautista (2001) define an ionization
parameter ξ given by
Z 1000R
Fion Lion
ξ = (4π) 2
Jν dν/n (H) = ≈ [erg cm s−1 ] (5.12)
1R n (H) r0 n (H) r02
2
where n(H) is the hydrogen density at the illuminated face of the cloud and r0 is the source - cloud
separation. The number is the log of ξ .
The original Tarter et al. (1969) paper defined ξ as the last term in equation 5.12, with Lion
defined as including all ionizing radiation. C LOUDY used this definition, integrating over all
ionizing photon energies, through version C13.03.
The 1 - 1000 Ryd energy range first appears in Krolik et al. (1981), in the discussion above eqn
2.2a, but they introduce a new variable, Fion , for the luminosity over this range. The XSTAR code
(Kallman and Bautista, 2001) defines ξ over 1 - 1000 Ryd.
Beginning with C13.04 the XSTAR definition is used for ξ , for compatibility with that code.
That is, we now integrate over 1 - 1000 Ryd. The middle and right terms in equation 5.12 are not
equal for a hard SED.
You can easily define your own energy intervals by using the luminosity, page 36, or intensity,
page 35, commands to specify L or 4πJ. They both accept the range option to change the limits in
equation 5.12.
Chapter 6
6.1 Overview
The spectral energy distribution (SED) of the incident radiation field should be specified between
the energies of 3.040 × 10−9 Ryd (λ ≈ 29.98 m) and 100 MeV ≈ 7.354 × 106 Ryd. The
low-energy region is important for Compton cooling, photoionization from excited states of the
elements, free-free heating, H− heating, and grain heating. The high-energy portion is important
for Auger and secondary ionization, Compton heating, and pair production. Energies greater than
100 MeV are not generally important since the Klein - Nishina electron-scattering cross section is
small. C LOUDY will complain, but compute the model if possible, if the incident radiation field is
not specified over the full energy range. An intensity of zero will be assumed for missing portions
of the incident radiation field.
The plasma frequency, given by
1/2
ne q2e
1/2 −1 1/2
ν pl = = 8.978 × 103 ne s = 2.729 × 10−12 ne Ryd, (6.1)
π me
will move into the energy range considered by the code if the electron density is higher than
∼ 107 cm−3 . The incident radiation field below the plasma frequency is totally reflected and does
not enter the slab. The code will generate a comment if the plasma frequency occurs within the
energy grid.
It is important to plot the incident radiation field using the output of the save continuum
command to make sure the SED has the expected shape. It is easy to make a mistake in converting
between fν , fλ , ν fν , and λ fλ when deriving the SED. The save continuum command will report
the SED in ν fν or λ fλ units (the two are equivalent).
41
42 CHAPTER 6. INCIDENT RADIATION FIELD SHAPE
108
107
106
105
ν Fν
104
1000
100
10
1
10−3 1 1000 106
hν (Ryd)
Figure 6.1: The continuum produced by the AGN continuum command. The Big Bump peaks
at ≈ 1 Ryd, while the X-ray power law dominates at high energies. The two components are
normalized by the second parameter, the value of αox .
44 CHAPTER 6. INCIDENT RADIATION FIELD SHAPE
command will generate that continuum. It is fairly similar to the Mathews and Ferland (1987)
continuum but there is much greater flexibility in changing its details.
which is equivalent to
6.4. BLACKBODY T=E5 K [LINEAR, LOG, LUMINOSITY] 45
black 1000000
or
black body t=6 .
Both temperatures are interpreted as logs if they are less than or equal to 10 or the keyword log
appears, and linear otherwise. They will be interpreted as the linear temperature rather than as a
log if the keyword linear appears. Note that if the linear key is used then both temperatures are
interpreted as linear. Similarly, if the keyword log appears, both temperatures are interpreted as
log. Note also that the cosmic background radiation should also be included if Tu ≤ 2.725(1 + z)K.
C LOUDY will complain, but compute the model, if the energy density of the incident continuum
corresponds to a temperature less than the present energy-density temperature of the universe.
This is an intensity command.
Jν π R2star
W≡ ≈ , (6.6)
Bν 4 π ro2
where Rstar is the radius of the star and ro is the separation between the illuminated face of the
cloud and the center of the star. The approximation on the RHS assumes that Rstar ≪ ro . The
dilution factor can be entered either directly or as a log. Any number > 0 will be interpreted as
linear, while any number ≤ 0 will be interpreted as log. The example above is a rough
approximation of the radiation field within a typical planetary nebula.
This is an intensity command.
A more realistic radiation field could be produced by combining the coronal equilibrium
command with the save transmitted continuum command to generate a continuum which can be
read in with the table read command.
TCMB = To (1 + z) [ K] (6.8)
where the redshift dependence is from Peebles (1971) and the present temperature of the
background is assumed to be To = 2.725 ± 0.002K (Mather et al., 1999; Wilkinson, 1987). This
command specifies both the shape and intensity of the radiation field. A starting radius of 1030 cm
will be assumed if no starting radius is specified.
6.6.1
The time option
The keyword time will follow the time-dependent recombination of an evolving universe. This is
now being developed by Ryan Porter and will be described in Porter et al. (in preparation).
6.6.2
The density option
The keyword density will also specify the density at the redshift.
where N(H) is the total hydrogen column density (cm−2 ), νRyd is the frequency in Rydbergs, and
η is the leakage.
The optional second number is the fractional leakage η through the absorber (see Ferland and
Mushotzky, 1982). This has a default value of 0, i.e., no leakage. The leakage is interpreted as a
48 CHAPTER 6. INCIDENT RADIATION FIELD SHAPE
log if it is negative and linear otherwise. If unexpected or unphysical results occur when the
extinguish command is given then it is likely that nearly all ionizing radiation has been
attenuated. A plot of the generated continuum (with the plot continuum command) may prove
interesting. The code will stop if the leakage is greater than 1.0 (100%).
The optional third number is the lowest energy for the absorption to occur. The default is 1 Ryd
and is appropriate if the absorption is mainly due to atomic hydrogen. The number is interpreted
as linear Rydbergs if positive and the log of the energy if less than or equal to zero. The
continuum with energies below this cutoff energy will be unaffected by the absorption. The
non-ionizing (hν < 1Ryd) continuum can be extinguished by this command but extrapolating the
power law to these energies is nonsense.
The second two arguments are optional and may be omitted from right to left. The cutoff energy
can only be changed if the leakage is specified.
The command acts by first generating the continuum shape with extinction neglected. The
continuum is then normalized using any of the luminosity or intensity commands (i.e., Q(H),
ionization parameter, luminosity, etc.). Only then is the continuum extinguished. The
continuum that actually strikes the illuminated face of the cloud does not have the intensity or
luminosity actually entered. (These values would be correct were the extinction not present.)
Physically, the luminosity of the central object is not changed by the presence of an absorbing
cloud along the line of sight.
This command should only be used as a quick test. A more physical way to extinguish the
continuum would be to actually transmit it through a model of the absorbing slab, save that
continuum with the save transmitted continuum command, then use this filtered continuum with
the table read command.
greater than 5; and linear Rydbergs otherwise. Any of the three styles can be chosen but it must be
used consistently within the command. If the first energy is entered as zero then it is interpreted as
the low-energy limit of the code. In this case the remaining energies will be interpreted as linear
Rydbergs if the second number is positive and the log of the energies in Rydbergs if it is negative.
An energy of zero Rydbergs is not allowed (except for the first), and the energies must be in
increasing order.
The second number in each ordered pair is the log of the relative flux density per unit energy
interval [log10 (Jν )+constant] at that energy. These numbers are only used to set the shape of the
continuum. The constant in the equation is set by one of the intensity or luminosity commands.
Heads up! The intensity is Jν and not νJν . You should check that this command has produced
the SED you expect by creating as plot by using the output from the save incident continuum
command described on page 203.
The interpolate command can be freely mixed with other shape commands and a total of up to
100 interpolate and table commands can be entered.2 Note that table and interpolate are
actually two forms of the same command so that they store information in the same arrays. The
total number of table and interpolate commands entered together cannot exceed 100.
As an example, the following approximates a metal-poor 4.5e4 K stellar atmosphere. The
energies are entered in Rydbergs:
# following is 45000 K atmosphere from Shields and Searle
interpolate (0.00001 -11.106) (.58 -1.5792) (.99 -1.44) (1.01 -1.7018)
continue 1.8 -1.905) (1.81 -1.939) (2.57 -2.208) (2.59 -2.247) (3 -2.3994)
continue (3.02 -2.8193) (3.49 -2.9342) (3.51 -4.143) (3.99 -5.582)
continue (4.01 -6.3213) (6 -9.9) (10 -17.3) (20 -30) (1e7 -30)
q(h) = 52.778151
Note that the continuum should be specified between 3.040 × 10−9 Ryd and 7.354 × 106 Ryd even
if the intensity is small. If it is not fully specified then a warning will be issued and a model
computed with the unspecified continuum set to zero. As a further note, it is important that the
continuum be physically correct. For instance, stellar model atmospheres predict almost no X-ray
emission while real OB stars are X-ray sources (although neglecting X-rays for these stars is
generally a safe approximation). See page 63 below for a more detailed discussion.
This command sets the SED by specifying fν points. Other commands may use ν fν or λ fλ units
(the two are equivalent). You should plot the final SED used by C LOUDY with the save
continuum command to make sure the SED has the expected shape. It is easy to make a mistake
in converting between fν , fλ , ν fν , and λ fλ when deriving the SED. The save continuum
command will report the SED in ν fν or λ fλ units.
The optional second number changes the relative width of the laser. The relative width is the
ratio dE/E where dE is the half width of the laser. The laser will only be active within ±dE of E.
The code would return an error condition if dE is so small that the laser does not happen to be
within ±dE of E as evaluated by the code’s energy mesh. The fractional width probably should
not be made smaller than roughly 0.01 but the code does not protect against too small a value
of dE.
Another way to make a laser is to save out a transmitted radiation field using the save
transmitted continuum command, edit this file, and, by hand, increase the intensity of the
continuum at particular cells. This is described where the table read command is defined.
6.10 Power law, slope =-1.4 [hi cut =6 Ryd low cut =.1, Kelvin]
N.B. IT IS VERY DANGEROUS TO USE THIS COMMAND. The radiation field will be a power
law with slope given by the first parameter. It has optional low-energy and high-energy
exponential cutoffs νhigh cut and νlow cut in Rydbergs. The form of the continuum is
fν = ν +α exp −ν/νhigh cut exp (−νlow cut /ν) [erg cm−2 s−1 Hz−1 ].
(6.10)
The first number on the command line is the slope α. Note that there is no implicit negative
sign in this exponent; typical AGN have αox ∼ −1.4, (Zamorani et al., 1981). The second
(optional) number is the high-energy cutoff νhigh cut . The third optional number is the low-energy
cutoff νlow cut . Both are expressed in Rydbergs and they can be omitted from right to left. The
default values are 104 and 10−4 Ryd.
If the keyword Kelvin appears then both cutoff energies are interpreted as temperatures in
Kelvin rather than energies in Rydbergs. The temperature is a log if it is less than or equal to 10 or
the keyword log appears, and the linear temperature itself otherwise. If you do not use the
keyword Kelvin, the cutoffs will always be interpreted as linear quantities.
It is generally a very bad idea to use this command. C LOUDY treats the entire radiation field
between very low and very high energies. Extrapolating reasonable radiation fields past the
optical-ultraviolet region into radio or γ-ray energies will have unexpected effects. Power-law
continua with slopes smaller than −1 will have unphysically large photon occupation numbers and
brightness temperatures at very long wavelengths. This will probably produce catastrophic
Compton cooling and/or free-free heating. Continua with slopes greater than −1 will be
dominated by the radiation field at energies of many MeV resulting in large Compton heating and
pair-production rates. The exponential cutoffs can prevent this but they also drive the radiation
field to zero intensity when either argument in the exponential becomes large. This is unphysical
and can cause numerical problems.
It is much better to use the interpolate command and enter physically reasonable low-energy
and high-energy radiation fields. There is a special version of the command, table power law for
entering a well-behaved power-law continuum.
In this example the nuFnu option indicates that the intensities are specified as ν fν rather than the
default fν . The units keyword changes the units of the photon energy. Lines after the ending field
of stars are used to document the file. The first line is a comment since it starts with the sharp sign.
0.1
0.01
10−3
4 π ν Jν erg cm-2 s-1
10−4
10−5
10−6
Davidson 1985
Hester 2008
10−7 6
10 109 1012 1015 1018 1021 1024
ν(Hz)
Figure 6.2: The SEDs produced by the table Crab commands are compared. The red line is the
SED from Davidson and Fesen (1985) and was the default used by C LOUDY through versions C10.
The black line is the current default, derived by Atoyan and Aharonian (1996) and shown in Hester
(2008)
6.12. OTHER TABLE COMMANDS 55
adjusted with the break keyword. The break can be adjusted between the limits of 0.2 Rydberg
and 3.040 × 10−9 Ryd by entering the keyword break followed by a number specifying the energy
of the break. The number is interpreted as the log of the energy in Rydbergs if it is negative and as
linear Rydbergs if positive. It is interpreted as the linear wavelength of the break in microns if the
keyword microns also appears. If no number appears, but the keywords no break does, then a
break at the low-energy limit of the code (3.040 × 10−9 Ryd) is assumed. The following shows
equivalent ways of generating a continuum with a break at 10 microns;
table AGN break .00912 # energy in Ryd
table AGN break -2.04 # log of energy in Ryd
table AGN break 10 microns # wavelength in microns
table AGN no break # no sub-millimeter break
Note that the nature of the SED in AGN is still an open question. The shape given here is very
simplistic and quite uncertain in the ionizing ultraviolet. Moreover, it would not be surprising if
the BLR sees a far different continuum than we do. This shape may not be correct for low redshift
Seyfert galaxies (Binette et al., 1989; Clavel and Santos-Lleo, 1990) and direct observations of
high-redshift quasars suggest a far softer continuum than this (Zheng et al., 1997; Korista et al.,
1997b). It is probably best to only use this shape in exploratory situations and generate a specific
AGN radiation field using either the ratio or AGN commands.
Figure 6.3: The SED produced by the table ISM command is the lighter line. The infrared cirrus is
the peak at λ ∼ 100 µm and starlight dominates at shorter wavelengths. The points just shortward
of the Lyman limit (0.0912µm) are interpolated—actually it is thought that interstellar extinction
removes most of this continuum. The dashed line shows the interpolated SED and the solid line
shows the effects of absorption introduced by adding the extinguish command. The heavy red line
is the table Draine continuum.
58 CHAPTER 6. INCIDENT RADIATION FIELD SHAPE
table ISM
CMB
extinguish column = 22 leak=0
6.12.9 Table power law [spectral index -1.4, low =.01, hi =20]
This produces a power-law continuum that is well behaved at both the high and low energy ends.
The default shape, assumed when no numbers occur on the command line, is the form fν ∝ ν α .
Here α = −1 for the spectral midrange between 10 microns and 50 keV, and the continuum has
slopes fν ∝ ν 5/2 at lower energies (appropriate for self-absorbed synchrotron, eq 6.54, p.190,
Rybicki and Lightman, 1979) and fν ∝ ν −2 at higher energies. Note that much of the X-ray
literature will use an implicit negative sign in defining the energy index, as in equation 13.2 of
AGN3. C LOUDY never uses implicit negative signs so a typical AGN will have an energy index of
roughly −1.5. Table 6.5 summarizes the continuum that is produced by this command if no other
parameters are specified.
60 CHAPTER 6. INCIDENT RADIATION FIELD SHAPE
Three optional numbers may appear on the command line. The first number sets the slope of the
mid-range spectral component (infrared to X-ray) and has a default of -1 ( fν ∝ ν −1 ). The next two
numbers adjust the energy limits of the mid-range spectral component. Their default units are
Rydbergs but the keyword microns will change the units to microns for the first energy only. The
second number is the energy (in Rydbergs) of the infrared break. The default is 0.009115 Ryd (10
microns). If this second number is zero then the low energy limit to the continuum
(3.040 × 10−9 Ryd) will be used. The number is interpreted as the log of the energy in Rydbergs if
it is negative and linear otherwise. Note that, with no infrared break, free-free heating will
probably be significant for denser clouds. A power-law continuum with a low energy break at 1
micron would minimize this heating and could be generated with the command
# a power-law with index -1 and 1 micron break
table power law slope -1, 1 micron break
The third optional number is the energy (in Rydbergs) of the break in the X-ray continuum. The
default is 50 keV and if it is zero then the high-energy limit of the continuum (7.354 × 106 Ryd) is
used. The number is interpreted as a log if the energy of the infrared break is entered as a log and
linear otherwise. The numbers may be omitted from right to left.
The table read command can be freely mixed with all of the other radiation field shape
commands. Any number of table read commands can be entered.3 The save continuum file must
have been produced by the same version of C LOUDY.
By default, this command does not set the intensity of the radiation field. If the scale option is
not given, the intensity of the radiation field must be set explicitly, using any of the intensity or
luminosity commands.
If the scale option is given, the intensity scale can be specified relative to the intensity of the
previous calculation. As with some other table commands, the value specified is interpreted as a
log scale if it is non-positive and linear otherwise. If no number is given, the scale factor defaults
to unity.
If the model that generated the transmitted spectrum and the model that reads it both set a
radius, then spherical dilution will implicitly be done. The scale factor will be a multiplicative
factor on top of that, i.e. the transmitted spectrum will be multiplied by a factor (rout /rin )2 s where
rout is the outer radius of the first model, rin is the inner radius of the second model, and s is the
scale factor. A warning will be printed if rin < rout , but the spherical correction will still be done
(which would make the radiation field more intense). If the first model set a radius, but not the
second (or vice versa) a caution will be printed and no spherical correction will be done (but the
scale factor will still be applied).
The following gives an example of first creating a file containing the transmitted radiation field
then using this file as the incident radiation field in a second calculation.
The output continuum can also be diluted by a factor of 100 compared to the first calculation:
10
1
ν f (erg s-1 cm-2 )
0.1
Tstar = 50,000 K
0.01
0.1 1
Photon Energy (Ryd)
Figure 6.4: This figure shows the emergent radiation field predicted by five 50 kK stars included
with the code. The smoothest is the blackbody, and the Kurucz (1991) and Rauch (1997) atmo-
spheres show the most structure. stars
These commands specify only the continuum shape. It is still necessary to specify a luminosity.
Tout et al. (1996) provide convenient fitting formulae giving zero age main sequence luminosities
as functions of stellar mass and metallicity.
Danger! Many forms of the table stars commands accept the log keyword to indicate that the
log of the stellar temperature is entered. Many also accept the surface gravity, normally referred to
as “log g”, as a second parameter. The “log” in “log g” would cause the temperature to be
interpreted as the log of the temperature. Either do not enter the string “log g”, or write it as
“logg” or “log(g)”.
log (Lx ) = 1.08 (+0.06/ − 0.22) log (Lbol ) − 9.38 (+2.32/ − 0.83) . (6.12)
The X-ray luminosity is typically ∼ 6.4 dex fainter than the bolometric luminosity. A source
temperature of 0.5 keV is quoted by Sciortino et al. This X-ray component must be explicitly
added as an independent part of the incident radiation field. Tests show that the high-energy light
has little effect on conditions in the H II region but does affect the ionization in the surrounding
PDR.
64 CHAPTER 6. INCIDENT RADIATION FIELD SHAPE
You can optionally include the keyword stellar or nebular if you want to use only the stellar or
the nebular component of the interstellar radiation field (these are the fourth and fifth column of
the Starburst99 calculation, respectively). The default is to use the total spectrum, which is the
sum of the stellar and nebular component. This would be the equivalent of including the emission
from nearby star forming regions in your calculation. If you don’t want that, you can use the
stellar component only, as in the following example
The above commands will produce files some file.ascii and some file.idx, which can
then be used in the table stars command:
The number on the table star command is the age of the starburst. It has the same units as the
ages given in the Starburst99 data file and is normally given in years. It is interpreted as a log if
the keyword log appears, and as the linear age otherwise.
It is critical that the original Starburst99 file not be changed in any way at all. Doing so will
trick the code into generating bogus results. In any case, it is a good idea to make a plot of the
generated radiation field, using column 1 and 2 of the output from the save continuum command,
to confirm that it is correct.
Starting with the C10 release it is possible to combine several Starburst99 runs with different
metallicities into a single 2-dimensional grid. This allows interpolation in both age and log Z. This
has to be done by compiling each of the Starburst99 runs as described above and then manually
merging the “.ascii” files into a single “.ascii” file. Appendix B.2 gives details how the
merged file should be formatted. An example of a merged file is available on the
StellarAtmospheres page of the Cloudy wiki linked at the start of this subsection. The resulting
file can be compiled using
CHEMICAL COMPOSITION
7.1 Overview
The default solar composition is summarized in Table 7.1. C and O abundances come from
photospheric abundances of Allende Prieto et al. (2002, 2001), while N, Ne, Mg, Si, and Fe are
from Holweger (2001). The helium abundance is a typical value for nebulae with near-solar
compositions. The remainder of the first thirty elements comes from Grevesse and Sauval (1998).
Meteoritic and photospheric abundances agree for most elements. They differ by significant
amounts for P, S, Cl, and Mn. These are fairly volatile elements so may be deficient in meteorites.
For these four the means of the meteoritic and photospheric abundances were used. The default
solar abundances are stored in the file data/abundances/default.abn and can be
changed by altering or overwriting that file.
These default abundances are maintained for backwards compatibility. The abundances GASS
command described in section 7.2 will use values from Grevesse et al. (2010).
Abundances are always specified by number relative to hydrogen, not by mass or relative to
silicon. Abundances are relative to the total hydrogen density, the sum of H in atomic, ionic, and
molecular form. These are gas-phase abundances and do not include material locked into grains.
The composition will be printed in the header information that starts the printout. You should
check this to confirm that the right composition is used.
The following sections describe how to modify the chemical composition.
67
68 CHAPTER 7. CHEMICAL COMPOSITION
7.3 Precedence
There are many ways to specify an abundance. It is even possible to specify different abundances
for the same element in the same input script. If the absolute abundance is specified with more
than one command then the last abundance is used. If the abundance is specified by both its
absolute abundance and by a scale factor then both are used. Either of the following will multiply
the default H II region nitrogen abundance by a factor of two:
abundances H II region
element scale factor nitrogen 2
or
element scale factor nitrogen 2
abundances H II region
The element scale factor option applies a scale factor while the element abundance option sets
an absolute abundance. The abundances H II region command uses one of the absolute
abundance mixtures that are stored by the code. This command enters the gas-phase abundances
of all 30 elements and also includes interstellar grains. The element command changes some
details about a particular element.
In the following example both commands set absolute abundances so the first nitrogen
abundance will have no effect and the final nitrogen abundance will be the default H II region
abundance
element abundance nitrogen -4.7
abundances H II region
In the following only the second nitrogen scale factor has any effect since the second scale factor
overwrites the first:
element scale factor nitrogen 3
element scale factor nitrogen 2
abundances H II region
The result will be H II region abundances with nitrogen having twice its normal value. Similarly,
the combination
element abundance nitrogen -4
element scale factor nitrogen 2
in either order would result in n(N)/n(H) = 2 × 10−4 since the first command sets an absolute
abundance of 10−4 and the second command doubles this.
The chemical composition is printed at the start of the calculation. Be sure to confirm that the
composition has been entered correctly.
7.4 Abundances he c. . .
The abundances of all elements can be entered with the command abundances followed by: a) a
complete set of abundances, b) the keyword all and a single number to set all of the abundances,
or c) a second keyword to select one of the stored abundance sets.
70 CHAPTER 7. CHEMICAL COMPOSITION
The abundances can also be entered as a set of scale factors indicating the desired abundances
relative to the current set absolute abundance. These will be solar by default. The following
example doubles the oxygen abundance and lowers the iron abundance
abundances he =1 li =1 be =1 b =1 c =1 n =1 o =2
continue f =1 ne =1 na =1 mg =1
continue al =1 si =1 p =1 s =1 cl =1 ar =1 k =1
continue ca =1 sc =1 ti =1 v =1 cr =1 mn =1 fe =0.0000001 #deplete iron
continue co =1 ni =1 cu =1 zn =1
It is better to specify absolute abundances since the default solar composition changes from time
to time.
The code checks the sign of all of the entered abundances to decide which style was entered.
The numbers are interpreted as linear scale factors if all are positive, and as logs of the abundance
relative to hydrogen if any are negative.
The metals command will set abundances of all elements heavier than helium.
abundances "cameron.abn"
abundances "HII.abn" no grains
Table 7.2 lists some of the abundance sets that are included in the distribution. The keyword
given in the first column of Table 7.2 can be used rather than the filename. This maintains
compatibility with versions C13 and before. This abundance sets in this table have been part of the
code’s distribution for a number of years and more recent sets are not listed here. Do a listing of
the *.abn files in data/abundances to get a full list of the available abundances.
Some of the stored abundance sets include grains, as indicated in Table 7.2. The no grains and
no QHeat options are recognized, as described on the grains command (see section 7.9). For
instance, ISM abundances but Orion grains would be specified with the combination
grains Orion
abundances "ISM.abn" no grains
72 CHAPTER 7. CHEMICAL COMPOSITION
The abundances files contain lines giving the name of an element and its abundance relative to
hydrogen. Hydrogen may be in specified, or may not be. If the abundance of hydrogen is given
and is not equal to unity the code will rescale the abundances by the entered value for hydrogen. If
hydrogen is not specified it is assumed to have an abundance of 1.
All elements heavier than hydrogen are turned off before the abundance files are read. An
element is turned on if it appears in the file. If an element is not included in the file it will not be
included in the calculation.
The abundances command has a print option to report grain types and abundances entered for
each active element.
To access the full range of grain options it is best to combine the no grains option on the
abundances command and follow that with the grains command and its options, described in
section 7.9), as in
abundances ISM no grains
grains [options]
Figure 7.1: This figure shows the net emission computed by the test case grains qheat. The
solid line includes quantum heating while the dashed line has disabled it. The emission lines have
been suppressed in this plot for clarity.
7.7. ELEMENT NAME [SCALE, ABUNDANCE, ISOTOPES, OFF, LOG, TABLE] 77
measurement from a single terrestrial source”. By default, the abundances of Asplund et al. (2009)
are used, modified to match the primordial D/H ratio of 1.65 × 10−5 (Pettini and Bowen, 2001),
and to reproduce Cloudy’s historic 13C isotope fraction of 1/30.
Additional isotopic data used internally include masses derived from Audi and Wapstra (1995),
and spins and magnetic moments obtained from Stone (2005).
Note that the command automatically resets the Deuterium and 13C abundances. The command
element name isotopes, described below, should be issued to maintain a desired isotope ratio,
following all instances of abundances isotopes.
A user-defined file must include fractions for all the isotopes present in the default files.
The default isotope abundances were used in our predictions for hyperfine structure line
emission from hot and rarefied media, e.g., the intracluster medium in galaxy clusters, and the
Orion million K gas; these are discussed in detail in Chatzikos et al. (2014).
This mainly affects HD cooling. The default is the primordial abundance of 1.65 × 10−5 as
measured by Pettini and Bowen (2001).
The command set D/H has been deprecated.
The code currently predicts the 13 CO rotation spectrum and the intensity of 13 C III λ 1910Å
(Clegg et al., 1997) using this ratio. The code does not now solve for 12 C and 13 CO abundances
and ionic fractions but rather assumes that the ratio 12 CO/13 CO and the 12 C+2 /13 C+2 ionization
fractions are equal to 12 C/13 C. This ignores chemical fractionation. A full treatment of this
physics is high on the list of priorities.
The 12 C/13 C ratio depends on both location in the galaxy and age. It is ≈ 90 in the solar system
(Asplund et al., 2009) and reflects the galactic value when the sun formed. The value toward the
Galactic center is about 20 increasing to ≈ 77 at the solar radius (Wilson and Rood, 1994). The
default value of 30 is a compromise.
The command set 12C13C has been deprecated.
renormalized so that the total abundance of the element is equal to the value specified by other
commands.2
This command does not specify the chemical state. The H2 fraction can be set with the set H2
command. Chemistry is disabled if you set the ionization distribution of an element that is part of
the chemical network. It will not be possible to obtain a chemical solution if the abundances of the
atom and ions cannot respond to changes in the chemistry.
All of this is unphysical and is only intended as a way to test the code.
because the ism.ini file turns off zinc. This destroys the memory of the element zinc
ionization command, which sets the ionization of the element. So, when the element is turned
back on with the element zinc on command the ionization will be determined self consistently
rather than set to the constant values.
to turn off elements that have trivial abundances. Table 7.6 lists the elements in terms of
decreasing abundance. The command
elements limit off -7
would cause all elements at Cobalt and above in Table 7.6 to be turned off.
The first number on each line is the log of the radius (the default) or depth (if the keyword
depth also appears on the element line). The second number is the log of the abundance of the
element at that point, by number relative to hydrogen. The table ends with a line starting with the
keyword end. Up to 500 pairs may be entered. This command always specifies the absolute
abundance and not the scale factor.
The chemical composition printed at the start of the calculation is always the composition at the
illuminated face of the cloud. If the table gives composition as a function of radius then the
composition will be evaluated at the inner radius of the cloud. If the table gives the composition as
a function of depth then the composition will be evaluated as a depth of 10−30 cm. The table must
extend to this depth as in the example above.
7.9 Grains
This command controls how grains are included in the calculation. They are not included by
default. Grains are included in the compositions set by some abundances commands (see Table
7.9. GRAINS 81
7.2 above). Grain physics was originally developed in collaboration with Peter van Hoof, Peter G.
Martin, and Joe Weingartner. Peter van Hoof did the majority of the coding, and he is the
maintainer of the code. Reviews are given by Spitzer (1948, 1978), and Martin and Zalubas
(1979). Baldwin et al. (1991), Weingartner and Draine (2001b), van Hoof et al. (2004) and
Weingartner et al. (2006) describe the theory incorporated in the code.
The save grain commands produce output giving details about the grains. Some details of the
grain physics can be adjusted with the no grain . . . family of commands. The compile grains
command (page 266 below) is used to create new grain opacity files, or to recompile them if the
code’s energy mesh is changed.
include grains. The elements which make up the grains are depleted from the gas phase in these
abundance sets. Elements are not depleted in sets that do not include grains by default.
• grains ISM specifies grains with a size distribution and abundance appropriate for the ISM
of our galaxy. This includes both a graphitic and silicate component and generally
reproduces the observed overall extinction properties for a ratio of extinction per reddening
of RV ≡ Av /E(B −V ) = 3.1. This is the default and will be used if no keywords occur on
the grains command. If either keyword graphite or silicate also appears then only that
grain type is included. Both species are included if neither keyword appears.
• grains Orion specifies graphitic and silicate grains with a size distribution and abundance
appropriate for those along the line of sight to the Trapezium stars in Orion. The Orion size
distribution is deficient in small particles and so produces the relatively grey extinction
observed in Orion (Baldwin et al., 1991). If either keyword graphite or silicate appears
then only that grain type is included. Both species are included if neither keyword appears.
• grains PAH turns on PAHs. See section 7.9.4 below for more details.
Grain abundances An optional scale factor on the command line changes the grain abundance
relative to its default value. If the keyword log appears or if the number is less than or equal to
zero then the number is the log of the scale factor. It is the linear factor if the keyword linear
appears or if no keyword appears and the number is positive.
It is also possible to change the abundances of the grains with the metals grains command. The
metals command scales the abundances of all elements more massive than helium by a scale
factor. If the keyword grains occurs then the grain abundance will also be scaled up or down. This
would keep the grains to metals abundance ratio constant.
The following example uses ISM gas-phase abundances, Orion silicates with dust to gas ratio
twice the default value, and ISM graphite with default ISM abundances.
# use ISM abundances but DO NOT include ISM default grains
abundances ISM no grains
# Orion silicate with twice the Orion abundance
grains Orion silicate 2
# ism graphite with ISM dust to gas ratio
grains ISM graphite
The default H II region grain abundances are close to the ISM value. Planetary nebula grain
abundances are quite uncertain. Clegg and Harrington (1989) find dust-to-gas ratios below the
ISM value, while Borkowski and Harrington (1991) find a dust-to-gas ratio an order of magnitude
above ISM in a hydrogen-deficient planetary nebula. Mallik and Peimbert (1988) find dust-to-gas
ratios roughly equal to the ISM in a sample of PNs. Stasińska and Szczerba (1999) discuss
properties of a sample of PNe. In view of this scatter the grain abundance of PNe should probably
be treated as a free parameter.
Size resolved or averaged grains Grains in the ISM have a broad range of sizes, often described
by a power-law distribution (Mathis et al., 1977). By default the grains will be resolved into ten
size bins. If the keyword single appears then the grains will have properties determined by
averaging over the entire size range. If the keyword distribution appears then the code will
resolve the size distribution. This is the default and will be used if no keyword appears. The single
84 CHAPTER 7. CHEMICAL COMPOSITION
option may save some machine time but will give a less realistic representation of the grain
physics. This is because many grain properties such as temperature and charge depend strongly on
the size. In particular, the photoelectric heating of the gas can be underestimated if the single
mean grain is used.
• An abundance command will override all grains set with a previous abundances
command. So with the following pair
abundances ism
abundances old solar 84
ISM grains stay in place since grains are not included in the old solar mixture.
abundances ism
abundances orion
• An abundances command will NOT override any grains set with a previous grains
command. It will not add any grains either. Instead it will implicitly behave as if the option
no grains was given on the abundances command.
grains orion
abundances ism
• A grains command given after an abundances command or another grains command will
add to those already included, even if it would cause the same set of grains to be included
twice. A warning will be printed if the latter occurs. For instance, the following would add
the ISM grains twice and generate a warning;
abundances ism
grains ism
• An abundance command that does not set any grains will not override any grains set with a
previous abundances command.
The following would result in the Orion gas-phase composition but ISM grains
abundances Orion no grains
grains ism
7.9. GRAINS 85
The following will use ISM grains and Orion abundances, but will not include Orion grains since
the abundances command comes after the grains command;
grains ism
abundances Orion
The order is swapped in the following. This results in Orion gas-phase abundances and both ISM
and Orion grains
abundances Orion
grains ism
To avoid confusion it is best to only specify grains with only the abundances command or by
including the no grains option on the abundances command and then including explicit grains
commands. In any case, be sure to check the resulting output to verify that things are set properly.
7.9.4 PAHs
PAH’s are not included by default but are added with the PAH option on the grains command. A
detailed treatment of the physics of PAH’s is implemented, including photoelectric heating and
collisional processes as discussed by Weingartner and Draine (2001a), and stochastic heating
effects following Guhathakurta and Draine (1989). A power-law distribution of PAH sizes with 10
size bins (Abel et al., 2008, hereafter AB08), and two single-sized PAH’s, are included in the
downloaded data files. AB08 is the default and will be used if no further options occur on the
command line. If the keyword single also appears then an unresolved size distribution with their
mean properties is used.
The PAH opacity functions were derived by Kevin Volk from a variety of sources. The original
opacity function is from Desert et al. (1990) and Schutte et al. (1993). Kevin adapted the opacities
from these papers to agree with the infrared plateaus seen in the Orion Bar (Bregman et al., 1989).
The optical/far-UV opacity values have a gradual change to atomic cross sections so that you get
the correct X-ray cross sections.
The command grains PAH C15 will include a single small PAH with 15 carbon atoms per
molecule, with an abundance relative to hydrogen of n(PAH)/n(Htot ) = 1.986 × 10−7 ,
86 CHAPTER 7. CHEMICAL COMPOSITION
corresponding to n(C)/n(Htot ) = 2.979 × 10−6 . The command grains PAH C120 will include a
large PAH with 120 carbon atoms per molecule and an abundance relative to hydrogen of
n(PAH)/n(Htot ) = 2.483 × 10−8 , also corresponding to n(C)/n(Htot ) = 2.979 × 10−6 .
PAHs appear to exist mainly at the interface between the H+ region and the molecular clouds.
Apparently PAHs are destroyed in ionized gas (Sellgren et al., 1990, AGN3 section 8.5) by
ionizing photons and by collisions with ions (mainly H+ ) and may be depleted into larger grains
in molecular regions. By default the code assumes that the PAH abundance scales with the ratio
n(H0 )/n(H) although this can be changed. This produces very few grains in ionized and fully
molecular gas, but the PAHs will have their default abundance when the gas is atomic. This is
consistent with Sellgren’s observations of the Orion Bar.
The set PAH command described on page 300 makes it possible to specify several other laws
describing how PAH abundances depend on physical conditions. Note that if PAHs are present in
predominantly molecular gas then they will soak up nearly all of the free electrons. This has major
effects on the predictions of the chemistry network.
Tielens (2008) has determined the abundance of carbon locked up in PAHs containing 20 – 100
atoms as 14 parts per million hydrogen atoms. The average Galactic PAHs per hydrogen,
according to Tielens (2008), is 10−6.52 . This abundance can be generated with the commands
All the other multipliers for the grain abundance are still in effect when the keyword function is
used. This means that the abundance multiplier supplied with the grains command is also
included, as well as the factor supplied in the metals grains command. So the abundance of the
grain is given by the default abundance multiplied with the two numbers mentioned here times
whatever the grain abundance function returns.
If the grains command sets the abundance of a single grain species then the function option
will only apply to that particular species. If the option occurs on a grains command that specifies
more than one species of grains (as in the ISM keyword) then all species enabled by that
command are affected. This is probably unphysical since small grains are easier to destroy than
7.9. GRAINS 87
large grains. However, it is possible to define a different behavior of the grain abundance in
routine GrnVryDpth for each individual grain size bin.
The code does not attempt to conserve the mass of the grain constituents. The gas-phase
abundances are not automatically changed where the grain abundances are changed. This can be
done by entering abundances with a depth-dependent table of abundances using the element
¡name¿ table command.
These issues are discussed further in Section Section 2.10, Line intensities in a dusty cloud in
Part 2 of H AZY.
save grains This command will give some additional information about the grain properties.
save continuum This produces files that include the infrared continuum emitted by the gas and
grains.
grain no heating or no cooling The keyword no heating on the grains command will turn off
heating of the gas by grain photoelectric emissions. The keyword no cooling will turn off
all forms of cooling of the gas by collisions with the grains. Either violates energy
conservation, of course.
7.9. GRAINS 89
grains no reevaluate The no reevaluate option on the grains command will speed up a
calculation by not continuously reevaluating grain quantities. Roughly a 30% speedup can
be achieved. This is potentially dangerous and can destabilize a solution and/or lead to
wrong results. It should be used under certain experimental circumstances and not in a true
simulation of a cloud.
set nchrg The grain charge distribution is resolved into the number of discrete integral charge
states set by the set nchrg command. The default is two charge states. The population of
each of charge state is determined self-consistently by solving the grain
ionization-recombination balance equations as described in van Hoof et al. (2004).
and by gas collisions. Grains cool by collisions with the gas, the thermionic effect, and by
radiation. The balance between heating and cooling establishes the temperature for each grain size
and type. Grains affect the gas temperature by heating, mainly by the grain photoelectric effect
and the thermionic effect, and by cooling, mainly by free-particle capture onto the grain surface.
After the calculation is complete there is a summary of some properties of the grains:
Average Grain Properties (over radius):
sil-a0slm01* sil-a0slm02* sil-a0slm03* sil-a0slm04* sil-a0slm05* sil-a0slm06* sil-a0slm07* sil-a0slm08* sil-a0slm09* sil-a0slm10
nd: 0 1 2 3 4 5 6 7 8 9
<Tgr>: 1.031e+02 9.156e+01 8.352e+01 7.854e+01 7.647e+01 7.556e+01 7.017e+01 6.218e+01 5.472e+01 4.989e+01
<Vel>: 1.620e+01 2.530e+02 5.102e+02 1.008e+03 1.908e+03 3.188e+03 4.218e+03 4.802e+03 5.183e+03 5.381e+03
<Pot>: 9.085e-01 -3.674e-01 -9.865e-01 -1.049e+00 -8.803e-01 -6.611e-01 -7.209e-01 -9.144e-01 -1.055e+00 -1.116e+00
<D/G>: 2.014e-05 2.969e-05 4.379e-05 6.464e-05 9.554e-05 1.416e-04 2.112e-04 3.186e-04 4.913e-04 3.264e-04
gra-a0glm01* gra-a0glm02* gra-a0glm03* gra-a0glm04* gra-a0glm05* gra-a0glm06* gra-a0glm07* gra-a0glm08* gra-a0glm09 gra-a0glm10
nd: 10 11 12 13 14 15 16 17 18 19
<Tgr>: 1.207e+02 9.886e+01 8.591e+01 8.088e+01 8.047e+01 7.164e+01 5.921e+01 4.733e+01 3.644e+01 3.030e+01
<Vel>: 2.500e+01 3.807e+02 9.346e+02 2.205e+03 4.155e+03 5.682e+03 6.422e+03 5.650e+03 5.099e+03 4.990e+03
<Pot>: 8.393e-01 -7.959e-01 -1.138e+00 -1.019e+00 -7.800e-01 -9.040e-01 -1.116e+00 -1.224e+00 -1.263e+00 -1.273e+00
<D/G>: 3.396e-05 3.691e-05 4.021e-05 4.401e-05 4.874e-05 5.554e-05 6.739e-05 9.234e-05 1.458e-04 6.589e-05
Dust to gas ratio (by mass): 2.374e-03, A(V)/N(H)(pnt):1.296e-022, (ext):8.245e-023, R:3.247e+000 AV(ext):7.158e-003 (pnt):1.125e-002
Finally, the save grain abundances command give the abundances as a function of depth.
(in any order) will result in a grain abundance that is a quarter of the default and a metallicity that
is half of solar.
In the following example the ISM gas phase and grain abundances are each increased by a
factor of two over their default values;
abundances ISM
metals and grains 2
where the reference abundance AZ (reference) is the composition the user specifies with other
commands and the depletion scale factor DZ is set with these commands. The final gas-phase
abundance results.
There are two versions of this command. The first uses a table of depletion factors that is based
on older work and has been included in C LOUDY for some time. The second uses the empirical
correlations given by Jenkins (2009) to relate depletions to a global variable he terms F∗ .
The depleted elements form grains. These commands do not create a set of grain species that is
consistent with the depletion. The grain properties are set separately, usually with one of the
grains commands described in Section 7.9. Specifying grains by themselves (with the grains
command) does not change the gas-phase abundances, which is not self-consistent. The code will
complain if you do this, but still perform the simulation.
The number of depleted atoms that results from the metals deplete command are not directly
related to the number of atoms in grains, as set with the grains commands. These commands do
not attempt to conserve mass. Snow and Witt (1996) argue that standard grains have more mass
than the heavy elements depleted from a solar abundance. Interstellar grains are likely to be
porous with a part of the volume a vacuum. You can judge the potential mismatch by looking at
the reported number of atoms in grains and also the number of atoms depleted from the gas phase.
These are given in the chemical composition report at the top of the main output.
The default file that is read if no name as specified is documented in the readme.md file located
in this directory.
The readme.md file in the abundances directory also specifies the names of other available
data files. Another file, perhaps your own, will be read if a filename appears within double quotes
on the command line. This new file must follow the format of the existing files. If you create
additional depletion files for your work please consider documenting what you have done by
placing comments inside the file and offering it back to the C LOUDY project by posting on the
user forum.
Command syntax
The full command syntax is
metals deplete Jenkins2009 Fstar=0.5 [vary] ["MyFile.dpl"]
The year 2009 must be the first number on the command line and the next number, F∗ , must be
between 0 and 1. A space may or may not be placed between the name and year. A typical use
case might be
abundances nova
metals deplete Jenkins 2009 Fstar=0.5
grains
which depletes the specified “nova” abundances by the Jenkins (2009) depletion scale factors with
F∗ = 0.5 and includes our default ISM grain mixture.
The value of F∗ is linear by default but the log and linear keywords allows F∗ to be specified
either way. The print option will vary F∗ between 0 and 1 and report the depletion factors.
This command includes the vary option, described in Section 17.3 allowing the grid command
or the optimizer to be used. The grid command requires log arguments so a grid of models
varying F∗ between 10−2 and 1 could be generated by
metals deplete Jenkins2009 Fstar=-0.5 vary log
grid -2 0 0.1
Other details
The Jenkins original work was limited to elements he studied with HST. Some very highly
depleted elements were not included in his study. Calcium is very highly depleted, was not studied
by Jenkins, and would produce strong lines if left at solar abundances (Kingdon et al., 1995) .
Solar-abundance calcium has a significant effect on other lines because of energy balance.
[Gunasekera et al. 2021] describe how we deplete elements not considered by Jenkins. Both
their updated version of the Jenkins analysis, which includes missing elements, and our version of
Jenkins’ original file, are available.
Some elements in Jenkins (2009) have depletion scale factors that are greater than unity for
small F∗ . The physical meaning is that depletion onto grains has increased the abundance of those
elements. Jenkins’ values are used by default and a comment is produced after the last zone if the
depletion scale factor of any element is greater than unity. We provide a limit option to specify an
upper limit to the depletion scale factor. The following is an example in which DZ is not allowed
to be greater than unity
7.11. METALS DEPLETE COMMANDS 95
The Jenkins (2009) study actually worked with ISM gas-phase abundances scaled relative to the
Lodders (2003) solar abundances. We provide both the Lodders (2003) and the more recent
Lodders et al. (2009) versions of her solar abundances in the C LOUDY distribution. The Lodders
(2003) gas-phase ISM abundances could be specified by
abundances "solar_Lodders03.abn"
metals deplete Jenkins2009 Fstar=0.5
grains
using the composition stored in the solar Lodders03.abn file in the abundances
directory. This combination would reproduce the Jenkins work.
96 CHAPTER 7. CHEMICAL COMPOSITION
Chapter 8
DENSITY LAWS
8.1 Overview
Hydrogen plays a fundamental role in any astrophysical plasma because of its large abundance.
As a result the hydrogen density [cm−3 ] is a fundamental parameter. Commands that specify how
the hydrogen density is set, and how it changes with radius or depth, are described in this section.
Constant density is the default. In this case the total hydrogen density (the sum of the protons in
atomic, ionic, and molecular form, given by the command hden) is kept constant. Many other
density or pressure distributions can also be computed.
A cloud can be isobaric, maintain constant pressure, if the timescale for changes, for instance in
the continuum source or the cooling time, is short compared with the dynamical or sound-crossing
time td
∆r
td = [s] (8.1)
cs
where ∆r is the cloud thickness and cs is the sound speed (AGN3 eq 6.25)
1
γkT0 2
cs = [ cm s−1 ]. (8.2)
µ0 mH
is kept constant. This is not quite an isochoric density law because the total particle density is not
constant—the electron and molecular fractions can vary with depth. I prefer this type of model
97
98 CHAPTER 8. DENSITY LAWS
because the homology relations with the ionization parameter (Davidson, 1977) are preserved.
The hydrogen nucleon density is set with the hden command.
The timescale tscale is the first number on the line and the power-law index α is the second. Here
Po (to ) is the static pressure evaluated at the illuminated face of the cloud.
The last two parameters can be omitted from right to left. Point sources or infinitesimally thin
sheets are the default. The default index is zero.
8.4
Dark [options]
This command provides a gravitational pressure term due to a dark-matter distribution. At present,
there is only one option, a standard Navarro et al. (1996) (NFW) profile.
8.5.2
Dlaw wind
This sets up a density profile consistent with a steady-state wind and the continuity equation. The
steady-state velocity profile is parametrized as in Springmann (1994):
q
v(r) = v⋆ + (v∞ − v0 ) β1 x + (1 − β1 )xβ2 . (8.9)
where x ≡ 1 − r⋆ /r and we set r⋆ to the inner radius of the cloud (except that x has a minimum
value 0.01 for computational stability). The mass loss rate into 4π sterradians (Ṁ) then allows the
density via continuity:
n(r) = Ṁ/(4πmH µr2 v(r)), (8.10)
where µ is the mean molecular weight of the gas. The parameters must be specified in this order:
Ṁ, v∞ , β2 , β1 , v0 , v⋆ . Only the first three are required. Ṁ should be given as M⊙ yr−1 . All
velocities should be given as km s−1 . The final three may be omitted right to left and take default
values β1 = v0 = v⋆ = 0. All values are interpreted as linear values.
This command sets the hydrogen density but does not create a wind. It creates a density profile
that mimics a wind. The dlaw command (with or without the wind keyword) and the wind
command described in section 14.5 are mutually exclusive, and you will just end up with
whichever one appeared last. There is no way to combine the two.
This command is experimental.
102 CHAPTER 8. DENSITY LAWS
Be sure that the first and last radii or depths extend beyond the computed geometry—this law is
only to be used for interpolation and the code will stop if extrapolation is necessary. Note that the
first depth must be smaller than 10−30 cm, and also that there must not be a space in the first
column of any lines with numbers—the code will think that an end of file has been reached.
Alphabetic characters can be placed anywhere on the line and will be ignored—I placed the word
continue in the first four columns for this reason (it is actually totally ignored).
The keyword column will replace the depth variable in equation 8.11 with the total hydrogen
column density. The period should then be the column density of one cycle. This will more evenly
weight the final column density over low- and high-density gas.
The fluctuations abundances command proves a mechanism for varying the gas-phase
abundances of the elements.
where no is the background density outside the cloud, with default value 1 cm−3 , and ∆r is the
depth into the cloud, measured from the illuminated face. The log of no is the optional first number
on the command line. The variable Rscale depth is the scale depth for the cloud and has a default of
one parsec, Rscale depth = 3.086 × 1018 cm. Other scale depths are specified by the optional second
parameter, which must be entered as a log of the scale depth in cm. The optional third argument is
the index α, which has the default1 α = 1. The arguments can be omitted from right to left.
If the optional keyword linear appears then the number is the density itself and not its log.
For situations where the hydrogen atom is close to LTE and the gas is hot, there is a problem in
defining the neutral hydrogen density because of the well-known divergence of the partition
function, as discussed, for instance, by Mihalas (1978). The atomic hydrogen density is defined as
the total population in all computed levels. In most circumstances, i.e., n(H) ≤ 1015 cm−3 and
T ≤ 104 K, the ambiguity is much less than 1%.
Several options are available to specify optional power-law dependencies on depth variables.
These are described in the next sub-sections.
i.e., α
r
n (r) = no (ro ) [cm−3 ]. (8.14)
ro
In this example no , the density at the illuminated face of the cloud, will be 109 cm−3 . The optional
power law is relative to radius, the distance to the central object, not the depth into the cloud. If
α = −2 then the density will be proportional to the inverse square of the radius. Both density and
photon flux will fall off as an inverse square and the cloud will tend to have the same ionization
parameter (and hence physical conditions) across the ionized zone.
A hydrogen ionization front will not be present and the model will extend to infinite radius when
Q(H) ≥ Qcrit (H). In this expression αB (Te) is the hydrogen Case B recombination coefficient and
no and ro are the inner density and radius respectively. Generally, a hydrogen ionization front will
not be present if the density falls off faster than an inverse square law, but rather the level of
ionization will tend to increase with increasing radius. In either case, if a reasonable outer radius
is not set, the calculation will extend to very large radii, an unphysically small density will result,
and usually the code will crash due to floating point underflow, followed by division by zero. It is
usually necessary to set an outer radius when the density falls off with an index α ≤ −2, since, for
most circumstances, the cloud will remain hot and ionized to infinite radius and zero density.
where N(H) is the total hydrogen column density [cm−2 ] from the illuminated face to the point in
question, and N(H)scale [cm−2 ] is the scale column density. The log of N(H)scale is the third
number.
106 CHAPTER 8. DENSITY LAWS
Chapter 9
GEOMETRY
9.1 Overview
This section describes commands that determine the geometry of the emission-line region. Many
of the quantities used below are defined in the section on geometry in the Chapter DEFINITIONS.
The geometry is always spherical but can be made effectively plane parallel by making the
radius much greater than the thickness of the nebula. It is also possible to compute a model in
which the emission-line region is almost a disk. A covering or filling factor can be specified and
the cloud can be either static or expanding.
107
108 CHAPTER 9. GEOMETRY
One of the keywords slit or beam must appear. The keyword beam tells the code to simulate
observing a resolved nebula with a small pencil beam centered very close to the central source. If
the keyword slit appears then the computed structure is simulated to be observed with a long slit
that extends over the entire width of the nebula, also positioned very close to the center. In the
long slit case, it is assumed that the observer has added up all the flux from the source over the full
length of the slit. It is not now possible to simulate an off-axis long slit or pencil beam.
The aperture command only affects how volume emissivities are added together to form the
final line spectrum printed in the main C LOUDY output and saved with the save lines command.
When optimizing line fluxes, or line flux ratios, the quantities observed through the aperture will
be used. This command has no effect on any aspect of the calculation of conditions in the gas. It
also does not affect the spectral energy distribution predicted with the save continuum
commands. This will always be integrated over the entire nebula. The continuum bands in the file
data/continuum bands.ini are not predicted when the aperture command is used, for
this reason.
This command only affects the line luminosities in the luminosity case. When the intensity case
is used and the inner radius is not specified all integrations are for a pencil beam through a
plane-parallel slab.
In the following a quantity α is defined with the following meaning: α = 0 in the pencil beam
case (we are observing along a single line of sight passing through the center of the nebula), α = 1
in the long-slit case (we are observing through a narrow slit placed over the center of the nebula;
the slit is longer than the nebula and the flux is integrated over the entire slit), and α = 2 in the
general case (we are observing the flux integrated over the entire nebula). The default index is
α = 2.
In all cases an observed quantity Qα can be defined for a line λ as
Z α
r
Qα (λ ) = Cα Dα ε (λ ) dr, (9.1)
r0
where ε(λ ) is the line’s volume emissivity [erg cm−3 s−1 ] and
C0 = 2
C1 = 2πr0 , (9.2)
C2 = 4πr02
where r0 is the inner radius of the nebula. The covering factor Dα depends on the geometry and is
D0 = 1/2, 1
D1 = Θ/2π . (9.3)
D2 = Ω/4π
For the entire nebula (α = 2) this is the familiar definition (see also Sect. 9.5). In the long slit case
(α = 1), D1 is the fraction of a large circle in the plane that is being observed that actually passes
through nebular material. In the pencil beam case (α = 0), D0 indicates whether only the front or
back side of the line of sight is covered with nebular material (D0 = 1/2) or if both sides are
covered (D0 = 1). The covering factor for the entire nebula is set with the covering factor
command. This is the quantity D2 . You can set the quantities D0 or D1 using the aperture
covering factor command described below.
9.4. CLUMPING FACTOR = 0.05 [INDEX =-1] 109
In the luminosity case Qα will have units erg s−1 for the entire nebula, erg cm−1 s−1 for the
long slit case, and erg cm−2 s−1 for the pencil beam. In the intensity case the units are erg cm−2
s−1 . The luminosity and intensity cases are defined on page 13.
Qα is the quantity printed in the main C LOUDY output and by the save lines command in the
default setup. However, if the distance to the object is set with the distance command, we can
convert this quantity into an observed flux at Earth. In the luminosity case we can construct the
following relations between observed quantities and the quantities predicted by the code. These
neglect interstellar extinction of course. The flux measured at the Earth will be
Aα
Fα (λ ) = Qα (λ ) [erg cm−2 s−1 ], (9.4)
4πD2
with
A0 = Ωb D2
A1 = Θs D . (9.5)
A2 = 1
Here Fα is the observed flux [erg cm−2 s−1 ] D is the distance of the object [cm], as specified with
the distance command, Θs is the slit width [radian], and Ωb is the surface area of the pencil beam
[sr].
If the print line flux at Earth command is used, then C LOUDY will do this conversion for you
and Fα will be reported in the main C LOUDY output as well as the save lines output. Fα will then
also be used when optimizing line fluxes. You can set the value of Θs or Ωb with the aperture size
command described below.
In the intensity case (the intensity case implies α = 0) the relation between the observed surface
brightness S(λ ) and Qo (λ ) is simply:
Ω 1 arcsec2
S (λ ) = Q0 (λ ) ≈ 1.87043 × 10−12 Q0 (λ ) [erg cm−2 s−1 arcsec−2 ]. (9.6)
4π
ro
hcyl
Figure 9.1: This figure shows the geometry assumed when the cylinder command is used.
The effective volume element used to compute the emissivity of the gas is given by
!
2 r min r, hcyl
dV = 4π ro f (r) dr [cm3 ] (9.7)
ro ro
where ro is the inner radius, hcyl is the cylinder half-height, and f (r) is the filling factor. The
default value is hcyl = 1035 cm.
Changing the emissivity as described by equation 9.7 is the only effect of this command. It does
not alter the radiative transfer methods and is only formally correct when the continua and lines
are optically thin.
When combined with the aperture slit command, it will be assumed that the slit is oriented
along the rotational axis of the cylinder. If the slit is oriented at an angle, you can model this
geometry by dividing the height of the cylinder by the cosine of the angle. If the slit is
perpendicular to the rotational axis you can simply omit the cylinder command since it will have
no effect on the predicted spectrum.
The default outer radius is effectively infinite (actually 1031 cm). If the intensity case is used
then a starting radius of 1030 cm will be set by default. Under most circumstances this will result
in a plane-parallel geometry.
Page 254 describes a problem that can occur if the second parameter is used with the vary
option. Please read it if you will vary the radius with the outer radius set. The stop thickness
command provides a way to set a stopping thickness without specifying a starting radius.
9.11. SPHERE [OPTIONS] 113
removed from the sphere command. Only the covering factor command changes the covering factor.
114 CHAPTER 9. GEOMETRY
10.1 Overview
Line transfer is relatively unimportant in low-density clouds such as H II regions and planetary
nebulae. Radiative transfer can be important in other environments, such as nova shells and the
broad-line region of active nuclei, where excited states of hydrogen have significant populations
and subordinate lines become optically thick. In other cases grains are present and all lines can be
absorbed by background opacity. All radiative transfer effects are included in the treatment of line
formation, including line thermalization, destruction by background opacities, pumping by the
incident continuum, and escape from the cloud.
It is necessary to iterate upon the solution if emission lines are optically thick since total optical
depths are not known on the first iteration. The default is for a single iteration. This is often
adequate for low-density nebulae such as planetary nebulae or H II regions. A second iteration is
sometimes enough to establish a fairly accurate line optical depth scale for many resonance
transitions. Further iterations are usually needed when subordinate lines are also optically thick.
The iterate to convergence command will iterate until the optical-depth scale is well defined.
Line-radiation pressure cannot be computed accurately until the total line optical depths are
known, so this quantity is only meaningful after the first iteration. C LOUDY will stop if the internal
radiation pressure exceeds half of the surface gas pressure in a constant-pressure model since such
a geometry is unstable unless it is self-gravitating. The radiation pressure is not allowed to exceed
half the gas pressure on the initial iterations of a multi-iteration constant-pressure model. This is
to prevent the calculation from stopping when the optical depth scale is not yet well converged.
The following sections outline various commands that affect the radiative transfer.
115
116 CHAPTER 10. OPTICAL DEPTHS AND RADIATIVE TRANSFER
This command is used to check the line emission from hydrogen-like and helium-like species in
the Case B limit (AGN3 section 4.2). This command should not be used in any model that is
supposed to represent a real physical environment. It is intended only to provide an easy way to
check predictions of the code against simple, more limited, calculations. In particular, when this is
used the Lyman-line optical depths will be made artificially large. This may affect the ionization
and temperature of the gas.
With no options, this command sets the inward-looking optical depth of Lα for all atoms and
ions of the H- and He-like iso-electronic sequences to 105 so that even a one-zone model will be
close to Case B.1 This optical depth does not depend on the abundance of the element, or even the
presence of the species. The optional number is the log of the Lα optical depth. One-sided escape
probabilities are used so the total escape probability is simply that for the inward direction. In
keeping with the Case B approximation the Case B command suppresses excited-state line optical
depths.
The Hummer option. The species include all collisional processes. Case B does not define the
population of the ground or first excited state so a true comparison with Case B results should
have collisions from these levels turned off. This is done with the Hummer and Storey option
(with the key Hummer), to allow comparison with their 1987 and 1995 papers. Collisions from
the ground and first excited states are included if this second option is not specified. Collisions
between levels with n ≥ 3 are included unless the database H-like collision off or database
He-like collision off commands are given. Collisions between the 2s and 2p levels are always
included unless the database H-like collisions l-mixing off command is given. Similarly, this
option uses the Percival and Richards (1978) n-changing collisions and the classical Pengelly and
Seaton (1964) theory for l-changing collisions.
In the case of the He-like isoelectronic sequence the Case B command sets the optical depths in
the singlet Lyman lines to a large value. The Hummer & Storey option has no effect on the
He-like sequence.
The no Pdest option turns off destruction of Lyman lines by background opacity.
There are several side effects of this command that may after the spectrum or physical
conditions in unexpected ways. The large Lα optical depth will often result in an especially strong
radiation field within this line. This affects the gas through photoionization of excited metastable
states of H and He and of those elements with a small enough ionization potential. The no
photoionization option on the Case B command tells the code not to include photoionization
from excited metastable states like the 2s level of H0 . But these strong diffuse fields will also
strongly affect the level of ionization of the gas, making the resulting ionization equilibrium a
fiction. Optically thin gas is actually described by Case C (Ferland, 1999b, Luridiana et al., 2009
and AGN3 Section 11.4) where continuum pumping enhances Balmer lines. The large Lyman-line
optical depths that result from the Case B command will prevent continuum resonant pumping of
the atom. Beware.
1 Beforeversion 96 the default optical depth was 109 . This caused extreme Lα behavior in a grain-free H II region.
The lower value is a better estimate of the physics that occurs in an actual H II region.
10.4. CASE C [OPTIONS] 117
“deep enough” for a given study. The optical depths are always computed self-consistently. On
second and later iterations the total optical depths are normally those of the computed structure.
Near the shielded face the outward optical depths will be small and radiation will freely escape in
the outward direction. The gas temperature may fall dramatically due to the enhanced cooling
resulting from the free escape of line photons. In real PDRs considerable neutral or molecular
material probably extends beyond the stopping point so that line photons do not freely escape. The
shielding effects of this unmodeled extra material can be included with this command. Then, the
shielded face of the cloud will correspond to the mid-plane of the overall structure and lines will
not artificially radiate freely into the outer (unmodeled) hemisphere.
then exactly two calculations of the structure will be done. If the number on the line is two or
greater, then the number will be the total number of calculations of the structure.
If the all option is given, the convergence test will be made on all transitions, rather than a
selected set.
Section 10.7.3 discusses some reasons the simulation may not converge. There are likely to be
convergence problems if the outer edge of the cloud is set by the lowest allowed temperature
rather than an outer radius of column density.
extinction sources. (Thermal and ionization effects of Compton scattering are turned off with the
no Compton command). The no scattering opacity command is automatically generated when
sphere (see section 9.11) is specified.
10.9.1 Definitions
The Doppler width of any line that is broadened by both thermal motions and turbulence that is
given by a Gaussian is given by the quadratic sums of the thermal and turbulent parts,
q √
u = uth 2 + u2 −1
turb = b = 2σ [ cm s ]. (10.1)
Here b is the Doppler parameter used in much of the UV absorption-line literature, σ is the
standard deviation (often called the dispersion) for a normal distribution, and σ 2 is the variance.
For a thermal distribution of motions the average velocity along the line of sight (Mihalas, 1978,
equation 9-35, page 250) and the most probable speed (Novotny, 1973, p 122) of a particle with
mass m are both given by p
uth = 2kT /m [ cm s−1 ]. (10.2)
This corresponds to 16.3 t4 /mAMU km s−1 for pure thermal motions. This command sets uturb .
p
Note that with these definitions the full-width half-maximum (FWHM) of a line is equal to
√
u (FW HM) = u 4 ln 2 [ cm s−1 ]. (10.3)
that the turbulent velocities may be organized, or lined up in certain directions, if the gas is
magnetically controlled. This presents a complication that is ignored.
Heiles and Troland (2005) discuss both turbulence and magnetic fields. Their equation 34 gives
the turbulent energy density in terms of the one-dimensional turbulent velocity dispersion
2
∆Vturb,1D (or standard deviation). Note that we write velocities in terms of u with the relationship
2 2
u = 2∆Vturb,1D . Their energy density can be rewritten as a pressure:
2
uturb
F 2 3.9 × 10−10 F ntot
erg cm−3 ; dyne cm−2
Pturb = 6 ρ uturb = 105 cm−3 1 km s−1
2 (10.4)
ntot uturb −3
= 2.8 × 106 F 105 cm−3 1 km s−1
cm K
where ntot is the total hydrogen density, uturb is the turbulent velocity, and He/H= 0.1 was
assumed. The term F accounts for how the turbulent velocity field is ordered (Heiles and Troland,
2005, their equation 34). F is 2 for turbulent velocities that are perpendicular to the magnetic field
as in Alfven waves and F is 3 for isotropic turbulent motions. The default value of F = 3 is
changed by entering a new value as a second number on this command line.
F 2 B2
Pturb = ρ uturb = Pmag = [erg cm−3 ]. (10.7)
6 8π
The magnetic field command sets B. The turbulent velocity is determined from the magnetic field
assuming equation 10.7. Heiles and Crutcher (2005) argue that the correlation between turbulent
and magnetic pressures, while true on average, does not hold in detail for specific regions of the
ISM. When this option is used, you can optionally add the parameter F on the command line (the
default is F = 3). The keyword no pressure is supported, but not dissipate.
122 CHAPTER 10. OPTICAL DEPTHS AND RADIATIVE TRANSFER
where r0 in the inner radius and u0 is the initial turbulence specified with the turbulence
command.
Chapter 11
THERMAL SOLUTIONS
11.1 Overview
This Chapter describes options that affect the thermal solution and the gas kinetic temperature.
The accuracy of the thermal solution is set by the error tolerance in the heating—cooling
balance. This is set with the set temperature tolerance command. Other commands can change
some details of the thermal solution.
where c1 and c2 are the two numbers entered with this command. If the second optional argument
c2 is not specified then zero (i.e., constant cooling) is assumed.
The function evaluating cextra sets the variable cextxx. The expression can be easily changed to
other forms by changing how this variable is set.
123
124 CHAPTER 11. THERMAL SOLUTIONS
WARNING! It is also necessary to specify a stopping criterion of some kind when this
command is used. Most thermal-equilibrium calculations stop when the electron temperature falls
below some lowest value, set with the stop temperature command and with the default value
4000 K. This cannot happen with a constant-temperature model. For instance, a constant
temperature model of a planetary nebula will continue until the default limit to the number of
zones (now 1400) is reached. The vast majority of the cloud will consist of predominantly neutral
gas well outside the hydrogen Strömgren sphere. This gas will have a small ambient level of
ionization and emission due to collisional ionization. The resulting emission-line spectrum might
be surprising since the neutral gas contributes significant emission.
Any of the stopping criteria described in the Chapter Stopping Criteria can be used. A more
physical constant temperature model of a ionized cloud could be done by using the stop efrac
command to stop the calculation when the hydrogen ionization front is reached.
coronal, T=1e6K
hden 0 # H density 1 cmˆ-3
set dr 0 # set zone thickness of 1 cm
stop zone 1 # do only one zone
If this is the only energy source specified then it is considered an intensity command.
Emission-line intensities will be predicted, as described on page 13, unless a radius is also
specified.
Figure 11.1 shows the soft X-ray line and continuum emission predicted from the input stream
in the test case ism hot brems.in.
1 In versions 87 and before the coronal command set the zone thickness to 1 cm and stopped after computing one
zone.
11.5. CORONAL EQUILIBRIUM, T=1E7 K [LINEAR] 125
1000
100
10
ν F ν (erg cm-2s-1)
0.1
0.01
10−4
0.01 0.1 1
Photon Energy (keV)
Figure 11.1: This shows the soft X-ray emission from the hot phase of a metal-rich ISM in coronal
equilibrium. The input script ism hot brems.in was used to create the predicted spectrum.
126 CHAPTER 11. THERMAL SOLUTIONS
The time init option provides a way to set initial conditions for a time-dependent cloud. This is
described beginning on page 162 where the time command is discussed.
The abundance of PAHs (see Section 7.9.4) has a direct effect on the electron density and hence
on the cosmic ray seconday ionization rate of H. The cosmic ray ionization rate of H2 is nearly
twice the rate for H since two atoms are present. This command changes the atomic hydrogen
ionization rate. Shaw and Ferland (2021) suggest that, for the average Galactic PAH abundance,
the cosmic ray ionization rate of atomic hydrogen is 3.9± 1.9×10−16 s−1 . This rate can be
specified with the command
Shaw and Ferland (2021) show that the hydrogen cosmic ray ionization rate derived using H+
3 is
much higher, 47.8± 23.3×10−16 s−1 , if PAHs are not present.
The default value of the index is α = 0, corresponding to a constant cosmic-ray density. The third
optional number is the log of the temperature of the fast electrons, if they are not relativistic. If
this third number is specified then expressions from Balbus and McKee (1982) will be used to
evaluate the electron heating rates. The options can be omitted from right to left.
107
104
1000
100
10 −5
10 10−4 10−3 0.01 0.1 1 10 100 1000
-3
n(H) [cm ]
Figure 11.2: This shows the gas kinetic temperature as a function of hydrogen density for a parcel of
ISM gas and dust exposed to ISM background starlight and cosmic rays. The upper curve includes
cosmic rays with the galactic background density while the lower curve has a density 105 times
smaller. The comsic rays strongly affect the conditions in the gas when the hydrogen density is
below ∼ 30 cm−3 .
The photoelectric heating and radiative cooling of low-density gas varies as the square of the
density while the CR heating varies linearly with density. This means that CR effects become
increasingly important, indeed dominant, at low enough densities. Figure 11.2 shows this.
The figure shows calculations in which both the galactic starlight and cosmic backgrounds are
included. One set of calculations has the full cosmic ray background density while the second has
10−5 of that value. The two nearly agree at high densities where CRs have little effect. The effects
of the CRs become increasingly dominant at lower densities, causing the gas to reach
temperatures of nearly 107 K at the lowest hydrogen column density shown.
Something to think about before adding cosmic rays to simulations of low-density gas.
11.7. FAILURES 100 TIMES [ MAP] 129
95 the option is not to produce a map, and this must be requested with the map option.
130 CHAPTER 11. THERMAL SOLUTIONS
The third optional parameter T is the total thickness of the slab. If this is given then the second
exponential term will be added. This will mimic an external heat source that warms the cloud
from both the illuminated and shielded faces. If the third parameter is not entered then the
rightmost term is not included.
where n(H) is the local hydrogen density [cm−3 ] and n0 is a scale density. The scale density is
unity by default and is changed by specifying the optional second number, the log of the scale
density.
where P is the local gas pressure [erg cm−3 ] and G is gravitational constant. All three parameters
must appear. There are spaces to either side of “ SS ”.
5 Inversions through 94.00 the heating rate varied as exp[−rscale /(r − ro )] and went to infinity as the illuminated
face. The radial dependence was changed to its current form in 94.01.
11.10. HIGH TEMPERATURE APPROACH 131
where B100 µG is the magnetic field in units of 100 µG. The plasma β parameter, defined as the
local ratio of thermal to magnetic energy densities, β = Pgas /Pmag , is printed in the summary of
pressure contributions. The field affects the dynamics of the gas when β ≤ 1.
Supersonic turbulence in rough energy equipartition with the magnetic field is often observed in
the cold ISM (Heiles and Crutcher, 2005). The turbulence command has an equipartition option
to set the turbulent velocity to a value in energy equipartition with the magnetic field. Although a
general correlation is observed in the cold neutral medium of the ISM, it is not thought to be a
fundamental relationship (see the Heiles & Crutcher paper).
The second optional argument is the heating—ionization efficiency of the neutrons, unity by
default. Both quantities are interpreted as logs if ≤ 0 and linear if positive.
continue 13 5
continue 14 6
continue 15 7
end of tlaw
Be sure that the first and last radii or depths extend beyond the computed geometry—this law is
only be used for interpolation and the code will stop if extrapolation is necessary. Note that the
first depth must be smaller than 10−30 cm, and also that there must not be a space in the first
column of any lines with numbers—the code will think that an end of file has been reached.
Alphabetic characters can be placed anywhere on the line and will be ignored—I placed the word
continue in the first four columns for this reason (it is actually totally ignored).
Chapter 12
135
136 CHAPTER 12. CONTROLLING ATOMIC AND MOLECULAR MODELS
determined by the local physical conditions since high levels may not be populated if, for instance,
the temperature is low.
The commands described in this section allow changes to the detailed treatment of each species.
Save species
This family of commands, described on 231, reports column densities, densities, and other
properties of the species.
runs a model with 10 levels for the O+ ion, rather than the default value.
Using =all rather than a numeric argument requests the maximum available number of levels.
The equal sign is part of the keyword and must be specified with no space between it and all.
12.3.3 Database H2
With no options, the only effect is to include the large model of the H2 molecule.
selects the Le Bourlot et al. (1999) data set. The keyword ohH2 adjusts the ortho data and the
keyword paH2 adjusts the para data set. One of these keywords must be specified. Both cannot be
adjusted with the same command.
database H2 H collisions (year)
This command sets collision rates for H2 – H0 collisions. There are three data sets. The default
is 2007, which uses the rates given by Wrathmall et al. (2007). The 1999 option uses the rates
given by Le Bourlot et al. (1999). The 2015 option uses the rates given by Lique (2015). By
default we use the Wrathmall et al. (2007) data.
database H2 He collisions options
This sets collision rates for H2 - He0 collisions. There are two data sets. The default is ORNL,
which uses the rates given by Lee et al. (2006). The Le Bourlot option uses the rates given by Le
Bourlot et al. (1999).
database H2 collisional dissociation on/off turns on or off collisional dissociation. The default
is to include it using the estimates given in Shaw et al. (2005). These rates are all only guesses and
represent an uncertainty.
database H2 grain collisions on/off turns off downward transitions induced by collisions with
grains.
By default the code will uses guesses of collisional rate coefficients using the g-bar method.
Collisional deexcitation for the g-bar transitions are turned off with the database H2 gbar
command.
When the H2 abundance is below this limit the photodissociation, heating, and cooling rates, are
evaluated using expressions in Tielens and Hollenbach (1985a). H2 level populations are set to
their LTE value so that self-shielding in the electronic bands is still computed.
densities, the emission-line spectrum, and details of the effects of H2 on the conditions in the
cloud.
continuum
collapsed
energy
resolved
Figure 12.1: This shows resolved and collapsed levels for a typical H- or He-like species. The set
of horizontal bars on the left are energy levels with principal quantum numbers ranging from 1 to
7, increasing from bottom to top. The lowest three configurations are resolved into nl terms while
higher shells are treated as collapsed levels, in which the nl terms are assumed to be populated
according to their statistical weight. The levels are adjusted with the database AA-like levels
command. This is a cartoon and does not represent any particular species.
levels is less than the total. We “topoff” the model by adding the remaining recombination
coefficient to the model atom, as controlled with the database xx-like topoff command.
By default, the lines produced by the highest levels are not included in the printout since their
intensities may be unreliable. The print line iso collapsed command, described in 16.19.11, will
cause lines produced by the highest levels to be included in the printout. See the discussion of the
print line iso collapsed command for more details.
resolved levels for C, N, O, Fe, and Zn, and three resolved levels for all remaining elements.
Increasing nmax allows a better representation of the atom’s emission, especially the collision
physics that occurs within higher levels of the atom, but at the expense of longer execution times
and greater memory requirements.
There are also 20 collapsed levels for He0 and one collapsed level for heavier elements. These
collapsed levels bring together all of the individual nLS terms as one pseudo-level. The
recombination coefficient into this pseudo-level is the sum of recombination coefficients into the
individual terms plus the recombination topoff. Transition probabilities from this pseudo-level are
calculated as follows.
∑Lu =L p m1 gLu S A(nu Lu S → nl Ll S)
A(nu → nl Ll S) = . (12.1)
∑Lu =Ll ±1
This causes the collapsed level to behave exactly as if it were a set of resolved terms populated
according to statistical weight.
There is no limit to the number of levels other than computational resources like memory and
time.
database H-like collisions l-mixing Pengelly [Classic/PSM17] If the key Classic is used, then
the original Pengelly and Seaton (1964) is used. If the key PSM17 is used, then the slightly
different modified theory from (Guzmán et al., 2017) is used.
The Case B command, described in Section 10.3, uses PSM20 by default. That command has a
key Hummer to allow comparison with Hummer and Storey (1987), that switches to the original
Pengelly and Seaton (1964) formalism. This formalism is providing Maxwell averaged rate
coefficients so thermal option does not apply.
database H-like collisions [thermal] l-mixing Vrinceanu This changes to the semi-classical
formalism of Vrinceanu and Flannery (2001), which reports cross sections. By default, the rate is
derived from the cross section at the most likely collision energy. Here the density is so low that
l-changing collisions are unimportant, or so high that the levels are l-mixed. See the database
H-like collisions [thermal] command above for a discussion of the thermal averaging options.
database H-like collisions l-mixing VOS12 Semiclassical This changes to the approximation
shown in equation (9) of Vrinceanu et al. (2012). This formalism is providing Maxwell averaged
rate coefficients so thermal option does not apply.
database H-like collisions [thermal] l-mixing [thermal] VOS12 Quantal This changes to the
approximation shown in equation (2) of Vrinceanu et al. (2012), corresponding to a pure quantal
treatment of l-mixing collisions. See the database H-like collisions [thermal] command above
for a discussion of the thermal averaging options.
The same commands used for H-like explained in section 12.4.3 are only used for l > 2. For l ≤ 2
l-shells are highly non degenerate and cannot be adequately treated by l-changing theories (see
Guzmán et al. (2017)).
database He-like collisions l-mixing [options] Where as in section 12.4.3 options are off,
Pengelly [Classic], [thermal] Vrinceanu , VOS2012 Semiclassical or [thermal] VOS2012
Quantal
database He-like collisions l-mixing all degenerate [options] This disables non degenerate
calculations and all l − l ′ (also l ≤ 2) collisions are calculated with the model chosen in options,
assuming all the levels are degenerate. This is mainly a testing command. The options are either
Pengelly, Vrinceanu or VOS12.
database He-like collisions l-mixing PSM20 Standard calculations from (Badnell et al., 2021),
with the criteria used in Guzmán et al. (2017), will be performed. This option will be performed as
default if no command is included.
database He-like collisions l-mixing [B72—no degeneration] [options] This sets up the
criterion for degeneration on collisions. If B72 is used, criteria from equation 3.12 of Brocklehurst
(1972) is adopted. If no degeneration, Pengelly and Seaton Pengelly and Seaton (1964) smoothed
criteria is followed. The options are either Pengelly, Vrinceanu, VOS12, or PSM17 (see above).
database He-like collisions l-mixing S62 [off] [degeneration ops] [options] This
enables/disables calculations based on Seaton (1962) for l ≤ 2 where electrons dominate. If
disabled these values are calculated with the model chosen in the options. The options are either
Pengelly, Vrinceanu or VOS12. Differently to the all degenerate command, this does not
disable non-degenerate l-shells.
The He-like iso sequence. If no number appears on the command, but the keyword large or
small does, then the number of levels will be large enough to extend to either n = 40 or 3.
Actually, the atoms are coded so that there is no limit to the number of levels that can be included,
other than the memory and computer time requirements (which can be substantial for large model
atoms).
Use the database xx-like levels print to confirm that you are using the expected number of
levels.
A word of caution. Using a small model atom for He-like species (and especially for helium
itself) can have unexpected consequences. Only the levels up to n = 3 are resolved, meaning that
lines coming from higher levels will be collapsed into one entry with an unusual wavelength. One
particular example for a well-known line is the He I 1s4d 3 D → 1s2p 3 P◦ triplet line at 4471.49 Å.
This line will be absent when using a small model atom since it comes from n = 4. But a line at
4469.79 Å will be present, which includes all lines from n = 4 to 1s2p 3 P◦ . Make sure to study the
output of the save line labels command when you are using a small model atom to understand
what the entries on the line stack mean.
Warning! Note that the command
will set all 30 hydrogenic atoms to a large number of levels. This would require roughly half a
gigabyte of memory for the H-like sequence alone, and would be very slow on today’s computers.
It is best to set only the most important elements to large levels.
12.4. DATABASE H-LIKE | HE-LIKE [ELEMENT, OPTIONS] 149
The continuum radiative pumping rate of the Lyman lines of H I will be multiplied by the scale
factor that appears on the line. This is meant to take into account the possible presence of Lyman
lines in emission or absorption in the incident continuum. The pumping rate is normally set by the
intensity of the coarse continuum at the line wavelength. The number that appears on the
command line is a scale factor that multiplies this continuum.3 Numbers ≤ 0 are interpreted as a
log and the log keyword will force interpretation as a log. A value of greater than 1 would
correspond to Lyman lines in emission in the incident radiation field. A scale factor of 2 would
simulate the presence of stellar Lyman emission lines with peak intensities twice those of the
neighboring continuum.
incomplete redistribution, which minimizes the line width and radiation pressure. This issue is
discussed further in Elitzur and Ferland (1986).
The extra characters in the label are the l state of the upper level and a + or − sign indicating
whether the l ′ value for the lower level is either l + 1 or l − 1. So, e.g., H 1 d- 6562.81A is the
3d → 2p transition of hydrogen. If l > 20 for the upper level, no character designation for the
quantum number exists and the l value itself will be printed, e.g., H 1 22-. Note that only
fine-structure components for resolved to resolved transitions will be saved, and not for collapsed
to resolved transitions. If the optional keyword off is entered, saving the fine-structure
components will be disabled, which is also the default. This command can only be used for the
H-like iso sequence.
• Each database has a masterlist file, located in data/DATABASE, that lists the species to be
used with that database.
• If a species is present in more than one database the higher priority database is used. The
Stout database has the highest priority, followed by Chianti and LAMDA.
• You can create your own masterlist file to cherry pick the species and database you want
with the database DATABASE masterlist command.
• In general, we use only a fraction of the levels available in the database. The print option on
the commands will report the species and number of levels for that database.
• The levels max option will use all available levels for a particular database. The calculation
will take significantly more time. Lykins et al. (2013) discusses the strategy we use to limit
the number of levels.
• It is possible to specify the minimum number of levels for a particular species by entering a
number following the species name in the masterlist file for Chianti and Stout.
If a double quote appears on the line then the filename between the pair of double quotes will be
used instead of the CloudyChianti.ini file. This makes it possible to create masterlist files
that select portions of Chianti.
157
158 CHAPTER 13. CONTROLLING CHEMICAL MODELS
Chapter 14
14.1 Overview
This section describes the dynamical and time-dependent calculations that can be done with the
code. This physics was developed in collaboration with Robin Williams and Will Henney, and
Henney et al. (2005) and Henney et al. (2007) describe first applications.
These calculations begin by doing several iterations to compute the static structure. This
establishes the optical depth scale that is used in later calculations. The number of static
calculations is 3 by default and is reset with the set dynamics relax command.
Advective terms are included in the balance equations by adding upstream quantities that are
taken from the previous iteration. Problems would arise if we needed to look upstream beyond the
outer edge of the computed radial grid. To prevent this the outer radius found in the static
iterations will be the outer radius of later calculations. This overrides the behavior of the radius
command.
Warning! The physics behind these commands is still being developed. The heuristics that are
needed to control changes in the time steps or the advancing upstream parameters are not
complete. Output options to capture the information in the flow or over time are not complete. All
of this is an area of active development.
In the following discussion commands that are still under development are introduced by the
symbol and are in a grey box.
14.2
cosmology
This follows the time dependent recombination of the early universe. It was added by Ryan Porter.
It has several options.
159
160 CHAPTER 14. DYNAMICAL & TIME-DEPENDENT CALCULATIONS
14.2.1
cosmology omega
This specifies an omega parameter. It accepts the keywords baryon, radiation, matter, lambda,
and K.
14.2.2
cosmology Hubble
This specifies the Hubble constant in units of 100 km s−1 Mpc−1 .
10-1
10-2
10-3
10-4
102 E/ΔE = 33.3
101
100
10-1
10-2
10-3
10-4
1 2 3 4 5 6 7 8 9
Ε / keV
Figure 14.1: The X-ray spectrum of a unit-volume parcel of gas cooling under conditions of con-
stant pressure (isobarically) from X-ray temperatures (1 keV), computed at three resolving powers.
In the top panel, the resolving power is comparable the proposed Athena resolving power around
6 keV. In the bottom panel, the resolving power is comparable to the Chandra non-dispersive re-
solving power around 1 keV. In the middle panel, the resolving power is at the code default. This
functionality is described in Chatzikos et al. (2015).
162 CHAPTER 14. DYNAMICAL & TIME-DEPENDENT CALCULATIONS
14.4
Time-variable incident radiation field
This follows the time-dependent evolution of a cloud near a variable continuum or heat source.
Time-dependent calculations are done by setting up an initial geometry using the usual
commands that specify a cloud and the incident radiation field. The time keyword establishes
which energy sources vary with time. The keyword can appear on any of the commands that
specify the luminosity of the radiation field and on the hextra command. The trace option will
turn on trace printout.
If a time command also occurs then all radiative and heat sources with the time keyword will
change with time. The time command sets a time step and stopping time. Each iteration is a time
step and the number of time steps is set with the iterate command. The calculation will stop when
either the number of iterations or the stopping time is reached.
In this example only one radiation field is given and the flux of hydrogen-ionizing photons
varies with time. A constant time step of 107 s is used. The time command is followed by the
series of lines giving the brightness of the incident radiation field as a function of time. The series
ends with the line starting with end. Each of the lines in the age—brightness table starts with age
but these characters are ignored. They are only present to improve readability.
In this example the incident radiation field is a blackbody with its intensity set by an ionization
parameter. The code does fifty iterations with a time step of 107.5 s since this is specified on the
initial time command line. In the table the blackbody is left at its initial brightness for the first
107 s then lowered to 10−5 of the initial value for a total of 109.3 s when it is raised back to the
initial value.
As given above, the time steps always have the same size, the size given on the initial time
command. It is also possible to specify the size of the time step for each elapsed time that appears
in the table that gives the continuum brightness. If all of the optional time-step sizes are specified
then they are used in place of the time step given on the time command. The time step sizes are
multiplicatively increased by the time-step scale factor. It is also possible to give a time-step scale
factor saying how to increase the time step.
If any are missing then the time step on the command is used and is kept constant. The table
ends with a line saying end. If the optional end time is not specified on the time command then
the calculation will continue until the specified number of iterations has been performed.
164 CHAPTER 14. DYNAMICAL & TIME-DEPENDENT CALCULATIONS
Without a ballistic flag (or A negative velocity in the case with no velocity keyword) the code
simulates the flow including corrections due to pressure gradients in the flow, appropriate to a
weak-D or D-critical H II region (Henney et al., 2005). (Note that the positive velocity case has
however not yet been tested thoroughly.) This physics is currently under development in
collaboration with Will Henney and Robin Williams. The central object mass is set to zero.
14.5.2
wind advection, velocity=-5 km/s
The advection keyword says to include the effects of advection on the thermal and ionization
equations. Currently advection is only treated in the case where the velocity is negative,
corresponding to a flow off a molecular cloud towards the source of ionizing radiation. The
argument is the initial gas flow speed in km s−1 . This physics is being developed in collaboration
with Robin Williams and Will Henney and is not yet mature.
The advection case has the following options. In all cases the numerical parameter follows the
keyword. There can be many parameters on one command line.
velocity- The number following this keyword is the velocity in km s−1 . The following would
specify a simple R-type front
center, index- A varying mass flux with depth into the grid is specified by a law ρu = Φo (r − c)i .
This gives the variation in flux with distance r into the grid as a function of value c given by
the center parameter and the value i given by the index parameter. For example,
would correspond to a wind diverging spherically from a point 1016 cm into the grid with a
velocity of 20 km s−1 at the illuminated face. By default the mass flux is constant (i = 0). If
these are not specified then zero is assumed.
dfdr- This specifies the mass flux gradient, Φ′ = d ρu/dr [g cm−3 s−1 ], as an alternative to
specifying the velocity. This is useful in the case in which the flow reaches stagnation at the
surface of the model, in which case the velocity itself does not fully constrain the physical
parameters.
The set dynamics command described below controls many details of the dynamics. The set
dynamics pressure mode command tells the code whether it should search for globally subsonic
or supersonic solution. If this is not specified the code will compare the ram and gas pressure at
the illuminated face to try to determine whether a super- or sub-sonic solution is appropriate.
Convergence- the level of convergence can be estimated by comparing the discretization error
and convergence error as a function of iteration, as shown in Figure 4 of Henney et al. (2005).
14.5. WIND VELOCITY=300 KM/SEC [MASS =1.4 MSUN, DISK, BALLISTIC, STATIC] 167
14.6
Miscellaneous dynamics commands
14.6.1 Constant pressure time
This allows the pressure to vary with time. See Section 8.2.5 Constant pressure timescale = 2.3e9
s, alpha=-1 for more details.
set dynamics advection length [fraction ] This sets the look-back distance used for the
advection terms in the initial iterations of the solutions. Its optimum value is determined by
a compromise between speed of convergence (which is improved for large lengths) and
accuracy (which is improved for small lengths). The code automatically cuts the look-back
distance when good convergence is obtained so a reasonably large value can be assumed
initially.
If the keyword fraction occurs then the number on the line will be the fraction of the total
depth of the model. It is the log of the fraction if it is negative. If fraction does not occur
then the number is the log of the scale length in cm.
set dynamics antishock depth 16 would put an anti-shock at a depth of 1016 cm.
set dynamics antishock Mach 1.01 would put in an anti-shock when the mach number fell
below 1.01.
set dynamics population equilibrium This uses the equilibrium solution rather than the
non-equilibrium solution that is done in a dynamical or time-dependent model.
set dynamics pressure mode This changes some aspects of how the pressure solver deals with
the sonic point. The options are: original, subsonic, supersonic, and strongd. The default
chooses subsonic or supersonic based on a comparison of the ram pressure and gas pressure
at the face. Original mode uses similar criteria to choose in each zone but is liable to
oscillation. Subsonic and supersonic will force a globally subsonic or supersonic solution.
Original and strongd can pass through a sonic point. Strongd does this by following the
supersonic branch until there is no valid pressure solution, then following the minimum of
the pressure-density relation until it can leave along the subsonic branch. By varying the
168 CHAPTER 14. DYNAMICAL & TIME-DEPENDENT CALCULATIONS
face conditions, the depth of the internal region of unphysical solution values can be
minimized, to converge on a physical strong-D type solution.
set dynamics shock depth. The argument is the log of the shock depth in cm.
set dynamics relax 4. This gives the number of static iterations to be performed before
dynamical or time-dependent behavior begins. The initial iterations are done to establish the
equilibrium geometry, optical depth scale, and other properties. The default is to do 3
iterations to relax the solution.
STOPPING CRITERIA
15.1 Overview
C LOUDY will stop at some depth into the cloud. The physics that sets this depth is important since
it can directly affect predicted quantities. This chapter describes various stopping criteria.
Two geometries, matter bounded and radiation bounded, can be identified for an ionized gas.
A radiation-bounded cloud is one where the outer edge of the emitting gas is a hydrogen
ionization front. In this case the calculation stops because nearly all ionizing radiation has been
attenuated and the temperature falls below 4000 K, the default lowest-allowed kinetic temperature.
This choice of lowest temperature was made with optical emission lines in mind. Setting another
outer limit is not necessary unless molecules or lines with very low ionization and excitation
potentials (i.e., the [C II] or [O I] far infrared lines) are of interest. You lower the stopping
temperature with the stop temperature command.
In a matter-bounded cloud the gas is optically thin to energetic radiation and the outer radius of
the cloud must be specified. This could be a column density, physical thickness in cm, or optical
depth. More than one stopping criterion can be specified and the calculation will stop when the
first one is met.
C LOUDY will say why it stopped after the results of the last zone calculation are printed. It is
very important to make sure that the calculation stopped for the reason you intended.
If no stopping criteria are set the calculation will usually stop because the default lowest
temperature (4000 K) or the default greatest number of zones (1400) was reached.
169
170 CHAPTER 15. STOPPING CRITERIA
is printed. First locate the print out for the last zone. The following example, from the pn paris
simulation, shows the printout that includes the last zone’s results and the start of the calculation’s
summary. The first line after the ionization distribution of iron gives the title for the model and the
line after that gives the reason that the calculation stopped. In this case the calculation stopped
because the kinetic temperature fell below the lowest temperature, which was left at its default of
4000 K. This occurs very near the hydrogen H+ - H0 ionization front. Optical and UV lines form
at higher temperatures so the calculation would include all contributors to the optical/UV
spectrum. Lines such as [C II] 158µ or [Si II] 34.8µ form in cool neutral gas, so these lines would
become stronger if the calculation went more deeply, into cold neutral gas.
####150 Te:3.978E+03 Hden:3.000E+03 Ne:1.276E+02 R:4.062E+17 R-R0:3.062E+17 dR:5.658E+13 NTR: 5 Htot:4.094E-19 T912: 9.97e+07###
Hydrogen 9.70e-01 2.97e-02 H+o/Hden 1.00e+00 3.57e-09 H- H2 1.57e-07 5.07e-10 H2+ HeH+ 8.59e-08 Ho+ ColD 3.27e+19 8.86e+20
Helium 8.77e-01 1.23e-01 1.81e-04 He I2SP3 4.78e-08 5.43e-16 Comp H,C 1.39e-26 3.59e-27 Fill Fac 1.00e+00 Gam1/tot 6.57e-01
Carbon 2.50e-04 9.97e-01 3.12e-03 0.00e+00 0.00e+00 0.00e+00 0.00e+00 H2O+/O 0.00e+00 OH+/Otot 0.00e+00 Hex(tot) 0.00e+00
Sulphur 0 7.02e-05 9.64e-01 3.56e-02 2.36e-06 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00
Argon 0 7.82e-01 1.96e-01 2.24e-02 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00
Iron 0 9.25e-06 9.97e-01 2.80e-03 3.42e-06 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00
parispn.in Meudon Planetary nebula
Calculation stopped because lowest Te reached. Iteration 1 of 1
The geometry is spherical.
!Some input lines contained [ or ], these were changed to spaces.
!Non-collisional excitation of [OIII] 4363 reached 2.35\% of the total.
!AGE: Cloud age was not set. Longest timescale was 3.68e+012 s = 1.17e+005 years.
Suprathermal collisional ionization of H reached 9.48\% of the local H ionization rate.
Charge transfer ionization of H reached 8.94\% of the local H ionization rate.
Left on its own, the code will probably stop when the temperature falls below the default lowest
temperature of 4000 K. This is what happened in the preceding example. This temperature was
chosen for two reasons; a) collisionally excited optical and ultraviolet lines generally form in gas
hotter than this (but infrared lines will form at far lower temperatures) and b) more than one
thermal solution is possible for temperatures around 3000 K (Williams, 1967), so thermal
instabilities may result if the gas extends to cooler temperatures.
It is a good idea to check whether the predictions would change if the model were made thicker
or thinner. It is safe to assume that a line’s intensity does not depend on the thickness of the cloud
if the final temperature is well below the excitation potential of the line or the gas is more neutral
than the species of interest.
The chapter Output in Part 2 of this document lists all possible reasons for stopping.
This command was added by Nick Abel. Note that this counts each H2 as two hydrogen atoms.
172 CHAPTER 15. STOPPING CRITERIA
n H0
Z
−2
0
f (r) dr [K−1 cm ].
N H /Tspin = (15.5)
Tspin
Note that Tspin is computed self-consistently including the effects of pumping by the background
continuum (usually the CMB) and the local Lα radiation field.
The 2 in H2 must come before the log of the column density in the command. This is really the
H2 column density, not twice it.
at 73.5 Ryd. The argument of this command is the log of the effective column density Ne f f ec . The
absorption cross-section per proton for cold neutral gas is taken from Morrison and McCammon
15.6. STOP CONTINUUM FLUX 200 MICRON 65 JANSKY 173
(1983). Scattering opacities are not included in this optical depth. No attempt is made to use
realistic physical conditions or absorption cross sections—this command follows the Morrison &
McCammon paper.
If the gas is highly ionized then the actual column density will be greater than the effective
column density. It will be less if the abundances of the heavy elements are greatly enhanced.
# this will stop on a flux of 1e-21 erg sˆ-1 cmˆ-2 Hzˆ-1 (100 Jy) at 100 micron
stop continuum flux 100 micron -21 erg/s/sqcm/Hz
#
# stop at the He++ - He+ ionization front
hden 9
stop eden 9.06 # stop when helium (10\% by number) is He+
#
# stop at H+ - H0 ionization front
hden 5
stop eden 4.5 # stop when electron dens falls below H density
The default is an electron density of −1030 cm−3 . (The negative sign is not a typo.)
Intrinsic intensities are used by default. Emergent intensities will be used if the keyword
emergent appears on the command line.
The line label and wavelength should be entered exactly as it appears in the emission-line
output. The line label within the quotes must have the same number of spaces as in the output.
“C 2” and “C 2” are not the same (the first has only one space and the second is correct with two
spaces). The wavelength is assumed to be in Angstroms if no letter follows it. The wavelength can
be changed to microns or centimeters by immediately following the wavelength with ’m’ or ’c’ so
that the [C II] 157.6µm would be written as “157.6m”.
Up to 10 different stop line commands may be entered. If more than one stop line command is
entered then the code will stop when any limit is reached.
linear keyword occurs then the number is interpreted as the linear value. The optical depth is only
for absorption and does not include scattering opacities. The second number is the energy in
Rydbergs. It is interpreted as a log if it is negative, as linear if positive, and must be within the
energy bounds considered by the code (presently 3.040 × 10−9 Ryd to 7.354 × 106 Ryd). At
present only one stopping optical depth can be specified. If more than one is entered then only the
last is honored.
It is traditional in X-ray astronomy to characterize low-energy cut-offs as the equivalent
completely neutral column density for solar abundances. This is not correct when the gas is
ionized (since the high-energy absorption opacity is diminished) or when the abundances of the
heavy elements are enhanced (since the high-energy opacity is increased). For extreme cases these
effects can change the opacity by more than an order of magnitude. The deduced column density
is underestimated by the same amount. It is better to convert the deduced column density back
into an optical depth at 0.5 or 1 keV (this is actually the observed quantity) and use this optical
depth and energy as the stopping criteria than to use the deduced column density as a stopping
criterion. Either this command, or the stop effective column density command (which is actually
a form of the stop optical depth command can be used to stop the calculation at an X-ray optical
depth corresponding to a certain low-energy absorption.
The optical depth used in this command is the absorption optical depth and does not include
scattering opacities. In general, the effects of scattering opacities are much more geometry
dependent than absorption opacities.
Note that C LOUDY always uses the dimensionless line center optical depth. The integrated
optical depth is the standard used in radio astronomy. The integrated optical depth is √ called the
mean optical depth in optical spectroscopy. The dimensionless mean optical depth is π larger
than the line center optical depth. In radio astronomy, the integrated optical depth is often given in
velocity units, km s−1 .
problems may develop if Tlow is lowered below a few thousand degrees Kelvin. This issue is
discussed further in the section Problems in Part 2 of this document.
If the keyword exceeds appears on the line then the specified temperature will be the highest
allowed temperature. The calculation stops if the temperature exceeds the value on the command.
This might be necessary when a grid of models is computed but those in the high temperature
phase (i.e., T > 105 K) are not of interest. The other rules for the command are unchanged.
If no number appears on the command line, but the keyword off does, then temperature will not
be used as a stopping criterion.
CONTROLLING OUTPUT
16.1 Overview
C LOUDY is capable of generating lots of output although its default output is minimal. Commands
that control the output are described here. A Chapter in Hazy 2 describes the meaning of the
output. The output commands are split into two broad classes:
• save commands generate output in separate files, typically once per zone, or once per
iteration.
16.2 No buffering
This command is described in Section 19.11.4.
179
180 CHAPTER 16. CONTROLLING OUTPUT
The optional second number sets the relative intensity of the reference line. If it is equal to 100,
as in this example, then all intensities will be relative to a reference line intensity of 100. The
default is for an intensity of unity. The example given above will cause the relative intensities to
be expressed relative to an [O III] λ 5006.84 intensity of 100. The scale factor must be greater than
zero.
The code works by finding the first line in the emission-line stack whose wavelength and label
matches the line on this command. There is a possible uniqueness problem since more than one
line can have the same wavelength. This is especially true for XUV or soft X-ray lines and for H2
lines.
The following shows some examples of the normalize command:
# normalize to spectrum to Pa
normalize to "H 1" 1.875m
species name must be followed by the “[:]” notation, e.g., “C+[:]”. A subset may be specified by
entering the desired levels in the brackets, e.g., “C+[1:5]” will print rows 1–5 and columns 1–5 of
the matrix.
there may be many lines contributing to a particular cell. This command will print the line energy
(Rydberg), continuum array index, and the line’s spectroscopic notation, for every line that is
included in the calculation. The lines will be printed in the order in which they are entered into the
continuum. The printout can then be sorted by energy or array index to discover all lines that
occur within a particular cell. This is a debugging aid.
There are two optional numbers which give the lower and upper limit to the energy range
(Rydbergs) to be printed. All lines are printed if these numbers do not appear then.
Some spectra have so many lines that several different transitions may appear to have the same
wavelength. This occurs to some extent for most H2 , Fe II, and He-like spectra. The print line
precision command allows you to change the number of digits in the printed line wavelength. It
may be necessary to increase the wavelength precision if the default line wavelengths are
ambiguous and more than one transition appears with the same wavelength.
If no numbers are entered, but the keyword off appears then all lines are printed, even those
with zero intensity.
version 96 but was moved to become an option on the print line command.
16.20. PRINT MACROS 187
The resulting output will print the first print off command, but will not print the commands or
the print on command. If this output is used as input no further output will be created for the new
model. This problem will not occur if the print off command includes the keyword hide.
16.23 Print on
This command turns on printout. This is the opposite of the print quiet or print off commands.
6 The title was printed by default in versions 95 and before of the code. The title was generally deleted so that the
save file could be used to make plots so it is now missing by default.
192 CHAPTER 16. CONTROLLING OUTPUT
or a PPM image, depending on the keyword given, fits or ppm. The image will be generated for
the given species for all iterations and zones. This can be limited to specific iteration with the
keyword iteration followed by an iteration number, and likewise to a specific zone with the
keyword zone followed by a zone number.
The benefit of FITS images is that they can be manipulated with standard software (e.g., with
ds9, FTOOLS, python, etc.) in post-processing. The fits option builds upon, and extends the save
fits command. Whereas the latter generates a table, the former creates a FITS file that contains
three images, one for each of the rate matrix, the vector of creation rates, and the computed level
populations. In terms of the linear algebra system, Ax = b, which Cloudy solves, these images
hold the A matrix, the b vector, and the computed x = A−1 b vector, respectively.
Notice that if a subset of the energy levels is specified, only those levels will appear in the
output images. For instance, “Fe+[10:20]” will generate an 11×11 image for the rate matrix
(centered on the diagonal), and two 11×1 images for the creation rates, and computed
populations. It is recommended that the full matrix be output at first, and then the range of levels
be limited at a later stage, if needed.
Also note that a FITS file with the three images mentioned above will be created if negative
populations are computed for a species when solving the relevant linear algebra equation. The
output file name contains the failing species, the iteration and zone where the failure occurred, as
well as a substring to distinguish the FITS file from those generated with this command; e.g.,
Fe+2 it1 nz0 NEG POP.fits. This functionality is offered as a debugging aid.
All reported quantities are the value itself. This command accepts the log option (page 192) to
report quantities in the log style used in C13 and before.
194 CHAPTER 16. CONTROLLING OUTPUT
109
ν Fν (erg cm-2 s-1)
108
Figure 16.1: The predicted X-ray spectrum of a warm absorber in an Active Galactic Nucleus.
Prominent emission and absorption lines are present along with broad UTA absorption features.
The parameters are from Reynolds & Fabian (1995, MNRAS, 273, 1167).
16.42. SAVE CONTINUUM 197
resolution command to specify the spectral resolution of a spectrograph. Higher values for the
resolution will make the line rise higher above the continuum.
Note that this command will only adjust the height of the line, not the width. The latter will
always be the width of one cell in the coarse continuum mesh (even if the line is broader than that
cell). This implies that the line flux in the continuum array is artificially changed by the set save
line width / resolution command. Changing the spectral resolution can be useful to emphasize
weak lines in a plot, but should never be used when energy conservation is important, e.g. when
you want to postprocess the file to fold the saved continuum with a photometric passband.
Column 1. The first column gives the photon energy in the units set with the units option. The
default units are Rydbergs.
Column 2. This is the incident continuum at the illuminated face of the cloud.
Column 3. This is the transmitted incident continuum and does not include diffuse emission from
the cloud. The cloud is assumed to fully cover the continuum source along our sight line, so
a covering factor has no effect. If the option no isotropic has been issued, the transmitted
continuum does not include contributions from isotropic incident radiation sources.
Column 4. This is the outward portion of the emitted continuum and line emission. This includes
a covering factor if one was specified. This does not include the attenuated or reflected
portions of the incident continuum.
Column 5. This gives the net transmitted continuum, the sum of the attenuated incident (column
3) and diffuse (column 4) continua and lines. This would be the observed continuum if the
continuum source were viewed through the gas. Emission from the cloud includes a
covering factor if one was specified. If the option no isotropic has been issued, the net
16.42. SAVE CONTINUUM 199
transmitted continuum does not include contributions from isotropic incident radiation
sources. This is the same as Column 2 of the save transmitted continuum command,
described in Section 16.42.22.
Column 6. This is the reflected continuum and is only predicted for an open geometry.
Column 7. This is the total, the sum of the transmitted and reflected continua and lines. The
attenuated incident continuum is included. If the option no isotropic has been issued, the
total continuum does not include contributions from isotropic incident radiation sources.
Column 10 and 11. Line and continuum labels indicate the lines and continuum edges that might
contribute at that energy. The line label gives the label for the strongest line in the total
spectrum (reflected plus outward) the line-center of which lies in that bin. (This is new in
C10. All previous versions simply reported the first line encountered, as is still the case with
the continuum label.) The continuum labels are established when the code is set up and they
do not mean that the continuum feature is actually present in the spectrum.
Column 12. This gives the number of emission lines within that continuum bin, divided by the
ratio of the energy width of the cell to the cell’s central energy, dE/E. So this is the number
of lines per unit relative energy.
This command will save the continuum at the outer edge of the cloud unless the keyword every
appears on the command line, in which case it will save the continuum for every zone.
Central
Object Reflected A
Emission
Transmitted
Emission
Figure 16.2: This figure illustrates several components of the radiation field that enter in the
calculations.
16.42. SAVE CONTINUUM 201
emission is detected) or column 7 (if both reflected and transmitted continua are seen). If the
central object is not seen then the quantity in column 4 would be observed.
The first column gives the photon energy in the units specified with the units option. The
second column gives the total emission from carbonaceous grains (including amorphous carbon
and PAH’s). The third column gives all emission from all constituents that are not carbonaceous.
In practice this will be mainly the silicates. The last column gives the sum of the two.
identify the portions of the radiation field that have the dominant interaction with the gas. The last
two labels on the line indicate which lines and continua contribute at that energy.
find the string occurring in two places, where the cooling is added with the call to CoolAdd and
another place where the cooling itself is evaluated. Comments around the call to CoolAdd indicate
that H2xC is cooling due to collisional excitation within the ground electronic state of H2 . A
search on the string "dust" finds its call to CoolAdd with the comment that it is cooling due to
grain recombination cooling.
Cooling due to the unified iso-electronic sequences is different since the label that occurs in the
call to CoolAdd is generated by the routine that evaluates the cooling and does not explicitly occur
in the source. The iso-electronic cooling labels begin with "IS", followed by a string indicating
the process, and followed by strings giving the iso-electronic sequence and the element. Search for
the start of the string but not for the element name. An example might be the string "IScionH
H". The "IS indicates that it is cooling due to an ion along the iso-electronic sequences and the
two ending H’s indicate that the coolant is H-like hydrogen. The string "IScion" occurs in the
source and comments indicate that the process is collisional ionization cooling. The iso-electronic
cooling strings do not include a pair of double quotes in the source since the ending double quote
occurs after the element names. You would search for the string "IScion".
16.47 Save dr
The logic behind the choice of zone thickness will be described.
16.48. SAVE DT 207
16.48 Save dt
The logic behind the choice of time step in time-dependent simulations will be described.
blackbody 1e5 K
ionization parameter -2
save FITS "filename"
This command is often used with the grid command which creates grids of calculations. In this
case, the command produces separate FITS files for each grid point. They will have names
grid000000000 filename, grid000000001 filename, etc., where filename is the
file name you supplied between double quotes. The meaning of the grid index embedded in the
filename can be found with the save grid command described in Section 16.58.
This is used with the grid command to create a file giving the parameters for each simulation in a
large grid of calculations. This can be combined with other save commands to create files giving
the derived quantities for a large set of calculations.
The first row gives tab-separated column titles. The column title for the parameters that are
varied will give the first few characters of the command line for that parameter. Each of the
following lines summarizes a particular grid point. The first column gives the index number in the
grid. This is useful if you have separate output for each grid point (e.g. from the save FITS
command). The index number will be part of the file name in that case. It is also useful for finding
back the output from a particular grid point in a save file (see Section 18.6 for more details). The
next two columns indicate whether the calculation had a failure or had any warnings. A successful
calculation will have “F” (for false) indicating no failure or warning occurred. If either of these is
“T” (for true) then that simulation had major problems. The following column is a string giving a
bit more detail about the exit code. It says “ok” if everything went fine and “warnings” if warnings
were present in the run, but nothing more serious. If the simulation failed completely, you could
see strings like “cloudy abort” or “early termination”. You should look at the detailed output to
find out what went wrong. The next two columns give the number of the MPI rank that executed
the simulation (will be zero in non-MPI runs) and the sequence number of the simulation on that
rank (they are executed in random order). These numbers are used for debugging the code. The
next columns give numerical parameters for each simulation in the grid. The last column gives all
the grid parameters as a single string. Many plotting programs will allow you to add this string
next to each of the plotted data points.
This command does not produce any output if the grid command is not used. In grid runs it is
highly recommended to always include this command. It allows you to see in one glance if the run
was successful and where the problems are in case it was not. It is also useful to include this
output in case you want to file a bug report.
The code will save the heating agents for each zone. The first two columns give the depth [cm]
and temperature [K]. The next two columns give the total heating and cooling rates [erg
cm−3 s−1 ], not including advective terms; advective heating is reported separately in the fifth
column. This is followed by a set of labels for various heat sources and the fraction of the total
heating (ignoring advective heating) carried by that agent. At least four (4) agents are reported, or
more if they are “bright” enough. The faintest agent saved is normally 0.05 of the total (sans
advective), and can be reset with the set WeakHeatCool command.
The heating labels will probably not correspond to any entries in the emission-line list. If the
identification of a heat source is in question the best recourse is to search for the heating label over
the entire code.
212 CHAPTER 16. CONTROLLING OUTPUT
16.61 Save H2
Some details of the large H2 molecule are output as a save file. One of the following options must
appear. The large H2 model is not enabled by default but is turned on with the database H2
command.
Many studies of H2 properties will use plots showing populations as a function of excitation
energy. The slope gives a population temperature, which may be related to the kinetic temperature
under some circumstances. Theoretical plots can be made using the save H2 column density or
save H2 populations commands described below. The level energy in K, given in the save output,
is the x-axis and the column density or population in each level is the y-axis.
The save grain H2rate command gives the H2 formation rate for each of the grain species
included in the calculation.
This sets the faintest line, and also requests all lines produced by all electronic configurations.
214 CHAPTER 16. CONTROLLING OUTPUT
This example requests only lines for the lowest three electronic configurations.
16.66 Save ip
This gives the ionization potentials of all shells of all ions and atoms of the 30 elements included
in the code. The first row is the spectroscopic designation of the ion. Each additional row gives the
subshell and ionization potential of that subshell in eV.
If the optional keyword relative is specified then the quantities will be given relative to the
normalization line. The default is to give the intensity 4πJ[erg cm−2 s−1 ].
The save lines zone cumulative and save lines emissivity commands can now be used in the
same calculation.
9 In versions 90 and before of the code, only the level 1 and level 2 lines were output by this command.
218 CHAPTER 16. CONTROLLING OUTPUT
The save lines cumulative and save lines emissivity commands can now be used in the same
calculation.
16.68. SAVE LINES, OPTIONS 219
Most emission lines share a common structure which contains a great deal of information about
line details. The keyword long will include these details in the report. In this case the report would
include
3653 H 1 6562.81A # index=2, 5 Elow=82259.08 H-like, 2ˆ2S - n= 3
220 CHAPTER 16. CONTROLLING OUTPUT
The entries marked “Inwd”, “Coll”, “Pump”, and “Heat” indicate the inward fraction, the
collisional and radiative pumped contribution to the line, and the line heating.
The command also accepts the no index keywords, which can be used to suppress the line index
in the output. This can be useful when comparing the line stacks for two versions of an atomic
database (e.g., Chianti), as spectral lines whose wavelength remains unchanged may appear
distinct to a differencing tool (e.g., sdiff) on account of the indices.
This output includes some transitions that are completely forbidden by radiative selection rules.
These transitions can still have collisional rates and so contribute to the heating or cooling. You
can judge whether a transition is truly forbidden by looking at the atomic data reported with the
save line data command, described in Section 16.68.3.
Filenames
These are tricky since two filenames appear in this command. All save commands have the name
of an output file in double quotes. This is the first filename on the command line. The file
containing the list of emission lines is within the second pair of quotes. In the following example
save line list "output.txt" "LineListHII.dat"
the save output will go to output.txt and LineListHII.dat contains the set of emission
lines. Predicted intensities for the list of lines contained in the second file will be output into the
first file.
This command works by calling routine cdGetLineList which is described in Part 2 of this
document. The filename within the second pair of quotes is sent to this routine. You can build
your own file and several sample files giving lists of emission lines are included in the data
directory. They have names that are of the form LineList*.dat and are intended for different
circumstances.
ignored. Lines containing data start with the line label in the first column, which is followed by
the wavelength in the usual C LOUDY format and optionally either the level indices or the energy
of the lower level to disambiguate the line (see Section 2.5.3 for details). Nothing else may appear
on the line except a comment at the end, also starting with a comment character. The following is
an example.
# the [O III] green line
O 3 5006.84
Blnd 5007A # Blend: "O 3 5006.84A"+"O 3 4958.91A"+"O 3 4931.23A"
H 1 4.65247m Elow=105291.6 # Is it 7->5 or 35->7? Use Elow to disambiguate
"Fe 2b" 7445
You can use the field of stars (“***”, i.e. a minimum of three consecutive stars starting in the first
column), or a blank line as an end-of-file sentinel. Any input after such a line will be ignored.
Output format
By default results are presented as rows of emission lines. The output file will have the list of
emission-line labels in the first row. The first column gives the iteration number and the remaining
entries across the row give the line predictions. The column option will produces columns instead.
The command
save line list "o3.lin" ratios from "linelist.dat"
would report the ratio of the [O III] λ 5006.84 to the λ 4363 line.
The following input script uses the grid command to predict the [O III] line ratio as a function
of n and T .
222 CHAPTER 16. CONTROLLING OUTPUT
[O III] 5007/4363
6
20
30
40
5 400 200 90 80 50
60
Log Density [cm-3]
4 10000 1000 70
2
4000 6000 8000 10000 12000 14000 16000
Kinetic Temperature [K]
Figure 16.3: The [O III] line ratio as a function of density and temperature.
This produces two output files, O3.grd containing the densities and temperatures, and O3.pun,
containing the ratio I(5006.84) / I(4363) for each density and temperature. These could be plotted
to show this line ratio as a function of density and temperature, as shown in the Figure 16.3.
16.68. SAVE LINES, OPTIONS 223
will read lines from linelist.dat and save the output in output.txt.
By default, there is one line of output per spectral line per zone. Each output line lists the depth,
the transition line label, the lower and upper level densities, the ratio (nu /gu )/(nl /gl ), and the
corresponding excitation temperature. An example drawn from work on hyperfine lines in galaxy
clusters is the following:
#depth emline nl nu (nu/gu)/(nl/gl) Tspin
5.00000e-01 Fe26 348.000m 9.3587e-11 9.0239e-15 3.2141e-05 3.9964e+00
5.00000e-01 Fe24 3068.00m 1.2614e-08 1.0044e-08 2.6540e-01 3.5353e+00
If the row keyword appears, the command will generate one line of output for each zone, listing
the depth, and for each spectral line, one of the columns above. By default, the population ratio is
reported, but the lower level, upper level populations, or the spin temperature may be reported,
instead; the relevant keywords are ratio, lower, upper, and tspin, respectively. For example,
using the row option with the previous command, modifies the output to
#depth Fe26 348.000m Fe24 3068.00m
5.00000e-01 3.2141e-05 2.6540e-01
These results may be used in post-processing. For instance, the population ratio,
(nu /gu )/(nl /gl ), may be used by external programs to correct absorption coefficients for
stimulated emission.
Note that results for lines that are not associated with an atomic model (e.g., blends,
recombinations lines) are always given as zeros.
temperature limits to the map. Both temperatures will be interpreted as logs if the first number is
≤ 10. The keyword linear will force that interpretation. If the temperature range is specified then
there must be three numbers on the line—the stopping zone number followed by the lower and
upper limits to the temperature.
Normally 20 steps occur between the lowest and highest temperature in the map. The number of
steps is reset with the set nmaps command.
(absorption plus scattering) cross section per hydrogen, the absorption cross section per hydrogen,
and the scattering cross section per hydrogen. The total and scattering opacity discount forward
scattering so are for the extended source case. The last column gives the scattering cross section
per hydrogen with forward scattering included so is for the stellar case.
The last optional number says how many neighboring cells to co-add. If no number appears
then 10 are coadded to reduce the amount of output. This must be the third number on the line, so
the range option must also be specified to change the number of cells to coadd.
By default, only cells with non-zero opacity will be output. The keyword all will report all
cells.
Pcorrect is the correct pressure at the current position. This is the sum of all contributors to the
total pressure. This may include, among other terms, gas, radiation, turbulent, magnetic, and
ram pressure.
Pcurrent is the current pressure. It will be equal to the correct total pressure, the previous term in
the output, if the pressure has been converged. The tolerance on the pressure convergence is
controlled with the set pressure convergence command.
PIn+Pinteg is the sum of the gas and radiation pressure due to the incident continuum evaluated
at the current position. In a hydrostatic model, such as the Orion model proposed by
Baldwin et al. (1991), this will be the total pressure and will be equal to the sum of the gas
pressure at the illuminated face and the momentum absorbed from the incident continuum.
Pram is the current ram pressure. This is only non-zero if the gas is moving, which only occurs
when the wind geometry is computed.
Pinteg is the current integrated pressure due to attenuation of the incident continuum.
V(wind km/s) is the wind velocity in km s−1 . This is only non-zero for a wind geometry.
int thin elec the integrated radiation force for electron scattering opacity only, in the absence of
any absorption.
Warning about ortho/para resolved LAMDA models Several molecule models in the
third-party database LAMDA separate species into ortho- and para- systems. The save species
command in this version of Cloudy has the limitation that only the last system in the LAMDA
masterlist will be reported in the output. This affects only the output of these commands. All
recognized systems will be included in the simulation.
The save species commands are of two types. The first group reports derived physical quantities
such as the column density in various levels within the species. The second group reports
fundamental physical properties of the model, such as the levels, line collision strengths, etc.
• The file name for the saved data must appear as the first item in double quotes. Any species
label comes second.
• The species label must match one of the labels given with the save species labels command.
These are case sensitive.
• The rules for how the species labels work are defined on page 14 above.
The all option will print all molecules and ions which exist in the calculation.
Level populations
In addition, individual states of level-resolved species can be accessed by including the level index
in square brackets after the species name, e.g. "He+[1]" or "CO[2]", or a range of levels if range
indexing is used e.g. "He+[1:5]". The indices are on the physics scale so count from a lowest
level of 1. If the lower bound is omitted, the range starts at the lowest available level, likewise if
the upper bound is omitted, so "He+[:]" prints all levels. The individual levels are not reported by
the save species labels command.
The total for the species will be reported if the species name is specified without the square
brackets, as in "CO". The population of the lowest level will be reported if "CO[1]" is specified.
Other quantities
Other quantities can also be printed, as shown in Table 16.1.
Examples
The following gives examples:
16.86. SAVE SPECIES [OPTIONS] 233
Table 16.1: Other quantities which can be added as columns in save species.
#
# save total water column density
save species column density "pdr.col" "H2O"
#
# ions use baryon, not spectroscopic, notation. This is C IV == C+3
save species populations "flow.pop" "C+3"
#
# save set of species, some for particular levels
# total in C+, populations in the first two levels of C+, the lowest level of CO,
# the electron density and the point visual extinction
save species densities "pdr.pop"
"C+"
"C+[1:2]"
"CO[1]"
"e-"
"*AV"
end
This reports the column densities [ cm−2 ] at the end of the iteration.
This reports the departure coefficients [dimensionless] for all zones. The depth is given first, and
then the departure coefficient for each species.
This reports the density of species and of levels [ cm−3 ] for all zones. The depth is given first, and
then the density for each species.
234 CHAPTER 16. CONTROLLING OUTPUT
By default, the continuum band is from 1000 Å to 7000 Å, split in 1000 logarithmic bins. These
defaults can be modified with the set species continuum command, described in Section 19.13.48.
The output file lists the photon energy, the total intensity, and the intensity directed inward, and
outward, in that order, in four tab-delimited columns. The photon energy is reported in Ryd,
unless other units are specified with the units option. The units of the intensity in the intensity and
luminosity cases follow those for the save continuum command, described in Section 16.42.
Because for large grids of calculations, this format may prove inconvenient, the row option is
provided. When issued, the wavelengths are listed once, in a single row at the top of the file, with
subsequent rows holding the intensities for various grid points. Only one intensity sum is then
reported per grid point, by default the total intensity. This may be altered by issuing the inward or
outward options, which will cause the corresponding intensity to be reported instead.
The distinction between total, inward- and outward-directed emission is important, e.g., for
Fe II lines in quasars, as discussed by Ferland et al. (2009b).
The first file to appear in the command is the output file, the second is the bands file, followed by
the species of choice.
16.86. SAVE SPECIES [OPTIONS] 235
A user-defined bands file may be used instead, but it must follow the format of file
data/FeII bands.ini. Briefly, each line holds one band only, described by three (positive)
wavelengths, all in Angström. The first column holds the wavelength that will be used with
reporting, and the following two columns hold the minimum and maximum wavelengths of the
band, in that order. The remainder of the line is ignored. Comment lines, which begin with a hash
(#), are ignored. Bands are independent of each other, which means that they are not expected in
any specific order, and they may also overlap.
The output created in the file specified by the save command has four tab-delimited columns.
The first column reports the wavelength of the band specified in the first column of the (input)
bands file. The following three columns report the total, inward, and outward species line
emission over that band. The intensity units follow those for the save continuum command,
Section 16.42. By default, intrinsic intensities are reported; for emergent intensities the keyword
emergent may be used.
The bands will appear in the main output only if a save command is entered. The only
exception to this rule is the “FeII” bands file: it is always parsed, and the summed up emission
always appears in the main output.
There, the bands are identified by the spectral label of the species, followed by a single ‘b’; e.g.,
the band for “Fe+” is “Fe 2b”. This is then followed by the wavelength of the band, listed in the
first column of the bands file. This entry contains the sum of the inward and outward flux. For each
of the bands a second entry will be created that only contains the inward flux. These entries will
have the label “InwdBnd” followed by the wavelength of the band. See also Hazy 2, Section 9.2.8.
Each entry also lists the external database from which the atomic data are derived, or the
iso-sequence the species belongs to, if appropriate. If no database name exists then the species
does not have internal structure.
respect to depth, dT /dr and d 2 T /dr2 . These derivatives set the rates of conductive heat flow and
heat loss respectively.
total - saves the sum of the outward spectrum and the reflected spectrum, including diffuse and
incident, lines and continua.
[ attenuated | reflected ] incident continuum - saves the incident continuum, the attenuated
incident continuum or the reflected incident continuum;
[ reflected ] diffuse continuum - saves the outward diffuse continuum or the reflected diffuse
continuum;
[ reflected ] spectrum - saves the total outward spectrum or the total reflected spectrum.
If none of these options are present, the total outward spectrum will be saved. By “reflected” we
mean components escaping into the 2π sr subtended by the illuminated face toward the continuum
source. If no options are specified for the atable command then the transmitted spectra will be
238 CHAPTER 16. CONTROLLING OUTPUT
saved. Note that the command can be specified multiple times, allowing the user to individually
save any or all of the separate components of the predicted spectra.
By default the full frequency range will be saved. The range option will limit the range. Both
lower and upper limits must be specified. The energies must be in keV.
By default the SEDs stored in an atable will be equal to the equivalent SEDs from the save
continuum command, except that they have different units [photons cm−2 s−1 bin−1 ] and
normalization will be forced on the inner radius (this is to prevent numerical overflow). The saved
spectrum will always conserve energy, i.e. the set save resolving power command has no effect.
There is an optional keyword normalize that will cause the SED to be normalized to 1
[photons cm−2 s−1 keV−1 ] at a specific frequency. You can specify a number in keV to set the
normalization frequency, or it will default to 1 keV if that number is omitted. If both the range
and normalize keywords are used, range (with its associated numbers) must come first. By
default the isotropic continua will be included. They can be excluded using the no isotropic
continua report command.
In the example below we specify that a blackbody is to be varied. The number on the
blackbody line is ignored. The range command specifies that the log of the temperature of the
blackbody will range from 4 to 6. The grid command specifies that we are calculating a regularly
spaced grid with 1 dex steps between 4 and 6. In this case since we only have one parameter
varied with the vary keyword, there will only be one dimension in the grid and only three
simulations. Each of the two save xspec atable commands produces a FITS format file. The first
file, named filename1, will contain the incident continuum for each of the three simulations.
The second file, named filename2, will contain the transmitted spectrum for each of the three
simulations. The commands are as follows:
# non-MPI runs
cloudy.exe -r optrun
# alternative
cloudy.exe -p optrun
# MPI runs
mpirun -np <n> /path/to/cloudy.exe -r optrun
# alternative
mpirun -np <n> /path/to/cloudy.exe -p optrun
This assumes that the input script is in the file optrun.in. The normal input and output
redirection shown elsewhere will not work in this case and C LOUDY will stop with an error
message if you try to use it. The command line switches are described in a section of H AZY 2.
Using the -r or -p command line switches is necessary because the code needs to know the name
of the input script in order to generate intermediate files with its name embedded. It is also
necessary for the correct functioning of the code in MPI mode. Running in MPI mode is described
further in Section 17.6.1.
17.2 Overview
The optimize command and its keywords tell the code to vary one or more parameters to try to
reproduce e.g. an observed emission-line spectrum, line flux or luminosity, a set of column
densities, or temperatures, etc. R.F. Carswell wrote the original code and first implemented the
method in C LOUDY and Peter van Hoof extended the methods. The user can choose a
minimization method (see Section 17.6) to obtain a best fit to a set of observed quantities. The
latter are specified by a series of optimize commands. These are described in Section 17.5. The
keyword vary can appear on many of the commands used to specify physical parameters (Table
17.1). This indicates that this parameter is to be varied in order to obtain a best fit to the observed
quantities, and also sets the initial value for the parameter. Section 17.10 below discusses details
243
244 CHAPTER 17. THE OPTIMIZE COMMAND
of some commands. Other commands exist to influence the behavior of the optimizer, e.g. to set
the initial stepsize, limit the range of a physical parameter, set the convergence tolerance, etc. See
Section 17.7 for more details.
This example tells the code to vary the density and ionization parameter to reproduce the observed
intensities of two emission lines.
Information concerning the optimization process is fed to the code as a series of keywords on
the optimize command. These are described next. Only one keyword will be recognized per
optimize command.
17.4. WHAT MUST BE SPECIFIED 245
Table 17.1: Commands with vary option. Entries “var” are explained in Section 17.10.
Command Quantity varied Min Max Inc.
abundances starburst metallicity −3 log(35.5) 0.2
AGN Big Bump temperature −∞ +∞ 0.5
blackbody temperature −∞ +∞ 0.5
bremsstrahlung temperature −∞ +∞ 0.5
constant pressure set pressure −∞ +∞ 0.1
constant temperature temperature log(2.8) 10 0.1
coronal equilibrium temperature log(2.8) 10 0.1
cosmic rays cosmic ray density −∞ +∞ 0.2
database H-like Lyman pumping scale line blocking scale factor −∞ +∞ 0.1
distance distance −∞ +∞ 0.3
dlaw first dlaw parameter −∞ +∞ 0.5
eden electron density −∞ 20 0.1
element . . . abundance of an element −∞ +∞ 0.2
energy density energy density temp −∞ +∞ 0.1
filling factor filling factor −∞ 0 0.5
fudge first fudge factor −∞ +∞ var
globule density −∞ +∞ 0.2
grains grain abundance −∞ +∞ 1.0
hden hydrogen density −∞ +∞ 1.0
hextra extra heating −∞ +∞ 0.1
illuminate Angle of illumination 0 π/2 0.1
intensity intensity of source −∞ +∞ 0.5
ionization parameter ionization parameter −∞ +∞ 0.5
luminosity luminosity of source −∞ +∞ 0.5
magnetic field . . . magnetic field −∞ +∞ 0.5
metals metallicity −∞ +∞ 0.5
metals deplete Jenkins 2009 Fstar 0.5 Fstar 0 1 0.1
phi(H) photon flux −∞ +∞ 0.5
power law see below var var 0.2
Q(H) no. of ionizing photons −∞ +∞ 0.5
radius inner radius −∞ +∞ 0.5
ratio intensity ratio −∞ +∞ 0.2
ratio alphaox power-law index −∞ +∞ 0.2
set H2 Jura scale scale factor for Jura rate −∞ +∞ 0.3
set temperature floor lowest allowed temperature log(2.8) 10 0.3
stop . . . column density column density −∞ +∞ 0.5
stop mass total mass −∞ +∞ 0.5
stop optical depth optical depth at specified energy −∞ +∞ 0.5
stop radius outer radius −∞ +∞ 0.5
stop thickness cloud thickness −∞ +∞ 0.5
table Draine scale factor −∞ +∞ 0.2
table ISM scale factor −∞ +∞ 0.2
table star . . . usually temperature var var 0.1
turbulence turbulent velocity −∞ +∞ 0.1
xi ionization parameter −∞ +∞ 0.5
246 CHAPTER 17. THE OPTIMIZE COMMAND
Molecular and level column densities: The species is specified as a quoted, case-sensitive
string, and no ionization stage is specified. (This is different from previous versions of Cloudy,
where the species did not need to be quoted, but only the first 4 characters were used, and an
ionization stage of 0 had to be specified.) The species names which are parsed from the lines
giving the column density constraints are simply passed to routine cdColm. That routine is
described in Part 2 of H AZY. This optimization command accepts any species that cdColm
recognizes. Column densities of molecules and excited states of some ions can be specified by
special syntax, and one of the cases that is described where cdColm is shown in the example
below.
The following shows some examples of optimizing molecular and state column densities:
optimize column densities
"H-" < 17 # The H- column density is a limit
"H2" 17.4 error =.001 # Match the total H_2 column density exactly
"H2+" 14.6 # The H2+ molecular ion
"O11*" 16.3 # This is an excited level within the Oˆ0 ground term
"He+[2]" 16.3 # This selects just one level from the He+ ion
"CO[2]" 16.3 # This is a level in the CO molecule
"CO[1:3]" 18.3 # This is the sum of levels 1,2,3 in the CO molecule
end of column densities
command) match this value. The sub-keyword is either intensity or luminosity and both have
exactly the same effect. The number is the log of either the intensity or luminosity of the line in
the same units as found in the third column of the final print out. The second (optional) number is
the fractional error for the fit between the observed and computed values. If a tolerance is not
specified then a fractional uncertainty of 0.05 is assumed.
By default the intrinsic luminosity of the line will be matched. If the keyword emergent
appears then the emergent luminosity will be considered.
Comments may be entered by placing any of the special characters described on page 23 in
column 1.
The following gives some examples of its use:
# this will request an H beta intensity of 0.5 erg cmˆ-2 sˆ-1
# it applies to Hbeta since this is the default normalization
# line
optimize intensity -0.3
17.5.3 Optimize continuum flux 350 micron 126 Jansky [error =0.1]
This commands allows you to optimize an observed continuum flux or surface brightness at an
arbitrary wavelength. Note that both the keywords continuum and flux need to be present on the
command line. The first parameter must be the wavelength or frequency of the observation. The
syntax for this parameter is exactly the same as for the set nFnu add command described in
Section 19.13.39. The code will implicitly behave as if a set nFnu add command had been given
to add the requested frequency point. The second parameter on the command line is the observed
flux. The unit of the flux should also be supplied. There are many choices. You can supply any
combination of the following keywords separated by slashes: erg/s or W for the power unit, and
sqcm (cm−2 ) or sqm (m−2 ) for the surface area unit. This will define a flux per decade νFν . If
you want to supply a flux density Fν , you can combine this with the keyword Hz, while for Fλ you
can use A (Å), nm or micron (µm). If you want to supply a surface brightness you can combine
this with sr or sqas (square arcsec), otherwise it will be assumed to be the intensity radiated into
4π sr. Some examples of valid units would be erg/s/sqcm/Hz, W/sqm/A, or W/sqcm/micron/sr.
Alternatively the following keywords are also recognized: Jansky or Jy (Jy), and mJy (mJy) for
supplying a flux density Fν , while the keyword MJy/sr can be used for supplying a surface
brightness. A keyword for the unit must be present. If the flux is ≤ 0, or the keyword log appears
on the line, it will be assumed that the flux is logarithmic (but not the wavelength or frequency!).
Observed fluxes must be dereddened for any extinction inbetween the source and the observer.
The same normalization will be used as in the rest of the Cloudy output. So if you include the
print line flux at earth command, you should enter the observed flux at Earth here. See
Section 16.19.7 for further details. See also Section 19.13.38 for a discussion of the components
that are included in the continuum flux prediction. The third (optional) parameter on the command
line is the relative uncertainty in the flux. If it is not specified then an uncertainty of 5% is
248 CHAPTER 17. THE OPTIMIZE COMMAND
assumed. The optimizer will print both the model and observed flux in the same units as were
used on the command line. A continuum flux can be specified as an upper limit by entering <
anywhere on the line after column 4.
For wavelengths longer than 1 mm this command is counted in the absolute flux category, for
shorter wavelengths in the photometry category (see Section 17.8). This distinction is useful so
that you can use a radio continuum flux measurement (e.g. at 6 cm) as a replacement for the Hβ
intensity, while you would not want the same to be done for dust continuum measurements since
the latter do not scale with the number of ionizing photons.
There is no limit to the number of optimize continuum flux commands. The following gives
some examples of its use:
# make sure we normalize the flux as observed
print line flux seen at earth
# and set the distance
distance 980 linear parsec
# this will set an upper limit of 1e-21 erg sˆ-1 cmˆ-2 Hzˆ-1 (100 Jy) at 100 micron
optimize continuum flux < 100 micron -21 erg/s/sqcm/Hz
One emission line is specified per line and the line must contain information in a specific order.
The line starts with a species label and wavelength. Optionally line disambiguation is supported.
See Sect. 2.5.3 for details. The next quantity is the observed relative line intensity. This will be in
the same units as the relative intensities printed at the end of the calculation. Intensities are
normally given relative to Hβ , but can be changed to other reference lines with the normalize
17.5. OBSERVED QUANTITIES 249
command. The last (optional) number is the relative error in the observed line. If an error is not
specified then a fractional uncertainty of 0.05 (5%) is assumed. A line can be specified as an upper
limit by entering < before the intensity. Nothing may be entered after the last number, except a
comment starting with a comment character. The default is to use the intrinsic line intensities. If
the keyword emergent appears than those will be used instead. This keyword needs to be added to
the optimize lines command, as shown below.
optimize lines emergent
O 3 88.33m 1.2
O 1 145.5m 1.6
end of lines
The emission lines end with a line that has the keyword end in columns 1 to 3. If this end does
not appear correctly then the code will continue reading lines until the end-of-file is encountered.
Comments may be entered using any of the special characters in column 1 that were described
on page 23.
This behaves as do the previous commands. The “<” option is recognized. Numbers ≤ 10 are
interpreted as logs of the temperature. The keywords volume and radius specify how to weight
the mean temperature. The default is to weight over radius and will be used if no keyword is
recognized. The label for the element must appear in the first four columns. The ion stage follows
with the temperature and an optional error coming next. An ion stage of zero indicates a molecule.
This command simply copies the labels and parameters on the each line and passes them to
cdTemp, a routine that determines the mean temperature and is described in a section of Hazy 2.
That documentation describes how to request mean temperatures for various ions, molecules, and
derived quantities.
The tolerance is a measure of the desired fractional accuracy of the parameters that are varied and
is set with this command. The default value of 0.10 should be sufficient for initial trial runs but the
final values should be made lower for more precision.
The phymir method includes an option to restart the optimization. During an optimization run, the
code’s state is regularly saved in the file continue.pmr. The optimization can be restarted by
including the command optimize continue. In this case it does not start from scratch, but re-starts
using information in the file continue.pmr instead. This can be useful when your machine
crashed during a lengthy run, you hit the maximum number of iterations before the optimization
was finished, or if you want to continue optimizing with a tighter tolerance. The code will be in
exactly the same state when it continues as when it wrote the last state file. So in general you will
need to edit the input script before you restart the calculation. For instance, the first optimization
may have ended because it hit the limit to the number of iterations. If you restart an optimization
with a continue.pmr file you will need to increase the maximum number of iterations in the
input script. Otherwise the code would stop immediately, thinking it was already at the iteration
limit.
When you start a run with the optimize continue command, the code will immediately rename
the file continue.pmr to continue.bak to avoid it being overwritten by the state files that
are produced by the new run. So if you make a mistake, you can rename continue.bak to
continue.pmr and try again.
The optimize continue command is only supported by the phymir optimizer.
!2
Fim − Fi0
χi2 = (17.1)
min Fim , F 0 σ
where F m and F 0 are the model and observed values and σ is the relative error in the observed
value. The uncertainty σ is specified when the observed quantities are entered and has a default
value of 0.05. The average of the error estimate is computed for each category. The error estimate
summed over all categories is minimized.
17.9. OTHER OPTIMIZER COMMANDS 253
17.10.1 AGN
Only the Big Bump temperature, the first parameter, can be varied.
17.10.3 Dlaw
The first parameter will be varied as entered by the user (i.e. no log will be taken). The user is
however strongly encouraged to use logs in the definition of the command if the parameter is not
of order 1.
254 CHAPTER 17. THE OPTIMIZE COMMAND
17.10.4 Element
Only the keywords scale and abundance are supported.
17.10.5 Fudge
The first parameter will be varied as entered by the user (i.e. no log will be taken). The user is
however strongly encouraged to use logs in the definition of the command if the parameter is not
of order 1.
The initial increment is set to 20% of the initial estimate, or to 1 if the initial estimate is zero.
Use the optimize increment command to override this default.
17.10.6 Illuminate
The illumination angle is varied as a linear quantity in radian.
17.10.7 Metals
The grains option can be used to vary the grain abundance with the metallicity. The keyword
depletion is not supported.
17.10.10 Radius
It is possible to specify the stopping radius or depth on the line but it is not possible to vary it.
Only the starting radius is varied.
17.11. NOTES CONCERNING THE OPTIMIZATION PROCESS 255
There could be a major source of confusion if the second parameter is entered and the two
numbers are of the same order of magnitude. The logic used to interpret the second number is
described on page 112 above. If the second number is greater than the first then it is interpreted as
an outer radius; if less than, then the depth. As a result the interpretation of the second number can
change while the first number is varied. It is safer to set an outer radius with the stop thickness or
stop radius command rather than using the second number. If you vary the inner radius while
keeping the outer radius fixed with the stop radius command, make sure that you use the
optimize range command to keep the inner radius inside the outer radius. Failing to do so may
result in premature termination of the optimization run.
matter how many other parameters are varied (it produces no He+ -ionizing radiation). It is
probably necessary to start with parameters in the general area of the successful model. When far
from the solution, it is also a good idea to use a large tolerance (using the optimize tolerance
command) to stop it from over-optimizing a bad solution. Then do follow-up runs with a smaller
tolerance once you have a better idea where the optimum solution is.
This script computes a series of AGN models in which the ionization parameter is varied
between two limits. The save grid command saves the values of the ionization parameter and
gives some information about the calculation. The save line list command saves a set of lines for
each grid point.
259
260 CHAPTER 18. THE GRID COMMAND
# MPI runs
mpirun -np <n> /path/to/cloudy.exe -r gridrun
# alternative
mpirun -np <n> /path/to/cloudy.exe -p gridrun
The following is a 2D grid in which both the ionization parameter and metallicity are varied.
There will be five values of the ionization parameter and three values of the metallicity computed.
ionization parameter -2 vary
grid range from 0 to -4 with -1 dex steps
metals 0 vary
grid range from -1 to 1 with 1 dex steps
For nearly all commands, the quantity will be varied logarithmically (current exceptions are the
illuminate, ratio alphox, dlaw, and fudge commands). If the quantity is varied logarithmically,
the lower / upper limit and the step size also need to be given as logarithms, as shown above. If the
keyword linear is included on the grid command, then these numbers will be interpreted as linear
quantities. As an example, the following will produce a grid of models with a constant electron
temperature of 5000, 10000, 15000, and 20000 K.
constant temperature 4 vary
grid range from 5000 to 20000 step 5000 linear
For some commands the unit of the quantity will be implicitly changed by the grid code. An
example is the radius command. You can enter a radius in parsec using the parsec keyword.
However, the grid code will always vary the radius in cm. In this case the lower / upper limit will
also need to be the (logarithm of) a radius in cm. There is currently no way to overrule this. In
general the lower / upper limit needs to have the exact same units as are used on the command line
that is generated by the grid, not the command line as originally typed by the user.
1 In
versions C10 and earlier of the code, the grid points were calculated in sequential order (at least for non-
MPI runs) so it made a difference then. The option of choosing a negative increment is maintained for backward
compatibility.
262 CHAPTER 18. THE GRID COMMAND
This is because of the rule stated above that the grid command treats temperature ranges as logs
unless the keyword linear occurs.
separate option on any of the grid commands, the gathering step will be skipped and the main
output will remain in separate files, thus speeding up the calculation considerably.
MISCELLANEOUS COMMANDS
19.1 Overview
This Chapter describes commands that are used to disable physical processes, change the code’s
internal behavior, or to take care of housekeeping activities. These are not usually used.
265
266 CHAPTER 19. MISCELLANEOUS COMMANDS
read or write them is. The process of converting the stellar atmosphere files from their original
format into a form that can be read by C LOUDY is referred to as compiling the stellar atmospheres.
The table star commands will only function if the atmosphere files are installed as described on
the code’s web site. This is only done once while installing C LOUDY although it will have to be
done again if you ever change the continuum energy mesh. This step does not need to be done if
you don’t want to use these stellar atmospheres.
Full instructions on how to download and install the stellar continua are given at
gitlab.nublado.org/cloudy/cloudy/-/wikis/StellarAtmospheres.
each bin within the grain-size distribution. Section A.2 describes how to create new grain opacity
files.
A grain model is specified by the optical properties of the material and by a description of the
distribution of grain sizes. The optical properties are given by a file, with a name ending in
“.rfi”, giving the refractive indices as function of photon energy for the full energy range
considered by the code. The grain-size distribution is specified in a separate data file with a name
ending in “.szd”. Sample refractive index and size distribution files are included in the data
directory or you can create your own. In all cases the compile command combines the refractive
index data with the size distribution to produce an opacity file (with a name ending in “.opc”).
Section A includes far more information and should be consulted.
• The grains will need to be recompiled if the energy mesh of the radiation field is changed.
The input script compilegrains.in in the data directory will do this.
19.6.4 Examples
# compile all grain types
compile grains
and have the calculation continue. The code will only crash if this is explicitly requested by
setting compiler options or enabling traps on the CPU. The source includes logic that will do this
on most platforms. C LOUDY should crash on division by zero, overflow, or invalid operation. The
zero, overflow, and NaN options on the crash command confirms this.
If the code does indeed crash with a failed assert then it may request that the output be posted on
the web site. This is normal and only shows that the asserts are working properly.
19.8 Eden -2
This adds free electrons to the gas. The argument is the log of the electron density [cm−3 ]. This
command accepts the vary keyword. It is mainly intended to test the behavior of C LOUDY in the
limit of very low Compton temperatures. When the color temperature Tcolor ≪ 104 K the gas is
almost entirely neutral and free electrons must be artificially added to test the Compton energy
exchange problem in the strict TE limit. (Remember, charge conservation is a horrible thing to
violate.)
Note: This command adds an extra component of electrons. The set eden commands, described
on page 295, set the electron density. Both commands violate charge conservation.
evaluated. The code will stop if the index to the array of stored values exceeds the number of
values entered. Extra numbers are simply ignored.
The code will abort if fudge is asked to return a parameter that was not defined. For instance if
the command line reads
fudge 4.0
then fudge(1) does not exist and the code will terminate.
fudge will return the number of parameters entered on the command line if it is called with a
negative argument. The following code fragment shows how to check on the number of
parameters and then evaluate fudge if fudge factors were entered.
factor = 1.;
if( fudge(-1) > 0 )
factor = fudge(0);
19.11 No . . .
It is possible to disable physical processes as a test of their importance. If a physical process is
turned off then a flag is set to indicate that the treatment of a physical process has been disabled.
A warning will be printed at the end of the calculation as a reminder that the results of the
calculation are not to be trusted. This warning will not be printed if the four-character keyword
(OK) appears on the command line. The parenthesis is part of this keyword.
19.11.3 No blends
The code keeps a list multiplets and blends in the file blends.ini in the data directory. This list
is an init file that is automatically read by the code when the input script is parsed (i.e., the code
behaves implicitly as if the command init ”blends.ini” had been included at the end of the script).
Including the command no blends prevents the list from being read. This can speed up the code
when running large grids of single-zone models.
19.11.4 No buffering
Programs produce output by first writing into a buffer. Information is written to disk once the
buffer is full. If a C++ program crashes before this buffer is “flushed” the information within the
buffer will be lost. This poses a problem if the printout generated just before the crash is needed
for debugging. The no buffering command will redirect the standard output to stderr which is
not buffered. Save commands also have a no buffering option to turn off file buffering for the
files they create.
On most systems stderr can be directed to a file by redirection of file descriptor 2 as in the
following example (this assumes you are running a bash shell or something equivalent).
cloudy.exe < sim.in > sim.out 2> sim.err
When the -r or -p command line flag is used, the situation is different. In parallel runs, multiple
output files would be open at once and redirecting to stderr would create havoc. In this case,
the output file is closed and immediately reopened again in append mode. Buffering can then
safely be turned off. In this case you run the code as you would normally.
cloudy.exe -r sim
19.11.8 No CTHeat
This turns off heating due to charge transfer. Kingdon and Ferland (1999) describe the process.
no grain electrons This turns off the effects of grain charging, either negative or positive, on the
overall charge balance in the gas. This violates charge conservation.
no grain gas collisional energy exchange Collisional energy exchange between grains and the
gas is treated as in van Hoof et al. (2004) and Abel et al. (2005). This processes acts to bring
the grains and gas toward the same temperature. The two temperatures will be equal if
collision energy exchange is fast. Often the gas is hotter than the grains in the H+ region
and this process heats the grains and cools the gas. In fully molecular regions typically the
reverse is true as the remaining continuum is very ineffective in heating the gas, but can still
heat the grains. This command disables this physics.
no grain molecules Condensation of molecules onto cold grain surfaces was added by Nick Abel
and is treated using the formalism outlined by Hasegawa et al. (1992) and Hasegawa and
Herbst (1993). This turns off that process.
no grain neutralization Ions can become neutralized or ionized, by several stages of ionization,
following a collision with a grain. The treatment of these collisions is described in van Hoof
et al. (2004). It is partially based on Draine and Sutin (1987)’s description of Coulomb
interactions between the grains and gas. The effects of grain neutralization upon the
ionization balance of the gas are turned off with this command although grain charging is
still computed. This is not self consistent.
no grain physics This turns off all grain physics. The only remaining effect of grains is their
continuous opacity. The resulting simulation will be much faster but incorrect. This is only
intended to provide a method to do quick and dirty calculations. The spectrum emitted by
the grains is not calculated so this command violates energy conservation.
no grain qheat This turns off quantum heating for all grain species.
no grain x-ray treatment This turns off the extensive treatment of inner shell X-ray processes
within grains. This makes the X-ray physics more like Weingartner and Draine (2001a).
no HeII OTS This turns off He II Lα and recombination continua OTS rates.
278 CHAPTER 19. MISCELLANEOUS COMMANDS
19.11.28 No photoionization
This turns off photoionization of the ground states of all elements. It is designed to test the code in
the collisional-ionization equilibrium limit.
This command can cause problems. Several iso-sequences are treated as full multi-level atoms.
This includes all processes that affect internal excitations. The level-populations solver may have
difficulty in finding a solution when photoionization is turned off with this command but the gas is
very weakly collisionally ionized. Often internal continuum pumping of the Lyman lines will
dominate excitations. When these radiative terms overwhelm the collisional-ionization term the
19.11. NO . . . 279
ionization rates out of the ground state may underflow. In this case the solver will find negative
level populations and the code will stop announcing a catastrophic failure. One solution is to turn
off continuum pumping, with the no induced processes command. Only do this if the calculation
fails.
make X-rays 100% effective in generating heat and produce no secondary ionizations or Lα
excitations.
19.11.37 No TePredictor
The code tries to predict the temperature of the next zone for constant density calculations. This
stops the predictions from being used.
19.11.40 No times
This turns off printout that would introduce differences between output files which have identical
results. The code will not report execution times or one-time notices about initializing databases.
This allow exact text comparisons of results between models run at different times or on different
machines.
19.11.41 No vary
This command turns off the vary option set on various optimization commands.
If the characters “<” or “>” appear on the command line the expected result is taken as an
upper or lower limit. The default is to check for equality.
The relative error is the second optional number on the line. If this is not specified then a
relative error of 0.05 will be assumed.
The save monitors command, described in section 16.38, can be used to save these in an external
file.
expectations. Assuming that the cloud conditions are set up properly, and that certain physical
processes are disabled, this provides a way to check the accuracy of models of some atoms.
One of the iso-sequences, H-like or He-like, must be specified. The default relative error can be
changed by specifying a number on the line. The code will compare Case B with computed values
for all lines that are included in the emission-line output and a botched monitor will be declared if
any of the code’s predictions differ from Case B predictions by more than this error. A line will be
printed that gives the mean error for the Case B comparisons.
monitor Case B H-like [element error] The H-like option will compare the code’s predictions
with the Storey and Hummer (1995) results. An element name, any between hydrogen and
oxygen, must also appear.
monitor Case B He-like error This will compare the predictions with Case B predictions for
He I emission given by Porter et al. (2012, 2013). The Case B values have the label “+Col”
in the main emission-line printout. The element name must still appear but currently only
helium itself can be tested.
The range option The keyword range tells the code to only check the monitored values over a
restricted wavelength range. The wavelengths of the lines are stored in Angstroms so the
range must be given in the same units. This was added as a way to exclude the intensities of
unobservable MIR - FIR lines. These lines come from higher levels in the atom and
generally have a larger error due to the finite size of the model.
monitor departure coefficient “C+4” If a species (in chemical notation) is given in quotes, as
"O+6" or "H2O", then departure coefficients for that species will be checked. The species
designation may include a range of levels, e.g., “C+4[3:10]”, or a specific level, e.g.,
“C+4[3]”. The rules of Section 16.86.1 apply.
monitor departure coefficients, H-like helium, error=0.08 The keyword H-like tells the code
that the departure coefficients predicted by an atom of the hydrogenic isoelectronic sequence
should be checked. The name of one of the elements must also appear on the command line.
If the keyword excited appears then the ground state will not be included. The keyword
ZeroOK allows departure coefficients of exactly zero to pass the test. This is useful in large
grids of calculations where the species being monitored actually has zero abundance at
some points in the grid.
monitor departure coefficients, He-like helium, error=0.08 The keyword He-like tells the
code to check the predictions for the specified element of the helium isoelectronic sequence.
It operates like the H-like keyword, and accepts the excited and ZeroOK keywords, as well.
monitor departure coefficient, hminus, error=0.08 The keyword hminus tells the code to
check the departure coefficient of H− .
• Relative intensities
If the keywords luminosity and intensity do not appear, the second number is interpreted as
the emission line intensity relative to the normalization line intensity. It is always a linear
quantity.
• Absolute intensities
If the keyword luminosity or intensity appears, then the absolute luminosity [erg s−1 ] or
intensity [erg cm−2 s−1 ] of the line is checked. The monitored quantity is the log of the
luminosity or intensity of the transition, and not the intensity relative to the normalization
line. For example,
intensities are integrated according to the weight set by the set cumulative command,
described in full in Section 19.13.13.
In the absence of any of these keywords, the monitored intensity is interpreted as intrinsic.
If only the keyword cumulative appears, the intensity is interpreted as cumulative
intrinsic. Checks against the (instantaneous, non-integrated) emergent intensity are issued
with the emergent keyword, while checks against the time-integrated emergent intensity are
issued with the cumulative emergent keywords.
The code computes means weighted over radius and over volume. If the keyword volume
appears then the temperature will be compared with the volume-weighted mean. The default is
weighting over radius.
If the keyword grid appears, then a file name should be supplied between double quotes. The
file name must be given before the double-quoted species. The syntax is:
This file should contain a series of temperatures to be monitored. There must be one value for
each grid point in a grid calculation (the grid command is described elsewhere). The file should
not contain any other text, not even comments. The numbers should be separated by whitespace
and/or newlines. An optional error may be supplied on the command line; the same error is
assumed for each grid point. For example,
H 1 3970.07
end
The blend components need to have type ’t’ as defined in the save line labels output and also be
associated to a transition. The latter can be recognized from the fact that the comment in the save
line labels output has entries for “index” and “Elow”. The custom blends will be stored on the
line stack and can be used like any other entry on that stack.
If the keyword quiet appears on the set blend command line, and the database model for any of
the species in the blend has been turned off, the blend will be quietly skipped rather than
producing error messages about missing lines. This is useful if the set blend command is included
in an init file that will be shared between many scripts. However, note that the code cannot
discriminate between a species that has been disabled and a typo in the label, so make sure that the
labels are correctly typed before using this keyword.
An init file called blends.ini with commonly used multiplets and blends is included in the
data directory2 . C LOUDY automatically parses this file unless you include the no blends
command in your script. It is possible to modify this file to add your own blends (but note that this
file is used by the test suite, so modifying or deleting existing blends could affect subsequent test
suite runs). You can also use this file as a template to create your own init file with custom blends,
or you can enter the blends directly in your script.
where k is Boltzmann’s constant, T is the gas kinetic temperature, µ is the reduced mass of
the two reactants, and ∆uturb is the turbulent velocity. Zsargó and Federman (2003)
summarize the physical mechanism of non-thermal chemistry as:
The effect of Te f f is to increase the rates of those reactions which have a strong exp(−c/T )
temperature barrier. This command primarily effects the formation of CH+ (the abundance
of which cannot be explained by equilibrium chemistry models) by eliminating the
temperature barrier for the C+ + H2 → CH+ + H formation channel, allowing CH+ to form.
The formation of CH+ has trickle down effects on the predicted abundances of other
molecules, such as CH, C2 , CN, and OH (see equations 7 & 8 of Zsargó and Federman,
2003). This option was added by Nick Abel. The keyword can be non equilibrium or
non-equilibrium.
set chemistry non equilibrium neutrals [ON , OFF ] If the option neutrals off is also included
then Te f f will equal T for all neutral-neutral reactions, so non-equilibrium chemistry is not
included for these species. The physical assumption is that neutrals are not coupled to the
magnetic field and therefore do not experience the effects of nonthermal chemistry. This
was used by Federman et al. (1996) to explain low OH abundances in regions with high
CH+ , such as ξ Per. By default, neutral-neutral reactions are included in the
non-equilibrium chemistry.
the temperature range we need. The Voronov (1997) and Dere (2007) data are generally in
excellent agreement. We scale the Voronov (1997) rates by the ratio of the Dere (2007) to Voronov
(1997) to obtain updated rates over the full temperature range. We refer to this as the hybrid
scheme. The scaling factor for each species is the Dere coefficient from the center of the
temperature range given in Dere (2007) divided by the Voronov (1997) coefficient at that same
temperature. The set collisional ionization Dima uses the Voronov (1997) rates while set
collisional ionization Hybrid, the default, uses thsi scaling.
set continuum shielding This changes the treatment of shielding of the incident continuum by
line optical depths. There are several options. Federman is the default and uses the function
given in the appendix of Federman et al. (1979) with a bug fixed in the wing shielding;
Fbug uses the original function from Federman et al. (1979) without the bug fix, as used by
292 CHAPTER 19. MISCELLANEOUS COMMANDS
versions of C LOUDY up to 13.02; Ferland uses the function given by Ferland (1992);
Rodgers uses a function derived from Rodgers and Williams (1974), as used by Draine and
Bertoldi (1996). Integral uses an explicit numerical integral over the Voigt function, which
should be highly accurate but is also very slow. Pesc uses the inward-looking escape
probability (though note that the escape probability includes an integral over which is not
needed in this case). None turns off self-shielding.
set FeII continuum The command is obsolete. See set species continuum, Section 19.13.48.
set fine continuum This changes the logic used to determine the resolution of the fine continuum
mesh. The command has two arguments. The name of an element must appear on the
line—the a tomic weight of this element will be used to determine the narrowest lines that
must be resolved. The number of resolution bins over a HWHM must also appear on the
line.
A range option can be used with the set fine continuum command. The first number is
interpreted as the lower limit (in Rydbergs) of the fine continuum. An optional second
number modifies the default upper limit. For both parameters, negative numbers are
interpreted as logs. This command is experimental and can appreciably change results in
conditions where line overlap is important.
• flux, which is appropriate for calculations on fixed domains and generates output in
erg cm−2 , and
• off which disables the cumulative calculation, and will generate an error if a ’save
cumulative’ output is encountered.
set dielectronic recombination mean [options ] At present rate coefficients for dielectronic
recombination through low-lying autoionizing states have not been computed for lower
stages of ionization of most elements on the third row (of the periodic table) and higher. The
mean option modifies the treatment of the estimates of the missing dielectronic
recombination coefficients.
The default is to use means of all existing DR rates for each ion stage to replace missing
data for that stage. For instance, Fe+ ⇒ Fe0 does not have reliable DR rates. Its rate will be
the mean DR rate for all first ions of all elements with published rates.
set dielectronic recombination mean off will turn off guesses for DR rates. These guesses are
normally used for those ions that have no rate coefficients because no better can be done at
present.
294 CHAPTER 19. MISCELLANEOUS COMMANDS
set dielectronic recombination mean scale will multiply the DR guesses by scale factors. One
or more scale factors may appear on the line, and each will multiply the mean rate for
successive ions. If there are fewer scale factors than ions then the last scale factor entered
will be used for all higher ions. The scale factors must be greater than or equal to zero.
set dielectronic recombination mean noise [dispersion ] will introduce Gaussian noise with the
indicated dispersion. This provides a way to quantify the uncertainty caused by the need to
use mean rates. This adds a component of Gaussian random noise to the means of the
dielectronic recombination rate coefficients. The number on the line is the dispersion. The
resulting random number will multiply the rate coefficient. As a result the same DR rates
will be used throughout any single calculation but the noise multiplying the rate will change
from run to run.
set dielectronic recombination suppression off will turn off suppression of dielectronic
recombination. The DR rate depends on both the gas temperature and density, such that as
the density increases the DR rate decreases. This is parametrized as a suppression factor
relative to the zero-density value, according to Nikolić et al. (2013). Unless this command is
issued, the suppression will be applied.
The keyword depth works similarly to the keyword relative but sets the minimum zone
thickness relative to the depth into the cloud. There is a default value of 10−5 . This minimum is
not active if a set dr command is used.
The default for the minimum zone thickness is the greater of approximately 1.2 × 10−36 cm and
the default relative to depth.
Use this command with great caution! Forcing the code to take steps that are too large can lead
to inaccurate results, or even destabilize the code.
set eden 2.3 If no other keywords are recognized then this command sets the electron density.
The number is the log of the density [ cm−3 ].
set eden convergence 0.01 This sets the convergence criterion for the electron density. The
number is the largest relative error in the electron density. It is interpreted as the log of the
relative error if it is negative. The default value is 0.01. The old form of the command, set
eden error, is also recognized.
set eden fraction 1e-3 This sets the electron fraction, ne /n(H), where n(H) is the density of
hydrogen in all forms. The number is the electron fraction and is interpreted as a log if it is
is ≤ 0.
set eden solver [ vWDB , SECAnt ] Switch between vWDB electron density solver (the
default) and experimental limited secant solver.
Note: The eden command, described on page 272, add an extra source of electrons. These set
eden commands set the electron density itself. These commands violate charge conservation.
19.13.26 Set H2 . . .
This command changes some aspects of the H2 molecule. Other aspects of this molecule are
changed with the database H2 command described on page 138 above.
set H2 fraction This sets the ratio n(H2 )/n(H). The number is interpreted as the log of the ratio if
it is less then or equal to zero and as the linear ratio otherwise. An upper limit of 0.5 will be
silently imposed. This command turns off the normal H2 molecular network and forces the
H2 density to the hydrogen density multiplied by this fraction. This is totally unphysical and
is only intended to provide an easy way to test the H2 molecule.
set H2 formation scale This scales the H2 formation rate (via three-body recombination). The
number is interpreted as the log of the scaling factor if it is less then or equal to zero and as
the linear factor otherwise. In the fully molecular or fully ionized limits, this command
should be used rather than the set H2 fraction command because it allows the same
functionality without breaking numerous consistency checks.
set H2 Jura [TH85; CT02; SN99; ELRD ] This changes the “Jura rate”, the rate H2 forms on
grains (Jura, 1975). The default rates include the Eley-Rideal Effect (Le Bourlot et al.,
2012; Röllig et al., 2013) as implemented by Röllig et al. (2013). These depend on grain
temperature and abundance. The option TH85 will use rates from Tielens and Hollenbach
(1985a), SN99 will use rates for Sternberg and Neufeld (1999), CT02 uses Cazaux and
Tielens (2002). Finally, ELRD will use the rates that include the Eley-Rideal Effect (Le
Bourlot et al., 2012; Röllig et al., 2013) and is the default.
set H2 Jura scale The number is a linear scale factor that multiplies the formation rate obtained
by one of the above methods. If the scale factor is negative or the keyword log appears then
the number is interpreted as the log of the scale factor. Habart et al. (2004) suggest that the
rate can vary across the galaxy by large factors.
19.13. SET COMMANDS 297
set H2 Jura rate The number is the log of the H2 grain formation rate k [cm3 s−1 ]. This is used
to give a simple grain formation rate R = k n (Htot ) n H0 [cm−3 s−1 ]. If no number appears
on the line then the Jura (1975) rate of 3 × 10−17 will be assumed.
set H2 Solomon [BD96; TH85; ELWERT ] This changes how the Solomon process is treated
when the small H2 molecule is used. The fits to the dissociation rate derived by Elwert et al.
(2005) are the default and will be used if the keyword ELWERT appears. The keyword
BD96 will use Bertoldi and Draine (1996) and the keyword TH85 will use the Tielens and
Hollenbach (1985a) rate. These rates differ by ≥ 1 dex for some H2 column densities.
When the large H2 molecule is used, as set with the database H2 command, the Solomon
process is treated in a self-consistent manner. Abel et al. (2004) show that H2 column
densities are quite sensitive to the correct treatment of this physics for translucent clouds.
set H2 continuum dissociation [Stancil; AD69 ] This command changes how direct
photodissociation of H2 is treated. By default, C LOUDY computes the photodissociation rate
by integrating the cross-section for photodissociation over the energy range for dissociation.
The cross sections used for this process come from Stancil et al. (in preparation) and are
specified by the keyword Stancil. The other option is to use a constant H2 cross section for
this process, which comes for the work of Allison and Dalgarno (1969) and is used when
AD69 appears on the command line. This process, while not the dominant destruction
process for H2 in a PDR, may be important in some environments.
set H2 grain formation pumping This changes the distribution function for populations of v, J
levels of H2 following formation on grain surfaces. There are several possible distributions:
Takahashi (2001, Taka, this is the default); Draine and Bertoldi (1996, DB96); and thermal
(thermal).
The keyword OFF will put all newly formed H2 in the lowest ortho and para states with a
3:1 ratio. This can be used to test the importantence of grain formation pumping. For low to
moderate temperatures in a purely collisional gas the higher levels within X may have no
source of populations when this is done. The code may then fail because the level population
matrix will become ill conditioned. This option should only be used for experiments.
set H2 Tad 420 This changes the binding energy, Tad , in the formalism described by Le Bourlot
(2000) to account for deexcitation of H2 while on a grain surface. The number is the binding
energy expressed as a temperature. The default value of 800 K maximizes the rates of H2
collisional deexcitation and ortho-para conversion. If the number is ≤ 10 it is interpreted as
a log of the temperature unless the keyword linear appears.
approximate correction for collisions by neutral hydrogen. This is only a guestamite based on
Drawin (1969), (see also Weisheit, 1974, Steenbock and Holweger, 1984, Lambert, 1993, and
Kiselman, 2001). The number on this command adjusts the scale factor f . You can turn off the
process by setting the number to zero.
298 CHAPTER 19. MISCELLANEOUS COMMANDS
set Leiden hack H2* off The chemistry network used in the workshop did not include H2 * (see
Tielens and Hollenbach, 1985a for a definition). This turns off reactions between that
species and the CO network (although it is still present in the H-H2 network).
set Leiden hack CR off This turns off cosmic-ray excitation for the large H2 molecule. This is
normally treated as in Dalgarno et al. (1999).
set Leiden hack UMIST This forces the code to use parts of the UMIST database that (we feel)
we do better with other methods.
19.13. SET COMMANDS 299
by default. Any or all of these may be entered on the command line, but at least one must occur.
Any component left off the command will not be included.
The four keywords, and the component that is included, are the following:
incident reflected or incident reflected includes the incident reflected continuum.
incident transmitted or incident transmitted includes the incident transmitted continuum.
diffuse inward or diffuse inward includes the diffuse inward continuum.
diffuse outward or diffuse outward includes the diffuse outward continuum.
total includes all four components of the continuum.
All desired components must be specified on a single set nFnu command. The following shows
how to only include the outward incident and outward diffuse emission in the nFnu entry in the
printout:
This command does not change the quantities printed with the nInu label—these are always the
sum of the reflected plus transmitted incident continuum.
set PAH constant or “H” This changes the function that describes how PAH abundances depend
on physical conditions. The default, which can also be specified with the string "H", is for
the PAH abundance to scale as n(H0 ) / n(Htot ). You can also specify the PAH abundance to
scale as the total abundance of neutral atomic and molecular hydrogen with the string
"H,H2". The abundance will be constant if the keyword constant appears.
set PAH Bakes will replace our self-consistent treatment of photoelectric heating by all grains
with the PAH photoelectric heating equation given by Bakes and Tielens (1994). This
command no longer guarantees energy conservation and is only intended for testing.
set save flush will cause the file buffers to be flushed after every iteration.
set save hash “newstring” When more than one iteration is saved into a file each ends with a
series of hash marks that makes it easy to locate with an editor. This sets the hash string to
something else. A new string must appear within the pair of double quotes.
The special string “return” is replaced with a single carriage return which translates into the
pair of carriage returns that gnuplot uses to separate plots. The special string “time” will
give the elapsed time since the start of time-dependent calculations, followed by a pair of
carriage returns. In both cases the keyword must appear within the pair of double quotes.
302 CHAPTER 19. MISCELLANEOUS COMMANDS
The hash can be completely turned off with the no hash option on the save command.
set save line width / resolving power, suppress, absorption The observed contrast between
emission lines and the continuum depends on the intrinsic line width and, for an unresolved
line, the resolution of the spectrometer. Lines are included in the radiation field produced by
the save continuum commands. The default behavior is to do this in such a way that the
energy is conserved in the resulting output.3 This command allows you to adjust the
contrast between the lines and continuum by, in effect, changing the velocity resolution of
the spectrometer which views the unresolved lines.
Lines and continua are stored separately throughout the code. They are combined only
when the output from the save continuum command is produced using the expression
Note that this command will only adjust the height of the line, not the width. The latter will
always be the width of one cell in the coarse continuum mesh (even if the line is broader
than that cell). This implies that the line flux in the continuum array is artificially changed
by this command. Changing the spectral resolution can be useful to emphasize weak lines in
a plot, but should never be used when energy conservation is important, e.g. when you want
to fold the saved continuum with a photometric passband.
If the keyword absorption occurs then the effects of absorption lines on the transmission of
the incident continuum will be modified by the factor given in equation 19.3. The
transmitted radiation field is changed as
0 ∆ν
ν fν = ν fν max 1 − (1 − trans) R , 0 (19.3)
ν
3 InC90.00 the standard was to use a line width equal to the speed of light. In C90.04 the standard was changed to
using a line width of 1000 km s−1 . Finally, in version C10 the standard was changed again to using energy conservation.
Versions prior to C90.00 did not include emission lines in the saved spectral energy distribution.
19.13. SET COMMANDS 303
where trans is the correct transmission factor as propagated from the fine to coarse mesh,
and ν/∆ν is the resolution of the coarse continuum mesh. The keyword absorption makes
the effects of absorption appear larger than than actually are, but gives an impression their
appearance would have if the spectrum were viewed at a higher resolution. This approach
uses the opacities stored in the much higher resolution fine continuum. As is the case for
emission lines, using this option will violate energy conservation.
If you include the keyword suppress on the command line, then emission lines will not be
included in the saved spectral energy distribution. If you combine the keywords suppress
and absorption, then the effects of absorption lines will also be suppressed and only a pure
continuum will be saved.
The only effect of this command is to change the line-to-continuum contrast in output from
all save commands except for that produced by the save transmitted continuum command.
set save luminosity old In versions of Cloudy between roughly 1983 and C13 the save
continuum output reported continuum and line luminosities per unit area of cloud at the
inner radius when the luminosity case was used. This was to avoid exponential limits on
floating point numbers. Today the code will report luminosities when appropriate. This
command will use the old style for backwards compatibility. If this is used the save
2
continuum output will be νLν /4πrinner and have units erg cm−2 s−1 .
set save prefix “test” This adds a prefix to all filenames and so provides an easy way to change
all file names at one time. The prefix is any string that appears between the pair of double
quotes on the command line. This command should precede all save commands.
would accumulate the Fe II emission from 3000 Å to 5000 Å in 200 logarithmic bins.
set temperature floor This sets a lowest kinetic temperature to allow in a calculation. When the
temperature falls below this floor the code goes over to a constant temperature solution at
the floor temperature. This provides a way to mimic having a minimum temperature that is
set by some external and unspecified source of heat. The temperature will be interpreted as a
log if it is less than or equal to 10 or the keyword log is present, and as linear if the keyword
linear is present.
set temperature convergence The gas kinetic temperature is set by the balance between the
heating and cooling. This command sets the relative error allowed in the heating-cooling
match. The number is the largest fractional error allowed. It is interpreted as the error itself
if it is positive and the log of the error if it is less than or equal to zero. The default is 0.005.
This will be the error allowed in each zone. The total error or energy conservation mismatch
integrated over a cloud will be much smaller, usually of order ten times smaller than the
tolerance specified.
set UTA off – disable all UTA lines. This is provided as a debugging tool. The simulation is
considered unphysical when this command is given.
set UTA Kisielius off – disable the Kisielius et al. (2003) data for Fe+13 though Fe+15 . They are
enabled by default. When disabled, the Badnell data for Fe+14 and Fe+15 , and the Gu data
for Fe+13 are used instead.
To check which data set is used for each ionic species, see print UTA references,
Section 16.30.
19.15 Test
This command runs a simple model to do a “smoke test”, a quick sanity check on the code. The
single command produces a series of commands to run a two-zone constant-temperature model.
19.15.1 Test
The table agn command is used with the density and temperature constant at 104 K. The
ionization parameter is U = 10−2 and the calculation stops after two zones and one iteration.
Many monitor commands are used to verify predictions. The commands that set up the model
will be printed if the keyword print occurs on the line.
19.15.3 Test H2
This tests the large H2 molecule.
Many of these options are included in the fast.ini initialization file. Using this ini file will
decrease the execution time by roughly a factor of two. This is meant as a way to roughly explore
vast ranges of parameters or as a debugging aid.
N.B.!! The fidelity of the simulation is compromised! These turn off significant physical
processes.
Specific elements can be turned off by giving that element on the element off command. The
ini files c84.ini, fast.ini, and ism.ini, among others, include a set of element off
commands to do this.
Turning off an element will affect results if the opacity, heating, or cooling due to the element is
significant. Minor elements can have major effects in very dense, optically thick, gas, where all
coolants are thermalized and so are close to the black body limit.
it is absorbed by the gas or dust, which can occur with some line, or if the source is optically thick
in the near IR continuum.
Use single rather than distributed grains. If the single keyword appears on the grain
command then a single mean grain size will take be used instead of the size-resolved grain
distribution. This affects the entire simulation, including the gas temperature and emission line
spectrum, because the grain - gas interactions depend on the grain size.
A.1 Introduction
This release of Cloudy contains a grain model that constitutes a significant upgrade from the
original model that was described in Baldwin et al. (1991). The code has been written by Peter
van Hoof, except where indicated differently. These are the main features:
• The code resolves the size distribution of the grains in an arbitrary number of size bins
(chosen by the user), and calculates all grain parameters such as temperature, charge
distribution, emitted flux, etc., separately for each bin. Since grain opacities depend strongly
on the grain radius, they need to be calculated separately for each bin as well.
• For this purpose Cloudy contains a Mie code for spherical grains (written by P.G. Martin,
based on a code by Hansen and Travis (1974)). This code allows the user to calculate grain
opacities using either a pre-defined or a user-supplied set of optical constants or opacities,
an arbitrary size distribution, and an arbitrary number of grain size bins. The code can
handle any number of grain bins, only limited by the memory on your machine.
• The code fully treats quantum heating of grains using a robust and efficient algorithm
(which is a comprehensively upgraded version of a code originally written by K. Volk),
implementing an improved version of the procedure described in Guhathakurta and Draine
(1989). Combined with resolved size distributions, this will lead to a much more realistic
modeling of the grain emission under all circumstances. Quantum heating is turned on
automatically for all resolved size distributions1 and single-sized grains (including PAH’s,
but excluding grey grains for which quantum heating is never used). The user can change
the default behavior of the code by including the keyword qheat (to enable quantum
heating) or no qheat (to disable quantum heating) with the grains command. If the relative
grain abundance Arel (r) in a particular zone (variable gv.bin[nd]->dstAbund) drops below a
preset threshold value (variable gv.dstAbundThreshold, default value 10−5 ), quantum
heating will be disabled for that zone only. Note that quantum heating usually only
1 The actual criterion is that the ratio of the volumes of the largest and smallest grain in each bin is smaller than 100
for quantum heating to be the default. Note that this criterion is very generous and that a much smaller ratio (i.e., a
higher number of size bins) will usually be necessary to achieve proper convergence of the emitted spectrum.
309
310 APPENDIX A. USING THE GRAIN CODE IN CLOUDY
influences the energy distribution of the emitted spectrum, nothing else2 . So switching off
quantum heating can be a good idea to speed up the modeling, provided the correct shape of
the emitted spectrum has no influence on the results the user is interested in.
• The treatment of the grain physics has been completely overhauled, following the
discussion in Weingartner and Draine (2001a), van Hoof et al. (2004), and Weingartner et al.
(2006). The grain model has a detailed treatment of the photo-electric effect and collisional
processes, and includes thermionic emissions. The code uses the n-charge state model
where for each bin the charge distribution is resolved in exactly n discrete charge states,
independent of the grain size. The default value for n is 2, but the user can choose any
number between 2 and NCHS/3 = 10 using the set nchrg <n> command (note that there is
no “a” in nchrg!). Choosing a higher value will usually give more accurate results at the
expense of computing time. Using the default n = 2 should give sufficient accuracy for most
astronomical applications. The maximum value of n can be increased by altering the
definition of NCHS in grainvar.h and recompiling the code. It is however extremely
unlikely that a value of n > 10 would ever be needed. A detailed description of the n-charge
state model can be found in van Hoof et al. (2004).
Extensive comparisons in collaboration with Joe Weingartner done in 2001 show that the
photo-electric heating rates and collisional cooling rates predicted by Cloudy agree very
well with the results from the Weingartner and Draine (2001a) model for a wide range of
grain sizes (between 5 Å and 0.1 µm), and using various choices for the incident radiation
field. A detailed discussion of this comparison can be found in van van Hoof et al. (2001).
followed by an extra carriage return. The Mie code needs refractive index or mixed medium, and
size distribution files as input. These are files with names ending in “.rfi”, “.mix”, or “.szd”,
resp. It will generate an opacity file, ending in “.opc”. The command shown above will instruct
the Mie code to calculate opacities using optical constants for astronomical silicate and a Mathis
et al. (1977) standard ISM size distribution. The size distribution will be resolved in 10 bins. This
2 Quantum heating can influence the emission line spectrum as well if continuum pumping of the lines by the short
wavelength end of the dust spectrum is important. Typically these will be molecular lines.
A.2. USING THE GRAIN MODEL 311
will produce a file silicate ism 10.opc which contains all the opacities. This opacity file is
in human readable form and contains many comments to clarify its contents. It also contains a
table of the size distribution function a4 n(a) as a function of the grain radius a for reference. The
format of the table is such that it could be used directly to define a size distribution table (see
section A.5.7). Note that only a single compile grain command can be given in a single Cloudy
run. Note furthermore that the opacity file produced in the example above is already included in
the Cloudy distribution!
In the previous example a refractive index file was used to define the optical properties of a pure
grain material (e.g., astronomical silicate or graphite). A second example could be:
(the mixed medium file fluffy.mix is included in the Cloudy distribution, and the text is also
shown in Table A.9). Here the mixed medium file is used instead of a refractive index file to define
a mixture of two or more grain materials (possibly including vacuum for defining fluffy grains). In
this case the optical properties of the constituting materials are combined with a mixing law (also
called effective medium theory or EMT) to create a set of optical constants that represents the
mixture and can be fed into the Mie theory. Hence the refractive index and mixed medium files
play similar roles in that both define a set of optical constants to be used by the Mie code. They
differ in the fact that refractive index files are used to define pure materials, while mixed medium
files define impure materials. As a consequence the internal format of both files is very different
and will be described in more detail in Sections A.3 and A.4. The opacities generated from both
types of input files are fully compatible though and can be used in exactly the same way, as shown
below.
In the second step, you can use these opacities in a subsequent run of Cloudy with the grains
command described in Hazy. An example could be:
Several grains commands may be used simultaneously to define mixtures of grains. One can
freely mix set nchrg and grains commands, and different grain types may be calculated using a
different number of charge states. The set nchrg command will only affect grains commands that
come later in the input file. For ease of use, the filenames of certain refractive index, size
distribution, and opacity files in the standard Cloudy distribution may be replaced by keywords, as
described in Hazy.
The refractive index, mixed medium, and size distribution files may be replaced by user-defined
versions, giving the user considerably more freedom to define grain properties compared to the
old grain model in Cloudy. The format for each of those files will be defined in Sections A.3, A.4,
and A.5.
312 APPENDIX A. USING THE GRAIN CODE IN CLOUDY
3 Note that the term “refractive index file” is used rather loosely here. It also pertains to materials for which no
refractive index data in the strict sense exist, such as grey grains and PAH’s.
A.3. DESCRIPTION OF THE REFRACTIVE INDEX FILES 313
Table A.1: The definition of each of the material types hardwired into Cloudy. The code in column
1 needs to be entered in the refractive index file. Each of the entries in columns 3 and higher will
be explained in the table indicated in the header of that column.
code mnemonic Table A.2 Table A.3 Table A.4 Table A.5 Table A.6 Table A.7 Table A.8
1 MAT CAR ENTH CAR ZMIN CAR POT CAR IAL CAR PE CAR STRG CAR H2 CAR
2 MAT SIL ENTH SIL ZMIN SIL POT SIL IAL SIL PE SIL STRG SIL H2 SIL
3 MAT PAH ENTH PAH ZMIN CAR POT CAR IAL CAR PE CAR STRG CAR H2 CAR
4 MAT CAR2 ENTH CAR2 ZMIN CAR POT CAR IAL CAR PE CAR STRG CAR H2 CAR
5 MAT SIL2 ENTH SIL2 ZMIN SIL POT SIL IAL SIL PE SIL STRG SIL H2 SIL
6 MAT PAH2 ENTH PAH2 ZMIN CAR POT CAR IAL CAR PE CAR STRG CAR H2 CAR
7 MAT SIC ENTH SIC ZMIN CAR POT CAR IAL CAR PE CAR STRG CAR H2 CAR
zero, for insulators such as silicates, a non-zero value should be used. The next line gives the
efficiency of thermionic emissions. This parameter is usually unknown for materials of
astrophysical interest, and using 0.5 should be a reasonably safe guess. Next comes the
sublimation temperature in Kelvin. Then comes a line with a keyword which identifies what type
of refractive index file is being read. It determines what the remainder of the file will look like.
Allowed values are rfi tbl, opc tbl, grey, pah1, ph2n, ph2c, ph3n, and ph3c. In the grey, pah1,
ph2n, ph2c, ph3n, and ph3c cases, no further data is needed and the refractive index file ends there
(i.e., the information needed to calculate the opacities is hardwired in the code).
The next line gives the number of principal axes Na for the grain crystal and should be a number
between 1 and 3. For amorphous materials one should always choose 1 axis. For crystalline
materials the number may be 2 or 3. Next comes a line with Na numbers giving the relative
weights for each of the axes. These numbers will be used to average the opacities over each of the
axes in crystalline materials. For materials with only one axis, this number is obviously redundant,
and a single 1 should be entered. For graphite it is appropriate to enter “1 2” indicating that the
first axis will have relative weight 1/3 and the second 2/3 (i.e., the relative weights are 1:2). Next
come Na chunks of data defining the optical constants for each axis. Each chunk starts with a line
giving the number of data points Nd for that axis, followed by Nd lines containing 3 numbers: the
wavelength in µm, and the real and imaginary part of the complex number defined above. Note
314 APPENDIX A. USING THE GRAIN CODE IN CLOUDY
Table A.2: The various choices for the enthalpy function hardwired in Cloudy.
mnemonic type reference
ENTH CAR graphite Guhathakurta and Draine (1989), Eq. 3.3
ENTH SIL silicate Guhathakurta and Draine (1989), Eq. 3.4
ENTH PAH PAH Dwek et al. (1997), Eq. A4
ENTH CAR2 graphite Draine and Li (2001), Eq. 9
ENTH SIL2 silicate Draine and Li (2001), Eq. 11
ENTH PAH2 PAH Draine and Li (2001), Eq. 33
ENTH SIC α-SiC Chekhovskoy (1971)
Table A.3: The various choices for the minimum charge hardwired in Cloudy.
mnemonic type reference
ZMIN CAR graphite Weingartner and Draine (2001a), Eq. 23a+24
ZMIN SIL silicate Weingartner and Draine (2001a), Eq. 23b+24
Table A.4: The various expressions for the electron affinity hardwired in Cloudy.
mnemonic type reference
POT CAR graphite Weingartner and Draine (2001a), Eq. 4
POT SIL silicate Weingartner and Draine (2001a), Eq. 5
Table A.5: The various choices for the inverse attenuation length. Note that these choices will only
be used if no refractive index data is contained in the refractive index file.
mnemonic type description
IAL CAR graphite use graphite.rfi to calculate the inverse attenuation length
IAL SIL silicate use silicate.rfi to calculate the inverse attenuation length
Table A.6: The various expressions for the photoelectric yield hardwired in Cloudy.
mnemonic type reference
PE CAR graphite Weingartner et al. (2006), Sect. 4 – 6
graphite Weingartner and Draine (2001a), Eq. 16 (with no grain x-ray treatment)
PE SIL silicate Weingartner et al. (2006), Sect. 4 – 6
silicate Weingartner and Draine (2001a), Eq. 17 (with no grain x-ray treatment)
Table A.7: The various choices for splitting up the grain emissions.
mnemonic type description
STRG CAR graphite store emitted spectrum as graphitic emission.
STRG SIL silicate store emitted spectrum as silicate emission.
Table A.8: The expressions for the ro-vibrational distribution of H2 formed on various grain sur-
faces.
mnemonic type reference
H2 ICE ice mantle Takahashi and Uehara (2001), Table 2
H2 CAR graphite Takahashi and Uehara (2001), Table 2
H2 SIL silicate Takahashi and Uehara (2001), Table 2
A.3. DESCRIPTION OF THE REFRACTIVE INDEX FILES 315
that the wavelengths may be either monotonically increasing or decreasing, and that the number of
data points or the wavelength grid may be different for each axis. The grid of wavelengths need
not coincide with the Cloudy grid, nor does it need to cover the entire range of energies used in
Cloudy. Logarithmic interpolation or extrapolation will be performed where needed. It is the users
responsibility to ensure that each wavelength grid contains sufficient points to make this process
meaningful; only minimal checks will be performed by Cloudy. Note that if your refractive index
data do not have sufficient wavelength coverage (as will usually be the case if they come from
laboratory experiments) you cannot simply merge data from another refractive index file to extend
the range. This is because the refractive index data need to obey the Kramers-Kronig relations. If
you take data from two different sources, this will not be the case. In most cases you need to
extend your data into the EUV and X-ray regime. The proper procedure in this case is to calculate
the absorption opacity by adding the photoionization opacities (including inner-shell ionizations)
for each of the atoms that make up the grain using data for neutral atoms. You then need to
combine these data with the Kramers-Kronig relations to reverse engineer the refractive index
data. This is the procedure that was used to create the refractive index files that are included in the
Cloudy distribution.
4. – supply σabs , σsct (in cm2 /H), (1 − g), and the inverse attenuation length (in cm−1 ).
Here σabs and σsct are the absorption and scattering cross sections, and g is called the asymmetry
factor or phase function. The latter is needed since the radiative transfer in Cloudy assumes that
photons that are scattered in a forward direction (at an angle of less than 90◦ ) are not lost from the
beam (i.e., they still make it out of the cloud). The asymmetry factor g gives the average value of
the cosine of the scattering angle, so that (1 − g) is an approximate correction factor for the
anisotropy of the scattering by grains. If no scattering cross sections are supplied, σsct × (1 − g)
will default to 10% of the absorption cross section. If no asymmetry factor is supplied, g will
default to zero. If no inverse attenuation lengths are supplied, they will be derived from the
material type supplied previously in the file. On the next line is a keyword with two allowed
316 APPENDIX A. USING THE GRAIN CODE IN CLOUDY
Table A.9: Example of a mixed medium file for fluffy silicate (fluffy.mix).
values: log or linear, defining whether the opacity table will contain logarithmic or linear data
values. The next line gives the number of data points Nd , followed by Nd lines of actual data. Each
line of the table should contain Nv + 1 numbers, starting with the photon energy in Rydberg,
followed by the absorption cross section, the scattering cross section, the factor (1 − g), and the
inverse attenuation length (the last three values may be omitted, depending on the value of Nv ).
The photon energies must either be strictly monotonically increasing or decreasing. The grid of
photon energies need not coincide with the Cloudy grid, nor does it need to cover the entire range
of energies. Logarithmic interpolation or extrapolation will be performed where needed. It is the
users responsibility to ensure that the frequency grid contains sufficient points to make this
process meaningful; only minimal checks will be performed by Cloudy.
about the materials. Each of these lines should give the relative fraction of the volume occupied by
that particular material, followed by the name of the refractive index file between double quotes.
Note that the refractive index files have to be of type rfi tbl since mixing laws need optical
constants as input and cannot work with opacities. The normalization of the relative volumes can
be on an arbitrary scale. The last line in the file should be a keyword identifying which mixing law
is to be used. Allowed values are listed in Table A.10. In the case of Farafonov (2000), the mixing
law assumes that the grain consists of concentric layers of material. It is assumed that the first
material supplied in the mixed medium file identifies the innermost layer, and the following lines
identify the subsequent layers towards the outer edge of the grain. The outermost layer will
determine the material type as defined in Table A.1. None of the layers are allowed to be
crystalline, i.e., have more than one principal axis, and the outermost layer is also not allowed to
be vacuum. In the case of Bruggeman (1935) and Stognienko et al. (1995), the grain is assumed to
be a random (possibly fractal) mixture of materials and the sequence in the mixed medium file is
irrelevant, except that the material type of the mixture is still defined by the last entry in the list of
materials. For this reason it is not allowed to have vacuum as the last entry. In the case of Maxwell
Garnett (1904) the grain is assumed to consist predominantly of a matrix which is defined by the
first entry in the mixed medium file, which encapsulates small, random inclusions which are
defined by the remaining entries. The material type, as well as many other properties of the grain
will be determined by the matrix material, i.e., the first entry in the file. The matrix material is not
allowed to be vacuum or a crystalline material, but the inclusions can be.
files start with a magic number for version control. This number should simply be copied from the
files in the standard distribution. The next line should contain a keyword indicating which type of
size distribution will be entered. The following choices are currently supported: ssize - a single
sized grain, ncarb - a PAH molecule with a specified number of carbon atoms, power - a simple
power law, exp1, exp2, exp3 - power laws with an exponential cutoff, normal, lognormal - a
Gaussian distribution in a or ln(a), table - an arbitrary size distribution supplied as a table. This
keyword is case insensitive. The rest of the file contains the parameters needed to fully define each
of those choices. I will now describe these choices in more detail. It should be noted that at this
stage the absolute normalization of the size distribution is irrelevant; that will be defined in the
refractive index file by the default grain abundance. Each parameter mentioned below should be
entered on a separate line, unless indicated otherwise. All size parameters should be entered in
µm.
A.5.1 ssize
In this case the size distribution is given by a simple delta function:
n(a) ∝ δ (a − a0 )
The only parameter that needs to be supplied is the radius of the grain a0 .
A.5.2 ncarb
This case also describes a single-sized grain, but this time the number of carbon atoms is the only
parameter that is supplied. This is convenient for defining a PAH molecule of a specific size. This
size distribution is obviously only meaningful when combined with carbonaceous material.
A.5.3 power
In this case the size distribution is given by a simple power law:
n(a) ∝ aα a0 ≤ a ≤ a1
Hence this distribution needs three parameters, which need to be supplied in the order a0 , a1 , α.
F(a; β ) = 1 if β = 0
(1 + β a) if β > 0
A.5. DESCRIPTION OF THE SIZE DISTRIBUTION FILES 319
( h n i
exp − alσ−a if a < al
Cl (a; al , σl ) = l
1 if a ≥ al
(
Cu (a; au , σu ) =
1 h n i if a ≤ au
a−au
exp − σu if a > au
The values of σl or σu may be set to zero, in which case a straight cutoff in the size distribution
will be used. Note that when β , σl , and σu are all set to zero, this size distribution degenerates to
the simple power law discussed above. The parameters need to be supplied in the following order:
al , au , α, β , σl , σu , a0 , a1 . The value of n is determined by the keyword used: n = 1 for exp1, etc.
The parameter β should be entered in µm−1 . Note that this size distribution extends infinitely
beyond al and au , so additional cutoffs at a0 and a1 are needed. Either of these values may be set
to zero, in which case Cloudy will calculate a safe default value such that only a negligible amount
of mass is contained in the tail beyond that limit.
A.5.5 normal
In this case the size distribution is given by a Gaussian distribution in a:
!
1 a − ac 2
1
n(a) ∝ exp − a0 ≤ a ≤ a1
a 2 σ
The parameters for this distribution need to be supplied in the order: ac , σ , a0 , a1 . As was
discussed in the previous section, the values of a0 or a1 may be set to zero in which case Cloudy
will calculate a safe default.
A.5.6 lognormal
This case is completely analogous to the normal case discussed above, except that the distribution
is now given by:
!
1 ln{a/ac } 2
1
n(a) ∝ exp − a0 ≤ a ≤ a1
a 2 σ
A.5.7 table
This option allows the user to define an arbitrary size distribution in the form of a table of a4 n(a)
as a function of a. First values for the lower and upper size limit a0 and a1 should be supplied.
These values need not coincide with the lower and upper size limit of the table, although the range
of the table should be at least that large (no extrapolation will be performed). Next the number of
data pairs n in the table should be supplied, followed by n lines each containing two numbers: a
(in µm) and a4 n(a) (in arbitrary units). Note that the values for a in the table must be strictly
monotonically increasing.
320 APPENDIX A. USING THE GRAIN CODE IN CLOUDY
Appendix B
INCLUDING USER-DEFINED
ATMOSPHERE GRIDS IN CLOUDY
B.1 Introduction
C LOUDY now features the possibility of including user-defined stellar atmosphere grids with an
arbitrary number of dimensions (this is the number of parameters that are varied in the grid).
Using such a grid requires two steps. The first is to create an ascii file with all the necessary
information. The format of this file will be described in Section B.2. The second (optional) step is
to compile this file into an index file. This is described in Section B.3. The runtime behavior of the
code is described in Section B.4.
321
322 APPENDIX B. INCLUDING USER-DEFINED ATMOSPHERE GRIDS IN CLOUDY
20060612 and 20160614. These two versions are almost identical, except for one extra model
parameter in the latter version. So unless noted explicitly, all of the discussion below applies to
both versions. The second line contains the number of parameters ndim that are varied in the grid.
Typically this number is 2, but it may be any number ≥ 1 and ≤ MDIM (the latter parameter is
defined in stars.h). The default value for MDIM is 4, which should be sufficient for all current
grids. The parameter can however be increased if the user wishes so. The code will then have to
be recompiled. The third line contains the number of parameters npar that are supplied for each
atmosphere model. This number may be larger than ndim, but not smaller. The additional
parameters are printed in the output, so using npar > ndim can be a useful way of supplying
additional information about the models. The number of parameters is limited by the parameter
MDIM defined in stars.h. Next follow npar lines, each giving a label for that parameter. This
is used in the C LOUDY output. The labels are completely free. However, if the first label matches
the string Teff, and the second label matches log(g) (case sensitive), then special rules apply. We
will refer to this as a Teff-log(g) grid. See Sections B.3 and B.4 for further details. The next line
gives the number of atmosphere models nmod in the grid, followed on the next line by the number
of frequency/wavelength points nfreq in each of those models. In order to keep the format of the
ascii file as close as possible to the original models, it is allowed to use either a frequency or
wavelength grid in arbitrary units. The same holds for the dependent variable, which may either
be a flux per frequency or wavelength unit. Both the dependent and independent variable should
be entered as linear quantities, so logarithmic units like magnitudes are not supported. With this
amount of freedom, the code needs to know how to convert these variables to C LOUDY’s internal
units. This is defines on the next 4 lines. The next line should contain either nu to state that the file
contains a frequency grid, or lambda to state that it contains a wavelength grid. The next line
contains a conversion factor to convert the numbers in the ascii file to a frequency in Hz (case nu)
or a wavelength in Å (case lambda). The conversion factor is multiplied with the numbers in the
ascii file. So, if the ascii file would contain a wavelength grid in nanometer, then the conversion
factor would have to be 10 to convert it into a grid in Å. The next line defines the data type of the
dependent variable. Legal values are F nu, H nu for fluxes per frequency unit, or F lambda,
H lambda for fluxes per wavelength unit. The next line contains the conversion factor to convert
the numbers in the ascii file to a flux in erg cm−2 s−1 Hz−1 (case F nu, H nu) or erg cm−2 s−1 Å−1
(case F lambda, H lambda). Again the conversion factors are multiplied with the numbers in the
ascii file. In the cases H nu and H lambda no implicit factor 4π will be used! So if the ascii file
contains Eddington fluxes H nu in erg cm−2 s−1 Å−1 sr−1 , then the conversion factor should be
12.56637. . . All fluxes are eventually renormalized in C LOUDY, but nevertheless it is important to
get this conversion correct. The effective temperature of interpolated models is internally checked
by evaluating the integral: Z ∞
4
Fν dν = σ Teff .
0
If the result deviates too much from the expected value an error will be printed. If all models
generate such an error, you should check your normalization.
This concludes the general setup of the grid. The remainder of the file contains the actual
parameters and the data of the atmosphere models. These numbers can be formatted in any way
you like, as long as it complies with C formatting rules. More in particular, you can supply more
than 1 number per line, as long as they are separated by whitespace. Several forms of Fortran
number formatting are not recognized in C! First, using “D-format” numbers (e.g. 1.0d+20) is not
B.2. THE ASCII FILE 323
Table B.1: Example of an ascii file, derived from the kwerner.ascii file. Comments are not allowed
to be embedded in the file and are only shown here for clarity.
allowed as C does not recognize this notation. Second, Fortran may omit the “e” in numbers with
large exponents (e.g. 1.0-102). This notation is not recognized either by C. The “e” in the
exponential notation may be either lowercase or uppercase. In the ascii file, first the model
parameters must be supplied. For syntax version 20060612 this means that nmod × npar numbers
must be entered. First all parameters for model #1, then the parameters for model #2, etc. For
syntax version 20160614 nmod × npar+1 items must be entered. First all parameters for model
#1 followed by a track ident (e.g. A1, in general a character followed by a number), then all
parameters for model #2 followed by a different track ident, etc. The latter format is used for the
CoStar grids. Next follows a block of nfreq numbers defining the frequency/wavelength grid.
Finally, nmod blocks, each containing nfreq numbers, must be entered which give the fluxes for
each of the atmosphere models. This then concludes the ascii file.
324 APPENDIX B. INCLUDING USER-DEFINED ATMOSPHERE GRIDS IN CLOUDY
C LOUDY will now create a file usergrid.idx. You may need to move this file to a location in
your search path. See Section 3.3 for details. You can now use the grid by including the following
in your input file:
table star "usergrid.ascii" 2.4e4 4.3
In the case of a Teff-log(g) grid (see Section B.2 for a definition) you can supply only Teff, and
log(g) will default to the highest value in the grid. In all other cases you need to supply exactly
ndim parameters. See Section 6.13 for further details.
it will try to interpolate the requested model using using as few models as possible. This means
that if an exact match could be found in the grid, only that model will be used. If an exact match
could be found for one parameter, but not another, then only interpolation in the latter parameter
will be performed. In general no extrapolation will be performed. The only exception is the log(g)
parameter in Teff-log(g) grids for which more relaxed rules are used. More on that later. First we
will return to the example above. Let’s assume that the usergrid contains models for Teff = {. . .
24000, 25000 . . .} and log(g) = {. . . 4.0, 4.5 . . .}. Then C LOUDY will perform interpolation using
the following 4 models: (Teff, log(g)) = (24000, 4.0), (24000, 4.5), (25000, 4.0), and (25000, 4.5).
It will perform linear interpolation on those models using the log of the flux. If any of the models
it needs for the interpolation is not present in the grid, the interpolation will fail and C LOUDY will
stop. However, more relaxed rules exist for log(g) in Teff-log(g) grids (see Section B.2 for a
definition). If it cannot find a model with a given log(g), it will substitute the model with the
nearest log(g) instead. The reasoning behind this is that in general the spectral energy distribution
is not very sensitive to the value of log(g).
Appendix C
C.2 Macros
Table C.2 lists some of the macros defined in macros.tex.
325
326 APPENDIX C. LATEX STYLE AND MACROS
327
328 REFERENCES
Y. Avni and H. Tananbaum. X-ray properties of optically selected QSOs. ApJ, 305:83–99, June 1986. doi:
10.1086/164230.
Y. Avni, D. M. Worrall, and W. A. Morgan, Jr. The Underlying Distribution of Optical to X-Ray Spectral
Index for Quasars in the Presence of Detection Thresholds. ApJ, 454:673, December 1995. doi:
10.1086/176520.
N. R. Badnell and M. J. Seaton. On the importance of inner-shell transitions for opacity calculations.
Journal of Physics B Atomic Molecular Physics, 36:4367–4385, November 2003. doi:
10.1088/0953-4075/36/21/015.
N. R. Badnell, M. A. Bautista, K. Butler, F. Delahaye, C. Mendoza, P. Palmeri, C. J. Zeippen, and M. J.
Seaton. Updated opacities from the Opacity Project. MNRAS, 360:458–464, June 2005. doi:
10.1111/j.1365-2966.2005.08991.x.
N. R. Badnell, F. Guzmán, S. Brodie, R. J. R. Williams, P. A. M. van Hoof, M. Chatzikos, and G. J. Ferland.
H, He-like recombination spectra - IV. Clarification and refinement of methodology for l-changing
collisions. MNRAS, 507(2):2922–2929, October 2021. doi: 10.1093/mnras/stab2266.
S. Bajtlik, R. C. Duncan, and J. P. Ostriker. Quasar ionization of Lyman-alpha clouds - The proximity
effect, a probe of the ultraviolet background at high redshift. ApJ, 327:570–583, April 1988. doi:
10.1086/166217.
E. L. O. Bakes and A. G. G. M. Tielens. The photoelectric heating mechanism for very small graphitic
grains and polycyclic aromatic hydrocarbons. ApJ, 427:822–838, June 1994. doi: 10.1086/174188.
S. A. Balbus and C. F. McKee. The evaporation of spherical clouds in a hot gas. III - Suprathermal
evaporation. ApJ, 252:529–552, January 1982. doi: 10.1086/159581.
J. A. Baldwin, G. J. Ferland, P. G. Martin, M. R. Corbin, S. A. Cota, B. M. Peterson, and A. Slettebak.
Physical conditions in the Orion Nebula and an assessment of its helium abundance. ApJ, 374:
580–609, June 1991. doi: 10.1086/170146.
R. P. Bauman, R. L. Porter, G. J. Ferland, and K. B. MacAdam. J-Resolved He I Emission Predictions in
the Low-Density Limit. ApJ, 628:541–554, July 2005. doi: 10.1086/430665.
M. A. Bautista and T. R. Kallman. Recombination Spectra of Helium-like Ions. ApJ, 544:581–591,
November 2000. doi: 10.1086/317206.
J. Bechtold, R. J. Weymann, Z. Lin, and M. A. Malkan. The integrated ultraviolet radiation field from
QSOs. ApJ, 315:180–197, April 1987. doi: 10.1086/165123.
J. Bergeron and S. Souffrin. Optical line spectrum of a gas heated by hard UV radiation or energetic
particles. A&A, 14:167–188, September 1971.
E. A. Bergin, W. D. Langer, and P. F. Goldsmith. Gas-phase chemistry in dense interstellar clouds including
grain surface molecular depletion and desorption. ApJ, 441:222–243, March 1995. doi:
10.1086/175351.
F. Bertoldi and B. T. Draine. Nonequilibrium Photodissociation Regions: Ionization-Dissociation Fronts.
ApJ, 458:222, February 1996. doi: 10.1086/176805.
E. Bica. Population synthesis in galactic nuclei using a library of star clusters. A&A, 195:76–92, April
1988.
L. Binette, A. Prieto, E. Szusziewicz, and W. Zheng. Relation between the ionizing continuum and the
emission lines in Fairall 9. ApJ, 343:135–141, August 1989. doi: 10.1086/167691.
J. H. Black. Heating and cooling of the interstellar gas. In Interstellar Processes, volume 134 of
Astrophysics and Space Science Library, pages 731–744. Hollenbach, D. J. and Thronson, Jr., H. A.,
1987. doi: 10.1007/978-94-009-3861-8 27.
REFERENCES 329
K. J. Borkowski and J. P. Harrington. A grain-heated, dusty planetary nebula in M22. ApJ, 379:168–176,
September 1991. doi: 10.1086/170493.
M. Bottorff and G. Ferland. Dissipative Heating and Quasar Emission Lines. ApJ, 568:581–591, April
2002. doi: 10.1086/339058.
M. Bottorff, J. Lamothe, E. Momjian, E. Verner, D. Vinković, and G. Ferland. Luminosity Indicators in
Dusty Photoionized Environments. PASP, 110:1040–1045, September 1998.
M. C. Bottorff, J. A. Baldwin, G. J. Ferland, J. W. Ferguson, and K. T. Korista. He II Reverberation in
Active Galactic Nucleus Spectra. ApJ, 581:932–947, December 2002. doi: 10.1086/344408.
M. C. Bottorff, G. J. Ferland, and J. P. Straley. Two-Photon Transitions and Continuous Emission from
Hydrogenic Species. PASP, 118:1176–1179, August 2006. doi: 10.1086/506974.
J. D. Bregman, L. J. Allamandola, F. C. Witteborn, A. G. G. M. Tielens, and T. R. Geballe. The infrared
emission bands. II - A spatial and spectral study of the Orion bar. ApJ, 344:791–798, September
1989. doi: 10.1086/167844.
M. Brocklehurst. The line spectra of helium in gaseous nebulae. MNRAS, 157:211, 1972.
D. A. G. Bruggeman. Berechnung verschiedener physikalischer Konstanten von heterogenen Substanzen. I.
Dielektrizitätskonstanten und Leitfähigkeiten der Mischkörper aus isotropen Substanzen. Annalen
der Physik, 416:636–664, 1935. doi: 10.1002/andp.19354160705.
M. G. Burton, D. J. Hollenbach, and A. G. G. M. Tielens. Line emission from clumpy photodissociation
regions. ApJ, 365:620–639, December 1990. doi: 10.1086/169516.
A. G. W. Cameron. Elemental and Nuclidic Abundances in the Solar System. In Essays in Nuclear
Astrophysics, page 23, 1982.
J. A. Cardelli. The Abundance of Heavy Elements in Interstellar Gas. Science, 265:209, July 1994. doi:
10.1126/science.265.5169.209.
J. A. Cardelli, B. D. Savage, F. C. Bruhweiler, A. M. Smith, D. C. Ebbets, K. R. Sembach, and U. J. Sofia.
First results from the Goddard High-Resolution Spectrograph - Elemental abundances in the diffuse
clouds toward XI Persei. ApJL, 377:L57–L60, August 1991. doi: 10.1086/186116.
S. Cazaux and A. G. G. M. Tielens. Molecular Hydrogen Formation in the Interstellar Medium. ApJL, 575:
L29–L32, August 2002. doi: 10.1086/342607.
F. H. Chaffee, Jr. and R. E. White. A survey of interstellar neutral potassium. I - Abundances and physical
conditions in clouds toward 188 early-type stars. ApJS, 50:169–198, November 1982. doi:
10.1086/190824.
M. Chatzikos, G. J. Ferland, R. J. R. Williams, R. Porter, and P. A. M. van Hoof. Effects of External
Radiation Fields on Line Emission—Application to Star-forming Regions. ApJ, 779:122, December
2013. doi: 10.1088/0004-637X/779/2/122.
M. Chatzikos, G. J. Ferland, R. J. R. Williams, and A. C. Fabian. On the Observability of Optically Thin
Coronal Hyperfine Structure Lines. ApJ, 787:96, June 2014. doi: 10.1088/0004-637X/787/2/96.
M. Chatzikos, R. J. R. Williams, G. J. Ferland, R. E. A. Canning, A. C. Fabian, J. S. Sanders, P. A. M. van
Hoof, R. M. Johnstone, M. Lykins, and R. L. Porter. Implications of coronal line emission in NGC
4696∗ . MNRAS, 446:1234–1244, January 2015. doi: 10.1093/mnras/stu2173.
V. Ya. Chekhovskoy. Enthalpy and thermodynamic properties of SiC at temperatures up to 2900 K. J.
Chem. Thermodynamics, 3:289–296, 1971.
J. Clavel and M. Santos-Lleo. The turn-over of the ’big bump’ in Fairall 9 and HS 1700 + 6416 - A genuine
difference between Seyfert galaxies and quasars? A&A, 230:3–10, April 1990.
R. E. S. Clegg and J. P. Harrington. The photo-ionization of He I (2 3S) in nebulae. MNRAS, 239:869–883,
August 1989.
330 REFERENCES
R. E. S. Clegg, P. J. Storey, J. R. Walsh, and L. Neale. Measurement of the 12 C/13 C ratio in planetary
nebulae. MNRAS, 284:348–358, January 1997.
L. L. Cowie and A. Songaila. High-resolution optical and ultraviolet absorption-line studies of interstellar
gas. ARA&A, 24:499–535, 1986. doi: 10.1146/annurev.aa.24.090186.002435.
G. Crinklaw, S. R. Federman, and C. L. Joseph. The depletion of calcium in the interstellar medium. ApJ,
424:748–753, April 1994. doi: 10.1086/173927.
R. Cruddace, F. Paresce, S. Bowyer, and M. Lampton. On the opacity of the interstellar medium to ultrasoft
X-rays and extreme-ultraviolet radiation. ApJ, 187:497–504, February 1974. doi: 10.1086/152659.
A. Dalgarno, M. Yan, and W. Liu. Electron Energy Deposition in a Gas Mixture of Atomic and Molecular
Hydrogen and Helium. ApJS, 125:237–256, November 1999. doi: 10.1086/313267.
K. Davidson. On photoionization analyses of emission spectra of quasars. ApJ, 218:20–32, November
1977. doi: 10.1086/155653.
K. Davidson and R. A. Fesen. Recent developments concerning the Crab Nebula. ARA&A, 23:119–146,
1985. doi: 10.1146/annurev.aa.23.090185.001003.
N. L. D’Cruz, C. L. Sarazin, and J. Dubau. Excitation of the 3.071 mm Hyperfine Line in Li-like 57 Fe in
Astrophysical Plasmas. ApJ, 501:414–424, July 1998. doi: 10.1086/305806.
S. Deguchi and W. D. Watson. Excitation of the hyperfine transitions of atomic hydrogen, deuterium, and
ionized helium 3 by Lyman-alpha radiation. ApJ, 290:578–586, March 1985. doi: 10.1086/163014.
K. P. Dere. Ionization rate coefficients for the elements hydrogen through zinc. A&A, 466:771–792, May
2007.
K. P. Dere, E. Landi, H. E. Mason, B. C. Monsignori Fossi, and P. R. Young. CHIANTI - an atomic
database for emission lines. A&AS, 125, October 1997. doi: 10.1051/aas:1997368.
F.-X. Desert, F. Boulanger, and J. L. Puget. Interstellar dust models for extinction and emission. A&A, 237:
215–236, October 1990.
B. T. Draine. Scattering by Interstellar Dust Grains. II. X-Rays. ApJ, 598:1026–1037, December 2003. doi:
10.1086/379123.
B. T. Draine and F. Bertoldi. Structure of Stationary Photodissociation Fronts. ApJ, 468:269, September
1996. doi: 10.1086/177689.
B. T. Draine and A. Li. Infrared Emission from Interstellar Dust. I. Stochastic Heating of Small Grains.
ApJ, 551:807–824, April 2001. doi: 10.1086/320227.
B. T. Draine and A. Li. Infrared Emission from Interstellar Dust. IV. The Silicate-Graphite-PAH Model in
the Post-Spitzer Era. ApJ, 657:810–837, March 2007. doi: 10.1086/511055.
B. T. Draine and B. Sutin. Collisional charging of interstellar grains. ApJ, 320:803–817, September 1987.
doi: 10.1086/165596.
H. W. Drawin. Influence of atom-atom collisions on the collisional-radiative ionization and recombination
coefficients of hydrogen plasmas. Zeitschrift fur Physik, 225:483–493, October 1969. doi:
10.1007/BF01392775.
E. Dwek, R. G. Arendt, D. J. Fixsen, T. J. Sodroski, N. Odegard, J. L. Weiland, W. T. Reach, M. G. Hauser,
T. Kelsall, S. H. Moseley, R. F. Silverberg, R. A. Shafer, J. Ballester, D. Bazell, and R. Isaacman.
Detection and Characterization of Cold Interstellar Dust and Polycyclic Aromatic Hydrocarbon
Emission, from COBE Observations. ApJ, 475:565, February 1997. doi: 10.1086/303568.
J. E. Dyson and D. A. Williams. The physics of the interstellar medium, 2nd ed. The graduate series in
astronomy. Bristol: Institute of Physics Publishing, 1997. ISBN 0750303069.
M. Elitzur and G. J. Ferland. Radiation pressure and emission clouds around active galactic nuclei. ApJ,
305:35–44, June 1986. doi: 10.1086/164226.
REFERENCES 331
10.1086/171063.
G. J. Ferland, A. C. Fabian, and R. M. Johnstone. The Physical Conditions Within Dense Cold Clouds in
Cooling Flows. MNRAS, 266:399, January 1994.
G. J. Ferland, K. T. Korista, D. A. Verner, and A. Dalgarno. Charge Transfer between Neutral Atoms and
Highly Ionized Species: Implications for ISO Observations. ApJL, 481:L115+, June 1997. doi:
10.1086/310655.
G. J. Ferland, A. C. Fabian, and R. M. Johnstone. The physical conditions within dense cold clouds in
cooling flows - II. MNRAS, 333:876–884, July 2002. doi: 10.1046/j.1365-8711.2002.05470.x.
G. J. Ferland, A. C. Fabian, N. A. Hatch, R. M. Johnstone, R. L. Porter, P. A. M. van Hoof, and R. J. R.
Williams. Collisional heating as the origin of filament emission in galaxy clusters. MNRAS, 392:
1475–1502, February 2009a. doi: 10.1111/j.1365-2966.2008.14153.x.
G. J. Ferland, C. Hu, J.-M. Wang, J. A. Baldwin, R. L. Porter, P. A. M. van Hoof, and R. J. R. Williams.
Implications of Infalling Fe II-Emitting Clouds in Active Galactic Nuclei: Anisotropic Properties.
ApJL, 707:L82–L86, December 2009b. doi: 10.1088/0004-637X/707/1/L82.
G. J. Ferland, R. Kisielius, F. P. Keenan, P. A. M. van Hoof, V. Jonauskas, M. L. Lykins, R. L. Porter, and
R. J. R. Williams. Expanded Iron UTA Spectra—Probing the Thermal Stability Limits in AGN
Clouds. ApJ, 767:123, April 2013a. doi: 10.1088/0004-637X/767/2/123.
G. J. Ferland, R. L. Porter, P. A. M. van Hoof, R. J. R. Williams, N. P. Abel, M. L. Lykins, G. Shaw, W. J.
Henney, and P. C. Stancil. The 2013 Release of Cloudy. Revista Mexicana de Astronomia y
Astrofisica, 49:137–163, April 2013b.
G. J. Ferland, M. Chatzikos, F. Guzmán, M. L. Lykins, P. A. M. van Hoof, R. J. R. Williams, N. P. Abel,
N. R. Badnell, F. P. Keenan, R. L. Porter, and P. C. Stancil. The 2017 Release Cloudy. Revista
Mexicana de Astronomia y Astrofisica, 53:385–438, October 2017.
G. B. Field, D. W. Goldsmith, and H. J. Habing. Cosmic-Ray Heating of the Interstellar Gas. ApJL, 155:
L149+, March 1969. doi: 10.1086/180324.
P. J. Francis. The continuum slopes and evolution of active galactic nuclei. ApJ, 407:519–524, April 1993.
doi: 10.1086/172533.
T. Fujimoto. Semi-empirical cross sections and rate coefficients for excitation and ionization by electron
collision and photoionization of helium. Technical Report IPPJ-AM-8, Nagoya University, 1978.
A. E. Glassgold and W. D. Langer. Model calculations for diffuse molecular clouds. ApJ, 193:73–91,
October 1974.
O. Gnat and A. Sternberg. Time-dependent Ionization in Radiatively Cooling Gas. ApJS, 168:213–230,
February 2007. doi: 10.1086/509786.
P. Goldreich and J. Kwan. Molecular Clouds. ApJ, 189:441–454, May 1974. doi: 10.1086/152821.
N. Grevesse and E. Anders. Solar-system abundances of the elements - A new table. In C. J. Waddington,
editor, Cosmic Abundances of Matter, volume 183 of American Institute of Physics Conference
Series, pages 1–8, 1989. doi: 10.1063/1.38013.
N. Grevesse and A. Noels. Cosmic abundances of the elements. In S. Kubono and T. Kajino, editors,
Origin and Evolution of the Elements, pages 15–25, January 1993.
N. Grevesse and A. J. Sauval. Standard Solar Composition. Space Science Reviews, 85:161–174, May
1998. doi: 10.1023/A:1005161325181.
N. Grevesse, M. Asplund, A. J. Sauval, and P. Scott. The chemical composition of the Sun. Ap&SS, 328:
179–183, July 2010. doi: 10.1007/s10509-010-0288-z.
M. F. Gu, T. Holczer, E. Behar, and S. M. Kahn. Inner-Shell Absorption Lines of Fe VI-Fe XVI: A
Many-Body Perturbation Theory Approach. ApJ, 641:1227–1232, April 2006. doi: 10.1086/500640.
REFERENCES 333
A. Li and B. T. Draine. Infrared Emission from Interstellar Dust. II. The Diffuse Interstellar Medium. ApJ,
554:778–802, June 2001. doi: 10.1086/323147.
F. Lique. Revisited study of the ro-vibrational excitation of H2 by H: towards a revision of the cooling of
astrophysical media. MNRAS, 453:810–818, October 2015. doi: 10.1093/mnras/stv1683.
K. Lodders. Solar System Abundances and Condensation Temperatures of the Elements. ApJ, 591:
1220–1247, July 2003. doi: 10.1086/375492.
K. Lodders, H. Palme, and H.-P. Gail. Abundances of the Elements in the Solar System. Landolt Börnstein,
page 44, 2009. doi: 10.1007/978-3-540-88055-4 34.
V. Luridiana, S. Simón-Dı́az, M. Cerviño, R. M. G. Delgado, R. L. Porter, and G. J. Ferland. Fluorescent
Excitation of Balmer Lines in Gaseous Nebulae: Case D. ApJ, 691:1712–1728, February 2009. doi:
10.1088/0004-637X/691/2/1712.
M. L. Lykins, G. J. Ferland, R. L. Porter, P. A. M. van Hoof, R. J. R. Williams, and O. Gnat. Radiative
cooling in collisionally ionized and photoionized plasmas. MNRAS, 429:3133–3143, March 2013.
doi: 10.1093/mnras/sts570.
D. C. V. Mallik and M. Peimbert. Filling factor determinations and their effects on planetary nebula studies.
Revista Mexicana de Astronomia y Astrofisica, 16:111–121, December 1988.
P. R. Maloney, D. J. Hollenbach, and A. G. G. M. Tielens. X-Ray–irradiated Molecular Gas. I. Physical
Processes and General Results. ApJ, 466:561, July 1996. doi: 10.1086/177532.
G. Marsaglia and W. W. Tsang. The Ziggurat Method for Generating Random Variables. Journal of
Statistical Software, 5:8, October 2000. doi: 10.18637/jss.v005.i08.
P. G. Martin and F. Rouleau. Extreme Ultraviolet Opacity with Interstellar Dust. In R. F. Malina and
S. Bowyer, editors, Extreme Ultraviolet Astronomy, page 341, 1991.
W. C. Martin and R. Zalubas. Energy levels of aluminum, Al I through Al XIII. Journal of Physical and
Chemical Reference Data, 8:817–864, July 1979. doi: 10.1063/1.555608.
J. C. Mather, D. J. Fixsen, R. A. Shafer, C. Mosier, and D. T. Wilkinson. Calibrator Design for the COBE
Far-Infrared Absolute Spectrophotometer (FIRAS). ApJ, 512:511–520, February 1999. doi:
10.1086/306805.
W. G. Mathews and G. J. Ferland. What heats the hot phase in active nuclei? ApJ, 323:456–467, December
1987. doi: 10.1086/165843.
J. S. Mathis. Abundances of N, S, and He, and relative stellar temperatures, in low-excitation nebulae. ApJ,
261:195–199, October 1982. doi: 10.1086/160330.
J. S. Mathis, W. Rumpl, and K. H. Nordsieck. The size distribution of interstellar grains. ApJ, 217:
425–433, October 1977. doi: 10.1086/155591.
F. Matteucci and L. Greggio. Relative roles of type I and II supernovae in the chemical enrichment of the
interstellar gas. A&A, 154:279–287, January 1986.
F. Matteucci and A. Tornambe. Chemical evolution of elliptical galaxies. A&A, 185:51–60, October 1987.
J. C. Maxwell Garnett. Colours in metal glasses and metal films. Philos. Trans. R. Soc. London, Sect. A,
203:385–420, June 1904. doi: 10.1098/rsta.1904.0024.
B. J. McCall, A. J. Huneycutt, R. J. Saykally, T. R. Geballe, N. Djuric, G. H. Dunn, J. Semaniak,
O. Novotny, A. Al-Khalili, A. Ehlerding, F. Hellberg, S. Kalhori, A. Neau, R. Thomas, F. Österdahl,
and M. Larsson. An enhanced cosmic-ray flux towards ζ Persei inferred from a laboratory study of
the H+ −
3 -e recombination rate. Nature, 422:500–502, April 2003. doi: 10.1038/nature01498.
C. F. McKee. The Dynamical Structure and Evolution of Giant Molecular Clouds. In C. J. Lada and N. D.
Kylafis, editors, NATO ASIC Proc. 540: The Origin of Stars and Planetary Systems, page 29, 1999.
REFERENCES 337
U. Springmann. Multiple resonance line scattering and the ’momentum problem’ in Wolf-Rayet star winds.
A&A, 289:505–523, September 1994.
G. Stasińska and R. Szczerba. The dust content of planetary nebulae: a reappraisal. A&A, 352:297–307,
December 1999.
W. Steenbock and H. Holweger. Statistical equilibrium of lithium in cool stars of different metallicity.
A&A, 130:319–323, January 1984.
A. Sternberg and D. A. Neufeld. The Ratio of Ortho- to Para-H 2 in Photodissociation Regions. ApJ, 516:
371–380, May 1999. doi: 10.1086/307115.
R. Stognienko, T. Henning, and V. Ossenkopf. Optical properties of coagulated particles. A&A, 296:797,
April 1995.
N. J. Stone. Table of nuclear magnetic dipole and electric quadrupole moments. Atomic Data and Nuclear
Data Tables, 90:75–176, May 2005. doi: 10.1016/j.adt.2005.04.001.
P. J. Storey and D. G. Hummer. Recombination line intensities for hydrogenic ions-IV. Total recombination
coefficients and machine-readable tables for Z=1 to 8. MNRAS, 272:41–48, January 1995. on the
web at http://adc.gsfc.nasa.gov/adc-cgi/cat.pl?/catalogs/6/6064/.
R. H. Stoy. The temperatures of the nuclei of planetary nebulae. MNRAS, 93:588, June 1933.
A. Suchkov, R. J. Allen, and T. M. Heckman. Cosmic-ray-dominated dense molecular gas in normal and
starburst galaxies. ApJ, 413:542–547, August 1993. doi: 10.1086/173023.
J. Takahashi. The Ortho/Para Ratio of H2 Newly Formed on Dust Grains. ApJ, 561:254–263, November
2001. doi: 10.1086/322954.
J. Takahashi and H. Uehara. H2 Emission Spectra with New Formation Pumping Models. ApJ, 561:
843–857, November 2001. doi: 10.1086/323364.
C. B. Tarter. Radiative Transfer in a Gas Excited by X-Rays. PhD thesis, Cornell University, 1967.
C. B. Tarter, W. H. Tucker, and E. E. Salpeter. The Interaction of X-Ray Sources with Optically Thin
Environments. ApJ, 156:943, June 1969. doi: 10.1086/150026.
A. G. G. M. Tielens. Interstellar polycyclic aromatic hydrocarbon molecules. ARA&A, 46:289–337,
September 2008. doi: 10.1146/annurev.astro.46.060407.145211.
A. G. G. M. Tielens and D. Hollenbach. Photodissociation regions. I - Basic model. II - A model for the
Orion photodissociation region. ApJ, 291:722–754, April 1985a. doi: 10.1086/163111.
A. G. G. M. Tielens and D. Hollenbach. Photodissociation Regions - Part Two - a Model for the Orion
Photodissociation Region. ApJ, 291:747, April 1985b. doi: 10.1086/163112.
C. A. Tout, O. R. Pols, P. P. Eggleton, and Z. Han. Zero-age main-seqence radii and luminosities as analytic
functions of mass and metallicity. MNRAS, 281:257–262, July 1996.
P. A. M. van Hoof. Photo-ionization studies of nebulae. PhD thesis, Rijksuniversiteit Groningen, 1997.
P. A. M. van Hoof, J. C. Weingartner, P. G. Martin, K. Volk, and G. J. Ferland. Grains in Photo-Ionized
Environments. In G. Ferland and D. W. Savin, editors, Spectroscopic Challenges of Photoionized
Plasmas, volume 247 of Astronomical Society of the Pacific Conference Series, page 363, 2001.
P. A. M. van Hoof, J. C. Weingartner, P. G. Martin, K. Volk, and G. J. Ferland. Grain size distributions and
photoelectric heating in ionized media. MNRAS, 350:1330–1341, June 2004. doi:
10.1111/j.1365-2966.2004.07734.x.
H. van Regemorter. Rate of Collisional Excitation in Stellar Atmospheres. ApJ, 136:906, November 1962.
doi: 10.1086/147445.
H. Vedel, U. Hellsten, and J. Sommer-Larsen. Formation of disc galaxies in the presence of a background
UVX radiation field. MNRAS, 271:743, December 1994.
REFERENCES 341
D. A. Verner and D. G. Yakovlev. Analytic FITS for partial photoionization cross sections. A&AS, 109:
125–133, January 1995.
D. A. Verner, G. J. Ferland, K. T. Korista, and D. G. Yakovlev. Atomic Data for Astrophysics. II. New
Analytic FITS for Photoionization Cross Sections of Atoms and Ions. ApJ, 465:487, July 1996. doi:
10.1086/177435.
G. S. Voronov. A Practical Fit Formula for Ionization Rate Coefficients of Atoms and Ions by Electron
Impact: Z = 1-28. Atomic Data and Nuclear Data Tables, 65:1, 1997. doi: 10.1006/adnd.1997.0732.
N. V. Voshchinnikov and J. S. Mathis. Calculating Cross Sections of Composite Interstellar Grains. ApJ,
526:257–264, November 1999. doi: 10.1086/307997.
L. Vriens and A. H. M. Smeets. Cross-section and rate formulas for electron-impact ionization, excitation,
deexcitation, and total depopulation of excited atoms. PhRvA, 22:940–951, September 1980. doi:
10.1103/PhysRevA.22.940.
D. Vrinceanu and M. R. Flannery. Classical and quantal collisional Stark mixing at ultralow energies.
PhRvA, 63(3):032701, March 2001. doi: 10.1103/PhysRevA.63.032701.
D. Vrinceanu, R. Onofrio, and H. R. Sadeghpour. Angular Momentum Changing Transitions in
Proton-Rydberg Hydrogen Atom Collisions. ApJ, 747:56, March 2012. doi:
10.1088/0004-637X/747/1/56.
W. R. Webber. A New Estimate of the Local Interstellar Energy Density and Ionization Rate of Galactic
Cosmic Cosmic Rays. ApJ, 506:329–334, October 1998. doi: 10.1086/306222.
J. C. Weingartner and B. T. Draine. Photoelectric Emission from Interstellar Dust: Grain Charging and Gas
Heating. ApJS, 134:263–281, June 2001a. doi: 10.1086/320852.
J. C. Weingartner and B. T. Draine. Dust Grain-Size Distributions and Extinction in the Milky Way, Large
Magellanic Cloud, and Small Magellanic Cloud. ApJ, 548:296–309, February 2001b. doi:
10.1086/318651.
J. C. Weingartner, B. T. Draine, and D. K. Barr. Photoelectric Emission from Dust Grains Exposed to
Extreme Ultraviolet and X-Ray Radiation. ApJ, 645:1188–1197, July 2006. doi: 10.1086/504420.
J. C. Weisheit. X-Ray Ionization Cross-Sections and Ionization Equilibrium Equations Modified by Auger
Transitions. ApJ, 190:735–740, June 1974. doi: 10.1086/152933.
R. E. White. Interstellar lithium - Differential depletion in diffuse clouds. ApJ, 307:777–786, August 1986.
doi: 10.1086/164463.
B. J. Wilkes, H. Tananbaum, D. M. Worrall, Y. Avni, M. S. Oey, and J. Flanagan. The Einstein database of
IPC x-ray observations of optically selected and radio-selected quasars, 1. ApJS, 92:53–109, May
1994. doi: 10.1086/191959.
D. T. Wilkinson. Measurements of cosmic microwave radiation. In M. P. Ulmer, editor, 13th Texas
Symposium on Relativistic Astrophysics, pages 209–218, 1987.
J. P. Williams, E. A. Bergin, P. Caselli, P. C. Myers, and R. Plume. The Ionization Fraction in Dense
Molecular Gas. I. Low-Mass Cores. ApJ, 503:689, August 1998. doi: 10.1086/306034.
R. E. Williams. The Ionization and Thermal Equilibrium of a Gas Excited by Ultraviolet Synchrotron
Radiation. ApJ, 147:556, February 1967. doi: 10.1086/149035.
R. E. Williams. Incorporation of density fluctuations into photoionization calculations. ApJ, 392:99–105,
June 1992. doi: 10.1086/171409.
T. L. Wilson and R. Rood. Abundances in the Interstellar Medium. ARA&A, 32:191–226, 1994. doi:
10.1146/annurev.aa.32.090194.001203.
D. M. Worrall, H. Tananbaum, P. Giommi, and G. Zamorani. X-ray studies of quasars with the Einstein
Observatory. IV - X-ray dependence on radio emission. ApJ, 313:596–606, February 1987. doi:
342 REFERENCES
10.1086/164999.
S. A. Wrathmall, A. Gusdorf, and D. R. Flower. The excitation of molecular hydrogen by atomic hydrogen
in astrophysical media. MNRAS, 382:133–138, November 2007. doi:
10.1111/j.1365-2966.2007.12420.x.
Y. Xu and R. McCray. Energy degradation of fast electrons in hydrogen gas. ApJ, 375:190–201, July 1991.
doi: 10.1086/170180.
D. G. York, M. Meneguzzi, and T. P. Snow. Upper limits for interstellar boron and beryllium abundances
toward zeta Ophiuchi. ApJ, 255:524–526, April 1982. doi: 10.1086/159852.
G. Zamorani, J. P. Henry, T. Maccacaro, H. Tananbaum, A. Soltan, Y. Avni, J. Liebert, J. Stocke, P. A.
Strittmatter, R. J. Weymann, M. G. Smith, and J. J. Condon. X-ray studies of quasars with the
Einstein Observatory. II. ApJ, 245:357–374, April 1981. doi: 10.1086/158815.
W. Zheng, G. A. Kriss, R. C. Telfer, J. P. Grimes, and A. F. Davidsen. A Composite HST Spectrum of
Quasars. ApJ, 475:469, February 1997. doi: 10.1086/303560.
J. Zsargó and S. R. Federman. Nonthermal Chemistry in Diffuse Clouds with Low Molecular Abundances.
ApJ, 589:319–337, May 2003. doi: 10.1086/374617.