Astrophysical Fluid Dynamics Mathematical Tripos, Part III 1 Ideal gas dynamics and MHD Dr Gordon Ogilvie Michaelmas Term 2008 1.1 Review of ideal gas dynamics Provisional synopsis 1.1.1 Fluid variables

Equations of ideal gas dynamics and MHD, including compress- A fluid is characterized by a velocity field u(x, t) and two independent • ibility, thermodynamic relations and self-gravitation. Microphys- thermodynamic properties. Most useful are the dynamical variables: ical basis and validity of a fluid description. the pressure p(x, t) and the mass density ρ(x, t). Other properties, e.g. temperature T , can be regarded as functions of p and ρ. The specific Physical interpretation of MHD, with examples of basic phenom- • volume (volume per unit mass) is v = 1/ρ. ena. We neglect the possible complications of variable chemical composition Conservation laws, symmetries and hyperbolic structure. Stress • associated with ionization and recombination, or chemical or nuclear tensor and virial theorem. reactions. Linear waves in homogeneous media. • 1.1.2 Eulerian and Lagrangian viewpoints Nonlinear waves, shocks and other discontinuities. • Spherical blast waves: supernovae. In the Eulerian viewpoint we consider how fluid properties vary in time • at a point that is fixed in space, i.e. attached to the (usually inertial) Spherically symmetric steady flows: stellar winds and accretion. • coordinate system. The Eulerian time-derivative is simply ∂ Axisymmetric rotating magnetized flows: astrophysical jets. . • ∂t Waves and instabilities in stratified rotating astrophysical bodies. • In the Lagrangian viewpoint we consider how fluid properties vary in time at a point that moves with the fluid. The Lagrangian time- derivative is then Please send any comments and corrections to [email protected] D ∂ = + u · ∇. Dt ∂t

1.1.3 Material points and structures

A material point is an idealized fluid element, a point that moves with the bulk velocity u(x, t) of the fluid. (Note that the true particles of which the fluid is composed have an additional random thermal motion.)

1 Material curves, surfaces and volumes are geometrical structures com- If δm = ρδV is a material mass element, it can be seen that mass is posed of fluid elements and moving (and distorting) with the fluid flow. conserved in the form An infinitesimal material line element δx evolves according to Dδm = 0. Dδx Dt = δu = δx · ∇u. Dt 1.1.5 Equation of motion It changes its length and/or orientation in the presence of a velocity gradient. The equation of motion, Infinitesimal material surface and volume elements can be defined from Du material line elements according to ρ = ρ∇Φ ∇p, Dt − − δS = δx(1) δx(2), × derives from Newton’s second law with gravitational and pressure forces. (1) (2) (3) δV = δx · δx δx . Φ(x, t) is the gravitational potential. Viscous forces are neglected in × They therefore evolve according to (exercise) ideal gas dynamics. DδS =(∇ · u)δS (∇u) · δS, Dt − 1.1.6 Poisson’s equation DδV =(∇ · u)δV. Dt The gravitational potential is related to the mass density by Poisson’s equation, (See, e.g., Batchelor, An Introduction to Fluid Dynamics, chapter 3.) S In Cartesian coordinates and suffix notation the equation for δ reads 2Φ = 4πGρ, ∇ DδSi ∂uj ∂uj = δSi δSj where G is Newton’s constant. The solution Dt ∂xj − ∂xi ′ ′ ρ(x , t) 3 ′ ρ(x , t) 3 ′ Φ(x, t)= G ′ d x G ′ d x 1.1.4 Equation of mass conservation − x x − ˆ x x ZV | − | ZV | − | =Φint +Φext The equation of mass conservation, generally involves contributions from both inside and outside the fluid ∂ρ + ∇ · (ρu) = 0, region V under consideration. ∂t has the typical form of a conservation law: ρ is the mass density and Non-self-gravitating means that (variations in) Φint can be neglected. ρu is the mass flux density. An alternative form is Then Φ(x, t) is known in advance and Poisson’s equation is not coupled to the other equations. Dρ = ρ∇ · u. Dt −

2 3 1.1.7 Thermal energy equation can be found from the equation of state. For an ideal gas with negligible radiation pressure, χρ = 1 and so Γ1 = γ. In the absence of non-adiabatic heating (e.g. by viscous dissipation or We often rewrite the thermal energy equation as nuclear reactions) and cooling (e.g. by radiation or conduction), Dp Γ p Dρ Ds = 1 , = 0, Dt ρ Dt Dt where s is the specific entropy (entropy per unit mass). Fluid elements and generally write γ for Γ1. undergo reversible thermodynamic changes and preserve their entropy. This condition is violated in shocks (see later). 1.1.8 Simplified models The thermal variables (T, s) can be related to the dynamical variables A polytropic gas is an ideal gas with constant cv, cp, γ and µ. The (p, ρ) via an equation of state and standard thermodynamic identities. polytropic index n (not generally an integer) is defined by γ =1+1/n. The most important case is that of an ideal gas together with black-body Equipartition of energy for a classical gas with N degrees of freedom radiation, per particle gives γ = 1+2/N. For a classical monatomic gas with kρT 4σT 4 N = 3 translational degrees of freedom, γ = 5/3 and n = 3/2. In p = pg + pr = + , reality Γ is variable when the gas undergoes ionization or when the µmp 3c 1 gas and radiation pressure are comparable. The specific internal energy where k is Boltzmann’s constant, mp is the mass of the proton and c of a polytropic gas is the speed of light. µ is the mean molecular weight (the average mass of the particles in units of mp), equal to 2.0 for molecular hydrogen, p N 1 e = = 2 kT . 1.0 for atomic hydrogen, 0.5 for fully ionized hydrogen and about 0.6 (γ 1)ρ µmp −   for ionized matter of typical cosmic abundances. Radiation pressure is usually negligible except in the centres of high-mass stars and in the A barotropic fluid is an idealized situation in which the relation p(ρ) immediate environments of neutron stars and black holes. is known in advance. We can then dispense with the thermal energy equation. e.g. if the gas is strictly isothermal and ideal, then p = c2ρ We define the first adiabatic exponent s with cs = constant being the isothermal sound speed. Alternatively, ∂ ln p if the gas is strictly isentropic and polytropic, then p = Kργ with Γ = , 1 ∂ ln ρ K = constant.  s related to the ratio of specific heats γ = cp/cv by (exercise) An incompressible fluid is an idealized situation in which Dρ/Dt = 0, implying ∇ · u = 0. This can be achieved formally by taking the limit Γ1 = χργ, γ . The approximation of incompressibility eliminates acoustic → ∞ where phenomena from the dynamics. ∂ ln p The ideal gas law itself is not valid at very high densities or where χ = ρ ∂ ln ρ quantum degeneracy is important.  T 4 5 1.2 Elementary derivation of the MHD equations In the ideal MHD approximation we regard the fluid as a perfect electri- cal conductor. The electric field in the rest frame of the fluid vanishes, (MHD) is the dynamics of an electrically con- implying that ducting fluid (ionized or liquid metal) containing a magnetic E = u B field. It is a fusion of fluid dynamics and electromagnetism. − × in a frame in which the fluid velocity is u(x, t). 1.2.1 Induction equation This condition can be regarded as the limit of a constitutive relation such as Ohm’s law, in which the effects of resistivity (i.e. finite conduc- We consider a non-relativistic theory in which the fluid motions are slow tivity) are neglected. compared to the speed of light. The electromagnetic fields E and B are governed by Maxwell’s equations without the , From Maxwell’s equations, we then obtain the ideal induction equation ∂B ∂B ∇ u B = ∇ E, = ( ). ∂t − × ∂t × × This is an evolutionary equation for B alone, and E and J have been ∇ · B = 0, eliminated. The divergence of the induction equation ∇ B = µ J, × 0 ∂ (∇ · B) = 0 where µ0 is the permeability of free space and J is the electric current ∂t density. The fourth Maxwell equation, involving ∇ · E, is not required ensures that the solenoidal character of B is preserved. in a non-relativistic theory. These are sometimes called the pre-Maxwell equations. 1.2.2 The Lorentz force Exercise: Show that these equations are invariant under the Galilean transformation to a frame of reference moving with uniform relative velocity v, A fluid carrying a J in a magnetic field B experiences a bulk Lorentz force ′ x = x vt, − 1 Fm = J B = (∇ B) B ′ t = t, × µ0 × × ′ E = E + v B, per unit volume. This can be understood as the sum of the Lorentz × forces on individual particles, ′ B = B, ′ qv B = qv B. J = J, × × X X  as required by a ‘non-relativistic’ theory. (In fact, this is simply Galilean, (The electrostatic force can be shown to be negligible in the non-relativistic rather than Einsteinian, relativity.) theory.)

6 7 In Cartesian coordinates is often referred to as the total pressure. The ratio ∂B p (µ F ) = ǫ ǫ m B β = 0 m i ijk jlm ∂x k B2/2µ  l  0 ∂B ∂B = i k B is known as the plasma beta. ∂x − ∂x k  k i  ∂B ∂ B2 = B i . k ∂x − ∂x 2 1.2.3 Summary of the MHD equations k i   Thus A full set of ideal MHD equations might read 1 B2 F = B · ∇B ∇ . ∂ρ m µ − 2µ + ∇ · (ρu) = 0, 0  0  ∂t The first term can be interpreted as a curvature force due to a magnetic Du 1 2 ∇ ∇ ∇ tension Tm = B /µ0 per unit area in the field lines. The second term ρ = ρ Φ p + ( B) B, Dt − − µ0 × × is the gradient of an isotropic magnetic pressure Ds = 0, B2 Dt pm = , 2µ0 ∂B = ∇ (u B), which is also equal to the energy density of the magnetic field. ∂t × × ∇ · B = 0, The magnetic tension gives rise to Alfv´en waves (see later), which travel parallel to the field with characteristic speed together with the equation of state, Poisson’s equation, etc., as required. Most of these equations can be written in at least one other way that 1/2 Tm B may be useful in different circumstances. va = = , ρ (µ ρ)1/2   0 These equations display the essential nonlinearity of MHD. When the the Alfv´en speed. This is often considered as a vector Alfv´en velocity, velocity field is prescribed, an artifice known as the kinematic approx- imation, the induction equation is a relatively straightforward linear B v = . evolutionary equation for the magnetic field. However, a sufficiently a 1/2 (µ0ρ) strong magnetic field will modify the velocity field through its dynam- The magnetic pressure also affects the propagation of sound waves, ical effect, the Lorentz force. This nonlinear coupling leads to a rich which become magnetoacoustic waves (see later). variety of behaviour. (Of course, the purely hydrodynamic nonlinearity of the u · ∇u term, which is responsible for much of the complexity of The combination fluid dynamics, is still present.) B2 Π= p + 2µ0

8 9 1.3 Microphysical basis flow in phase space is incompressible (Liouville’s theorem). f evolves according to Boltzmann’s equation It is useful to understand the way in which the fluid dynamical equations ∂f ∂f ∂f ∂f are derived from microphysical considerations. The simplest model in- + v + a = . ∂t j ∂x j ∂v ∂t volves identical neutral particles with no internal degrees of freedom. j j  c The collision term on the right-hand side is a complicated integral oper- 1.3.1 The Boltzmann equation ator but has three simple properties corresponding to the conservation of mass, momentum and energy in collisions:

Between collisions, particles follow Hamiltonian trajectories in their six- ∂f dimensional (x, v) phase space: m d3v = 0, ∂t Z  c ∂Φ x˙ i = vi, v˙i = ai = . ∂f 3 −∂xi mv d v = 0, ∂t Z  c The distribution function f(x, v, t) specifies the number density of par- ∂f ticles in phase space. The velocity moments of f define the number 1 mv2 d3v = 0. 2 ∂t density n(x, t) in real space, the bulk velocity u(x, t) and the velocity Z  c dispersion c(x, t) according to The collision term is strictly local in x (not even involving derivatives) although it involves integrals over v. The Maxwellian distribution 3 f d v = n, 2 2 −3/2 v u Z fM = (2πc ) n exp | − | − 2c2   vf d3v = nu, is the unique solution of (∂f /∂t) = 0 and can have any parameters Z M c n, u and c. v u 2f d3v = 3nc2. | − | Z Equivalently, 1.3.2 Derivation of fluid equations

