Modeling and Simulation in Python: An Introduction for Scientists and Engineers

Modeling and Simulation in Python: An Introduction for Scientists and Engineers

Modeling and Simulation in Python: An Introduction for Scientists and Engineers
Автор: Downey Allen
Дата выхода: 2023
Издательство: No Starch Press, Inc.
Количество страниц: 311
Размер файла: 2,0 МБ
Тип файла: PDF
Добавил: codelibs
 Проверить на вирусы

Modeling and Simulation Book - Table of Contents

Front Matter

  • 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

Chapter 1: Introduction to Modeling

  • The Modeling Framework
  • Testing the Falling Penny Myth
  • Computation in Python
  • False Precision
  • Computation with Units
  • Summary
  • Exercises

Chapter 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

Chapter 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

Chapter 4: Parameters and Metrics

  • Functions That Return Values
  • Loops and Arrays
  • Sweeping Parameters
  • Incremental Development
  • Summary
  • Exercises
  • Challenge Exercises
  • Under the Hood

Chapter 5: Building a Population Model

  • Exploring the Data
  • Absolute and Relative Errors
  • Modeling Population Growth
  • Simulating Population Growth
  • Summary
  • Exercise

Chapter 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

Chapter 7: Limits to Growth

  • Quadratic Growth
  • Net Growth
  • Finding Equilibrium
  • Dysfunctions
  • Summary
  • Exercises

Chapter 8: Projecting into the Future

  • Generating Projections
  • Comparing Projections
  • Summary
  • Exercise

Chapter 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

Chapter 10: Case Studies Part I

  • Historical World Population
  • One Queue or Two?
  • Predicting Salmon Populations
  • Tree Growth

PART II: FIRST-ORDER SYSTEMS

Chapter 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

Chapter 12: Quantifying Interventions

  • The Effects of Immunization
  • Choosing Metrics
  • Sweeping Immunization
  • Summary
  • Exercise

Chapter 13: Sweeping Parameters

  • Sweeping Beta
  • Sweeping Gamma
  • Using a SweepFrame
  • Summary
  • Exercise

Chapter 14: Nondimensionalization

  • Beta and Gamma
  • Exploring the Results
  • Contact Number
  • Comparing Analysis and Simulation
  • Estimating the Contact Number
  • Summary
  • Exercises
  • Under the Hood

Chapter 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

Chapter 16: Solving the Coffee Problem

  • Mixing Liquids
  • Mix First or Last?
  • Optimal Timing
  • The Analytic Solution
  • Summary
  • Exercises

Chapter 17: Modeling Blood Sugar

  • The Minimal Model
  • The Glucose Minimal Model
  • Getting the Data
  • Interpolation
  • Summary
  • Exercises

Chapter 18: Implementing the Minimal Model

  • Implementing the Model
  • The Update Function
  • Running the Simulation
  • Solving Differential Equations
  • Summary
  • Exercise

Chapter 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

Chapter 20: The Falling Penny Revisited

  • Newton's Second Law of Motion
  • Dropping Pennies
  • Event Functions
  • Summary
  • Exercise

Chapter 21: Drag

  • Calculating Drag Force
  • The Params Object
  • Simulating the Penny Drop
  • Summary
  • Exercises

Chapter 22: Two-Dimensional Motion

  • Assumptions and Decisions
  • Vectors
  • Simulating Baseball Flight
  • Drag Force
  • Adding an Event Function
  • Visualizing Trajectories
  • Animating the Baseball
  • Summary
  • Exercises

Chapter 23: Optimization

  • The Manny Ramirez Problem
  • Finding the Range
  • Summary
  • Exercise
  • Under the Hood

Chapter 24: Rotation

  • The Physics of Toilet Paper
  • Setting Parameters
  • Simulating the System
  • Plotting the Results
  • The Analytic Solution
  • Summary
  • Exercise

Chapter 25: Torque

  • Angular Acceleration
  • Moment of Inertia
  • Teapots and Turntables
  • Two-Phase Simulation
  • Phase 1
  • Phase 2
  • Combining the Results
  • Estimating Friction
  • Animating the Turntable
  • Summary
  • Exercise

Chapter 26: Case Studies Part III

  • Bungee Jumping
  • Bungee Dunk Revisited
  • Orbiting the Sun
  • Spider-Man
  • Kittens
  • Simulating a Yo-Yo
  • Congratulations

Back Matter

Appendix: Under the Hood

  • How run_solve_ivp Works
  • How root_scalar Works
  • How maximize_scalar Works

Index

Modeling and Simulation in Python teaches readers how to analyze real-world scenarios using the Python programming language, requiring no more than a background in high school math.
Modeling and Simulation in Python is a thorough but easy-to-follow introduction to physical modeling—that is, the art of describing and simulating real-world systems. Readers are guided through modeling things like world population growth, infectious disease, bungee jumping, baseball flight trajectories, celestial mechanics, and more while simultaneously developing a strong understanding of fundamental programming concepts like loops, vectors, and functions.
Clear and concise, with a focus on learning by doing, the author spares the reader abstract, theoretical complexities and gets right to hands-on examples that show how to produce useful models and simulations.


Похожее:

Список отзывов:

Нет отзывов к книге.