This book provides readers with the skills they need to write computer codes that simulate convection, internal gravity waves, and magnetic field generation in the interiors and atmospheres of rotating planets and stars. Using a teaching method perfected in the classroom, Gary Glatzmaier begins by offering a step-by-step guide on how to design codes for simulating nonlinear time-dependent thermal convection in a two-dimensional box using Fourier expansions in the horizontal direction and finite differences in the vertical direction. He then describes how to implement more efficient and accurate numerical methods and more realistic geometries in two and three dimensions. In the third part of the book, Glatzmaier demonstrates how to incorporate more sophisticated physics, including the effects of magnetic field, density stratification, and rotation.
Featuring numerous exercises throughout, this is an ideal textbook for students and an essential resource for researchers.
"Glatzmaier's work is synonymous with the cutting edge of research in this field, and his tried-and-true presentation has been perfected over many years of teaching. I know of no other book that focuses on computer modeling of convection in planets and stars as this one does. It is an ideal tutorial for graduate students, and will also be of great interest to senior researchers."--James M. Stone, Princeton University
"The computational methods Glatzmaier describes can be applied to a huge range of nonlinear problems, with a variety of physical effects. There is a great deal of potential here for new investigations. In fact, our generation has barely scratched the surface! This is an important message for young scientists, who will find in this book some of the tools they will need to make future advances in astrophysics and geophysics."--Chris A. Jones, University of Leeds
"I am certain that this book will prove to be extremely useful to students and professionals alike. It is engagingly written, timely, comprehensive, and perhaps most importantly, graduated in its approach. Gary Glatzmaier is internationally recognized as one of the best computational scientists in geophysics and astrophysics."--Peter L. Olson, Johns Hopkins University
"This book provides readers with the skills they need to write computer codes that simulate convection, internal gravity waves and magnetic field generation in the interiors and atmospheres of rotating planets and stars. It is very useful for readers having a basic understanding of classical physics, vector calculus, partial differential equations, and simple computer programming."--Claudia-Veronika Meister, Zentralblatt MATH
PART I. THE FUNDAMENTALS 1
Chapter 1 A Model of Rayleigh-Bénard Convection 3
1.1 Basic Theory 3
1.2 Boussinesq Equations 10
1.3 Model Description 13
Supplemental Reading 15
Exercises 15
Chapter 2 Numerical Method 17
2.1 Vorticity-Streamfunction Formulation 17
2.2 Horizontal Spectral Decomposition 19
2.3 Vertical Finite-Difference Method 21
2.4 Time Integration Scheme 22
2.5 Poisson Solver 24
Supplemental Reading 25
Exercises 25
Chapter 3 Linear Stability Analysis 27
3.1 Linear Equations 27
3.2 Linear Code 29
3.3 Critical Rayleigh Number 30
3.4 Analytic Solutions 31
Supplemental Reading 34
Exercises 34
Computational Projects 34
Chapter 4 Nonlinear Finite-Amplitude Dynamics 35
4.1 Modifications to the Linear Model 35
4.2 A Galerkin Method 36
4.3 Nonlinear Code 38
4.4 Nonlinear Simulations 43
Supplemental Reading 48
Exercises 49
Computational Projects 49
Chapter 5 Postprocessing 51
5.1 Computing and Storing Results 51
5.2 Displaying Results 51
5.3 Analyzing Results 54
Supplemental Reading 57
Exercises 57
Computational Projects 57
Chapter 6 Internal Gravity Waves 59
6.1 Linear Dispersion Relation 59
6.2 Code Modifications and Simulations 62
6.3 Wave Energy Analysis 66
Supplemental Reading 66
Exercises 67
Computational Projects 67
Chapter 7 Double-Diffusive Convection 68
7.1 Salt-Fingering Instability 69
7.2 Semiconvection Instability 72
7.3 Oscillating Instabilities 74
7.4 Staircase Profiles 76
7.5 Double-Diffusive Nonlinear Simulations 79
Supplemental Reading 80
Exercises 80
Computational Projects 80
PART II. ADDITIONAL NUMERICAL METHODS 83
Chapter 8 Time Integration Schemes 85
8.1 Fourth-Order Runge-Kutta Scheme 85
8.2 Semi-Implicit Scheme 87
8.3 Predictor-Corrector Schemes 89
8.4 Infinite Prandtl Number: Mantle Convection 91
Supplemental Reading 92
Exercises 93
Computational Projects 93
Chapter 9 Spatial Discretizations 95
9.1 Nonuniform Grid 95
9.2 Coordinate Mapping 97
9.3 Fully Finite Difference 98
9.4 Fully Spectral: Chebyshev-Fourier 102
9.5 Parallel Processing 108
Supplemental Reading 112
Exercises 112
Computational Projects 112
Chapter 10 Boundaries and Geometries 115
10.1 Absorbing Top and Bottom Boundaries 115
10.2 Permeable Periodic Side Boundaries 117
10.3 2D Annulus Geometry 122
10.4 Spectral-Transform Method 130
10.5 3D and 2.5D Cartesian Box Geometry 133
10.6 3D and 2.5D Spherical-Shell Geometry 135
Supplemental Reading 162
Exercises 162
Computational Projects 164
PART III. ADDITIONAL PHYSICS 167
Chapter 11 Magnetic Field 169
11.1 Magnetohydrodynamics 170
11.2 Magnetoconvection with a Vertical Background Field 173
11.3 Linear Analyses: Magnetic 179
11.4 Nonlinear Simulations: Magnetic 182
11.5 Magnetoconvection with a Horizontal Background Field 184
11.6 Magnetoconvection with an Arbitrary Background Field 187
Supplemental Reading 189
Exercises 190
Computational Projects 191
Chapter 12 Density Stratification 193
12.1 Anelastic Approximation 194
12.2 Reference State: Polytropes 207
12.3 Numerical Method: Anelastic 214
12.4 Linear Analyses: Anelastic 219
12.5 Nonlinear Simulations: Anelastic 222
Supplemental Reading 227
Exercises 227
Computational Projects 228
Chapter 13 Rotation 229
13.1 Coriolis, Centrifugal, and Poincaré Forces 229
13.2 2D Rotating Equatorial Box 233
13.3 2D Rotating Equatorial Annulus: Differential Rotation 241
13.4 2.5D Rotating Spherical Shell: Inertial Oscillations 247
13.5 3D Rotating Spherical Shell: Dynamo Benchmarks 259
13.6 3D Rotating Spherical Shell: Dynamo Simulations 264
13.7 Concluding Remarks 275
Supplemental Reading 277
Exercises 278
Computational Projects 279
Appendix A A Tridiagonal Matrix Solver 283
Appendix B Making Computer-Graphical Movies 284
Appendix C Legendre Functions and Gaussian Quadrature 288
Appendix D Parallel Processing: OpenMP 291
Appendix E Parallel Processing: MPI 292
Bibliography 295
Index 307