v2f d3v = n(u2 + 3c2). A crude but illuminating model of the collision operator is the BGK Z approximation 2 The relation between velocity dispersion and temperature is kT = mc . ∂f 1 (f fM) In the absence of collisions, f is conserved following the Hamiltonian ∂t ≈−τ −  c flow in phase space. This is because particles are conserved and the where fM is a Maxwellian with the same n, u and c as f, and τ is the relaxation time. This can be identified with the mean free flight time

10 11 of particles between collisions. In other words the collisions attempt to 1.3.3 Validity of a fluid approach restore a Maxwellian distribution on a characteristic time-scale τ. They do this by randomizing the particle velocities in a way consistent with The basic idea here is that deviations from the Maxwellian distribution the conservation of momentum and energy. are small because collisions are frequent compared to the characteristic time-scale of the flow. In higher-order approximations these deviations If the characteristic time-scale of the fluid flow is T τ, then the ≫ can be estimated, leading to the equations of dissipative gas dynamics collision term dominates the Boltzmann equation and f must be very including transport effects (viscosity and heat conduction). close to fM. This is the hydrodynamic limit. The fluid approach breaks down if τ is not T , or if the mean free path The velocity moments of fM can be determined from standard Gaussian ≪ λ cτ between collisions is not the characteristic length-scale L of integrals, in particular (exercise) ≈ ≪ the flow. λ can be very long (measured in AU or pc) in very tenuous gases such as the interstellar medium, but may still be smaller than the f d3v = n, M size of the system. Z 3 This approach can be generalized to deal with molecules with internal vifM d v = nui, degrees of freedom and also to plasmas or partially ionized gases where Z there are various species of particle with different charges and masses 3 2 vivjfM d v = n(uiuj + c δij), experiencing electromagnetic forces. The equations of MHD can be Z derived using a similar method. 2 3 2 2 v vifM d v = n(u + 5c )ui. Some typical numbers: Z − We obtain equations for mass, momentum and energy by taking mo- Solar-type star: centre ρ 102 g cm 3, T 107 K; photosphere ρ − − ∼ − ∼ − ∼ ments of the Boltzmann equation weighted by (m,mv , 1 mv2). In each 10 7 g cm 3, T 104 K; corona ρ 10 15 g cm 3, T 106 K. i 2 ∼ ∼ ∼ case the collision term integrates to zero and the ∂/∂v term can be in- − j Interstellar medium: molecular clouds n 103 cm 3, T 10 K; cold tegrated by parts. We replace f with f when evaluating the left-hand − ∼ ∼ M medium (neutral) n 10 100 cm 3, T 102 K; warm medium (neu- sides and note that mn = ρ: ∼ − − ∼ tral/ionized) n 0.1 1 cm 3, T 104 K; hot medium (ionized) − − ∼ − − ∼ ∂ρ ∂ n 10 3 10 2 cm 3, T 106 K. + (ρui) = 0, ∼ − ∼ ∂t ∂xi The Coulomb cross-section for ‘collisions’ between charged particles −4 −2 2 ∂ ∂ 2 (electrons or ions) is σ 1 10 (T/K) cm . The mean free path is (ρui)+ ρ(uiuj + c δij) ρai = 0, ≈ × ∂t ∂xj − λ = 1/(nσ).   ∂ 1 2 3 2 ∂ 1 2 5 2 2 ρu + 2 ρc + ( 2 ρu + 2 ρc )ui ρuiai = 0. ∂t ∂xi − These are equivalent to the equations of ideal gas dynamics in conserva- tive form (see later) for a monatomic ideal gas (γ = 5/3). The specific 3 2 3 internal energy is e = 2 c = 2 kT/m.

12 13 2 Physical interpretation of MHD Precisely the same equation, ∂ω = ∇ (u ω), There are two aspects to MHD: the advection of B by u (induction ∂t × × equation) and the dynamical back-reaction of B on u (Lorentz force). is satisfied by the vorticity ω = ∇ u in homentropic/barotropic ideal × fluid dynamics in the absence of a magnetic field. However, the fact 2.1 Kinematics of the magnetic field that ω and u are directly related by the curl operation means that the analogy between vorticity dynamics and MHD is not perfect. The ideal induction equation Another way to demonstrate the result of flux freezing is to represent ∂B the magnetic field using Euler potentials α and β, = ∇ (u B) ∂t × × B = ∇α ∇β. × has a beautiful geometrical interpretation: the magnetic field lines are This is sometimes called a Clebsch representation. By using two scalar ‘frozen in’ to the fluid and can be identified with material curves. This potentials we are able to represent a three-dimensional vector field is sometimes known as Alfv´en’s theorem. satisfying the constraint ∇ · B = 0. A vector potential of the form One way to show this is to use the identity A = α∇β + ∇γ generates this magnetic field via B = ∇ A. The × magnetic field lines are the intersections of the families of surfaces ∇ (u B)= B · ∇u B(∇ · u) u · ∇B + u(∇ · B) α = constant and β = constant. × × − − to write the induction equation in the form After some algebra it can be shown that ∂B Dα Dβ DB · ∇ ∇ · ∇ (u B)= ∇ ∇β + ∇α ∇ . = B u B( u), ∂t − × × Dt × × Dt Dt −     and use the equation of mass conservation, The ideal induction equation is therefore satisfied if the Euler potentials Dρ are conserved following the fluid flow, i.e. if the families of surfaces = ρ∇ · u, Dt − α = constant and β = constant are material surfaces. In this case the magnetic field lines can also be identified with material lines. to obtain Yet another viewpoint is that the magnetic flux δΦ= B · δS through a D B B = · ∇u. material surface element is conserved: Dt ρ ρ     DδΦ DB DδS = · δS + B · This is exactly the same equation satisfied by a material line element δx. Dt Dt Dt ∂u ∂u ∂u ∂u Therefore a magnetic field line (an integral curve of B/ρ) is advected = B i B j δS + B j δS j δS j ∂x − i ∂x i i ∂x i − ∂x j and distorted by the fluid in the same way as a material curve.  j j   j i  = 0.

14 15 By extension, we have conservation of the magnetic flux passing through Consider an axisymmetric magnetic field, which we separate into poloidal any material surface. (meridional) and toroidal (azimuthal) parts:

B = Bp(R,z,t)+ Bφ(R,z,t) eφ. 2.2 The Lorentz force The ideal induction equation reduces to (exercise) ∂B The Lorentz force p = 0, ∂t 1 B2 Fm = B · ∇B ∇ ∂Bφ µ − 2µ = RBp · ∇Ω. 0  0  ∂t can also be written as the divergence of the Maxwell stress tensor: Differential rotation winds the poloidal field to generate a toroidal field. 2 To obtain an steady state without winding, we require ∇ · 1 B Fm = M, M = BB 1 . · ∇ µ − 2 Bp Ω = 0, 0   In Cartesian coordinates known as Ferraro’s law of isorotation. ∂M 1 B2 There is an energetic cost to winding the field, as work is done against (F ) = ji , M = B B δ . m i ∂x ij µ i j − 2 ij magnetic tension. In a dynamical situation a strong magnetic field tends j 0   to enforce isorotation along its length. If the magnetic field is locally aligned with the x-axis, then We now generalize the analysis to allow for axisymmetric torsional os- T 0 0 p 0 0 m m cillations: M = 0 0 0 0 p 0 ,   −  m  0 0 0 0 0 pm u = RΩ(R,z,t) eφ.     showing the magnetic tension and pressure. The azimuthal component of equation of motion is (exercise) ∂Ω 1 Combining the ideas of magnetic tension and a frozen-in field leads ρR = Bp · ∇(RBφ). to the picture of field lines as elastic strings embedded in the fluid. ∂t µ0R Indeed there is a close analogy between MHD and the dynamics of This combines with the induction equation to give dilute solutions of long-chain polymer molecules. ∂2Ω 1 B · ∇ 2B · ∇ 2 = 2 p (R p Ω). ∂t µ0ρR

2.3 Differential rotation and torsional Alfv´en waves This equation describes torsional Alfv´en waves. e.g. if Bp = Bz ez is vertical and uniform, then We first consider the kinematic behaviour of a magnetic field in the ∂2Ω2 ∂2Ω2 presence of a prescribed velocity field involving differential rotation. In = v2 . ∂t2 a ∂z2 cylindrical polar coordinates (R,φ,z), let This is not strictly an exact nonlinear analysis because we have ne- u = RΩ(R,z) eφ. glected the force balance (and indeed motion) in the meridional plane.

16 17 2.4 Magnetostatic equilibrium In a true vacuum, the magnetic field must be potential. However, only an extremely low density of charge carriers (i.e. electrons) is needed to A magnetostatic equilibrium is a static solution (u = 0) of the equation make the force-free description more relevant. of motion, i.e. one satisfying An example of a force-free field is ∇ ∇ 1 ∇ 0 = ρ Φ p + ( B) B, B = Bφ(R) eφ + Bz(R) ez, − − µ0 × × dB 1 d together with ∇ · B = 0. ∇ B = z e + (RB ) e . × − dR φ R dR φ z In regions of low density, such as the solar corona, the magnetic field Now ∇ B = λB implies may be dynamically dominant over the effects of gravity or gas pres- × 1 d dB sure. Under these circumstances we have (approximately) a force-free R z + λ2B = 0. R dR dR z magnetic field such that   The solution regular at R =0 is (∇ B) B = 0. × × B = B J (λR),B = B J (λR), Magnetic fields B satisfying this equation are known in a wider mathe- z 0 0 φ 0 1 matical context as Beltrami fields. Since ∇ B must be parallel to B, where J is the Bessel function of order n. This solution can be matched × n we may write smoothly to a uniform exterior field at a zero of J1. ∇ B = λB, (1) × for some scalar field λ(x). The divergence of this equation is

0= B · ∇λ, so that λ is constant on each magnetic field line. In the special case λ = constant, known as a linear force-free magnetic field, the curl of equation (1) results in the Helmholtz equation

2B = λ2B, −∇ which admits a wide variety of non-trivial solutions. A subset of force-free magnetic fields consists of potential or current-free magnetic fields for which

∇ B = 0. The helical nature of this field is typical of force-free fields with λ = 0. × 6 18 19 2.5 Magnetic buoyancy 3 Conservation laws, symmetries and hyper- bolic structure A magnetic flux tube is an idealized situation in which the field is lo- calized in a tube and vanishes outside. To balance the total pressure at 3.1 Synthesis of the total energy equation the interface, the gas pressure must be lower inside. Unless the temper- atures are different, the density is lower inside. In a gravitational field the tube therefore experiences an upward buoyancy force and tends to Starting from the ideal MHD equations, we construct the total energy equation piece by piece. rise. Kinetic energy:

D 1 2 · ∇ · ∇ 1 · ∇ ρ ( 2 u )= ρu Φ u p + u [( B) B] . Dt − − µ0 × × Gravitational energy (assuming first that the system is non-self-gravitating and Φ is independent of t): DΦ ρ = ρu · ∇Φ. Dt Thermal energy (using the thermodynamic identity de = T ds p dv): − De Ds D ln ρ ρ = ρT + p = p∇ · u. Dt Dt Dt − Sum of these three: D 1 2 ∇ · 1 ∇ · ρ ( 2 u +Φ+ e)= (pu)+ ( B) ( u B). Dt − µ0 × − × Using mass conservation:

