{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Preface to Python Notebook Version\n", "\n", "| | | |\n", "|:---:|:---:|:---:|\n", "| ![image](Figs/Cover.png)|[From **COMPUTATIONAL PHYSICS**, 3rd Ed, 2015](http://physics.oregonstate.edu/~rubin/Books/CPbook/index.html)
RH Landau, MJ Paez, and CC Bordeianu (deceased)
Copyrights:
[Wiley-VCH, Berlin;](http://www.wiley-vch.de/publish/en/books/ISBN3-527-41315-4/) and [Wiley & Sons, New York](http://www.wiley.com/WileyCDA/WileyTitle/productCd-3527413154.html)
R Landau, Oregon State Unv,
MJ Paez, Univ Antioquia,
C Bordeianu, Univ Bucharest, 2015.
Support by National Science Foundation.|![image](Figs/BackCover.png)|\n", "\n", ">The more I think of it I find this conclusion more impressed upon me — that the greatest thing a human soul ever does in this world is to see something, and tell what it saw in a plain way. Hundreds of people can talk for one who can think, but thousands can think for one who can see. - John Ruskin\n", "\n", "This Python notebook version of *Computational Physics* continues our long-standing efforts (since 1986) at exploring what is possible and useful for eTextBooks [*Visions and Realizations of a Computational eTextbook*,\n", "Computing in Science and Engineering **17(5)**,72-79, August 2015]. As the reader of this CiSE article may note, our biggest struggles have been, first, comingling code with text, with the code still executable within the text, and, second, getting commercial publishers to do something with the interactive electronic texts we had created. Well, the collection of notebooks presented here, with each chapter of our text placed in a separate notebook, represents a big step in reaching our goal of an \"executable text\". \n", "\n", "The codes in the notebooks are essentially the same as those in the paper text, with the biggest change being the need to replace the use of the *Visual* package by the *iVisual* package for those of our codes that do not use *MatPlotLib*. (*MatPlotLib*, which runs fine in the notebooks, is high-powered and is deliberately similar to *MatLab* graphics). This is our first use of the notebook format and so some parts may not be complete or as well done as possible. We welcome suggestions for the future.\n", "\n", "Finally, and in deep sadness, we must note that the junior member of the three authors, Cristian Bordeianu, passed away just as the paper version of the third edition was coming out. We miss him terribly and dedicate this version and edition to his memory.
-RHL, Tucson, January 2016\n", "\n", "# Preface to Printed Third Edition\n", "\n", "Seventeen years have past since Wiley’s first published Landau and\n", "Páez’s *Computational Physics* and seven years since Cristian Bordeianu\n", "joined the collaboration for the second edition. This third edition\n", "adheres to the original philosophy that the best way to learn\n", "computational physics (CP) is by working on a wide range of projects\n", "using the text and the computer as partners. Most projects are still\n", "constructed using a computational, scientific problem-solving paradigm:\n", " Our guiding hypothesis remains that CP is a\n", "computational science, which means that to understand CP you need to\n", "understand some physics, some applied mathematics and some computer\n", "science. What’s different in this edition is the choice of Python for\n", "sample codes and an increase in the number of topics covered. We now\n", "have a survey of CP which is more than enough for a full-year’s course.\n", "\n", "The use of Python is more than just a change of language, it is taking\n", "advantage of the Python ecosystem of base language plus multiple,\n", "specialized libraries to provide all computational needs. In addition,\n", "we find Python to be the easiest and most accessible language for\n", "beginners, while still being excellent for the type of interactive and\n", "exploratory computations now popular in scientific research.\n", "Furthermore, Python supplemented by the Visual package (Vpython) has\n", "gained traction in lower-division physics teaching, and this may serve\n", "as an excellent segue to a Python-based CP course. Nevertheless, the\n", "important aspects of computational modeling and thinking transcends any\n", "particular computer language, and so having a Python alternative to our\n", "previous use of Fortran, C and Java may help promote this view (codes in\n", "all languages are available).\n", "\n", "As before, we advocate for the use of a compiled or interpreted\n", "programming language when learning CP, in contrast to a higher-level\n", "problem-solving environment like Mathematica or Maple, which we use in\n", "daily work. This follows from our experiences that if you want to\n", "*understand* how to compute scientifically, then you must look inside a\n", "program’s black box and get your hands dirty. Otherwise, the algorithms,\n", "logic and the validity of solutions cannot be ascertained, and that is\n", "not a good physics. Not surprisingly, we believe all physicists should\n", "know how to read programs how to write them as well.\n", "\n", "Notwithstanding our beliefs about programming, we appreciate how\n", "time-consuming and frustrating debugging programs often is, and\n", "especially for beginners. Accordingly, rather than make the learner\n", "write all codes from scratch, we have placed a large number of codes\n", "within the text and often ask the learner only to run, modify, and\n", "extend them. This not only leaves time for exploration and analysis, but\n", "also provides experience in the modern work environment in which one\n", "must incorporate new developments into the preexisting codes of others.\n", "Be that as it may, for this edition we have added problems in which the\n", "relevant codes are not in the text (but are available to instructors).\n", "This should permit an instructor to decide on the balance of new and\n", "second-hand codes with which their students should work.\n", "\n", "In addition to the paper version of the text, there is also an eBook of\n", "it that incorporates many of the multimodal enhancements possible with\n", "modern technologies: video lecture modules, active simulations, editable\n", "codes, animations and sounds. The eBook is available as a Web (HTML5)\n", "document appropriate for both PC’s or mobile devices. The lecture\n", "modules, which can be viewed separately from the eBook, cover most of\n", "the topics in the text, are listed in Appendix B, and are available\n", "online. They may provide avenues for alternative understanding the text\n", "(either as a preview or a review), for an online course, or for a\n", "blended course that replaces some lecture time with lab time. This\n", "latter approach, which we recommend, provides time for the instructor to\n", "assist students more personally with their projects and their learning\n", "issues. The studio-produced lectures are truly “modules”, with active\n", "slides, a dynamic table of context, excellent sound (except maybe for a\n", "Bronx accent), and with occasional demonstrations replacing the talking\n", "head.\n", "\n", "The introductory chapter includes tables listing all of the problems and\n", "exercises in the text, their locations in the text, as well as the\n", "physics courses in which these problems may be used as computational\n", "examples. Although we think it is better to have entire courses in CP\n", "rather than just examples in traditional courses, the inclusion of\n", "examples may serve as a valuable first step towards modernization.\n", "\n", "The entire book has been reedited to improve clarity and useability. New\n", "materials have also been added, and this has led to additional and\n", "reorganized chapters. Specific additions not found in the second edition\n", "include: descriptions of the Python language and its packages,\n", "demonstrations of several visualization packages, discussions of\n", "algebraic tools, an example on protein folding, a derivation of the\n", "Gaussian quadrature rule, searching to obtain the temperature dependence\n", "of magnetization, chaotic weather patterns, planetary motion, matrix\n", "computing with Numerical Python, expanded and updated discussion of\n", "parallel computing including scalability and domain composition,\n", "optimized matrix computing with NumPy, GPU computing, CUDA programming,\n", "principal components analysis, digital filtering, the Fast Fourier\n", "Transform (FFT), an entire chapter on wavelet analysis and data\n", "compression, a variety of predator-prey models, signals of chaos,\n", "nonlinear behavior of double pendulum, cellular automata, Perlin noise,\n", "ray tracing, Wang-Landau sampling for thermodynamic simulations, finite\n", "*element* (in addition to *difference*) solutions of 1-D and 2-D PDE’s,\n", "waves on a catenary, finite-difference-time-domain solutions for E&M\n", "waves, advection and shock waves in fluids, and a new chapter on fluid\n", "dynamics. We hope you enjoy it all!
\n", "RHL, Redmond, Oregon, June 2014 \n", "\n", "## Acknowledgements \n", "\n", "> *Immature poets imitate;
\n", "> mature poets steal. — T. S. Elliot*
\n", "\n", "This book and the courses it is based upon could not have been created\n", "without continued financial support from the National Science\n", "Foundation’s CCLI, EPIC, and NPACI programs, as well as support from the\n", "Oregon State University. Thank you all and we hope we have done you\n", "proud.\n", "\n", "Our CP developments have followed the pioneering path paved by the books\n", "of Thompson, Gould & Tobochnik, Koonin and Press *et al.*; indubitably,\n", "we have borrowed material from them and made it our own with no further\n", "thought. We wish to acknowledge valuable contributions by Hans Kowallik,\n", "Sally Haerer (video lecture modules), Paul Fink, Michel Vallières, Joel\n", "Wetzel, Oscar A. Restrepo, Jaime Zuluaga, Pavel Snopok and Henri Jansen.\n", "It is our pleasure to acknowledge the invaluable friendship,\n", "encouragement, helpful discussions, and experiences we have had with\n", "many colleagues and students over the years. We are particularly\n", "indebted to Guillermo Avendaño-Franco, Saturo S. Kano, Melanie Johnson,\n", "Jon Maestri (deceased), David McIntyre, Shashikant Phatak, Viktor\n", "Podolskiy, C. E. Yaguna, Zlatco Dimcovic and Al Stetz. The new work on\n", "principal component analysis resulted from a wonderful collaboration\n", "with Jon Wright and Roy Schult in 1997. Our gratitude also goes to the\n", "reviewers for their thoughtful and valuable suggestions, and to Bruce\n", "Sherwood, who has assisted us in making the Python codes run faster and\n", "look better. And finally, Ann Seidel, Martin Preuss, Nina Stadthuas and\n", "Vera Palmer at Wiley-VCH have been a pleasure to work with.\n", "\n", "In spite of everyone’s best efforts, there are still errors and\n", "confusing statements in the book and codes for which we are to blame.\n", "\n", "Finally, we extend our gratitude to the wives, Jan and Lucia, whose\n", "reliable support and encouragement are lovingly accepted, as always.\n", "\n", "*To the memory of Cristian Bordeianu.*\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.10" } }, "nbformat": 4, "nbformat_minor": 0 }