ebook img

Theoretical Physics on the Personal Computer PDF

222 Pages·1990·5.865 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Theoretical Physics on the Personal Computer

E.W. Schmid G. Spitz W. Losch Theoretical Physics on the Personal Computer Erich W Schmid Gerhard Spitz Wolfgang Losch Theoretical Physics on the Personal Computer Second Edition With 154 Figures Springer-Verlag Berlin Heidelberg New York London Paris Tokyo Hong Kong Professor Dr. Erich W. Schmid Institut fOr Theoretische Physik, Universitat TObingen, Auf der Morgenstelle 14, 0-7400 TObingen, Fed. Rep. of Germany Dr. Gerhard Spitz Siemens AG, 0-8000 MOnchen 70, Fed. Rep. of Germany Wolfgang Losch FB Physik, Universitat Essen, Universitatsstr. 5, 0-4300 Essen, Fed. Rep. of Germany Tt-ans/ator: A. H. Armstrong "Everglades", Brimpton Common, Reading, RG74 RY Berks, UK Additional material to this book can be downloaded from http://extras.springer.com. Title of the original German edition: Theoretische Physik mit dem Personal Computer ISBN 3-540-18310-8 Springer-Verlag Berlin Heidelberg New York ISBN 0-387-18310-8 Springer-Verlag New York Berlin Heidelberg © Springer-Verlag, Berlin, Heidelberg 1987 ISBN-13:978-3-642-75473-9 e-ISBN-13:978-3-642-75471-5 001: 10.1007/978-3-642-75471-5 Library of Congress Cataloging-in-Publication Data. Schmid, Erich w., 1931-[Theoretische Physik mit dem Per sonal-Computer. English] Theoretical physics on the personal computer 1 Erich W. Schmid, Gerhard Spitz, Wolfgang Losch; [translator, A. H. Armstrong]. - 2nd ed. p. cm. Translation of: Theoretische Physik mit dem Per sonal-Computer.lncludes bibliographical references(p.lSBN-13:978-3-642-75473-9(U.S.:alk.paper)1.Mathematical physics-Data processing. 2. Microcomputers. I. Spitz, Gerhard, 1955-. II. Losch, Wolfgang, 1956-. III. Title. aC20.7.E4S3513 1990 530.1'0285'526-dc20 90-9441 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 microfilms or in other ways, and storage in data banks. Duplication of this publication or parts thereof is only per mitted under the provisions of the German Copyright Law of September 9, 1965, in its version of June 24, 1985, and a copyright fee must always be paid. Violations fall under the prosecution act of the German Copyright Law. © Springer-Verlag Berlin Heidelberg 1988 and 1990 Softcover reprint of the hardcover 2nd edition 1990 The use of registered names, trademarks, etc. in this publication does not imply, 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. Please note: Before using the programs contained in this book, please consult for technical advice the manuals provided by the respective manufacturer of the computer - and any additional plug-in-boards - to be used. The authors and the publisher accept no legal responsibility for any damage caused by improper use of instructions and programs contained within. The programs appearing here have been tested carefully. Nevertheless we can offer no guarantee for the correct functioning of the programs. 2156/3150-543210 - Printed on acid-free paper Preface to the Second English Edition The second English edition has given us the opportunity to implement some suggestions made by our readers. A version of our plot package adapted to the Microsoft FORTRAN-77 compiler (on a diskette supplied by H. U. Zimmermann) had to be mailed to many readers who have a computer without a coprocessor and who therefore have to use a compiler which does not require one. For this reason we have modified the diskette accompanying our book by offering the option to work with Microsoft FORTRAN- 77 (version 4.0 and up). In a last-minute effort we were also able to offer the option to use the new FORTRAN /2 compiler by IBM; we thank Dr. von Dehn for his quick help. The list of personal computers on which we have installed and tested the programs given in the book has become longer. It now includes the IBM PS/2 series, Siemens PC-D and PC-D2, and many other IBM-compatible computers. Chapter 1 of the book has been rewritten because of the new options. In other chapters we have corrected errors; some paragraphs have been modified to improve understanding. Tiibingen, January 1990 E. W. Schmid, G. Spitz v Preface to the First English Edition We would like to thank Mr. A.H. Annstrong, who translated this book, for his many valuable suggestions and corrections. We also acknowledge a stimulating response from our readers. Mr. J. Peeck sent us a diskette containing the pro grams modified to run on an ATARI computer. Mr. H.U. Zimmermann sent us diskettes, on which the graphics software of the book is adapted to the require ments of the FORTRAN-77 compiler by MICROSOFT. Readers interested in these adaptations should contact the authors. Tiibingen, January 1988 E. W. Schmid, G. Spitz VII Preface to the German Edition This book is based on the lecture course "Computer applications in Theo retical Physics", which has been offered at the University of Tiibingen since 1979. This course had as its original aim the preparation of students for a nu merical diploma course in theoretical physics. It soon became clear, however, that the course provides a valuable supplement to the fundamental lectures in theoretical physics. Whereas teaching in this field had previously been prin cipally characterised by the derivation of equations, it is now possible to give deeper understanding by means of application examples. A graphical presen tation of numerical results proves to be important in emphasizing the physics. Interaction with the machine is also valuable. At the end of each calculation the computer should ask the question: "Repeat the calculation with new data (yes/no )?". The student can then answer "yes" and input the new data, e.g. new starting values for position and velocity in solving an equation of motion. The programming of a user-friendly dialogue is not really difficult, but time consuming. At the beginning of the course the student therefore constructs only the numerical parts of the programs. The numerical parts are therefore deleted from the programs under consideration, and newly programmed by the student. Later on, the programming of the graphical output and of the dialogue is taught. In the initial phase of the course several assistants contributed in the prepa ration of the teaching schedule. We are particularly grateful to Dr. K. Hahn, Dr. R. Kircher, Dr. H. Leeb, Dr. M. Orlowski and Dr. H. Seichter. For suggest ing and discussing the example of "the electrostatic lens", we thank Prof. Dr. F. Lenz and Prof. Dr. E. Kasper. Until 1985 this course had been held at the terminals of the Computer Centre of the University of Tiibingen. After the arrival of powerful personal computers the students themselves showed a desire to have the course adapted to these machines. With the welcome cooperation of IBM the FORTRAN pro grams for all the chapters were rewritten for the personal computer as a diploma task (W. Losch). In order to make the programs accessible to a wider circle of users this book was produced. We wish you great fun on the personal computer! Tiibingen, October 1987 E. W. Schmid, G. Spitz IX Contents 1. Introduction......... ........ .............................. ... 1 1.1 Programming of the Numerical Portions of the Programs.... 3 1.2 Programming of the Input and Output ...................... 6 2. Numerical Differentiation and Introduction into Screen Dialogue ...................................................... 12 2.1 Formulation of the Problem................................. 12 2.2 Mathematical Methods ...................................... 13 2.3 Programming ............................................... 14 2.4 Exercises ................................................... 19 2.5 Solutions to the Exercises ................................... 19 3. Numerical Integration ....................................... 22 3.1 Formulation of the Problem ................................. 22 3.2 Numerical Methods... .............................. ........ 23 3.2.1 The Trapezoidal Rule ................................. 23 3.2.2 The Simpson Rule .................................... 24 3.2.3 Newton-Cotes Integration ............................. 25 3.2.4 The Gauss-Legendre Integration. . . . . . . . . . . . . . . . . . . . . . . 25 3.3 Programming............................................... 29 3.4 Exercises ................................................... 33 3.5 Solutions to the Exercises ................................... 33 4. Harmonic Oscillations with Sliding and Static Friction, Graphical Output of Curves ................................ 35 4.1 Formulation of the Problem ................................. 35 4.2 Numerical Treatment ....................................... 36 4.2.1 Transformation of the Differential Equation ............ 36 4.2.2 The Euler Method .................................... 37 4.3 Programming ............................................... 37 4.4 Exercises ................................................... 41 4.5 Solutions to the Exercises ................................... 41 5. Anharmonic Free and Forced Oscillations ................. 43 5.1 Formulation of the Problem ................................. 43 5.2 Numerical Treatment ....................................... 44 XI 5.2.1 Improvement of the Euler Method.... ............... .. 44 5.2.2 The Runge-Kutta Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 5.3 Programming............................................... 47 5.4 Exercises ................................................... 49 5.5 Solutions to the Exercises ................................... 50 6. Coupled Harmonic Oscillations ............................. 53 6.1 Formulation of the Problem ................................. 53 6.2 Numerical Method.......................................... 54 6.3 Programming ............................................... 55 6.4 Exercises ................................................... 57 6.5 Solutions to the Exercises ................................... 57 7. The Flight Path of a Space Craft as a Solution of the Hamilton Equations .......................................... 59 7.1 Formulation of the Problem............................... .. 59 7.2 Mathematical Methods...................................... 63 7.2.1 Mesh Width Adaptation in the Runge-Kutta Method.. 63 7.2.2 Coordinate Transformation............................ 66 7.3 Programming............................................... 67 7.3.1 Hamilton's Equations of Motion....... ............... . 67 7.3.2 Automatic Mesh Width Adjustment in the Runge-Kutta Method................................. 69 7.3.3 Coordinate Transformation............................ 71 7.3.4 Main Program ........................................ 73 7.4 Exercises ................................................... 79 7.5 Solutions to the Exercises ................................... 79 8. The Celestial Mechanics Three-body Problem ............ 81 8.1 Formulation of the Problem ................................. 81 8.2 Mathematical Method ...................................... 85 8.3 Programming ............................................... 85 8.4 Exercises ................................................... 89 8.5 Solutions to the Exercises ................................... 89 9. Computation of Electric Fields by the Method of Successive Over-relaxation .................................. 90 9.1 Formulation of the Problem................................. 90 9.2 Numerical Method........................................... 92 9.2.1 Discretisation of Laplace's Equation................... 92 9.2.2 The Method of Successive Over-relaxation ............. 93 9.3 Programming............................................... 95 9.4 Exercises ................................................... 100 9.5 Solutions to the Exercises ................................... 100 XII 10. The Van der Waals Equation ............................... 102 10.1 Formulation of the Problem................................ 102 10.2 Numerical Method ......................................... 104 10.3 Programming .............................................. 106 10.4 Exercises.................................................. 112 10.5 Solutions to the Exercises .................................. 113 11. Solution of the Fourier Heat Conduction Equation and the "Geo-Power Station" ............................... 115 11.1 Formulation of the Problem ................................ 115 11.2 Method of Solution ........................................ 117 11.3 Programming.............................................. 119 11.4 Exercises .................................................. 121 11.5 Solutions to the Exercises .................................. 122 12. Group and Phase Velocity in the Example of Water Waves 125 12.1 Formulation of the Problem................................ 125 12.2 Numerical Method ......................................... 129 12.3 Programming .............................................. 131 12.4 Exercises .................................................. 134 12.5 Solutions to the Exercises .................................. 134 13. Solution of the Radial Schrodinger Equation by the Fox-Goodwin Method ................................... 136 13.1 Formulation of the Problem ................................ 136 13.2 Numerical Method of Solution ............................. 140 13.3 Programming .............................................. 142 13.4 Exercises .................................................. 144 13.5 Solutions to the Exercises .................................. 145 14. The Quantum Mechanical Harmonic Oscillator........... 149 14.1 Formulation of the Problem................................ 149 14.2 Numerical Method ......................................... 150 14.3 Programming .............................................. 153 14.4 Exercises .................................................. 156 14.5 Solutions to the Exercises .................................. 156 15. Solution of the Schrodinger Equation in Harmonic Oscillator Representation ................................... 158 15.1 Formulation of the Problem ................................ 158 15.2 Numerical Method ......................................... 159 15.3 Programming .............................................. 160 15.4 Exercises .................................................. 163 15.5 Solutions to the Exercises .................................. 163 XIII 16. The Ground State of the Helium Atom by the Hylleraas Method ............................................ 165 16.1 Formulation of the Problem................... ............. 165 16.2 Setting up the State Basis and the Matrix Equation ........ 167 16.3 Programming .............................................. 172 16.4 Exercises .................................................. 180 16.5 Solutions to the Exercises .................................. 180 17. The Spherical Harmonics.................................... 181 17.1 Formulation of the Problem................... ............. 181 17.2 Numerical Method......................................... 184 17.3 Programming .............................................. 185 17.4 Exercises .................................................. 187 17.5 Solutions to the Exercises .................................. 188 18. The Spherical Bessel Functions ............................. 189 18.1 Formulation of the Problem ................................ 189 18.2 Mathematical Method ..................................... 191 18.3 Programming .............................................. 192 18.4 Exercises .................................................. 195 18.5 Solutions to the Exercises .................................. 195 19. Scattering of an Uncharged Particle from a Spherically Symmetric Potential ......................................... 197 19.1 Formulation of the Problem................................ 197 19.2 Mathematical Treatment of the Scattering Problem ........ 200 19.3 Programming.............................................. 203 19.4 Exercises .................................................. 206 19.5 Solutions to the Exercises .................................. 207 References ......................................................... 209 Subject Index ..................................................... 211 XIV

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.