Scientific Computation Editorial Board J.-J. Chattot, Davis, CA, USA P. Colella, Berkeley, CA, USA R. Glowinski, Houston, TX, USA M. Holt, Berkeley, CA, USA Y. Hussaini, Tallahassee, FL, USA P.'Joly, Le Chesnay, France H. B. Keller, Pasadena, CA, USA D. I. Meiron, Pasadena, CA, USA O. Pironneau, Paris, France A. Quarteroni, Lausanne, Switzerland J. Rappaz, Lausanne, Switzerland R. Rosner, Chicago, IL, USA J. H. Seinfeld, Pasadena, CA, USA A. Szepessy, Stockholm, Sweden M. F. Wheeler, Austin, TX, USA Springer-Verlag Berlin Heidelberg GmbH ONLINE LIBRARY Physics and Astronomy http://www.springer.de/phys/ Scientific Computation A Computational Method in Plasma Physics Computational Techniques F. Bauer, O. Betancourt, P. Garabechan for Fluid Dynamics 2 Specific Techniques Implementation of Finite Element Methods for Different Flow Categories for Navier-Stokes Equations Second Edition C. A. J. Fletcher F. Thomasset Methods for the Localization of Singularities Finite-Different Techniques in Numerical Solutions for Vectorized Fluid Dynamics Calculations of Gas Dynamics Problems Edited by D. Book E. V. Vorozhtsov, N. N. Yanenko Unsteady Viscous Flows Classical Orthogonal Polynomials D. P. Telionis of a Discrete Variable Computational Methods for Fluid Flow A. F. Nikiforov, S. K. Suslov, V. B. Uvarov R. Peyret, T. D. Taylor Flux Coordinates and Magnetic Filed Computational Methods in Bifurcation Structure: A Guide to a Fundamental Tool Theory and Dissipative Structures of Plasma Theory M. Kubicek, M. Marek W. D. D'haeseleer, W. N. G. Hitchon, J. D. Callen, J. L. Shohet Optimal Shape Design for Elliptic Systems O. Pironneau Monte Carlo Methods in Boundary Value Problems The Method of Differential Approximation K. K. Sabelfeld Yu.I. Shokin The Least-Squares Finite Element Method Computational Galerkin Methods Theory and Applications in Computational C. A. J. Fletcher Fluid Dynamics and Electromagnetics Numerical Methods Bo-nan Jiang for Nonlinear Variational Problems Computer Simulation R. Glowinski of Dynamic Phenomena Numerical Methods in Fluid Dynamics M.L. Wilkins Second Edition M. Holt Grid Generation Methods Computer Studies of Phase Transitions V. D. Liseikin and Critical Phenomena O. G. Mouritsen Radiation in Enclosures Finite Element Methods A. Mbiock, R. Weber in Linear Ideal Magnetohydrodynamics R. Gruber, J. Rappaz Large Eddy Simulation for Incompressible Flows An Introduction Second Edition Numerical Simulation of Plasmas P. Sagaut Y. N. Dnestrovskii, D. P. Kostomarov Higher-Order Numerical Methods Computational Methods for Kinetic Models for Transient Wave Equations of Magnetically Confined Plasmas G.c. Cohen J. Killeen, G. D. Kerbel, M. C. McCoy, Fundamentals of Computational A.A. Mirin Fluid Dynamics Spectral Methods in Fluid Dynamics H. Lomax, T. H. Pulliam, D. W. Zingg Second Edition C. Canuto, M. Y. Hussaini, A. Quarteroni, T. A. Zang The Hybrid Multiscale Simulation Teclmology An Introduction with Computational Techniques Application to Astrophysical and Laboratory for Fluid Dynamics 1 Plasmas A. S. Lipatov Fundamental and General Techniques Second Edition C. A. J. Fletcher Computational Aerodynamics and Fluid Dynamics An Introduction J.-J. Chattot Series homepage - http://www.springer.de/phys/books/sc/ Jean -Jacques Chattot Com putationa I Aerodynamics and Fluid Dynamics An Introduction With 77 Figures Springer Professor Jean-Jacques Chattot University of California Department of Mechanical and Aeronautical Engineering One Shields Avenue Davis, CA 95616, USA Library of Congress Cataloging-in-Publication Data. Chattot, J. J. Computational aerodynamics and fluid dynamics: an introductionl Jean-Jacques Chattot. p. cm. -(Scientific computation, ISSN 1434-8322) Includes bibliographical ref erences and index. ISBN 978-3-642-07798-2 ISBN 978-3-662-05064-4 (eBook) DOI 10.1007/978-3-662-05064-4 1. Fluid dynamics-Data processing. 2. Fluid dynamics-Mathematical models. L Title. II. Series. QA911.C435 2002 531'.05-dc21 2002021726 ISSN 1434-8322 ISBN 978-3-642-07798-2 This work is subject to copyright. All rights are reserved, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilm or in any other way, and storage in data banks. Duplication of this publication or parts thereof is permitted only under the provisions oft he German Copyright Law ofS eptember 9, 1965, in its current version, and permission for use must always be obtained from Springer-Verlag Berlin Heidelberg GmbH. Violations are liable for prosecution under the German Copyright Law. http://www.springer.de © Springer-Verlag Berlin Heidelberg 2002 Originally published by Springer-Verlag Berlin Heidelberg New York in 2002 Sof'tcover reprint of the hardcover I st edition 2002 The use of general descriptive names, registered names, trademarks, etc. in this publication does not intply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. Typesetting: Frank Herweg, Leutershausen Cover design: design & production GmbH, Heidelberg Printed on acid-free paper SPIN: 10875805 55/3141lba -5 4 3 21 0 To my wife Adrienne and son Eric Preface The field of computational fluid dynamics (CFD) has matured since the au thor was first introduced to electronic computation in the mid-sixties. The progress of numerical methods has paralleled that of computer technology and software. Simulations are used routinely in all branches of engineering as a very powerful means for understanding complex systems and, ultimately, improve their design for better efficiency. Today's engineers must be capable of using the large simulation codes available in industry, and apply them to their specific problem by implemen ting new boundary conditions or modifying existing ones. The objective of this book is to give the reader the basis for understanding the way numerical schemes achieve accurate and stable simulations of phy sical phenomena, governed by equations that are related, yet simpler, than the equations they need to solve. The model problems presented here are linear, in most cases, and represent the propagation of waves in a medium, the diffusion of heat in a slab, and the equilibrium of a membrane under distributed loads. Yet, regardless of the origin of the problem, the partial differential equations (PDE's) reflect the physical phenomena to be modeled and can be classified as being of hyperbolic, parabolic or elliptic type. The numerical treatment depends on the equation type that can represent several physical situations as diverse as heat conduction and viscous fluid flow. Non linear model problems are also presented and solved, such as the transonic small disturbance equation and the equations of gas dynamics. The model problems are given a full treatment, from the exact analytical solution, the analysis of the scheme's consistency and accuracy, the study of stability, to the detailed implementation of the scheme and of the boundary and/or initial conditions. It is the author's hope that this will entice the reader to write his/her own programs, and by doing so, learn more about CFD than a book can teach. Davis, March 2002 Jean-Jacques Chattot Table of Contents 1. Introduction.............................................. 1 1.1 Motivation............................................ 1 1.2 Content............................................... 1 2. Basics of the Finite-Difference Method..... . . ... . . .... ... 5 2.1 Representation of a Function by Discrete Values. . . . . . . . . . . . 5 2.2 Representation of a First Derivative ...................... 6 2.3 Representation of a Second Derivative. . . . . . . . . . . . . . . . . . . . . 7 2.4 Geometric Interpretation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.5 Taylor Expansion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.6 Consistency and Accuracy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.7 Stability............................................... 12 2.8 Complements on Truncation Error. . . . . . . . . . . . . . . . . . . . . . .. 14 3. Application to the Integration of Ordinary Differential Equations. . . . . . . . . . . . . . . . . . . . . . .. 19 3.1 Introduction........................................... 19 3.2 The Euler-Cauchy Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 20 3.3 Improved Euler Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 21 3.4 The Runge-Kutta Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 22 3.5 Integration of Polynomials. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 22 3.6 Boundary Value Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 23 4. Partial Differential Equations. . . . . . . . . . . . . . . . . . . . . . . . . . . .. 27 4.1 Introduction........................................... 27 4.2 General Classification and Notion of Characteristic Surface. . . . . . . . . . . . . . . . . . . . .. 28 4.3 Model Equations and Types ............................. 30 4.3.1 Linear Convection Equation. . . . . . . . . . . . . . . . . . . . . .. 30 4.3.2 The Wave Equation.. . . . .... . .... . . ... . . ... . . . ... 31 4.3.3 Laplace's Equation ............................... 32 4.3.4 The Heat Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 33 4.3.5 Burgers' Equation (Inviscid) . . . . . . . . . . . . . . . . . . . . . .. 34 4.3.6 Other Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 35 X Table of Contents 4.4 Conservation Laws and Jumps for a System of PDEs. . . . . . .. 35 4.4.1 Jump Conditions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 36 4.4.2 Examples....................................... 37 5. Integration of a Linear Hyperbolic Equation. . . . . . . . . . . . .. 41 5.1 Introduction........................................... 41 5.2 The Linear Convection Equation. . . . . . . . . . . . . . . . . . . . . . . .. 41 5.2.1 A Centered Scheme. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 41 5.2.2 An Upwind Scheme. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 42 5.2.3 The Lax Scheme ................................. 43 5.2.4 The Lax-Wendroff Scheme. . . . . . . . . . . . . . . . . . . . . . . .. 43 5.2.5 The MacCormack Scheme... .. . . ... . . . . .. . . . . . .... 44 5.3 The Wave Equation... . . ... . . . .... . . . . .... . . .... . . . ..... 45 5.3.1 Exact Solution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 46 5.3.2 Numerical Scheme, Consistency and Accuracy ....... 47 5.3.3 Numerical Implementation. . . . . . . . . . . . . . . . . . . . . . . .. 49 5.3.4 Stability........................................ 49 5.4 Implicit Scheme for the Wave Equation ................... 52 6. Integration of a Linear Parabolic Equation ............... 53 6.1 Introduction........................................... 53 6.2 Exact Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 54 6.3 A Simple Explicit Scheme ............................... 55 6.3.1 Consistency and Accuracy. . . . . . . . . . . . . . . . . . . . . . . .. 55 6.3.2 Numerical Implementation. . . . . . . . . . . . . . . . . . . . . . . .. 56 6.3.3 Stability........................................ 57 6.4 Simple Implicit Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 58 6.5 Combined Method A. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 59 6.6 Solution of a Linear System with Tridiagonal Matrix. . . . . . .. 59 7. Integration of a Linear Elliptic Equation. . . . . . . . . . . . . . . . .. 63 7.1 Introduction........................................... 63 7.2 Numerical Scheme, Consistency, Accuracy. . . . . . . . . . . . . . . .. 63 7.3 Matrix Formulation; Direct Solution. . . . . . . . . . . . . . . . . . . . .. 64 7.4 Outlook of Iterative Methods. . . . . . . . . . . . . . . . . . . . . . . . . . .. 65 7.4.1 The Method of Jacobi ............................ 67 7.4.2 The Gauss-Seidel Method. . . . . . . . . . . . . . . . . . . . . . . .. 68 7.4.3 The Successive Over-Relaxation Method (SOR) ...... 69 7.5 Other Iterative Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 71 7.5.1 The SLOR Method. . . . . ... . . . ... . . . .... . . . .... . .. 72 7.5.2 AD! Methods. . ... . . . .... . ..... . . . .... . . ..... . . .. 74 Table of Contents XI 8. Finite Difference Scheme for a Convection-Diffusion Equation ...... . . . . . . . . . . . . . . .. 75 8.1 Introduction........................................... 75 8.2 FTCS Method .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 76 8.3 The Box and Modified Box Methods. . . . . . . . . . . . . . . . . . . . .. 79 8.4 A Mixed-Type Scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 80 9. The Method of Murman and Cole ........................ 81 9.1 Introduction........................................... 81 9.2 The Model Problem .................................... 81 9.3 The Murman-Cole Scheme (1970) ..... . . . . . . . . . . . . . . . . . .. 85 9.4 The Four-Operator Scheme of Murman (1973) ............. 87 10. Treatment of Non-Linearities . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 93 10.1 Introduction....... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 93 10.2 An Explicit Mixed-Type Scheme ......................... 93 10.3 An Implicit Mixed-Type Scheme ......................... 96 10.4 Discussion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 99 11. Application to a System of Equations ..................... 101 11.1 Introduction ........................................... 101 11.2 The Equations of Gas Dynamics .......................... 101 11.3 Jump Conditions ....................................... 103 11.4 The Riemann Problem .................................. 104 11.5 A Box-Scheme for the Equations of Gas Dynamics .......... 105 11.6 Some Results .......................................... 108 11. 7 The Bigger Picture ..................................... 111 Appendix ..................................................... 113 A. Problems ................................................ 113 B. Solutions to Problems ..................................... 137 References .................................................... 181 Index ......................................................... 183 1. Introduction 1.1 Motivation The material in this book is based on lecture notes on computational fluid dynamics (CFD) that the author has developed over the past twenty years in France, at Centre National d'Etudes Superieures de Mecanique and at the Universite de Paris-Sud, and in the US at the University of California, Davis. It is intended for senior undergraduate and first year graduate students who will be developing or using codes in the simulation of fluid flows or other physical phenomena governed by partial differential equations (PDEs). It is the belief of the author, that a numerical method is not fully un derstood until it has been coded by the user and applied in simulation; each model and scheme in this book is presented with this goal in mind. 1.2 Content The book is self contained and kept at a simple enough level that the reader will not need further references in order to understand the material. The approach is based on the finite difference method (FD), which is wi dely employed as a method of discretization on cartesian mesh systems, in the physical domain, or in the computational domain after coordinate trans formation. The extension to the finite volume method on arbitrary mesh sytems, including unstructured meshes, although feasible with a similar ap proach, would require all analyses to be performed numerically, instead of analytically in closed form, as is the case here. The book is organized in chapters that build up each on material covered in the previous chapters, particularly Chaps. 2, 3 and 4 and Chaps. 8-11. Chapters 5, 6 and 7 can be read in any order. The basics of the finite difference method are presented in Chap. 2. The tools that will be used throughout the book are introduced: the Taylor expan sion and the complex mode analysis, which requires some complex algebra. They are the tools for the accuracy and stability analyses. Chapter 3 is devoted to ordinary differential equations (ODEs) and their integration. ODEs represent an important particular case of partial differen tial equations (PDEs), when the number of independent variables reduces to J.-J. Chattot, Computational Aerodynamics and Fluid Dynamics © Springer-Verlag Berlin Heidelberg 2002
Description: