Professional Documents
Culture Documents
4/16/2009
ROUGH DRAFT
Lawrence D. Cloutman
adastera47@yahoo.com
Abstract
We present a set of informal notes on the equation of state appropriate to deep
stellar interiors of ordinary stars. We assume the ions are treated as ideal gases,
the radiation is treated in the gray one-temperature (1T) approximation, and the
electrons are degenerate. We consider both the thermal and caloric equations of state
for arbitrary degrees of degeneracy. Non-relativistic and relativistic formalisms are
considered for a small selection of zero-dimensional problems where there is no flow
and no chemistry. These cases can be helpful in validating equation of state software.
2009
c by Lawrence D. Cloutman. All rights reserved.
1
1 Equations of State
We consider thermal and caloric equations of state appropriate to the interiors of ordinary
stars. These have been incorporated into an updated version of the COYOTE computer
program [1], which was used to produce the numerical results presented here. A short table
of physical constants is given in the appendix. All units are CGS and the temperature T is
in K.
The thermal equation of state is the sum of partial pressures for each species, with
the ionic species treated as ideal gases:
X Rρα T aT 4
P = + Pe + , (1)
α6=e Mα 3
where P is the total pressure, R is the universal gas constant, ρα is the density of species
α, a is the radiation energy density constant, and Mα is the molecular weight of species α.
The electron pressure Pe can be calculated from the usual degenerate gas equation of state
or as just another ideal gas, depending upon the thermodynamic conditions. The radiation
pressure term assumes local thermodynamic equilibrium between the gas and radiation field.
The caloric equation of state provides the relationship among temperature, density,
internal energy, and composition and is given by
ρα Iα (T ) + ρe Ie + aT 4 ,
X
ρI = (2)
α6=e
where Iα is the ionic species specific thermal internal energy, and Ie is the electron internal
energy. In the present application, we assume
RT
Iα = Cvα T = (α 6= e). (3)
(γα − 1)Mα
As in the case of the electron pressure, the electron internal energy can be calculated from
the ideal gas case (3) in the nondegenerate limit.
The degenerate non-relativistic electron equations of state are [2, 3]
4π
ne (η, T ) = 3
(2me kB T )3/2 F1/2 (η) = 5.44940154 × 1015 T 3/2 F1/2 (η), (4)
h
8πkB T
Pe (η, T ) = 3
(2me kB T )3/2 F3/2 (η) = 0.501583989 T 5/2 F3/2 (η), (5)
3h
Z ∞
un
Fn (η) = du, (6)
0 exp(u − η) + 1
and
ρe Ie = 1.5Pe , (7)
2
where h is Planck’s constant, me is the electron mass (not to be confused with the electron
molecular weight Me ), kB is the Boltzmann constant, and the integration variable is u =
p2 /2me kB T . The degeneracy parameter is the chemical potential in units of kB T , η =
µ/kB T . Given ne and T , first F1/2 (η), then η are computed. Then F3/2 (η) and finally Pe
may be computed. This electron equation of state is correct unless relativistic effects become
important, which we shall discuss in the next section.
The degenerate electron equation of state requires numerical evaluation of the Fermi-
Dirac integrals and their inverses. A simple but useful approximation that avoids the calcu-
lation of η is [4]
h i5/3
3 1 + 0.1938F1/2 (η)
F3/2 (η) = F1/2 (η) h i , (8)
2 1 + 0.12398F1/2 (η)
which is accurate to within 0.02 percent for η < 30. Accurate tables of the Fermi-Dirac
integrals are given by Cloutman [5], and Antia [6] provides accurate rational approximations
to the integrals and their inverses.
For problems in the ideal gas limit, use of the ideal gas approximation for electrons
is computationally less complex and more efficient than the degenerate electron equation of
state. For η < −3 (or F1/2 (η) < 4.3366 × 10−2 ), the difference between the two is less than
one percent. Using this accuracy criterion, the ideal gas limit is valid for
or
ρe < 2.15 × 10−13 T 3/2 g/cm3 . (10)
Less restrictive criteria are found commonly in the literature. We define the mean
molecular weight per free electron µe by
1 X YZ Z
= . (11)
µe Z AZ
The value of µe is usually between 1 and 2. Cox and Giuli [7] (p. 844) show that for η = 0,
which is where degeneracy definitely becomes significant,
ρ
= 6.12 × 10−9 T 3/2 g/cm3 . (12)
µe
Slightly different choices of accuracy criterion give slightly different numerical factors (for
example, see Clayton [3], p. 88).
3
2 Relativistic Degeneracy
At the high densities and temperatures where relativistic effects must be included, equa-
tions (4) through (7) must be generalized. The general case is given by equations (161) and
(163) of chapter X of Chandrasekhar’s classic book [2]: 1
8π Z ∞ p2 dp
ne = ,
h3 0 exp (E/kB T − η) + 1
8π Z ∞ Ep2 dp
ρe Ie = 3 , (13)
h 0 exp (E/kB T − η) + 1
and
8π Z ∞ p3 ∂E
Pe = 3
dp, (14)
3h 0 exp (E/kB T − η) + 1 ∂p
where p is the electron momentum and E is its kinetic energy. Equations (4) through (7)
are derived from these general equations using the Newtonian approximation E = p2 /2me .
Following Cox and Giuli [7], we note the following assumptions are made in the above
equations:
1. Thermodynamic equilibrium
for a single electron with total energy Et (rest energy me c2 plus kinetic E). This is equivalent
to
m e c2
Et2 = p2 c2 + m2e c4 = (16)
1 − (v/c)2
Chadrasekhar’s equations (48) and (65) in chapter X give the kinetic energy of a single free
electron as
1/2
E = p2 c2 + m2e c4 − me c2 (17)
1
Note that Chandrasekhar uses a different convention than me for the chemical potential: His α = −η.
4
Note that this equation may be rearranged algebraically to give Chandrasekhar’s equa-
tion (160),
E2
2
+ 2Eme = p2 . (18)
c
At low energies, this reduces to the classical Newtonian approximation. The derivative
∂E/∂p is the electron speed,
!−1/2
∂E p p2
v = = 1+ 2 2 . (19)
∂p me me c
This reduces to p/me and c in the classical and extreme relativistic regimes, respectively.
Divine [8] recasts the degenerate electron equation of state into a form valid for all
speeds, from the slow classical limit to the extreme relativistic limit. To do this, the Fermi-
Dirac integrals are generalized to the following three cases:
!1/2
Z ∞ u1/2 du 5 2 2 β 3 u3
IN 1/2 (η, β) = 1 + βu + 2β u + (20)
0 exp(u − η) + 1 2 2
3/2
∞ u3/2 du 1
Z
IP 3/2 (η, β) = 1 + βu (21)
0 exp(u − η) + 1 2
!1/2
Z ∞ u3/2 du 5 β 3 u3
IU 3/2 (η, β) = 1 + βu + 2β 2 u2 + . (22)
0 exp(u − η) + 1 2 2
The integration variable is the scaled energy of an individual electron u = E/kB T , and
T
β = kB T /me c2 = . (23)
5.93 × 109
The degenerate electron equations of state are
4π
ne (η, T ) = 3
(2me kB T )3/2 IN 1/2 (η, β), (24)
h
8πkB T
Pe (η, T ) = 3
(2me kB T )3/2 IP 3/2 (η, β), (25)
3h
and
4πkB T
ρe Ie = Ue (η, T ) = (2me kB T )3/2 IU 3/2 (η, β), (26)
h3
In the nonrelativistic limit (β → 0), we recover equations (4) through (7). See also Blinnikov,
et al. [9] for expansions appropriate to all levels of degeneracy and relativistic effects.
We note that most of the literature uses a form of the generalized Fermi-Dirac inte-
grals (20) through (22) written in terms of another generalized Fermi-Dirac integral,
Z ∞ un (1 + 0.5βu)1/2
Fn (η, β) = du (n > −1). (27)
0 exp(u − η) + 1
5
Then
IN 1/2 (η, β) = F1/2 (η, β) + βF3/2 (η, β) (28)
β
IP 3/2 (η, β) = F3/2 (η, β) + F5/2 (η, β) (29)
2
IU 3/2 (η, β) = F3/2 (η, β) + βF5/2 (η, β). (30)
While this form is mathematically elegant, it has no clear computational advantage over
Divine’s form.
When are relativistic effects important? Part of the conventional wisdom has it that
relativistic effects are important for densities greater than 106 − 107 g/cm3 . Clayton [3]
derives this limit assuming that relativistic effects are important once the Fermi energy is
twice the rest mass energy of an electron. This limit is far too lax if one needs pressure and
internal energy to accuracies of a few percent or less. That is, this criterion is a sufficient
condition for relativistic effects to be significant. However, it is clear from the definitions
of the generalized Fermi-Dirac integrals that relativistic effects are important if β is large,
regardless of the density.
There is an additional limit emphasized by Mitalas [10], and a derivation of this limit
may be found on page 807 of Cox and Giuli. For relativistic effects to be negligible for
η > 0, βη << 1. The product βη is the chemical potential in units of the electron rest mass,
which clearly is a physically meaningful relativity parameter. Figure 24.4 of Cox and Giuli
(p. 847) is a useful version of the traditional ρ − T plane showing where relativistic effects
are important for the electron equation of state.
Mitalas [10] suggests a slightly different approximation,
β
Fn (η, β) = Fn (η) + Fn+1 (η). (31)
4
He also notes F5/2 (η) ≈ 5ηF3/2 (η)/7 for η >> 1, in which case F3/2 (η, β) ≈ F3/2 (η)(1 +
15 β η / 28). Given the ease with which the integrals in equations (20) through (22) may
be evaulated and tabulated using the methods of Cloutman [5], we shall not investigate the
accuracy of such approximations at the present time.
The integrals obey the following recursion relation (for example, Cox and Giuli, p.
810):
dFn+1 (η, β) dFn (η, β)
(n + 1)Fn (η, β) = −β (k > −1) (32)
dη dβ
For large β, Fn (η, β) ≈ (β/2)1/2 Fn+1/2 (η, β) for all η.
6
3 Partial and Pressure Ionization, Coulomb Correc-
tions, Pair Production
There are several effects that we have not yet included that affect the equation of state under
certain conditions. We shall discuss some of these in this section. Clayton [3] (pp. 139-155)
provides an elementary discussion of these issues.
The first issue is partial and pressure ionization. In this study, we assumed total
ionization. We argue on energetic grounds that this should be a good approximation for
the conditions of deep stellar interiors where the thermal energy per particle exceeds the
ionization potential. In principle, partial ionization can be included in my program by using
either the equilibrium chemistry package to solve the Saha equation or the kinetic chemistry
package using ionization and recombination rates. There is presently no mechanism in the
code to account for pressure ionization (lowering of the continuum). Eggleton, Faulkner
and Flannery [11] provide a first pass at computing variable ionization, including pressure
ionization. Updates to this model are presented by Pols, et al. [12]. Weaver, Zimmerman,
and Woosley [13] briefly describe an average atom model for partial and pressure ionization
of a multicomponent mixture.
Another physical effect is the change to pressure and internal energy due to the
Coulomb interactions between charged particles in the plasma:
Clayton provides an introduction to this effect, and Iben, Fujimoto, and MacDonald [14]
provide a more detailed and complete model. Pols, et al. also discuss Coulomb corrections.
For very high temperatures, pair creation of electron-positron pairs must be included
in the equation of state. This occurs when the thermal energy of fluid particles approaches
or exceeds the rest mass energy of an electron, or kB T > me c2 [15].
Timmes and Arnett [16] also provide expressions for arbitrary levels of degeneracy
and relativistic effects, including electron-positron pair creation. Timmes and Swesty [17]
describe a numerical method for implementing tables of such equations of state while insuring
thermodynamic consistency.
Researchers at LLNL created the more detailed OPAL equation of state tables [18, 19,
20]. Similar work has been reported by Mihalas, Hummer, and Däppen (MHD) [21, 22, 23].
7
4 Non-Relativistic Numerical Examples
The COYOTE computer program was used to run several zero-dimensional test cases in
order to check out the software that evaluates the equations of state described in the previous
section. We shall consider four sets of physics options and two densities: one nondegenerate,
one degenerate.
The first example is conditions for helium burning via the triple alpha process. Here
the temperature is above 108 K, which corresponds to an average thermal energy per particle
of 104 ev. 2 Here is a short list of the ionization energies of ions with a single electron: 3
1. H I (Z=1): 13.59844 ev
2. He II (Z=2): 54.41778
3. O VIII (Z=8): 871.4101
4. S XVI (Z=16): 3494.1892
5. Cr XXIV (Z=24): 7894.81
6. Cu XXIX (Z=29): 11567.617
We should expect that if the thermal energy (temperature) is larger than the ionization
energy, then the electron will be stripped from most atoms. In the cases I will be considering
first, helium is burned to carbon and oxygen. My temperatures will always exceed 104 ev, but
the ionization energy of O VIII is less than 103 ev. Therefore, the approximation of total
ionization should be adequate, and that approximation will be assumed in the following
examples.
8
mixture mean molecular weight = 1.3342D+00
mixture C_v = 9.3483D+07 [#2]
mixture sound speed = 2.2788D+08 cm/s
i j P rho I T
3 3 3.11677D+19 1.00027D+03 4.67415D+16 5.00000D+08
3 3 3.11677D+22 1.00027D+06 4.67415D+16 5.00000D+08
Mass Fractions
i j 1 2 3 4
3 3 2.74112D-04 9.99726D-01 0.00000D+00 0.00000D+00
3 3 2.74112D-04 9.99726D-01 0.00000D+00 0.00000D+00
Note that I have presented 10 digits in some of the above numbers. This runs counter to
standard practice of reporting results only to the number of significant figures determined by
the least accurate input number. In the present example, we are limited to 4 or 5 significant
digits by the accuracy of the physical constants. The computer doesn’t care how many digits
of R or Mα are significant, it carries all our double precision arithmetic out to about 16 digits.
I did the hand calculations with a 10-digit scientific calculator using the full significance, just
as the computer did, in an attempt to duplicate the computer output. Therefore, differences
between my hand calculations and the computational results should be limited by rounding
in the hand calculator or in the printout if it is has fewer than 10 digits.
Note that the pressure calculations look correct, but the internal energy is off in the
fourth digit. This small discrepancy appears to be due to the number of significant figures
carried in the physical constants. The hand calculation used Cvα for each species computed
from equation (3). These are listed in the printout above in the column labelled [#1]. The
9
enthalpy tables generated by gasnuc and used in the cfd program to compute the mixture Cv
at [#2] uses a specific heat at constant presssure CP = 4.968 kcal/mol-K = 20.786 kJ/mol-K.
The ρ = 106 g/cm3 case also appears to be working correctly. The pressure scales
linearly with density, and I is independent of density.
i j p rho I T
3 3 3.11881D+19 1.00027D+03 4.67703D+16 5.00000D+08
3 3 4.98584D+22 1.00027D+06 7.47681D+16 5.00000D+08
Mass Fractions
i j 1 2 3 4
3 3 2.74112D-04 9.99726D-01 0.00000D+00 0.00000D+00
3 3 2.74112D-04 9.99726D-01 0.00000D+00 0.00000D+00
The pressure is correctly computed by the code. We are at a low enough density that
degeneracy effects are not important. The discrepancy in the internal energy is the same
small value as in the previous case and is undoubtedly due to the same cause.
For ρ = 106 , electron degeneracy is important, which can be seen by comparing P
and I for the two densities. Here are the hand calculations:
10
• ne = ρe /me = 3.009927328 × 1029 cm−3
i j p rho I T
3 3 1.88751D+20 1.00027D+03 5.19328D+17 5.00000D+08
3 3 5.00160D+22 1.00027D+06 7.52406D+16 5.00000D+08
Mass Fractions
i j 1 2 3 4
3 3 2.74112D-04 9.99726D-01 0.00000D+00 0.00000D+00
3 3 2.74112D-04 9.99726D-01 0.00000D+00 0.00000D+00
The electron and ion contributions are the same as for the case in the previous sub-
section. However, comparison with those results shows that the radiation dominates in the
lower density case and is not very important in the higher density case. For ρ = 103 g/cm3 ,
11
We get good agreement between the code and the hand calculation, so we conclude that
the equations of state have been implemented correctly. Note one peculiarity: The internal
energy density I decreases with density while ρI increases. This feature is due to the radiation
pressure term, for which I does indeed decrease with increasing density.
gasdata input
isp label wt htform gamma charge
1 e- 5.485800000D-04 0.000000000D+00 1.666667000D+00 -1
2 He++ 4.000763040D+00 1.821902486D+03 1.666667000D+00 2
3 C 1.201120000D+01 1.699772945D+02 1.666667000D+00 0
4 O+ 1.599880000D+00 3.730241396D+02 1.666667000D+00 1
idealg = 1 rad1T = 0.0D+00 rgas = 8.31451D+07
species input
k=1 wt=5.485800D-04 gamma=1.66667D+00 eosform=1.0D+00 ze=-1.0
k=2 wt=4.000763D+00 gamma=1.66667D+00 eosform=1.0D+00 ze= 2.0
k=3 wt=1.201120D+01 gamma=1.66667D+00 eosform=1.0D+00 ze= 0.0
k=4 wt=1.599880D+00 gamma=1.66667D+00 eosform=1.0D+00 ze= 1.0
nreg = 1 mmw, P, C_v = 1.3340D+00 3.1173D+19 9.3495D+07
nreg = 1 gamma, sound spd = 1.6667D+00 2.2791D+08
i j P rho I T
3 3 3.11735D+19 1.00027D+03 4.67474D+16 5.00000D+08
3 3 3.11735D+22 1.00027D+06 4.67474D+16 5.00000D+08
12
Mass Fractions
i j 1 2 3 4
3 3 2.74163D-04 9.99726D-01 0.00000D+00 0.00000D+00
3 3 2.74163D-04 9.99726D-01 0.00000D+00 0.00000D+00
13
5 Relativistic Numerical Examples
Tables of relativistic Fermi-Dirac integrals were calculated that were used to develop software
for the relativistic equation of state. The numerical method is the same as in [5] and is
summarized in appendix B. The tables cover the ranges −30 ≤ η ≤ 70 and 0.0 ≤ β ≤ 1.2.
The software is based on bilinear interpolation, which is easy to implement and has the
3/2
advantage that it is reversible. That is, if one interpolates a table to find η for a given IN
3/2
and β, then interpolation for that η and β will produce the original value of IN to within
rounding errors. The question of thermodynamic consistency, however, needs examination.
It may be necessary to change to another algorithm in the future.
The above table contains selected values of the non-relativistic Fermi-Dirac inte-
grals from non-degenerate to highly degenerate conditions. The last column is the ratio
F3/2 (η)/F1/2 (η), which has a value of 1.5 in the non-degenerate regime. Degeneracy effects
begin to be important in the range −5 ≤ η ≤ 0.
14
F_n 2.1378006768D+01 1.3452855273D+02 1.0369132308D+03 1.00384
2.0D+01 6.0723318472D+01 7.3452712403D+02 7.3984357633D+02 12.0963
F_n 5.9994107800D+01 7.2921067173D+02 1.0632904599D+04 1.00724
3.0D+01 1.1218582469D+02 2.0176032258D+03 2.0391942639D+03 17.9845
F_n 1.1018981251D+02 1.9960121877D+03 4.3182076140D+04 1.01070
7.0D+01 4.1124248826D+02 1.7040118103D+04 1.7456855841D+04 41.4357
F_n 3.9461910790D+02 1.6623380365D+04 8.3347547647D+05 1.02446
The above table contains selected values of the relativistic Fermi-Dirac integrals from
non-degenerate to highly degenerate conditions for β = 0.001, which corresponds to a tem-
perature of only 5.93 × 106 K. There are two kinds of lines in this table. Lines with a
numerical value of η in the first column contain values of IN 1/2 , IP 3/2 , IU 3/2 , and the ratio
IP 3/2 /IN 1/2 . This ratio should be 1.5 in the non-degenerate, non-relativistic (ideal gas) limit,
and that is the case.
Lines that begin with Fn contain the generalized Fermi-Dirac integrals F1/2 (η, β),
F3/2 (η, β), F5/2 (η, β), and the ratio IU 3/2 /IP 3/2 . This ratio should be 1.0 in the non-relativistic
ideal gas limit. These values should be non-relativistic to a high degree of accuracy. In-
deed, even the most extreme table entry F5/2 (70, 0.001) = 8.33 × 105 is very close to the
non-relativistic value of F5/2 (70) = 8.22 × 105 . As pointed out by Cox and Giuli [7] and
Mitalas [10], βη is the relevant relativity parameter if η > 0, and this parameter has a value
of 0.07 in this case. Relativistic corrections of a few percent are therefore the most that we
should expect unless the degeneracy becomes even stronger.
The above table contains selected values of the relativistic Fermi-Dirac integrals from
non-degenerate to highly degenerate conditions for β = 0.01 (T = 5.9 × 107 K). The ratios
IP 3/2 (η, β)/IN 1/2 (η, β) = 1.5 and IU 3/2 (η, β)/IP 3/2 (η, β) = 1.0124 for η = −30 already show
15
a small correction to the internal energy even at this low value of β. Both ratios show a
deviation from the non-relativistic equation of state for η ≥ 0. The deviations in the pressure
and internal energy are in opposite directions: Relativistic effects lower the pressure from
the non-relativistic value, but raise the internal energy.
The ratio IU 3/2 (η, β)/IP 3/2 (η, β) is unity in the non-relativistic limit. If one needs the
equation of state to be highly accurate, say to one or two percent, then the relativistic form
of the Fermi-Dirac integrals must be used for all advanced stages of thermonuclear burning
in stars. That is the case for our He-burning deflagrations, which have β values ranging from
0.02 to 0.2 and η ranging from around 0 on up to (more typically) very large values.
The values of β = 0.08 and 0.5 were chosen to be in the middle of the range of T
encountered in He burning and near the upper limit of T found all but the most advanced
stages of nuclear burning. The ratios clearly show the importance of relativistic effects at
these temperatures regardless of the density (which determines the degeneracy parameter η
for a given T ). Note also that the ratio IU 3/2 (η, β)/IP 3/2 (η, β) is approaching the extreme
16
relativistic limit of 2.0 as η and β increase. Note also that relativistic effects become impor-
tant at lower values of η and β for the caloric equation of state than for the thermal equation
of state.
The question of accuracy of the numerical integrations used to make these tables
is legitimate. The code is the same one used to make extensive tables for β = 0 that
are accurate to at least 10 digits [5]. The numerical method is based on Simpson’s rule
with Aitken extrapolation to obtain values for finite integration intervals, followed by two
extrapolation techniques to obtain the value on the infinite interval. Internal checks indicate
that the tables in this appendix were computed to an accuracy of 12-15 digits. This is
consistent with the 16 digit accuracy of double precision artithmetic on my computer.
A cross-check was made by using Gauss-Laguerre quadrature with 8, 16, 32, and
64 nodes to compute some of these integrals, an approach proposed by Kippenhahn and
Thomas [24]. We obtained agreement to about 10 digits in the non-degenerate limit. How-
ever, the Gauss-Laguerre quadrature failed miserably at high degeneracy, with the values
of the integrals not converging smoothly as the number of integration nodes was increased.
While the source of this behavior was not investigated, there are three obvious suspects:
Round-off errors, coding errors, and (most likely) the fact that the error term is proportional
to the n-th order derivative of the integrand, where n is the number of nodes. If the integrand
is such that derivatives grow without bound as the order increases, then the truncation error
is also unbounded. My code has been checked in the limits of large and small η by comparing
to analytic series expansions of the integrals and by comparing to earlier published values.
Now let us consider the relativistic effects by examining the governing equations.
Consider equation (4) rewritten as
ρ −3/2
F1/2 (η) = 1.105 × 108 T (33)
µe
as a measure of the importance of degeneracy effects. If F1/2 (η) < 6.0 × 10−3 , or η < −5,
then degeneracy is negligible (approximately 0.1 percent effect on the pressure). Relativistic
effects are important when β, defined by equation (23), is much less than unity. For β = 0.01,
we have T = 5.93×107 K. We saw from the table above that even at this low (by the standards
of He burning) temperature, relativistic effects are present at the one percent level. Even for
η ≈ −5, the effect is about 2 percent, and it gets larger the more degenerate the electrons.
The density for these conditions is ρ/µe = 24.6 g/cm3 . The molecular weight per electron is
a weak function of composition for H-depleted mixtures, and its value is approximately 2.0.
17
6 Conclusions
The results of this study suggest the following conclusions:
4. The degenerate electron equation of state for arbitrary degrees of degeneracy and
relativity parameter is a straightforward generalization of the non-relativistic equation
of state and is little more difficult to implement into a fluid dynamics code.
5. Some simple Pade approximants or similar numerical device would be convenient for
computing the integrals as functions of η and β, as well as for their inverses.
18
References
[4] R. B. Larson and P. R. Demarque, “An application of Henyey’s approach to the inte-
gration of the equations of stellar structure,” Ap. J. 140, 524 (1964).
[5] L. D. Cloutman, “Numerical evaluation of the Fermi-Dirac integrals,” Ap. J. Suppl. 71,
677 (1989).
[7] J. P. Cox and R. T. Giuli, 1968, Principles of Stellar Structure, Vol. 2. Physical Prin-
ciples (New York: Gordon and Breach); chapt. 24.
[8] N. Divine, “Numerical evaluation of the degenerate equation of state,” Ap. J. 142, 1652
(1965).
[10] R. Mitalas, “Relativity parameter at high degeneracy,” Ap. J. 172, 179 (1972).
[11] P. P. Eggleton, J. Faulkner, and B. P. Flannery, “An approximate equation of state for
stellar material,” Astron. Astrophys. 23, 325 (1973).
[12] O. R. Pols, C. A. Tout, P. P. Eggleton, and Z. Han, “Approximate input physics for
stellar modelling,” MNRAS 274, 964 (1995).
[14] I. Iben, Jr., M. Y. Fujimoto, and J. MacDonald, “Diffusion and mixing in accreting
white dwarfs,” Ap. J. 388, 521 (1992).
19
[15] H.-Y. Chiu, 1968, Stellar Physics (Waltham, MA: Baisdell).
[16] F. X. Timmes and D. Arnett, “The accuracy, consistency, and speed of five equations
of state for stellar hydrodynamics,” Ap. J. Suppl. 125, 277 (1999).
[17] F. X. Timmes and F. D. Swesty, “The accuracy, consistency, and speed of an electron-
positron equation of state based on table interpolation of the Helmholtz free energy,”
Ap. J. Suppl. 126, 501 (2000).
[19] F. J. Rogers and C. A. Iglesias, “Radiative atomic Rosseland mean opacity tables,” Ap.
J. Suppl. 79, 507 (1992). (OPAL)
[20] F. J. Rogers, 1994, in G. Chabrier and E. Schatzman, eds., Proc. IAU Colloq. 147, The
Equation of State in Astrophysics. Cambridge Univ. Press, Cambridge. (OPAL)
[21] D. G. Hummer and D. Mihalas, “The equation of state for stellar envelopes. I. An
occupation probability formalism for the truncation of internal partition functions,”
Ap. J. 331, 794 (1988). (MHD)
[22] D. Mihalas, W. Däppen, and D. G. Hummer, “The equation of state for stellar envelopes.
II. Algorithm and selected results,” Ap. J. 331, 815 (1988). (MHD)
[25] E. Isaacson and H. B. Keller, 1966, Analysis of Numerical Methods (New York: John
Wiley).
[26] H. L. Gray and T. A. Atchison, 1968, in Proc. ACM 23rd National Conf. (Princeton:
Brandon/Systems Press), p. 73.
20
A Physical Constants
• Radiation energy density constant: a = 7.563 × 10−15 erg cm−3 K−4 (astef in the code)
• π = 3.141592654 (pi)
21
B Excerpts from ApJS Paper [5]
B.1 Numerical Integration Techniques
In general numerical quadrature must be used to evaluate the Fermi-Dirac integrals for condi-
tions of partial degeneracy (η near zero), and attention must be paid to several complications.
For n < 0, the integrand has a singularity at the origin. For nonintegral n, certain deriva-
tives of the integrand have a singularity at the origin. Finally, the interval of integration is
infinite. This section describes the techniques and strategies that avoid numerical difficulties
associated with these features and allow one to obtain excellent accuracy with only a small
computational effort. The algorithm we adopt is based on a pair of extrapolation procedures
and readily produces accurate results without manual input beyond setting up the program
and checking the output for consistency of the extrapolations.
The difficulty with singularities in the derivatives is due to the truncation error term of
the chosen quadrature rule. Consider the example of Simpson’s rule applied to the evaluation
of a definite integral. Simpson’s rule is derived by fitting a parabola to three equidistant
points and integrating the parabola. For m (an odd integer) equally spaced points, m ≥ 5,
the three-point rule may be applied to a sequence of three-point subintervals to obtain
b (m−1)/2 (m−1)/2
H
Z X X
f (x) dx = f (a) − f (b) + 4 f (a + [2j − 1] H) + 2 f (a + 2jH)
a 3 j=1 j=1
(b − a) 4 (4)
−H f (ξ), (34)
180
where H is the integration step size, and ξ is some point in the open interval (a, b) =
(a, a + [m − 1] H) [25]. The truncation error term is valid only if the first four derivatives of
the integrand are bounded in the interval of integration. For n = 1/2 and 3/2, the first and
second derivatives, respectively, are singular at the origin, and Simpson’s rule is less accurate
than shown in equation (34). This is because, for n = 1/2, the slope of the integrand at
the origin is infinite, and the parabola used to fit the integrand at the first three integration
nodes must have a finite slope and therefore cannot make a very accurate fit. The n = 3/2
case is less accurate because the parabolic fit has similar trouble with the infinite second and
higher derivatives of the finite integrand.
This difficulty is not peculiar to Simpson’s rule. For example, the trapezoidal rule
m−2
Z b H X (b − a) 2 (2)
f (x) dx = f (a) + f (b) + 2 f (a + jH) − H f (ξ) (35)
a 2 j=1 12
requires the first two derivatives to be finite. Gaussian quadrature of order N requires that
the first 2N derivatives be bounded, which is even more restrictive.
22
The difficulty with singular integrands and derivatives for half-integer values of n ≥
−1/2 may be eliminated by the simple change of variables z 2 = x applied to equation (6):
Z ∞ z 2n+1 dz
Fn (η) = 2 .) (36)
0 1 + exp(z 2 − η)
This same change of variables is used for the relativistic integrals. Although this transfor-
mation can be used for integral values of n, it is not necessary.
Evaluation of equation (6) or equation (36) begins with application of Simpson’s rule
over the finite interval [0, t] for two values of t. If the values of t are properly chosen, then
we can extrapolate to the integral over [0, ∞]. Consider the general case of numerically
evaluating improper integrals of the form
Z ∞
S(p) = f (p, x) dx = lim St (p), (37)
a t→∞
where Z t
St (p) = f (p, x) dx, (38)
a
and where a is a finite constant. The limit in equation (37) is obtained by means of ex-
trapolation procedures. This may be done by means of any of several transforms that were
originally devised for doing Laplace transforms numerically.
Define the B and G transforms [26] as
Gray and Atchison [26] show that if limt→∞ Rt (p, k) 6= 0 or 1, G converges to S(p) faster
than St+k (p). A similar theorem was given for the B transform. It can be shown that, if
St is evaluated exactly, the G transformation is exact for f = exp(−x), and the B trans-
formation is exact for f = x−s , s > 1 for finite t and k. Experience has shown that these
23
transforms do help the convergence in evaluating the Fermi-Dirac integrals. Because the
Fermi-Dirac integrand decays exponentially, the G transformation is more accurate than the
B transformation.
The St (p) are evaluated by numerical integration and contain truncation and round-
off errors. Aitken extrapolation is used to improve the accuracy of the St (p) and is based
on the assumption that, for sufficiently large m, the truncation error vanishes smoothly and
monotonically as m increases. If we use µ, 2µ, and 4µ subintervals, where µ = m − 1, then
we assume
I = Iµ + c H p ,
and
I = I4µ + c (H/4)p ,
where I is the exact value of the integral, Iµ is the approximate value using µ subintervals,
and c and p are free parameters. Equations (15) can be solved for I, c, and p given H and
the Im :
(I4µ − I2µ )2
I = I4µ − , (45)
I4µ − 2I2µ + Iµ
p = log10 [(I − Iµ )/(I − I2µ )]/ log10 (2), (46)
and
c = (I − Iµ )/H p . (47)
We obtained 12-digit accuracy with only 121 nodes in the Simpson quadratures.
24
subprogram to evaluate Fn in applications programs. Tables were published for the non-
relativistic case for n = -1/2, 1/2, 3/2, and 5/2 and for −5 ≤ η ≤ 25 in steps of 0.05 [5].
Outside that range, series expansions provide good accuracy.
Cox and Giuli [7] show that for η ≤ 0, a good approximation is
∞
exp(r η)
(−1)r
X
Fn (η) = Γ(n + 1) exp(η) , n > −1, (49)
r=0 (r + 1)n+1
where Γ is the gamma function. Using Γ(z + 1) = zΓ(z) and Γ(1/2) = π 1/2 (for example,
Abramowitz and Stegun [27]), we specialize this series to
∞
π 1/2 X (−1)j+1 exp(j η)
F1/2 (η) = , (50)
2 j=1 j 3/2
and
∞
3π 1/2 X exp(j η)
F3/2 (η) = (−1)j+1 . (51)
4 j=1 j 5/2
Only five terms are used for η ≤ −5, which provide 12 digit accuracy for the worst cases,
F1/2 (−5) and F3/2 (−5).
For η > 25, another asymptotic form is used. For integrals of the form
Z ∞ φ0 (u) du
I(η) =
0 exp(u − η) + 1
∞
C2j φ(2j) (η),
X
≈ φ(η) + 2 (52)
j=1
for large η. This series expansion has errors of order exp(−η). The C2j are given by
∞
(−1)i+1 i−2j = [1 − 2−2j+1 ] ζ(2j),
X
C2j = (53)
i=1
where ζ is the Riemann zeta function. The first five coefficients are C2 = π 2 /12, C4 =
7π 4 /720, C6 = 31π 6 /30240, C8 = 127π 8 /1209600, and C10 = 511π 10 /47900160. After
evaluating the necessary derivatives, the final expansions are
∞ n+1
η n+1
k η −2r , n > 0, η >> 1.
X Y
Fn (η) = 1 + 2 C2r (54)
n+1 r=1 k=n−2r+2
dFn
= n Fn−1 (η), n > 0, (57)
dη
so we need the table for F−1/2 for a routine that evaluates F1/2 and F3/2 . Cubic Hermite
interpolation, which fits the function values and derivatives at two nodes, provides seven
digits accuracy near η = -5 and 12 digits near η = 20. We finally adopted fifth order Hermite
interpolation, which fits function values and derivatives at three nodes. The accuracy is at
least ten digits near η = -5 and least 12 near η = 25.
26