∂ 1 2 ∇· 1 2 1 ∇ · ρ( 2 u +Φ+ e) + ρu( 2 u +Φ+ e)+ pu = ( B) E. ∂t µ0 × Magnetic energy:    ∂ B2 1 = B · ∇ E. ∂t 2µ −µ ×  0  0 Total energy: ∂ B2 E B ρ( 1 u2 +Φ+ e)+ +∇· ρu( 1 u2 +Φ+ w)+ × = 0, ∂t 2 2µ 2 µ  0   0  20 21 where w = e + p/ρ is the specific enthalpy. Note that (E B)/µ is the The magnetic helicity in a volume V is × 0 electromagnetic Poynting flux. The total energy is therefore conserved. Hm = A · B dV, To allow for self-gravitation we write Φ = Φint +Φext. Now ZV ′ ∇ D 1 1 D dm where A is the magnetic vector potential, such that B = A. Now ρ ( 2 Φint)= 2 Gρ ′ × Dt − Dt x x ∂A Z′ | − |′ ∇ ∇ (u u) · (x x) ′ = E Φe = u B Φe, = 1 Gρ − − dm ∂t − − × − 2 x′ x 3 Z | − | ′ ′ where Φe is the electrostatic potential. This can be thought of as the (u + u) · (x x) ′ = ρu · ∇Φ + 1 Gρ − dm . ‘uncurl’ of the induction equation. In ideal MHD, therefore, magnetic int 2 x′ x 3 Z | − | helicity is conserved: The volume integral of the last term vanishes because it is antisymmet- ∂ (A · B)+ ∇ · [Φ B + A (u B)]=0. ric: ∂t e × × ′ ′ (u + u) · (x x) ′ 1 G − dm dm = 0. However, care is needed because Hm is not uniquely defined unless 2 x′ x 3 B · n = 0 on the surface S of V . Under a gauge transformation A ZZ | − | 7→ A + ∇χ, Φ Φ ∂χ/∂t, H changes by an amount The final conservation equation is therefore non-local: e 7→ e − m

2 B · ∇χ dV = ∇ · (χB) dV = χB · n dS. ∂ 1 2 1 B ρ( u + Φ +Φ + e)+ V V S ∂t 2 2 int ext 2µ Z Z Z  0  E B + ∇ · ρu( 1 u2 +Φ+ w)+ × Magnetic helicity is a pseudoscalar quantity (it changes sign under a re- 2 µ  0  flection of the spatial coordinates). It is related to the lack of reflectional + (term that integrates to zero) = 0. symmetry in the magnetic field. It can also be interpreted topologically in terms of the twistedness and/or knottedness of the magnetic field (see Example 1.5). Since the field is ‘frozen in’ to the fluid and deformed 3.2 Other conservation laws in ideal MHD continuously by it, the topological properties of the field are conserved. The equivalent conserved quantity in ideal gas dynamics (without a In ideal fluid dynamics there are certain invariants with a geometrical or magnetic field) is the kinetic helicity topological interpretation. In homentropic/barotropic flow, for exam- ple, vorticity (or, equivalently, circulation) and kinetic helicity are con- H = u · (∇ u) dV. k × served, while, in non-barotropic flow, potential vorticity is conserved. ZV The Lorentz force breaks these conservation laws because the curl of the Lorentz force per unit mass does not vanish in general. However, some The cross-helicity in a volume V is new topological invariants associated with the magnetic field appear. Hc = u · B dV. ZV 22 23 It is helpful here to write the equation of motion in ideal MHD in the 3.4 Hyperbolic structure form u We neglect the gravitational force here, since it involves action at a ∂ ∇ ∇ 1 2 +( u) u + ( 2 u +Φ+ w) distance. ∂t × × (1) 1 = T ∇s + (∇ B) B, The equation of mass conservation, the thermal energy equation, the µ0ρ × × equation of motion and the induction equation can be written in the combined form using the relation dw = T ds + v dp. Thus U U ∂ A ∂ 0 ∂ + i = , (u · B)+ ∇ · u (u B)+( 1 u2 + w + Φ)B = T B · ∇s, ∂t ∂xi ∂t × × 2   where and so cross-helicity is conserved in ideal MHD in homentropic/barotropic flow. U =[ρ,p, u, B]T

Bernoulli’s theorem follows from the inner product of equation (1) with is an eight-dimensional state vector and the A are three 8 8 matrices, i × u. In steady flow e.g. · ∇ 1 2 u ( 2 u +Φ+ w) = 0, ux 0 ρ 0 000 0 0 u γp 0 000 0 · x but only if u Fm = 0 (e.g. if u B), i.e. if B does no work on the flow.  1 By Bz  k 0 ρ ux 0 0 0 µ0ρ µ0ρ  0 0 0 u 0 0 Bx 0  A =  x µ0ρ  . x  − Bx  3.3 Symmetries of the equations  000 0 ux 0 0   − µ0ρ   000 0 0 u 0 0   x  translation of space and time, and rotation of space (if Φext has  0 0 B B 0 0 u 0  •  y − x x  those symmetries): related to conservation of momentum, energy  0 0 B 0 B 0 0 u   z x x  and angular momentum  −  reversal of time: related to absence of dissipation The system of equations is said to be hyperbolic if the eigenvalues of • Aini are real for any unit vector n and if the eigenvectors span the eight- reflection of space (but note that B is a pseudovector and does dimensional space. The eigenvalues can be identified as wave speeds, • not change sign) and the eigenvectors as wave modes. n is the local normal to the wave- fronts. Galilean invariance (relativity principle) • Taking n = ex WLOG, we find reversal of the sign of B • det(A v1)=(v u )2 (v u )2 v2 x − − x − x − ax (v u )4 (v2 + v2)(v u )2 + v2v2 , × − x − s a  − x s ax   24 25 where Integrate over a material volume V bounded by a surface S (mass ele- ment dm = ρ dV ): γp 1/2 v = s ρ d2 ∂T ∂T   x x dm = 2ρu u + x ki + x kj dV dt2 i j i j j ∂x i ∂x is the adiabatic sound speed. The wave speeds v are always real and the ZV ZV  k k  system is indeed hyperbolic. The various wave modes will be examined = (2ρu u T T ) dV + (x T + x T )n dS i j − ji − ij j ki i kj k later. ZV ZS −3 For ideal gas dynamics without a magnetic field, the state vector is If the surface term vanishes (e.g. if Tij falls off faster than r and we five-dimensional and the wave speeds for n = ex are ux and ux vs. let V occupy the whole of space) and Tij is symmetric, we obtain the ± tensor virial theorem In this representation, there are two modes that propagate at the fluid 2 velocity, so they do not propagate relative to the fluid. One is the 1 d Iij 2 = 2Kij ij, entropy mode, which is physical but involves only a density perturba- 2 dt − T tion. The other is the ‘∇ · B’ mode, which is unphysical and involves where a perturbation of ∇ · B. This is eliminated by imposing the constraint ∇ · B = 0. Iij = xixj dm, Z K = 1 u u dm, 3.5 Stress tensor and virial theorem ij 2 i j Z = T dV. The equation of motion can be written in the form Tij ij Z Du ρ = ∇ · T, The scalar virial theorem is the trace of this expression: Dt 1 d2I where = 2K . 2 dt2 − T 1 g2 1 B2 T = p 1 gg 1 + BB 1 K is the total kinetic energy. Now − − 4πG − 2 µ − 2   0   g2 B2 is a symmetric stress tensor and g = ∇Φ. The idea of gravitational = 3p + dV − −T − 8πG 2µ stress only works if the system is self-gravitating and Φ and ρ are related Z  0  through Poisson’s equation: = 3(γ 1)U + W + M, − ∇ · 1 2 ∇ · for a polytropic gas with no external gravitational field, where U, W (gg 2 g 1)=( g)g = 4πGρg − − and M are the total internal, gravitational and magnetic energies. The Consider gravitational integral is D2 D ∂T ∂T g2 ∇Φ 2 Φ 2Φ 1 ρ (x x )= ρ (u x + x u ) = 2ρu u + x ki + x kj dV = | | dV = ∇ dV = ρΦ dV. Dt2 i j Dt i j i j i j j ∂x i ∂x − 8πG − 8πG 8πG 2 k k ZV ZV ZV ZV 26 27 Thus 4 Linear waves in homogeneous media 1 d2I = 2K + 3(γ 1)U + W + M. 2 dt2 − In ideal MHD the density, pressure and magnetic field evolve according to On the RHS, only W is negative. For the system to be bound (i.e. not ∂ρ fly apart) the kinetic, internal and magnetic energies are limited by = u · ∇ρ ρ∇ · u, ∂t − − 6 2K + 3(γ 1)U + M W . ∂p − | | = u · ∇p γp∇ · u, The tensor virial theorem provides more specific information relating ∂t − − ∂B to the energies associated with individual directions. = ∇ (u B). ∂t × × Consider a magnetostatic equilibrium in which the density, pressure and magnetic field are ρ0(x), p0(x) and B0(x). Now consider small perturbations from equilibrium, such that ρ(x, t) = ρ0(x)+ δρ(x, t) with δρ ρ , etc. The linearized equations are | |≪ 0 ∂δρ = δu · ∇ρ ρ ∇ · δu, ∂t − 0 − 0 ∂δp = δu · ∇p γp ∇ · δu, ∂t − 0 − 0 ∂δB = ∇ (δu B ). ∂t × × 0 By introducing the displacement ξ(x, t) such that δu = ∂ξ/∂t, we can integrate these equations to obtain

δρ = ξ · ∇ρ ρ∇ · ξ, − − δp = ξ · ∇p γp∇ · ξ, − − δB = ∇ (ξ B) × × = B · ∇ξ ξ · ∇B (∇ · ξ)B. − − We have now dropped the subscript ‘0’ without danger of confusion. We have also eliminated the entropy mode, which would consist in this case of a time-independent perturbation of the density distribution.

28 29 The linearized equation of motion is and changing the sign)

