Presents standard numerical approaches for solving common mathematical problems in engineering using Python.
* Covers the most common numerical calculations used by engineering students
* Covers Numerical Differentiation and Integration, Initial Value Problems, Boundary Value Problems, and Partial Differential Equations
* Focuses on open ended, real world problems that require students to write a short report/memo as part of the solution process
* Includes an electronic download of the Python codes presented in the book
Autorentext
Jeffrey J. Heys is currently the department head in Chemical and Biological Engineering at Montana State University. He has taught numerous courses in Chemical and Biological Engineering for 15 years. He also taught courses in Applied Mathematics at the University of Colorado at Boulder, including Numerical Analysis, for three years. Jeff has been creating mathematical models of biological systems for approximately 20 years, published more than 40 peer reviewed papers, and has programmed extensively in FORTRAN, C, C++, MATLAB®, and Python®.
Klappentext
Chemical and Biomedical Engineering Calculations Using Python®
Presents standard numerical approaches for solving common mathematical problems in engineering using Python®Python® is a clear and powerful object-oriented programming language, comparable to Perl, Ruby, Scheme, and Java. The Python programming language is ideal due to its rapid growth and strong recent interest among practitioners in areas as diverse as numerical modeling, data science, and bioinformatics. Chemical and Biomedical Engineering Calculations Using Python® presents standard numerical approaches for solving common mathematical problems in engineering.
The book covers the most common engineering calculations used by students and utilizes the freely available Python software and its supporting libraries. Chemical and Biomedical Engineering Calculations Using Python® features topics on:
- Programming in Python
- Common External Libraries for Engineering
- Plotting
- Symbolic Mathematics
- Linear Systems
- Regression
- Nonlinear Equations
- Statistics
- Numerical Differentiation and Integration
- Initial Value Problems
- Boundary Value Problems
- Partial Differential Equations
- Finite Element Method
Chemical and Biomedical Engineering Calculations Using Python® is written to be accessible to engineering students in a numerical methods or computational methods course as well as for practicing engineers who want to learn to solve common problems using Python. Also included is an electronic download of the Python codes presented in the book.
Inhalt
Preface xi
About the Companion Website xv
1 Problem Solving in Engineering 1
1.1 Equation Identification and Categorization 4
1.1.1 Algebraic versus Differential Equations 4
1.1.2 Linear versus Nonlinear Equations 5
1.1.3 Ordinary versus Partial Differential Equations 6
1.1.4 Interpolation versus Regression 8
Problems 10
Additional Resources 11
References 11
2 Programming with Python 12
2.1 Why Python? 12
2.1.1 Compiled versus Interpreted Computer Languages 13
2.1.2 A Note on Python Versions 14
2.2 Getting Python 15
2.2.1 Installation of Python 17
2.2.2 Alternative to Installation: SageMathCloud 18
2.3 Python Variables and Operators 19
2.3.1 Updating Variables 21
2.3.2 Containers 23
2.4 External Libraries 25
2.4.1 Finding Documentation 27
Problems 28
Additional Resources 29
References 30
3 Programming Basics 31
3.1 Comparators and Conditionals 31
3.2 Iterators and Loops 34
3.2.1 Indentation Style 39
3.3 Functions 39
3.3.1 Pizza Example 43
3.3.2 Print Function 44
3.4 Debugging or Fixing Errors 45
3.5 Top 10+ Python Error Messages 45
Problems 47
Additional Resources 49
References 49
4 External Libraries for Engineering 51
4.1 Numpy Library 51
4.1.1 Array and Vector Creation 51
4.1.2 Array Operations 55
4.1.3 Getting Helping with Numpy 55
4.1.4 Numpy Mathematical Functions 56
4.1.5 Random Vectors with Numpy 57
4.1.6 Sorting and Searching 57
4.1.7 Polynomials 58
4.1.8 Loading and Saving Arrays 59
4.2 Matplotlib Library 60
4.3 Application: Gillespie Algorithm 63
Problems 66
Additional Resources 68
References 68
5 Symbolic Mathematics 70
5.1 Introduction 70
5.2 Symbolic Mathematics Packages 71
5.3 An Introduction to SymPy 72
5.3.1 Multiple Equations 75
5.4 Factoring and Expanding Functions 76
5.4.1 Equilibrium Kinetics Example 77
5.4.2 Partial Fraction Decomposition 78
5.5 Derivatives and Integrals 78
5.5.1 Reaction Example 79
5.5.2 Symbolic Integration 80
5.5.3 Reactor Sizing Example 80
5.6 Cryptography 81
Problems 83
References 86
6 Linear Systems 87
6.1 Example Problem 88
6.2 A Direct Solution Method 91
6.2.1 Distillation Example 95
6.2.2 Blood Flow Network Example 95
6.2.3 Computational Cost 98
6.3 Iterative Solution Methods 100
6.3.1 Vector Norms 100
6.3.2 Jacobi Iteration 100
6.3.3 GaussSeidel Iteration 103
6.3.4 Relaxation Methods 105
6.3.5 Convergence of Iterative Methods 105
Problems 107
References 112
7 Regression 113
7.1 Motivation 113
7.2 Fitting Vapor Pressure Data 114
7.3 Linear Regression 115
7.3.1 Alternative Derivation of the Normal Equations 118
7.4 Nonlinear Regression 119
7.4.1 Lunar Disintegration 122
7.5 Multivariable Regression 126
7.5.1 Machine Learning 127
Problems 129
References 134
8 Nonlinear Equations 135
8.1 Introduction 135
8.2 Bisection Method 137
8.3 Newton's Method 140
8.4 Broyden's Method 143
8.5 Multiple Nonlinear Equations 146
8.5.1 The Point Inside a Square 149
Problems 151
9 Statistics 156
9.1 ...