๐”– Scriptorium
โœฆ   LIBER   โœฆ

๐Ÿ“

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

โœ Scribed by Allen B. Downey


Publisher
No Starch Press
Year
2023
Tongue
English
Leaves
311
Edition
1
Category
Library

โฌ‡  Acquire This Volume

No coin nor oath required. For personal study only.

โœฆ Synopsis


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.

โœฆ Table of Contents


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
Phase 1
Phase 2
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


๐Ÿ“œ SIMILAR VOLUMES


Modeling and Simulation in Python: An In
โœ Allen B. Downey ๐Ÿ“‚ Library ๐Ÿ“… 2023 ๐Ÿ› No Starch Press, Inc. ๐ŸŒ English

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 traje

Mathematical Modeling and Simulation - I
โœ Kai Velten ๐Ÿ“‚ Library ๐Ÿ“… 2008 ๐Ÿ› Wiley ๐ŸŒ English

This concise and clear introduction to the topic requires only basic knowledge of calculus and linear algebraโ€”all other concepts and ideas are developed in the course of the book. Lucidly written so as to appeal to undergraduates and practitioners alike, it enables readers to set up simple mathemati

Mathematical Modeling and Simulation - I
โœ Kai Velten ๐Ÿ“‚ Library ๐Ÿ“… 2009 ๐ŸŒ English

This concise and clear introduction to the topic requires only basic knowledge of calculus and linear algebraโ€”all other concepts and ideas are developed in the course of the book. Lucidly written so as to appeal to undergraduates and practitioners alike, it enables readers to set up simple mathemati

Mathematical Modeling and Simulation - I
โœ Kai Velten ๐Ÿ“‚ Library ๐Ÿ“… 2009 ๐ŸŒ English

This concise and clear introduction to the topic requires only basic knowledge of calculus and linear algebraโ€”all other concepts and ideas are developed in the course of the book. Lucidly written so as to appeal to undergraduates and practitioners alike, it enables readers to set up simple mathemati

Mathematical Modeling and Simulation: In
โœ Prof. Dr. Kai Velten(auth.) ๐Ÿ“‚ Library ๐ŸŒ English

Content: <br>Chapter 1 Principles of Mathematical Modeling (pages 1โ€“46): <br>Chapter 2 Phenomenological Models (pages 47โ€“115): <br>Chapter 3 Mechanistic Models I: ODEs (pages 117โ€“228): <br>Chapter 4 Mechanistic Models II: PDEs (pages 229โ€“316):

Mathematical Modeling and Simulation: In
โœ Kai Velten ๐Ÿ“‚ Library ๐Ÿ“… 2009 ๐Ÿ› Wiley ๐ŸŒ English

A book on modeling and simulation exclusively based on open source software. It includes many examples from such diverse fields as biology, ecology, economics, medicine, agricultural, chemical, electrical, mechanical, and process engineering. Requiring only little mathematical prerequisite in calcul