2 2 ∂ ξ 1 2 B 1 ρ = δρ∇Φ ρ∇δΦ ∇δΠ+ (δB · ∇B + B · ∇δB), ρω ξ = γp + k · ξ (k · B)B · ξ k 2 µ − µ ∂t − − − µ0  0  0  (1) 1 where the perturbation of total pressure is + (k · B)[(k · B)ξ (k · ξ)B] . µ0 − B · δB δΠ= δp + For transverse displacements that are orthogonal to both the wavevector µ 0 and the field, i.e. k · ξ = B · ξ = 0, this simplifies to B2 1 = ξ · ∇Π γp + ∇ · ξ + B · (B · ∇ξ). − − µ µ 2 1 · 2  0  0 ρω ξ = (k B) ξ. µ0 The gravitational potential perturbation satisfies the linearized Poisson Such solutions are called Alfv´en waves. Their dispersion relation is equation 2 2 ω =(k · va) . 2δΦ = 4πGδρ. ∇ Given the dispersion relation ω(k) of any wave mode, the phase and We consider a basic state of uniform density, pressure and magnetic group velocities of the wave can be identified as field, in the absence of gravity. Such a system is homogeneous but ω v = kˆ, anisotropic, because the uniform field distinguishes a particular direc- p k tion. The problem simplifies to ∂ω vg = = ∇kω, ∂2ξ 1 ∂k ∇ B · ∇ B · ∇ξ ∇ · ξ B ρ 2 = δΠ+ [ ( ) ] , ∂t − µ0 − where kˆ = k/k. The phase velocity is that with which the phase of the wave travels; the group velocity is that which the energy of the wave with (or the centre of a wavepacket) travels. B2 1 δΠ= γp + ∇ · ξ + B · (B · ∇ξ). For Alfv´en waves, therefore, − µ µ  0  0 vp = va cos θ kˆ, Owing to the symmetries of the basic state, plane-wave solutions exist ± of the form vg = va, ± where θ is the angle between k and B. ξ(x, t)=Re ξ˜exp( iωt +ik · x) , − To find the other solutions, we take the inner product of equation (1) h i where ω and k are the frequency and wavevector, and ξ˜ is a constant with k and then with B to obtain first vector representing the amplitude of the wave. Then (omitting the tilde B2 1 ρω2k · ξ = γp + k · ξ (k · B)B · ξ k2 µ − µ  0  0  30 31 and then tension gives rise to Alfv´en waves, which are similar to waves on an elastic string, and are trivial in the absence of the magnetic field. In 2 ρω B · ξ = γp(k · ξ)k · B. addition, the magnetic pressure affects the response of the fluid to com- pression, and therefore modifies the propagation of acoustic waves. These can be written in the form

2 The phase and group velocity vectors for the full range of θ are usually 2 B 2 1 k · B 2 k · ξ ρω γp + µ0 k µ0 ( )k 0 exhibited in Friedrichs diagrams. We can interpret: − · = . " γp (k · B)  ρω2 # B ξ 0 −     the fast wave as a quasi-isotropic acoustic-type wave in which both · · • The ‘trivial solution’ k ξ = B ξ = 0 corresponds to the Alfv´en wave gas and magnetic pressure contribute that we have already identified. The other solutions satisfy the slow wave as an acoustic-type wave that is strongly guided by B2 1 • ρω2 ρω2 γp + k2 + γpk2 (k · B)2 = 0, the magnetic field − µ0 µ0     the Alfv´en waves as analogous to a wave on an elastic string, • which simplifies to propagating by means of magnetic tension and perfectly guided by the magnetic field v4 (v2 + v2)v2 + v2v2 cos2 θ = 0. p − s a p s a The two solutions

1/2 v2 = 1 (v2 + v2) 1 (v2 + v2)2 v2v2 cos2 θ p 2 s a ± 4 s a − s a are called fast and slow magnetoacoustic waves, respectively. In the special case θ =0(k B), we have k 2 2 2 vp = vs or va,

2 2 together with vp = va for the Alfv´en wave. Note that the fast wave 2 2 2 2 could be either vp = vs or vp = va, whichever is greater. In the special case θ = π/2 (k B), we have ⊥ 2 2 2 vp = vs + va or 0,

2 together with vp = 0 for the Alfv´en wave. The effects of the magnetic field on wave propagation can be understood as resulting from the two aspects of the Lorentz force. The magnetic

32 33 5 Nonlinear waves, shocks and other disconti- nuities

5.1 One-dimensional gas dynamics

5.1.1 Riemann’s analysis

The equations of mass conservation and motion in one dimension are ∂ρ ∂ρ ∂u + u = ρ , ∂t ∂x − ∂x ∂u ∂u 1 ∂p + u = . ∂t ∂x −ρ ∂x Phase and group velocity diagrams for the case va = 0.7vs. We assume the gas is homentropic (s = constant) and polytropic. Then p ργ and v2 = γp/ρ ργ−1. It is convenient to use v as a variable ∝ s ∝ s in place of ρ or p: ρ 2 dv dp = v2 dρ, dρ = s . s v γ 1 s  −  Then ∂u ∂u ∂ 2v + u + v s = 0, ∂t ∂x s ∂x γ 1  −  ∂ 2v ∂ 2v ∂u s + u s + v = 0. ∂t γ 1 ∂x γ 1 s ∂x  −   −  We add and subtract to obtain ∂ ∂ 2v +(u + v ) u + s = 0, ∂t s ∂x γ 1   −  Phase and group velocity diagrams for the case vs = 0.7va. ∂ ∂ 2v +(u v ) u s = 0. ∂t − s ∂x − γ 1   −  Define the two Riemann invariants

2vs R± = u . ± γ 1 − 34 35 Then we deduce that R± = constant along a characteristic (curve) of 5.1.3 A simple wave gradient dx/dt = u v in the (x, t) plane. The + and characteristics ± s − form an interlocking web covering the space-time diagram. Suppose that R− is uniform (the same constant on every characteristic emanating from an undisturbed region to the right). Its value every- Note that both Riemann invariants are needed to reconstruct the solu- where is that of the undisturbed region: tion (u and vs). Half of the information is propagated along one set of characteristics and half along the other. 2vs 2vs0 u = − γ 1 −γ 1 In general the characteristics are not known in advance but must be − − determined along with the solution. The + and characteristics prop- Then both R+ and R− must be constant on the + characteristics, so − agate at the speed of sound to the right and left, respectively, with both u and vs are constant on them, and the + characteristics have respect to the motion of the fluid. constant slope v = u + vs (they are straight lines). This concept generalizes to nonlinear waves the solution of the classical The statement that the wave speed v = constant on the straight lines wave equation for acoustic waves on a uniform background, of the form dx/dt = v is expressed by the equation f(x vst)+ g(x + vst). ∂v ∂v − + v = 0. ∂t ∂x 5.1.2 Method of characteristics This is known as the inviscid Burgers equation or the nonlinear advec- tion equation. A numerical method of solution can be based on the following idea. It is easily solved by the method of characteristics. The initial data start with the initial data (u and v ) for all relevant x at t = 0 define v0(x)= v(x, 0). The characteristics are straight lines. In regions • s where dv0/dx > 0 the characteristics diverge in the future. In regions determine the characteristic slopes at t = 0 • where dv0/dx< 0 the characteristics converge and will form a shock at propagate the R± information for a small increment of time, ne- some point. Contradictory information arrives at the same point in the • glecting the variation of the characteristic slopes space-time diagram, leading to a breakdown of the solution.

combine the R± information to find u and v at each x at the new Another viewpoint is that of wave steepening. The graph of v versus x • s value of t evolves in time by moving each point at its wave speed v. The crest of the wave moves fastest and eventually overtakes the trough to the right re-evaluate the slopes and repeat of it. The profile would become multiple-valued, but this is physically • meaningless and the wave breaks, forming a discontinuity. The domain of dependence of a point P in the space-time diagram is that region of the diagram bounded by the characteristics through Indeed, the formal solution of the inviscid Burgers equation is ± P and located in the past of P . The solution at P cannot depend on v(x, t)= v0(x0) with x = x0 + v0(x0)t. anything that occurs outside the domain of dependence. Similarly, the ′ ′ domain of influence of P is the region in the future of P bounded by Then ∂v/∂x = v0/(1 + v0t) diverges first at the breaking time t = the characteristics through P . 1/ max( v′ ). − 0 36 37 The crest of a sound wave move faster than the trough for two reasons. Wave steepening is therefore generic for simple waves. However, waves It is partly because the crest is denser and hotter, so the sound speed do not always steepen in practice. For example, linear dispersion arising is higher (unless the gas is isothermal). But it is also because of the from Coriolis or buoyancy forces (see later) can counteract nonlinear self-advection of the wave (the wave speed is u+vs). The breaking time wave steepening. Waves propagating on a non-uniform background are depends on the amplitude and wavelength of the wave. not simple waves.

5.2 General analysis of simple nonlinear waves 5.3 Shocks and other discontinuities

Recall the hyperbolic structure of the ideal MHD equations: 5.3.1 Jump conditions ∂U ∂U + Ai = 0, Discontinuities are resolved in reality by additional physical effects (vis- ∂t ∂xi cosity, thermal conduction and resistivity, i.e. diffusive effects) that be- come more important on smaller length-scales. U =[ρ,p, U, B]T. Properly, we should solve an enhanced set of equations to resolve the The system is hyperbolic because the eigenvalues of A n are real for i i internal structure of a shock. This would then be matched on to the any unit vector n . The eigenvalues are identified as the wave speeds, i external solution where diffusion is neglected. But the matching condi- and the corresponding eigenvectors as wave modes. tions can in fact be determined from general principles without resolving In a simple wave propagating in the x-direction, all physical quantities the internal structure. are functions of a single variable, the one-dimensional phase ϕ(x, t). We consider a shock front at rest at x = 0 (making a Galilean trans- Thus U = U(ϕ) and formation if necessary). We look for a stationary solution in which gas dU ∂ϕ dU ∂ϕ flows from left (ρ1, etc.) to right (ρ2, etc.). On the left is upstream, + A = 0. dϕ ∂t x dϕ ∂x pre-shocked material.

This works if dU/dϕ is an eigenvector of the hyperbolic system and then Consider any equation in conservative form ∂Q ∂ϕ ∂ϕ + ∇ · F = 0. + v = 0 ∂t ∂t ∂x For a stationary solution in one dimension, where v is the corresponding wavespeed. But since v = v(ϕ) we again find dFx = 0, dx ∂v ∂v + v = 0, ∂t ∂x which implies that the flux density Fx has the same value on each side of the shock. We write the matching condition as the inviscid Burgers equation. [F ]2 = F F = 0. x 1 x2 − x1 38 39 Including additional physics means that additional diffusive fluxes (not Note that the conservative form of the momentum equation is of mass but of momentum, energy, magnetic flux, etc.) are present. ∂ B B But these fluxes are negligible outside the shock, so they do not affect (ρu )+ ∇ · ρu u + Π e i = 0. ∂t i i i − µ the jump conditions. This approach is permissible as long as the new  0  physics doesn’t introduce any source terms in the equations. So the Including gravity makes no difference to the shock relations because Φ total energy is a properly conserved quantity but not the entropy (see is always continuous (it satisfies 2Φ = 4πGρ). later). ∇ Although the entropy in ideal MHD satisfies an equation of conservative From mass conservation: form, 2 [ρux]1 = 0. ∂ (ρs)+ ∇ · (ρsu) = 0, ∂t From momentum conservation: the dissipation of energy within the shock provides a source term for B2 2 ρu2 + Π x = 0, entropy. Therefore the entropy flux is not continuous across the shock. x − µ  0 1 2 BxBy 5.3.2 Non-magnetic shocks ρuxuy = 0, − µ0 1   Consider a normal shock (u = u = 0) with no magnetic field. We 2 y z BxBz obtain the Rankine–Hugionot relations ρuxuz = 0, − µ0 1   2 From ∇ · B = 0: [ρux]1 = 0, 2 2 2 [ρux + p]1 = 0, [Bx]1 = 0. 1 2 2 [ρux( ux + w)]1 = 0. From ∂B/∂t + ∇ E = 0: 2 × For a polytropic gas, 2 2 [uxBy uyBx] = [Ez] = 0, − 1 − 1 γ p w = [u B u B ]2 =[E ]2 = 0. γ 1 ρ x z − z x 1 y 1  −  (These are the standard electromagnetic conditions at an interface: the and these equations can be solved algebraically (see example 2.2). In- normal component of B and the parallel components of E are contin- troduce the upstream Mach number (the shock Mach number) uous.) From total energy conservation: u = x1 . 2 1 1 M vs1 ρu ( 1 u2 +Φ+ w)+ B2u (u · B)B = 0. x 2 µ x − x  0 1  40 41 Then we find that frame) and pressure in the limit of a strong shock are (to be used

2 later) ρ2 ux1 (γ + 1) 1 = = M2 , ρ1 ux2 (γ 1) + 2 γ + 1 − M1 ρ = ρ , 2 γ 1 1 p 2γ 2 (γ 1)  −  2 = M1 − − , p1 (γ + 1) 2 ux2 ux1 = ushock, 2 − γ + 1 2 2+(γ 1) 1   2 = 2 − M . M 2γ 1 (γ 1) 2 2 M − − p2 = ρ1u . γ + 1 shock   Case (i): 2 > 1, 2 < 1: supersonic upstream, subsonic downstream. M1 M2 This last equation can be thought of as determining the thermal energy This is a compression shock (ρ2 > ρ1, p2 >p1). that is generated out of kinetic energy by the passage of a strong shock. Case (ii): 2 < 1, 2 > 1: supersonic upstream, subsonic down- M1 M2 stream. This is a rarefaction shock (ρ < ρ , p

Rarefaction shocks are excluded by the second law of thermodynamics. Since ρux is continuous across the shock (and non-zero), we deduce that 2 2 All shocks involve dissipation and irreversibility. [uy]1 =[uz]1 = 0. Momentum and energy conservation apply as before, and we recover the Rankine–Hugoniot relations. In the strong shock limit 1, common in astrophysical applica- M1 ≫ tions, we have ρ u γ + 1 5.3.4 Tangential discontinuities 2 = x1 , ρ1 ux2 → γ 1 − There is a separate case with no flow through the discontinuity(ux = 0). p 2 1, This is usually called an interface, not a shock. We can deduce only p 2 1 ≫ that [p]1 = 0. Arbitrary discontinuities are allowed in ρ, uy and uz. 2 2 γ 1 If [uy] = [uz] = 0 we have a contact discontinuity (only ρ and s 2 − . 1 1 M2 → 2γ may change across the shock), otherwise a vortex sheet (the vorticity is proportional to δ(x)). Note that the compression ratio ρ2/ρ1 is finite (and equal to 4 when γ = 5/3). In the rest frame of the undisturbed (upstream) gas the shock speed is u = u . The downstream density, velocity (in shock − x1

42 43 5.3.5 MHD shocks and discontinuities 6 Spherical blast waves: supernovae

When a magnetic field is included, the jump conditions allow a wider 6.1 Introduction variety of solutions. There are different types of discontinuity associated with the three MHD waves (Alfv´en, slow and fast). Since the parallel In a supernova, an energy of order 1051 erg is released into the inter- components of B need not be continuous, it is possible for them to stellar medium. An expanding spherical blast wave is formed as the ‘switch on’ or ‘switch off’ on passage through a shock. explosion sweeps up the surrounding gas. Several good examples of A current sheet is a tangential discontinuity in the parallel magnetic these supernova remnants are observed in the Galaxy. field. A classic case would be where By, say, changes sign across the The effect is similar to a bomb. When photographs (complete with interface. The current density is proportional to δ(x). length and time scales) were released of the first atomic bomb test in New Mexico in 1945, both L. I. Sedov in the Soviet Union and G. I. Tay- lor in the UK were able to work out the energy of the bomb (about 20 kilotons), which was supposed to be a secret. We suppose that an energy E is released at t = 0, r = 0 and that the explosion is spherically symmetric. The external medium has density ρ0 and pressure p0. In the Sedov–Taylor phase of the explosion, the pressure p p . Then a strong shock is formed and the external ≫ 0 pressure p0 can be neglected (formally set to zero). Gravity is also negligible in the dynamics.

6.2 Governing equations

For a spherically symmetric flow of a polytropic gas, ∂ ∂ ρ ∂ + u ρ = (r2u), ∂t ∂r −r2 ∂r   ∂ ∂ 1 ∂p + u u = , ∂t ∂r −ρ ∂r   ∂ ∂ − + u ln(pρ γ) = 0. ∂t ∂r   These imply the total energy equation ∂ 1 p 1 ∂ 1 γp ρu2 + + r2 ρu2 + u = 0. ∂t 2 γ 1 r2 ∂r 2 γ 1  −    −   44 45 The shock is at r = R(t), and the shock speed is R˙ . The equations are 6.4 Similarity solution solved in 0

46 47 6.6 First integral Thus F˜ ξQ˜ = constant = 0 Consider the total energy equation in conservative form (multiply through − by r2): (for a solution finite at ξ = 0).

∂Q ∂F Solve forp ˜: + = 0. ∂t ∂r (γ 1)˜ρu˜2(ξ u˜) p˜ = − − . 2(γu˜ ξ) The dimensions are − Note that this is compatible with the shock boundary conditions. Hav- E E [Q]= , [F ]= . ing found a first integral, we can now dispense with (e.g.) the thermal r t     energy equation. In dimensionless form, Letu ˜ = vξ. We now have dlnρ ˜ dv Q = ρ R2R˙ 2 Q˜(ξ), F = ρ R2R˙ 3 F˜(ξ). (v 1) = 3v, 0 0 − d ln ξ −d ln ξ − Substitute into the conservation equation to find dv 1 d (γ 1)˜ρξ2v2(1 v) 3 (v 1) + 2 − − = v. ′ ′ − d ln ξ ρξ˜ d ln ξ 2(γv 1) 2 ξQ˜ Q˜ + F˜ = 0.  −  − − Eliminateρ ˜: We deduce the first integral dv v(γv 1)[5 (3γ 1)v] = − − − . d ln ξ γ(γ + 1)v2 2(γ + 1)v + 2 d − (F˜ ξQ˜) = 0. Invert and split into partial fractions: dξ − d ln ξ 2 γ(γ 1) 13γ2 7γ + 12 Now = + − + − dv −5v (2γ + 1)(γv 1) 5(2γ + 1)[5 (3γ 1)v] − − − 1 p Q = r2 ρu2 + , The solution is 2 γ 1 −2/5 (γ−1)/(2γ+1)   ξ v (γv 1) − ∝ − − 2− − 1 γp [5 (3γ 1)v] (13γ 7γ+12)/5(2γ+1)(3γ 1). F = r2 ρu2 + u, × − − 2 γ 1  −  Now and so dlnρ ˜ 1 3v d ln ξ = 1 p˜ dv −v 1 − v 1 dv Q˜ = ξ2 ρ˜u˜2 + , − 2 − 3γ 2 γ 1 = +  −  (2 γ)(1 v) (2γ + 1)(γv 1) − − − 1 γp˜ 13γ2 7γ + 12 F˜ = ξ2 ρ˜u˜2 + u.˜ − . 2 γ 1 − (2 γ)(2γ + 1)[5 (3γ 1)v]  −  − − − 48 49 The solution is − − ρ˜ (1 v) 2/(2 γ)(γv 1)3/(2γ+1) ∝ − − 2− − − [5 (3γ 1)v](13γ 7γ+12)/(2 γ)(2γ+1)(3γ 1). × − − e.g. for γ = 5/3:

2/13 − 5v − ξ v 2/5 1 (5 4v) 82/195, ∝ 3 − −   9/13 − 5v ρ˜ (1 v) 6 1 (5 4v)82/13. ∝ − 3 − −   To satisfy v = 2/(γ + 1) = 3/4 andρ ˜ =(γ + 1)/(γ 1) = 4 at ξ = 1: − − − 4v 2/5 20v 2/13 5 82/195 ξ = 4 2v , 3 3 − 2 −       9/13 82/13 − 20v 5 ρ˜ = 4(4 4v) 6 4 2v . − 3 − 2 −     Then, from the first integral,

6/5 82/15 3 4v − 5 p˜ = (4 4v) 5 2v . 4 3 − 2 −     ξ ranges from 0 to 1, and v from 3/5 to 3/4. Sedov solution for γ = 5/3. The normalization integral (numerically) yields α 1.152. ≈ The similarity method is useful in a very wide range of nonlinear prob- lems. In this case it reduced partial differential equations to integrable 6.7 Application ordinary differential equations.

51 −24 −3 Supernova: E 10 erg. Estimate ρ0 2 10 g cm . Then ∼ − ∼ × R 5.1 pc and R˙ 2000 km s 1 at t = 1000 yr. ≈ ≈ 21 −3 −3 1945 New Mexico explosion: E 7.1 10 erg, ρ0 1.2 10 g cm . ≈ − × ≈ × Then R 140 m and R˙ 5.7kms 1 at t = 0.01s. ≈ ≈ 50 51 7 Spherically symmetric steady flows: stellar 7.2 First treatment winds and accretion We first use the differential form of the equation of motion. 7.1 Basic equations Rewrite the pressure term using the other two equations: dp d ln ρ 2 1 du We consider spherically symmetric steady flow that is purely radial, = γp = ρv2 + −dr − dr s r u dr either towards or away from a body of mass M. We neglect the effects   of rotation and magnetic fields. The gas is polytropic and non-self- Thus gravitating, so Φ = GM/r. − du 2v2 dΦ Mass conservation for such a flow implies (u2 v2) = u s − s dr r − dr   M˙ r2ρu = = constant There is a critical point (sonic point) at r = r where u = v . For −4π s | | s the flow to pass smoothly from subsonic to supersonic, the RHS must If u > 0 (a stellar wind), M˙ is the mass loss rate. If u < 0 (an vanish at the sonic point: − accretion flow), M˙ is the mass accretion rate. We ignore the secular 2 change in the mass M. 2vss GM 2 = 0 rs − r The thermal energy equation implies homentropic flow: s Evaluate Bernoulli’s equation at sonic point: p = Kργ , K = constant

1 1 2 GM + vss = B The equation of motion has only one component (where u = ur): 2 γ 1 − r  −  s du dp dΦ ρu = ρ We deduce that dr −dr − dr 2(γ 1) (5 3γ) GM Alternatively, we can use the integral form (Bernoulli’s equation): v2 = − B, r = − ss (5 3γ) s 4(γ 1) B − − γ p 1 u2 + w +Φ= B = constant, w = 2 γ 1 ρ There is a unique transonic solution, which exists only for 1 <γ< 5/3  −  (the case γ = 1 can be treated separately or by taking a limit). In highly subsonic flow the first term is negligible and the gas is quasi- Now evaluate M˙ at the sonic point: hydrostatic. M˙ = 4πr2ρ v In highly supersonic flow the second term is negligible and the flow is | | s s ss quasi-ballistic (freely falling). Our aim is to solve for u(r), and to determine M˙ if appropriate.

52 53 7.3 Second treatment The (r, ) plane shows an X-type critical point at (r , 1). M s We now use Bernoulli’s equation instead of the equation of motion. Introduce the local Mach number = u /v . Then M | | s M˙ r2ρv = | | sM 4π 2 γ−1 vs = γKρ Eliminate ρ:

γ−1 M˙ vγ+1 = γK | | s 4πr2 M!

Bernoulli’s equation becomes v2 GM 1 v2 2 + s = B + 2 s M γ 1 r − Substitute for vs:

2(γ−1)/(γ+1) M˙ 4/(γ+1) −2(γ−1)/(γ+1) (γK)2/(γ+1) | | M + M 4π 2 γ 1 ! " − # Solution curves for the case γ = 4/3. − − − = Br4(γ 1)/(γ+1) + GMr (5 3γ)/(γ+1) For r r the subsonic solution is close to a hydrostatic atmosphere. ≪ s Think of this as f( ) = g(r). Assume that 1 <γ< 5/3 and B > 0. The supersonic solution is close to free fall. M Then f( ) has a minimum at = 1. g(r) has a minimum at M M For r rs the subsonic solution is close to p = constant. The super- ≫ − (5 3γ) GM sonic solution is close to u = constant (so ρ r 2). r = − ∝ 4(γ 1) B − This is the sonic radius rs identified previously. A smooth passage 7.4 Stellar wind through the sonic point is possible only if M˙ has a special value, so | | that the minima of f and g are equal. If M˙ is too large the solution For a stellar wind the appropriate solution is subsonic (hydrostatic) | | does not work for all r. If it is too small the solution remains subsonic (or at small r and supersonic (coasting) at large r. Parker (1958) first supersonic) for all r, which may not agree with the boundary conditions. presented this simplified model for the solar wind.

54 55 7.5 Accretion 8 Axisymmetric rotating magnetized flows: as- trophysical jets In spherical or Bondi (1952) accretion we consider a gas that is uni- form and at rest at infinity (pressure p and density ρ ). Then B = 0 0 Stellar winds and jets from accretion discs are examples of outflows v2 /(γ 1). The appropriate solution is subsonic (uniform) at large r s0 − in which rotation and magnetic fields have important or essential roles. and supersonic (free fall) at small r. If the accreting object has a dense Using cylindrical polar coordinates (R,φ,z), we examine steady (∂/∂t = surface (a star rather than a black hole) then the accretion flow will be 0), axisymmetric (∂/∂φ = 0) models based on the equations of ideal arrested by a shock above the surface. MHD. The accretion rate of the critical solution is (γ+1)/(γ−1) 8.1 Representation of an axisymmetric magnetic field ˙ 2 2 vss M = 4πrs ρsvss = 4πrs ρ0vs0 vs0   The solenoidal condition for an axisymmetric magnetic field is = f(γ)M˙ B 1 ∂ ∂B (RB )+ z = 0. where R ∂R R ∂z 2 2 We may write ˙ πG M ρ0 2 MB = 3 = 4πraρ0vs0 vs0 1 ∂ψ 1 ∂ψ BR = ,Bz = − − −R ∂z R ∂R 2 (5 3γ)/2(γ 1) f(γ)= where ψ(R,z) is the magnetic flux function. This is related to the 5 3γ  −  magnetic vector potential by ψ = RAφ. The magnetic flux contained Here inside the circle (R = constant, z = constant) is R GM ′ ′ ′ ra = 2 Bz(R ,z) 2πR dR = 2πψ(R,z) (+constant). 2vs0 Z0 is the nominal accretion radius, roughly the radius within which the Since B · ∇ψ = 0, ψ labels magnetic field lines or their surfaces of mass M captures the surrounding medium into a supersonic inflow. revolution, magnetic surfaces. The magnetic field may be written in Exercise: show that the form 1 lim f(γ) = e3/2, lim f(γ) = 1 B ∇ ∇ e e ∇ e → = ψ φ + Bφ φ = φ ψ + Bφ φ . γ 1 γ→5/3 × " − R × # " # The two square brackets represent the poloidal (meridional) and toroidal However, there is no sonic point for γ = 5/3. (azimuthal) parts of the magnetic field:

B = Bp + Bφ eφ.

56 57 Note that Therefore k = k(ψ), ∇ · B = ∇ · Bp = 0. i.e. k is a surface function, constant on each magnetic surface. Similarly, one can write the velocity in the form We now have u = up + uφ eφ. u kB u B = e (u B B u )= φ φ ∇ψ. × φ × φ p − φ p R − Rρ   8.2 Mass loading and angular velocity Taking the curl of this, we find u kB 0 = ∇ φ φ ∇ψ. The steady induction equation in ideal MHD, R − Rρ ×   ∇ (u B)= 0, Therefore × × u kB φ φ = ω, implies R − Rρ where ω(ψ) is another surface function, known as the angular velocity u B = E = ∇Φe, × − of the magnetic surface. where Φe is the electrostatic potential. Now The complete velocity field may be written in the form u B u e B e kB =( p + uφ φ) ( p + Bφ φ) u = + Rω e , × × ρ φ = e (u B B u ) + u B . φ × φ p − φ p p × p i.e. the total velocity is parallel to the total magnetic field in a frame " # " # of reference rotating with angular velocity ω. It is useful to think of the fluid being constrained to move along the field line like a bead on a For an axisymmetric solution with ∂Φe/∂φ = 0, we have rotating wire. u B = 0, p × p i.e. the poloidal velocity is parallel to the poloidal magnetic field. Let 8.3 Entropy

ρup = kBp, The steady thermal energy equation, u · ∇s = 0, where k is the mass loading, i.e. the ratio of mass flux to magnetic flux. implies that B · ∇s = 0 and so The steady equation of mass conservation is p s = s(ψ) 0= ∇ · (ρu)= ∇ · (ρup)= ∇ · (kBp)= Bp · ∇k. is another surface function.

58 59 8.4 Angular momentum Consider the two equations u kB The azimuthal component of the equation of motion is φ = φ + ω, R Rρ · ∇ uRuφ 1 · ∇ BRBφ ρ up uφ + = Bp Bφ + RBφ R µ0 R Ruφ = + ℓ.     µ0k 1 1 Eliminate B to obtain ρup · ∇(Ruφ) Bp · ∇(RBφ) = 0 φ R − µ0R 2 2 1 RB R ω A ℓ · ∇ φ uφ = − Bp kRuφ = 0 R(1 A2) R − µ0 −   1 A2 ℓ and so = Rω + . 1 A2 A2 1 R  −   −  RBφ Ruφ = + ℓ, For A 1 we have µ0k ≪ where uφ Rω, ≈ ℓ = ℓ(ψ) i.e. the fluid is in uniform rotation, corotating with the magnetic sur- face. For A 1 we have is another surface function, the angular momentum invariant. This is ≫ ℓ the angular momentum removed in the outflow per unit mass, but part uφ , of the torque is carried by the magnetic field. ≈ R i.e. the fluid conserves its specific angular momentum. The point R = R (ψ) where A = 1 is the Alfv´en point. The locus of Alfv´en points 8.5 The Alfv´en surface a for different magnetic surfaces forms the Alfv´en surface. To avoid a singularity there we require Define the poloidal Alfv´en number (cf. the Mach number) 2 u ℓ = Raω. A = p . vap Typically the outflow will start at low velocity in high-density mate- Then rial, where A 1. We can therefore identify ω as the angular veloc- ≪ 2 2 ity uφ/R = Ω0 of the footpoint R = R0 of the magnetic field line at 2 µ0ρup µ0k A = = , the source of the outflow. It will then accelerate smoothly through B2 ρ p an Alfv´en surface and become super-Alfv´enic (A > 1). If mass is ˙ and so A ρ−1/2 on each magnetic surface. lost at a rate M in the outflow, angular momentum is lost at a rate ∝

60 61 ˙ ˙ 2 Mℓ = MRaΩ0. In contrast, in a hydrodynamic outflow, angular mo- is another surface function, the energy invariant. mentum is conserved by fluid elements and is therefore lost at a rate ˙ 2 An alternative invariant is MR0Ω0. A highly efficient removal of angular momentum occurs if the ′ ε = ε ℓω Alfv´en radius is large compared to the footpoint radius. This effect − is the magnetic lever arm. The loss of angular momentum through a RωBφ RBφ = 1 u2 +Φ+ w Ru ω stellar wind is called magnetic braking. 2 − µ k − φ − µ k 0  0  = 1 u2 +Φ+ w Ru ω 2 − φ 1 2 1 2 cg 8.6 The Bernoulli equation = u + (uφ Rω) +Φ + w, 2 p 2 − where The total energy equation for a steady flow is cg 1 2 2 Φ =Φ 2 ω R E B − ∇ · ρu( 1 u2 +Φ+ w)+ × = 0. is the centrifugal–gravitational potential associated with the magnetic 2 µ  0  surface. One can then see that ε′ is the Bernoulli function of the flow Now since in the frame rotating with angular velocity ω. In this frame the flow is kB strictly parallel to the field and the field therefore does no work because u = + Rω eφ, J B B and so J B (u Rω e ). ρ × ⊥ × ⊥ − φ we have 8.7 Summary E = u B = Rω e B = Rω e B , − × − φ × − φ × p We have been able to integrate almost all of the MHD equations, re- which is purely poloidal. Thus ducing them to a set of algebraic relations on each magnetic surface. If the poloidal magnetic field Bp (or, equivalently, the flux function (E B)p = E (Bφ eφ)= RωBφBp. × × − ψ) is specified in advance, these algebraic equations are sufficient to The total energy equation is then determine the complete solution on each magnetic surface separately, although we must also (i) specify the initial conditions at the source of RωB ∇ · kB ( 1 u2 +Φ+ w) φ B = 0 the outflow and (ii) ensure that the solution passes smoothly through p 2 − µ p  0  critical points where the flow speed matches the speeds of slow and fast RωB magnetoacoustic waves. B · ∇ k 1 u2 +Φ+ w φ = 0 p 2 − µ k   0  The component of the equation of motion perpendicular to the magnetic 1 2 RωBφ surfaces is the only piece of information not yet used. This ‘transfield’ or 2 u +Φ+ w = ε, − µ0k ‘Grad–Shafranov’ equation ultimately determines the equilibrium shape where of the magnetic surfaces. It is a very complicated nonlinear partial differential equation for ψ(R,z) and cannot be reduced to simple terms. ε = ε(ψ) We do not consider it here.

62 63 8.8 Acceleration from the surface of an accretion disc

We consider the launching of an outflow from a thin accretion disc. The angular velocity Ω(R) of the disc corresponds to circular Keplerian orbital motion around a central mass M: GM 1/2 Ω= R3   If the flow starts essentially from rest in high-density material (A 1), ≪ we have

ω Ω, ≈ i.e. the angular velocity of the magnetic surface is the angular velocity of the disc at the foot-point of the field line. In the sub-Alfv´enic region we have ′ ε 1 u2 +Φcg + w. ≈ 2 p

As in the case of stellar winds, if the gas is hot (comparable to the escape temperature) an outflow can be driven by thermal pressure. Of more interest here is the possibility of a dynamically driven outflow. Contours of Φcg, in units such that R = 1. For a ‘cold’ wind the enthalpy makes a negligible contribution in this 0 The downhill directions are indicated by dashed contours. equation. Whether the flow accelerates or not above the disc then depends on the variation of the centrifugal–gravitational potential along the field line. In units such that R0 = 1, the equation of the equipotential passing through the foot-point (R0,z) is Consider a Keplerian disc in a point-mass potential. Let the foot-point 2 − R 3 of the field line be at R = R0, and let the angular velocity of the field (R2 + z2) 1/2 + = . line be 2 2 This can be rearranged into the form GM 1/2 ω =Ω0 = 3 , 2 2 R 2 (2 R)(R 1) (R + 1) (R + 2)  0  z = − − . (3 R2)2 as argued above. Then − Close to the foot-point (1, 0) we have cg 2 2 −1/2 1 GM 2 Φ = GM(R + z ) R . 2 2 2 3 z 3(R 1) − − R0 ≈ − 64 65 and so 9 Waves and instabilities in stratified rotating astrophysical bodies z √3(R 1). ≈± − The foot-point lies at a saddle point of Φcg. If the inclination of the field 9.1 Eulerian and Lagrangian perturbations line to the vertical, i, at the surface of the disc exceeds 30◦, the flow is accelerated without thermal assistance. This is magnetocentrifugal We have used the symbol δ to denote an Eulerian perturbation, i.e. the acceleration. perturbation of a quantity at a fixed point in space. Let ∆ denote the Lagrangian perturbation, i.e. the perturbation of a quantity as expe- The critical equipotential has an asymptote at r = r √3. The field line 0 rienced by a fluid element, taking into account its displacement by a must continue to expand sufficiently in the radial direction in order to distance ξ. For infinitesimal perturbations these are related by sustain the magnetocentrifugal acceleration. ∆= δ + ξ · ∇, 8.9 Magnetically driven accretion and so

To allow a quantity of mass ∆Macc to be accreted from radius R0, ∆ρ = ρ∇ · ξ, 2 − the angular momentum that must be removed is R0Ω0 ∆Macc. The angular momentum removed by a quantity of mass ∆Mjet flowing out ∆p = γp∇ · ξ, in a magnetized jet from radius R is ℓ ∆M = R2Ω ∆M . Therefore − 0 jet a 0 jet ∆B = B · ∇ξ (∇ · ξ)B. accretion can in principle be driven by an outflow, with − These relations hold even if the basic state is not static, if ξ is the ˙ 2 Macc Ra Lagrangian displacement, i.e. the displacement of a fluid element the 2 . M˙ jet ∼ R0 between the unperturbed and perturbed flows. Thus The magnetic lever arm allows an efficient removal of angular momen- Dξ ∆u = tum if the Alfv´en radius is large compared to the foot-point radius. Dt If the basic state is static (u = 0) this reduces to δu = ∂ξ/∂t as before.

9.2 The energy principle

In Section 4 we derived the linearized equation

∂2ξ 1 ∇ ∇ ∇ B · ∇B B · ∇ B ρ 2 = δρ Φ ρ δΦ δΠ+ (δ + δ ) (1) ∂t − − − µ0

66 67 governing the displacement ξ(x, t) of the fluid from an arbitrary mag- where is a linear differential operator (or integro-differential if self- F netostatic equilibrium, where gravitation is taken into account). The force operator can be shown F to be self-adjoint with respect to the inner product δρ = ∇ · (ρξ), − ∗ η, ξ = ρη · ξ dV 2δΦ = 4πGδρ, h i ∇ Z 2 if appropriate boundary conditions apply. Let δΨ be the gravitational · ∇ B ∇ · 1 · · ∇ δΠ= ξ Π γp + ξ + B (B ξ), potential perturbation associated with the displacement η, so 2δΨ= − − µ0 µ0 ∇   4πG∇ · (ρη). Then δB = B · ∇ξ ξ · ∇B (∇ · ξ)B. − − − 2 ∗ ∂δΦ ∗ ∂ Φ ∗ ∂ ∂ξ Using the equation of magnetostatic equilibrium, η, ξ = ρη ρη ξ + η V k dV h F i − i ∂x − i j ∂x ∂x i ∂x ijkl ∂x Z  i i j j  l  1 2 ∗ 2 ∗ 0 ∇ ∇ B · ∇B δΨ ∗ ∂ Φ ∂ξk ∂ηi = ρ Φ Π+ , = δΦ∇ ρξiη Vijkl dV − − µ0 − 4πG − j ∂x ∂x − ∂x ∂x Z  i j l j  ∇ · ∇ ∗ 2 ∗ equation (1) can be put into the equivalent form (exercise) (δΦ) (δΨ ) ∗ ∂ Φ ∂ ∂ηi = ρξiηj + ξk Vijkl dV 4πG − ∂xi∂xj ∂xl ∂xj 2 2 Z    ∂ ξi ∂δΦ ∂ Φ ∂ ∂ξk 2 2 ∗ ρ = ρ ρξ + V , (2) ∗ δΦ ∗ ∂ Φ ∂ ∂ηk 2 j ijkl = δΨ ∇ ρξ η + ξ V dV ∂t − ∂xi − ∂xi∂xj ∂xj ∂xl − 4πG − i j ∂x ∂x i ∂x klij ∂x   Z  i j j  l  ∗ 2 ∗ where ∂δΨ ∗ ∂ Φ ∂ ∂ηk = ρξi ρξiηj + ξi Vijkl dV − ∂xi − ∂xi∂xj ∂xj ∂xl B2 Z    Vijkl = γp + δijδkl + Π(δilδjk δijδkl) = η, ξ . µ0 − hF i   1 Here the integrals are over all space. We assume that the exterior of the + (BjBlδik BiBjδkl BkBlδij) µ0 − − body is a medium of zero density in which the force-free limit of MHD = V . holds and B decays sufficiently fast as r that we may integrate klij | |→∞ − freely by parts and ignore surface terms. Also note that δΦ= O(r 1), or in fact O(r−2) if δM = 0. In this form (but with ρ D2ξ/Dt2 on the left-hand side) this equation can be shown to hold for perturbations from an arbitrary flow u(x, t), The functional if ξ is the Lagrangian displacement. 1 W [ξ]= ξ, ξ −2h F i We may write the equation in the form 2 2 ∗ 1 ∇δΦ ∗ ∂ Φ ∂ξ ∂ξ = | | + ρξ ξ + V i k dV ∂2ξ 2 − 4πG i j ∂x ∂x ijkl ∂x ∂x ξ  i j j l  2 = , Z ∂t F is therefore real and represents the change in potential energy associated with the displacement ξ.

68 69 If the basic state is static, we may consider solutions of the form where E is determined by the initial conditions ξ0, ξ˙0. If W is posi- tive definite then the equilibrium is stable because ξ is limited by the ξ = Re ξ˜(x) exp( iωt) , 6 − constraint W [ξ] E. h i so we obtain Suppose that a (real) trial displacement η can be found for which ω2ξ˜ = ξ˜ 2W [η] − F = γ2, γ> 0. η, η − and h i ˙ ξ˜, ξ˜ 2W [ξ˜] Then let the initial conditions be ξ0 = η, ξ0 = γη so that ω2 = h F i = . − ξ˜ ξ˜ ξ˜ ξ˜ , , ξ˙, ξ˙ + 2W [ξ] = 2E = 0. h i h i h i Therefore ω2 is real and we have either oscillations (ω2 > 0) or insta- Now let bility (ω2 < 0). ξ, ξ The above expression for ω2 satisfies the usual Rayleigh–Ritz variational a(t)=ln h i 2 η, η principle for self-adjoint eigenvalue problems. The eigenvalues ω are h i the stationary values of 2W [ξ]/ ξ, ξ among trial displacements ξ sat- h i so that isfying the boundary conditions. In particular, the lowest eigenvalue is ˙ the global minimum value of 2W [ξ]/ ξ, ξ . Therefore the equilibrium is da 2 ξ, ξ h i = h i unstable if and only if W [ξ] can be made negative by a trial displace- dt ξ, ξ h i ment ξ satisfying the boundary conditions. This is called the energy d2a 2( ξ, ξ + ξ˙, ξ˙ ) ξ, ξ 4 ξ, ξ˙ 2 principle. = h F i h i h i− h i dt2 ξ, ξ 2 This discussion is incomplete because it assumes that the eigenfunctions h i 2( 2W [ξ]+ ξ˙, ξ˙ ) ξ, ξ 4 ξ, ξ˙ 2 form a complete set. In general a continuous spectrum of non-square- = − h i h i− h i ξ, ξ 2 integrable modes is also present. However, it can be shown that a h i ξ 4( ξ˙, ξ˙ ξ, ξ ξ, ξ˙ 2) necessary and sufficient condition for instability is that W [ ] can be = h ih i−h i made negative as described above. Consider the equation for twice the ξ, ξ 2 h i energy of the perturbation, > 0 d by the Cauchy–Schwarz inequality. Thus ξ˙, ξ˙ + 2W [ξ] = ξ¨, ξ˙ + ξ˙, ξ¨ ξ˙, ξ ξ, ξ˙ dt h i h i h i−h F i−h F i da   = ξ, ξ˙ + ξ˙, ξ ξ˙, ξ ξ, ξ˙ > a˙ = 2γ hF i h F i−h F i−hF i dt 0 = 0. a > 2γt + a0 = 2γt. Therefore Therefore the disturbance with these initial conditions grows at least as ξ˙, ξ˙ + 2W [ξ] = 2E = constant. fast as exp(γt) and the equilibrium is unstable. h i 70 71 9.3 Spherically symmetric star Thus 1 The simplest model of a star neglects rotation and magnetic fields and ω2 ρ ξ 2 dV = ∇δΦ 2 dV | | −4πG ∞ | | assumes a spherically symmetric hydrostatic equilibrium in which ρ(r) V Z 2 Z δp ∗ 1 and p(r) satisfy + | | (ξ · ∇p) · ξ · ∇ ln p ξ · ∇ ln ρ dV V γp − γ − dp Z    = ρg 2 dr − 2 2 1 2 δp 2 2 ω ρ ξ dV = ∇δΦ dV + | | + ρN ξr dV | | −4πG ∞ | | γp | | with inward radial gravitational acceleration ZV Z ZV   r where N(r) is the Brunt–V¨ais¨al¨afrequency (or buoyancy frequency) dΦ G ′ ′ ′ g(r)= = ρ(r ) 4πr 2 dr given by dr r2 Z0 1 d ln p d ln ρ ds N 2 = g g The stratification induced by gravity provides a non-uniform back- γ dr − dr ∝ dr   ground for wave propagation. N is the frequency of oscillation of a fluid element that is displaced In this case vertically in a stably stratified atmosphere if it maintains pressure equi- ∂2ξ librium with its surroundings. ρ = δρ∇Φ ρ∇δΦ ∇δp ∂t2 − − − There are three contributions to ω2: the self-gravitational term (desta- bilizing), the acoustic term (stabilizing) and the buoyancy term (stabi- 2 2 ∗ ω ρ ξ dV = ξ · (δρ∇Φ+ ρ∇δΦ+ ∇δp) dV lizing if N 2 > 0). | | ZV ZV At the surface S of the star, we assume that ρ and p vanish. Then δp If N 2 < 0 for any interval of r, a trial displacement can always be 2 also vanishes on S (assuming that ξ and its derivatives are bounded). found such that ω < 0. This is done by localizing ξr in that interval Now and arranging the other components of ξ such that δp = 0. Therefore the star is unstable if ∂s/∂r < 0 anywhere. This is Schwarzschild’s ∗ ∗ ξ · ∇δp dV = (∇ · ξ) δp dV criterion for convective instability. − ZV ZV 1 ∗ = (δp + ξ · ∇p) δp dV V γp 9.4 Modes of an incompressible sphere Z 2 δp 1 ∗ = | | + (ξ · ∇p)( ξ · ∇p γp∇ · ξ) dV γp γp − − Analytical solutions can be obtained in the case of a homogeneous in- ZV   2 2 compressible ‘star’ of mass M and radius R which has δp ξ · ∇p ∗ = | | | | (ξ · ∇p)∇ · ξ dV γp − γp − ZV   3M 2 2 ρ = H(R r), δp ξ · ∇p ∗ 4πR3 − = | | | | (ξ · ∇Φ)(δρ + ξ · ∇ρ) dV   γp − γp − ZV   72 73 where H is the Heaviside step function. For r 6 R we have Thus − − GMr BR ℓ 1 ARℓ = 0 g = 3 , − R − − − − 3GM (ℓ + 1)BR ℓ 2 ℓARℓ 1 = ℓRℓ 1 3GM 2(R2 r2) − − R3 p = − .   8πR6 with solution For an incompressible fluid ℓ 3GM A = ,B = AR2ℓ+1 −2ℓ + 1 R3 ∇ · ξ = 0,   At r = R the Lagrangian pressure perturbation should vanish: 3M δρ = ξ · ∇ρ = ξr δ(r R), ξ · ∇ − 4πR3 − ∆p = δp + p = 0   2 3M ℓ 3GM 3GM − 2 3GM 2 ℓ ℓ ℓ 1 δΦ = 4πGδρ = ξ δ(r R). (1) 3 ω R + 3 R 5 ℓR = 0 ∇ r R3 − 4πR 2ℓ + 1 R − 4πR         δp is indeterminate and is a variable independent of ξ. The linearized 2 2ℓ(ℓ 1) GM ω = − 3 equation of motion is 2ℓ + 1 R Since ω2 > 0 the star is stable. Note that ℓ = 0 corresponds to ξ = 0 2 ρω ξ = ρ∇δΦ ∇δp. and ℓ = 1 corresponds to ξ = constant. The remaining modes are − − − non-trivial and are called f modes (fundamental modes). These can be Thus ξ = ∇U with 2U = 0 and ρω2U = ρδΦ δp in r 6 R. ∇ − − − thought of as surface gravity waves, related to ocean waves for which Appropriate solutions of Laplace’s equation regular at r = 0 are the ω2 = gk. solid spherical harmonics (with arbitrary normalization)

ℓ m U = r Yℓ (θ,φ), 9.5 The plane-parallel atmosphere where ℓ and m are integers with ℓ > m . Equation (1) also implies | | The local dynamics of a stellar atmosphere can be studied in a Cartesian (‘plane-parallel’) approximation. The gravitational acceleration is taken ArℓY m, rR For hydrostatic equilibrium, dp The matching conditions from equation (1) at r = R are = ρg dz − [δΦ]=0 2 A simple example is an isothermal atmosphere in which p = cs ρ with ∂δΦ 3GM cs = constant: = ξ ∂r r R3 −z/H −z/H     ρ = ρ0 e , p = p0 e

74 75 2 H = cs /g is the isothermal scale-height. The Brunt–V¨ais¨al¨afrequency where ‘h’ stands for horizontal (x and y components). Then in an isothermal atmosphere is given by 2 ρω ξh = ikhδp, 1 d ln p d ln ρ 1 g − − N 2 = g = 1 γ dz − dz − γ H 2 dδp     ρω ξz = g δρ , − − − dz which is constant and is positive for γ > 1. An isothermal atmosphere is dρ stably (subadiabatically) stratified if γ > 1 and neutrally (adiabatically) δρ = ξz ρ∆, stratified if γ = 1. − dz − dp A further example is a polytropic atmosphere in which p ρ1+1/m δp = ξz γp∆, ∝ − dz − in the undisturbed state, where m is a positive constant. In general dξ 1 + 1/m differs from the adiabatic exponent γ =1+1/n of the gas. For ∆ ∇ · ξ =ik · ξ + z ≡ h h dz hydrostatic equilibrium, The self-gravitation of the perturbation (i.e. δΦ) is neglected in the dρ ρ1/m ρg atmosphere. This is known as Cowling’s approximation. dz ∝− Eliminate variables in favour of ξz and ∆: ρ1/m z ∝− dξz if z = 0 is the surface of the atmosphere. Let ω2 gk2ξ =(ω2 v2k2)∆, dz − h z − s h z m ρ = ρ0 dξz 2 1 d −H g ω ξz = (γp∆) + g∆,   dz − ρ dz where ρ0 and H are constants. Then where kh = kh . A general property of these equations is that they m+1 | | z admit an incompressible mode in which ∆ = 0. For compatibility of p = p0 −H these equations,   where ω2 g ρ gH = p = 0 gk2 ω2 0 m + 1 h 2 to satisfy dp/dz = ρg. In this case ω = gkh. − ± m + 1 g m n g The acceptable solution with ξz decaying with depth is N 2 = m = − . γ − z n + 1 z 2     − ω = gkh, ξz exp(khz) ∝ We return to the linearized equations looking for solutions of the form This is a surface gravity wave known in stellar oscillations as the f mode (fundamental mode). It is vertically evanescent. ξ = Re ξ˜(z) exp( iωt +ik · x) , etc. − h h i 76 77 The other wave solutions can be found analytically in the case of a Rearrange: polytropic atmosphere. Eliminate variables in favour of ∆ (algebra ω2 2 ω2 omitted): n(m + 1) (n + 1)(2 + m) +(m n) = 0 gkh − N gkh − d2∆ d∆     z +(m + 2) (A + k z)k ∆ = 0 dz2 dz − h h A negative root for ω2 exists if and only if m n < 0, i.e. N 2 < 0, as − expected from Schwarzschild’s criterion for stability. where n(m + 1) ω2 m n gk A = + − h n + 1 gk n + 1 ω2 h   is a constant. Let ∆ = w(z) ekhz:

d2w dw z +(m +2+2k z) (A m 2)k w = 0 dz2 h dz − − − h This is related to the confluent hypergeometric equation and has a reg- ular singular point at z = 0. Using the method of Frobenius, we seek power-series solutions

∞ w = a zσ+r, a = 0 r 0 6 r=0 X The indicial equation is

σ(σ + m + 1) = 0 and the regular solution has σ = 0. The recurrence relation is then

a (A m 2 2r)k r+1 = − − − h ar (r + 1)(r + m + 2) Dispersion relation, in arbitrary units, for a stably stratified In the case of an infinite series, ar+1/ar 2kh/r as r , so w − −∼ − → ∞ plane-parallel polytropic atmosphere with m = 3 and n = 3/2. behaves like e 2khz and ∆ diverges like e khz as z . Solutions → −∞ The dashed line is the f mode. Above it are the first ten in which ∆ decays with depth are those for which the series terminates p modes and below it are the first ten g modes. and w is a polynomial. For a polynomial of degree 1 ( > 1), N − N A = 2 + m N 78 79 Du ∂Φ 1 ∂p For 1, the large root is z = N ≫ Dt − ∂z − ρ ∂z 2 ω (n + 1)2 2 2 N (p modes, ω vs ) Dρ 1 ∂ 1 ∂uφ ∂uz gk ∼ n(m + 1) ∝ = ρ (RuR)+ + h Dt − R ∂R R ∂φ ∂z   and the small root is Dp 1 ∂ 1 ∂uφ ∂uz = γp (RuR)+ + ω2 m n Dt − R ∂R R ∂φ ∂z − (g modes, ω2 N 2)   gk ∼ (n + 1)2 ∝ with h N The f mode is the ‘trivial’ solution ∆ = 0. p modes (‘p’ for pressure) D ∂ ∂ uφ ∂ ∂ = + uR + + uz are acoustic waves, which rely on compressibility. g modes are gravity Dt ∂t ∂R R ∂φ ∂z waves, which rely on buoyancy. Consider a steady, axisymmetric basic state with density ρ(R,z), pres- In solar-type stars the inner part (radiative zone) is convectively stable sure p(R,z), gravitational potential Φ(R,z) and with differential rota- (N 2 > 0) and the outer part (convective zone) is unstable (N 2 < 0). tion However, the convection is so efficient that only a very small entropy gradient is required to sustain the convective heat flux, so N 2 is very u = RΩ(R,z) eφ small and negative in the convective zone. Although g modes propagate For equilibrium we require in the radiative zone at frequencies smaller than N, they cannot reach the surface. Only f and p modes are observed at the solar surface. 2 1 RΩ eR = ∇Φ ∇p In more massive stars the situation is reversed. Then f, p and g modes − − − ρ can be observed, in principle, at the surface. g modes are particularly Take the curl to obtain well observed in certain classes of white dwarf. ∂Ω2 1 R e = ∇p ∇ = ∇T ∇s − ∂z φ × ρ × 9.6 Rotating fluid bodies   This is just the vorticity equation in a steady state. It is sometimes 9.6.1 Equilibrium called the thermal wind equation. The equilibrium is called barotropic if ∇p is parallel to ∇ρ, otherwise it is called baroclinic. In a barotropic The equations of ideal gas dynamics in cylindrical polar coordinates are state the angular velocity is independent of z: Ω=Ω(R). This is a ver- sion of the Taylor–Proudman theorem which states that under certain Du u2 ∂Φ 1 ∂p conditions the velocity in a rotating fluid is independent of height. R φ = Dt − R −∂R − ρ ∂R We can also write Duφ uRuφ 1 ∂Φ 1 ∂p 1 + = ∇p = g = ∇Φ+ RΩ2 e Dt R −R ∂φ − ρR ∂φ ρ − R

80 81 where g is the effective gravitational acceleration, including the centrifu- 9.6.2 Linear perturbations gal force associated with the (non-uniform) rotation. The basic state is independent of t and φ, allowing us to consider linear In a barotropic state with Ω(R) we can write perturbations of the form g = ∇Φcg, Φcg = Φ(R,z)+Ψ(R), Ψ= RΩ2 dR − − Re[δu (R,z) exp( iωt +imφ)] , etc. Z R − Also, since p = p(ρ) in the equilibrium state, we can define the pseudo- enthalpy w˜(ρ) such that dw ˜ = dp/ρ. An example is a polytropic model where m is the azimuthal wavenumber (an integer). The linearized for which equations in the Cowling approximation are p = Kρ1+1/m, w˜ =(m + 1)Kρ1/m 1 ∂δp δρ ∂p iˆωδuR 2Ωδuφ = + 2 (w ˜ equals the true enthalpy only if the equilibrium is homentropic.) − − −ρ ∂R ρ ∂R The equilibrium condition then reduces to 1 imδp iˆωδu + δu · ∇(R2Ω) = 0 = ∇Φcg ∇w˜ − φ R − ρR − − or 1 ∂δp δρ ∂p iˆωδuz = + 2 Φ+Ψ+w ˜ = C = constant (1) − −ρ ∂z ρ ∂z 1 ∂ imδu ∂δu iˆωδρ + δu · ∇ρ = ρ (Rδu )+ φ + z An example of a rapidly and differentially rotating equilibrium is an − − R ∂R R R ∂z accretion disc around a central mass M. For a non-self-gravitating   − 1 ∂ imδu ∂δu disc Φ = GM(R2 + z2) 1/2. Assume the disc is barotropic and let iˆωδp + δu · ∇p = γp (Rδu )+ φ + z − − − R ∂R R R ∂z the arbitrary additive constant inw ˜ be defined (as in the polytropic   example above) such thatw ˜ = 0 at the surfaces z = H(R) of the disc where ± where ρ = p = 0. Then − ωˆ = ω mΩ GM(R2 + H2) 1/2 + Ψ(R)= C − − from which is the Doppler-shifted frequency, i.e. the frequency measured in a frame d − of reference that rotates with the local angular velocity of the fluid. RΩ2 = GM(R2 + H2) 1/2 −dR Eliminate δuφ and δρ to obtain For example, if H =h ǫR with ǫ = constant,i

2 2 −1/2 GM 2 iˆω ∂δp ∂p δp imδp Ω = (1+ ǫ ) (ˆω A)δuR Bδuz = + 2Ω 3 − − − ρ ∂R − ∂R γp ρR R   The thinner the disc is, the closer it is to Keplerian rotation. Having iˆω ∂δp ∂p δp determined the relation between Ω(R) and H(R), equation (1) then Cδu + (ˆω2 D)δu = − R − z − ρ ∂z − ∂z γp determines the spatial distribution ofw ˜ (and therefore of ρ and p) within   the disc.

82 83 where Note that 2Ω ∂ 1 ∂p 1 ∂p 1 ∂ρ 1 ∂ imδu ∂δu 1 ∂ imξ ∂ξ A = (R2Ω) (Rδu )+ φ + z = iˆω (Rξ )+ φ + z R ∂R − ρ ∂R γp ∂R − ρ ∂R R ∂R R R ∂z − R ∂R R R ∂z     2Ω ∂ 1 ∂p 1 ∂p 1 ∂ρ B = (R2Ω) The linearized equations constitute an eigenvalue problem for ω but it R ∂z − ρ ∂R γp ∂z − ρ ∂z   is not self-adjoint except when m = 0. 1 ∂p 1 ∂p 1 ∂ρ C = We specialize to the case m = 0 (axisymmetric perturbations). Then −ρ ∂z γp ∂R − ρ ∂R   1 ∂p 1 ∂p 1 ∂ρ 2 1 ∂δp ∂p δp D = (ω A)ξR Bξz = −ρ ∂z γp ∂z − ρ ∂z − − ρ ∂R − ∂R γp     Note that A, B, C and D involve radial and vertical deriavtives of the 1 ∂δp ∂p δp Bξ +(ω2 D)ξ = specific angular momentum and the specific entropy. The thermal wind − R − z ρ ∂z − ∂z γp equation implies   with B = C δp = ξ · ∇p γp∇ · ξ − − so the matrix ∗ ∗ Multiply the first equation by ρξR and the second by ρξz and integrate AB AB over the volume V of the fluid (using the boundary condition δp = 0) M = = C D B D to obtain     ∗ δp ∗ is symmetric. ω2 ρ( ξ 2 + ξ 2) dV = ρQ(ξ)+ ξ ∇δp ξ ∇p dV | R| | z| · − γp · ZV ZV   δp ∗ ∗ 9.6.3 The Solberg–Høiland criteria = ρQ(ξ) (γp∇ · ξ + ξ ∇p) dV − γp · ZV   δp 2 It can be useful to introduce the Lagrangian displacement ξ such that = ρQ(ξ)+ | | dV γp V   Dξ Z ∆u = δu + ξ · ∇u = , where Dt i.e. 2 ∗ ∗ 2 ∗ ∗ AB ξR Q(ξ)= A ξR + B(ξRξz + ξz ξR)+ D ξz = ξR ξz | | | | B D ξz    δuR = iˆωξR,   − is the (real) Hermitian form associated with the matrix M. δu = iˆωξ Rξ · ∇Ω, φ − φ − Note that this integral involves only the meridional components of δu = iˆωξ . the displacement. If we had not made the Cowling approximation z − z 84 85 there would be the usual negative definite contribution to ω2 from self- and gravitation. ∂ℓ2 ∂s ∂ℓ2 ∂s 2 g > 0 The above integral relation therefore shows that ω is real and a vari- − z ∂R ∂z − ∂z ∂R ational property ensures that instability to axisymmetric perturbations   occurs if and only if the integral on the right-hand side can be made These are the Solberg–Høiland stability criteria. negative by a suitable trial displacement. If Q is positive definite then (If the criteria are marginally satisfied a further investigation may be 2 ω > 0 and we have stability. Now the characteristic equation of the required.) matrix M is Consider first the non-rotating case ℓ = 0. The first criterion reduces λ2 (A + D)λ + AD B2 = 0 − − to the Schwarzschild criterion for convective stability, The eigenvalues λ± are both positive if and only if 1 g ∇s N 2 > 0 A + D > 0 and AD B2 > 0 −cp · ≡ − If these conditions are satisfied throughout the fluid then Q> 0, which In the homentropic case s = constant (which is a barotropic model) implies ω2 > 0, so the fluid is stable to axisymmetric perturbations they reduce to the Rayleigh criterion for centrifugal (inertial) stability, (neglecting self-gravitation). These conditions are also necessary for dℓ2 stability. If one of the eigenvalues is negative in some region in the > 0 dR meridional plane, a trial displacement can be found which is localized in that region, has δp = 0 and Q< 0, implying instability. (By choosing which states that the specific angular momentum should increase with ξ in the correct direction and tuning ∇ · ξ appropriately, it is possible R for stability. to arrange for δp to vanish.) The second Solberg-Høiland criterion is equivalent to 2 −1 Using ℓ = R Ω (specific angular momentum) and s = cp(γ ln p − 2 ln ρ) + constant (specific entropy) for a polytropic ideal gas, we have (eR ( g)) (∇ℓ ∇s) > 0 × − · × 2 2 1 ∂ℓ gR ∂s In other words the vectors eR ( g) and ∇ℓ ∇s should be parallel A = 3 × − × R ∂R − cp ∂R (rather than antiparallel). In a rotating star, for stability we require

2 that the specific angular momentum should increase with R on each 1 ∂ℓ gR ∂s gz ∂s surface of constant entropy. B = 3 = R ∂z − cp ∂z − cp ∂R g ∂s D = z − cp ∂z so the two conditions become 1 ∂ℓ2 1 g ∇ 3 s> 0 R ∂R − cp ·

86 87