Modeling and simulation in Python An introduction for scientists and engineers

Allen Downey

Book - 2023

"Teaches the art of describing and simulating real-world systems using Python. Learn to model discrete systems, like a bike-sharing network, as well as first-order systems, like a coffee cup as it cools down, and second-order systems, like projectiles moving through space. Each chapter features hands-on examples and exercises"--

Saved in:
1 person waiting

2nd Floor New Shelf Show me where

005.133/PYTHON/Downey
0 / 1 copies available
Location Call Number   Status
2nd Floor New Shelf 005.133/PYTHON/Downey (NEW SHELF) Due Sep 15, 2024
Subjects
Genres
handbooks
Handbooks and manuals
Guides et manuels
Published
San Francisco : No Starch Press, Inc [2023]
Language
English
Main Author
Allen Downey (author)
Item Description
"Covers Python 3.x"--Back cover
Physical Description
xxvi, 248 pages : illustrations ; 24 cm
Bibliography
Includes index.
ISBN
9781718502161
  • Acknowledgments
  • Introduction
  • Who Is This Book For?
  • How Much Math and Science Do I Need?
  • How Much Programming Do I Need?
  • Book Overview
  • Teaching Modeling
  • Getting Started
  • Installing Python
  • Running Jupyter
  • Suggestions and Corrections
  • Part I. Discrete Systems
  • 1. Introduction to Modeling
  • The Modeling Framework
  • Testing the Falling Penny Myth
  • Computation in Python
  • False Precision
  • Computation with Units
  • Summary
  • Exercises
  • 2. Modeling a Bike Share System
  • Our Bike Share Model
  • Defining Functions
  • Print Statements
  • If Statements
  • Parameters
  • For Loops
  • TimeSeries
  • Plotting
  • Summary
  • Exercises
  • Under the Hood
  • 3. Iterative Modeling
  • Iterating on Our Bike Share Model
  • Using More Than One State Object
  • Documentation
  • Dealing with Negative Bikes
  • Comparison Operators
  • Introducing Metrics
  • Summary
  • Exercises
  • 4. Parameters and Metrics
  • Functions That Return Values
  • Loops and Arrays
  • Sweeping Parameters
  • Incremental Development
  • Summary
  • Exercises
  • Challenge Exercises
  • Under the Hood
  • 5. Building a Population Model
  • Exploring the Data
  • Absolute and Relative Errors
  • Modeling Population Growth
  • Simulating Population Growth
  • Summary
  • Exercise
  • 6. Iterating the Population Model
  • System Objects
  • A Proportional Growth Model
  • Factoring Out the Update Function
  • Combining Birth and Death
  • Summary
  • Exercise
  • Under the Hood
  • 7. Limits to Growth
  • Quadratic Growth
  • Net Growth
  • Finding Equilibrium
  • Dysfunctions
  • Summary
  • Exercises
  • 8. Projecting into the Future
  • Generating Projections
  • Comparing Projections
  • Summary
  • Exercise
  • 9. Analysis and Symbolic Computation
  • Difference Equations
  • Differential Equations
  • Analysis and Simulation
  • Analysis with WolframAlpha
  • Analysis with SymPy
  • Differential Equations in SymPy
  • Solving the Quadratic Growth Model
  • Summary
  • Exercises
  • 10. Case Studies Part I
  • Historical World Population
  • One Queue or Two?
  • Predicting Salmon Populations
  • Tree Growth
  • Part II. First-Order Systems
  • 11. Epidemiology and Sir Models
  • The Freshman Plague
  • The Kermack-McKendrick Model
  • The KM Equations
  • Implementing the KM Model
  • The Update Function
  • Running the Simulation
  • Collecting the Results
  • Now with a TimeFrame
  • Summary
  • Exercise
  • 12. Quantifying Interventions
  • The Effects of Immunization
  • Choosing Metrics
  • Sweeping Immunization
  • Summary
  • Exercise
  • 13. Sweeping Parameters
  • Sweeping Beta
  • Sweeping Gamma
  • Using a SweepFrame
  • Summary
  • Exercise
  • 14. Nondimensionalization
  • Beta and Gamma
  • Exploring the Results
  • Contact Number
  • Comparing Analysis and Simulation
  • Estimating the Contact Number
  • Summary
  • Exercises
  • Under the Hood
  • 15. Thermal Systems
  • The Coffee Cooling Problem
  • Temperature and Heat
  • Heat Transfer
  • Newton's Law of Cooling
  • Implementing Newtonian Cooling
  • Finding Roots
  • Estimating r
  • Summary
  • Exercises
  • 16. Solving the Coffee Problem
  • Mixing Liquids
  • Mix First or Last?
  • Optimal Timing
  • The Analytic Solution
  • Summary
  • Exercises
  • 17. Modeling Blood Sugar
  • The Minimal Model
  • The Glucose Minimal Model
  • Getting the Data
  • Interpolation
  • Summary
  • Exercises
  • 18. Implementing the Minimal Model
  • Implementing the Model
  • The Update Function
  • Running the Simulation
  • Solving Differential Equations
  • Summary
  • Exercise
  • 19. Case Studies Part II
  • Revisiting the Minimal Model
  • The Insulin Minimal Model
  • Low-Pass Filter
  • Thermal Behavior of a Wall
  • HIV
  • Part III. Second-Order Systems
  • 20. The Falling Penny Revisited
  • Newton's Second Law of Motion
  • Dropping Pennies
  • Event Functions
  • Summary
  • Exercise
  • 21. Drag
  • Calculating Drag Force
  • The Params Object
  • Simulating the Penny Drop
  • Summary
  • Exercises
  • 22. Two-Dimensional Motion
  • Assumptions and Decisions
  • Vectors
  • Simulating Baseball Flight
  • Drag Force
  • Adding an Event Function
  • Visualizing Trajectories
  • Animating the Baseball
  • Summary
  • Exercises
  • 23. Optimization
  • The Manny Ramirez Problem
  • Finding the Range
  • Summary
  • Exercise
  • Under the Hood
  • 24. Rotation
  • The Physics of Toilet Paper
  • Setting Parameters
  • Simulating the System
  • Plotting the Results
  • The Analytic Solution
  • Summary
  • Exercise
  • 25. Torque
  • Angular Acceleration
  • Moment of Inertia
  • Teapots and Turntables
  • Two-Phase Simulation
  • Combining the Results
  • Estimating Friction
  • Animating the Turntable
  • Summary
  • Exercise
  • 26. Case Studies Part III
  • Bungee Jumping
  • Bungee Dunk Revisited
  • Orbiting the Sun
  • Spider-Man
  • Kittens
  • Simulating a Yo-Yo
  • Congratulations
  • Appendix: Under the Hood
  • How run_solve_ivp Works
  • How root_scalar Works
  • How maximize_scalar Works
  • Index