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

๐Ÿ“

Python for Engineering and Scientific Computing

โœ Scribed by Veit Steinkamp


Publisher
Rheinwerk Publishing
Year
2024
Tongue
English
Leaves
550
Edition
1
Category
Library

โฌ‡  Acquire This Volume

No coin nor oath required. For personal study only.

โœฆ Synopsis


Itโ€™s finally hereโ€”your guide to Python for engineers and scientists, by an engineer and scientist! Get to know your development environments and the key Python modules youโ€™ll need: NumPy, SymPy, SciPy, Matplotlib, and VPython. Understand basic Python program structures and walk through practical exercises that start simple and increase in complexity as you work your way through the book. With information on statistical calculations, Boolean algebra, and interactive programming with Tkinter, this Python guide belongs on every scientistโ€™s shelf!

  • A practical guide to Python for nonprogrammers
  • Work with NumPy, SymPy, SciPy, Matplotlib, and VPython
  • Automate numerical calculations, create simulations and visualizations, perform statistical analysis, and more



Python for Scientists
You already know how to solve problems in your field. In this guide youโ€™ll find the tools you need to map your existing calculations with Python.

Python Modules
Learn how NumPy, SymPy, SciPy, Matplotlib, and VPython can help you with your scientific work. From solving linear equations and creating animations to using discrete Fourier transformations to reconstruct a noisy signal, youโ€™ll find the practical advice you need.

Python in Action
Start simple by sizing a shaft and then move on to increasingly advanced exercises: animating a pendulum, simulating a rolling element bearing defect, creating a predator-prey model, and more. For every exercise, review the complete source code, with extensive comments, and analyze the output.

  • Program structures
  • NumPy
  • Matplotlib
  • SymPy
  • SciPy
  • VPython
  • Tkinter
  • Numerical calculations
  • Statistical calculations
  • Boolean algebra

โœฆ Table of Contents


Cover
Contents
1: Introduction
1.1 Development Environments
1.1.1 IDLE
1.1.2 Thonny
1.1.3 Spyder
1.1.4 Pip
1.2 The Modules of Python
1.2.1 NumPy
1.2.2 Matplotlib
1.2.3 SymPy
1.2.4 SciPy
1.2.5 VPython
1.3 The Keywords of Python
1.4 Your Path through This Book
2: Program Structures
2.1 Linear Program Structures
2.1.1 Linear Programs without Function Calls
2.2 Functions
2.2.1 Built-In Functions
2.2.2 Functions without Parameters and without Return Values
2.2.3 Functions with Parameters and a Return
2.2.4 Functions with Multiple Return Values
2.2.5 Functions Call Other Functions
2.3 Branching Structures
2.3.1 Single Selection
2.3.2 Multiple Selection
2.4 Repetitive Structures
2.4.1 The while Loop
2.4.2 The for Loop
2.5 Data Structures
2.5.1 Tuples
2.5.2 Lists
2.5.3 Dictionaries
2.5.4 Sets
2.6 Functional Program Style
2.7 Object-Oriented Program Style
2.7.1 Objects and Classes
2.7.2 Inheritance
2.8 Project Task: Dimensions of a Shaft
2.9 Tasks
3: Numerical Calculations Using NumPy
3.1 NumPy Functions
3.1.1 Creating One-Dimensional Arrays Using arange() and linspace()
3.1.2 Creating Two-Dimensional Arrays Using array()
3.1.3 Slicing
3.1.4 Mathematical NumPy Functions
3.1.5 Statistical NumPy Functions
3.2 Vectors
3.2.1 Addition of Vectors
3.2.2 Scalar Product
3.2.3 Cross Product
3.2.4 Triple Product
3.2.5 Dyadic Product
3.3 Matrix Multiplication
3.3.1 Chain Shape with B Parameters
3.3.2 Usage Example: Calculating the Energy of a Rotating Rigid Body in Space
3.4 Linear Systems of Equations
3.4.1 Systems of Equations with Real Coefficients
3.4.2 Systems of Equations with Complex Coefficients
3.5 Project Task: Lightning Protection System
3.6 Tasks
4: Function Plots and Animations Using Matplotlib
4.1 2D Function Plots
4.1.1 Basic Structure of a Function Plot
4.1.2 Gridlines
4.1.3 Labels
4.1.4 Line Styles
4.1.5 Designing Axes
4.1.6 Coloring Areas
4.1.7 Subplots
4.1.8 Parameter Representation
4.1.9 Changing Function Parameters Interactively
4.1.10 Contour Plots
4.2 3D Function Plots
4.2.1 Helical Line
4.2.2 Circular Ring
4.2.3 Combining a 3D Plot with a Contour Plot
4.3 Vectors
4.3.1 Vector Addition
4.3.2 Vector Field
4.4 Displaying Figures, Lines, and Arrows
4.4.1 Rectangles
4.4.2 Circles and Lines
4.4.3 Arrows
4.4.4 Polygons
4.4.5 Usage Example: A Metal Rod in a Magnetic Field
4.5 Animations
4.5.1 A Simple Animation: Shifting a Sine Function
4.5.2 Animated Oblique Throw
4.5.3 Animated Planetary Orbit
4.6 Project Task: Stirling Cycle
4.7 Project Task: Animating a Thread Pendulum
4.8 Project Task: Animating a Transmission
4.9 Tasks
5: Symbolic Computation Using SymPy
5.1 Basic Mathematical Operations
5.1.1 Addition
5.1.2 Multiplication of Terms
5.1.3 Multiplication of Linear Factors
5.1.4 Division
5.1.5 Exponentiation
5.1.6 Usage Example: Analyzing an Electrical Power Transmission System
5.2 Multiplying Matrixes
5.2.1 Calculation Rule
5.2.2 Transmission Function of a Catenary Circuit
5.3 Equations
5.3.1 Linear Systems of Equations
5.3.2 Nonlinear Systems of Equations
5.4 Simplifications of Terms
5.5 Series Expansion
5.6 Partial Fractions
5.7 Continued Fractions
5.8 Limits
5.8.1 Limits of Sequences
5.8.2 Limits of Functions
5.8.3 Differential Quotient
5.9 Differentiation
5.9.1 Usage Example: Curve Sketching
5.10 Integrations
5.10.1 Indefinite Integral
5.10.2 Definite Integral
5.10.3 Usage Example: Stored Electrical Energy
5.11 Differential Equations
5.11.1 Linear First-Order Differential Equations
5.11.2 General Solution of a Second-Order Differential Equation
5.11.3 Special Solution of a Second-Order Differential Equation
5.12 Laplace Transform
5.12.1 Solving Differential Equations
5.12.2 Analyzing Networks with Transmission Functions
5.13 Project Task: Step Response of a Catenary Circuit
5.14 Project Task: Bending a Beam That Is Fixed at One End
5.14.1 Second Moment of Area
5.14.2 Equation of the Bending Line
5.15 Project Task: Reaction Kinetics
5.16 Project Task: Dual Mass Oscillator
5.17 Tasks
6: Numerical Computations and Simulations Using SciPy
6.1 Numerical Computation of Zeros
6.2 Optimizations
6.3 Interpolations
6.4 Numerical Differentiation
6.4.1 Methods of Numerical Differentiation
6.4.2 Drawing a Tangent Slope
6.4.3 Derivative of a Sine Function
6.4.4 Usage Example: Free Fall
6.5 Numerical Integration
6.5.1 Methods of Numerical Integration
6.5.2 Definite Integral
6.5.3 Integrating a Constant
6.5.4 Usage Example: Free Fall
6.5.5 Improper Integral
6.5.6 Calculating Arc Lengths
6.5.7 Volume and Surfaces of Rotating Bodies
6.5.8 Double Integrals
6.5.9 Triple Integrals
6.6 Solving Differential Equations Numerically
6.6.1 Numerical Solution of Differential Equations
6.6.2 First-Order Linear Differential Equation
6.6.3 Second-Order Linear Differential Equation
6.6.4 Nonlinear Second-Order Differential Equation
6.6.5 Second-Order Differential Equation System: Coupled Spring-Mass System
6.6.6 Nonlinear Second-Order Differential Equation System: Double Pendulum
6.7 Discrete Fourier Transform
6.7.1 Basic Use of the Fast Fourier Transform Algorithm
6.7.2 Frequency Spectra of Non-Sinusoidal Periodic Signals
6.7.3 Reconstructing a Noisy Signal
6.8 Writing and Reading Sound Files
6.8.1 Generating and Saving Signals
6.8.2 Reading and Displaying Signals
6.9 Signal Processing
6.9.1 Frequency Response of a Butterworth Lowpass
6.9.2 Frequency Response of a Crossover
6.9.3 Filtering Signals
6.10 Project Task: Simulation of a Rolling Bearing Damage
6.11 Project Task: Predator-Prey Model
6.11.1 Exponential Growth
6.11.2 Logistic Growth
6.11.3 Predator-Prey Relationship for Exponential Growth
6.11.4 Predator-Prey Relationship for Logistic Growth
6.12 Project Task: Simulation of an Epidemic
6.13 Tasks
7: 3D Graphics and Animations Using VPython
7.1 The Coordinate System
7.2 Basic Shapes, Points, and Lines
7.2.1 Cylinder
7.2.2 Cuboid
7.2.3 Points
7.2.4 Lines
7.2.5 Sphere
7.2.6 Penetration
7.2.7 Composite Bodies
7.3 Bodies in Motion
7.3.1 Vertical Movement
7.3.2 Horizontal Movement
7.3.3 Movement in Space
7.3.4 Composite Motion
7.3.5 Rotational Motion
7.3.6 Random Motion
7.4 Animation of Oscillations
7.4.1 Simple Pendulum
7.4.2 Spring Pendulum
7.5 Event Processing
7.6 Project Task: Animation of a Coupled Spring Pendulum
7.7 Project Task: Animation of Two Coupled Simple Pendulums
7.8 Tasks
8: Computing with Complex Numbers
8.1 Mathematical Operations
8.2 Eulerโ€™s Formula
8.2.1 Symbolic Method
8.3 Calculating with Complex Resistors
8.4 Function Plots with Complex Magnitudes
8.4.1 Complex Frequency Response of a Series Resonant Circuit
8.4.2 Locus Curves
8.5 Project Task: Electric Power Transmission System
8.5.1 Task
8.5.2 Equivalent Circuit Diagram of a Three-Phase Power Line
8.6 Tasks
9: Statistical Computations
9.1 Generating, Saving, and Reading Measurement Values
9.1.1 Generating Measurement Values
9.1.2 Converting a Measurement Series into a Table
9.1.3 Writing Measurement Values to a File
9.1.4 Reading Measurement Values from a File
9.2 Frequency Distribution
9.2.1 Frequency Tables
9.2.2 Histograms
9.3 Location Parameters
9.3.1 Arithmetic Mean
9.3.2 Mode, Median, Harmonic Mean, and Geometric Mean
9.4 Dispersion Parameters
9.5 Normal Distribution
9.5.1 Graphical Representation of the Density Function
9.5.2 Probability Distribution
9.6 Skew
9.7 Regression Analysis
9.7.1 Computing the Regression Parameters
9.7.2 Representing the Scatter Plot and the Regression Line
9.8 Project Task: Simulation of a Quality Control Chart
9.9 Tasks
10: Boolean Algebra
10.1 Logical Operations
10.1.1 Conjunction
10.1.2 Disjunction
10.1.3 Negation
10.2 Laws of Boolean Algebra
10.2.1 Simple Postulates
10.2.2 De Morganโ€™s Laws
10.2.3 Distributive Law
10.3 Circuit Synthesis
10.3.1 Simplifying Logic Functions by Factoring Out
10.3.2 Simplification Using the Disjunctive Normal Form
10.3.3 Simplification Using the Conjunctive Normal Form
10.4 Project Task: Seven-Segment Coding
10.5 Tasks
11: Interactive Programming Using Tkinter
11.1 Interactions with Command Buttons, Textboxes, and Labels
11.1.1 Labels
11.1.2 Textboxes and Command Buttons
11.2 The Layout Manager of Tkinter
11.2.1 The pack Method
11.2.2 The grid Method
11.2.3 Summary
11.3 Selection with Radio Button
11.4 Slider
11.5 The Canvas Drawing Area
11.5.1 Representing Lines
11.5.2 Function Plots
11.5.3 Querying Mouse Coordinates
11.6 Project Task: Rotational Frequency Control of an Externally Excited DC Motor
11.7 Tasks
Appendix
A.1 Glossary: Basic Applied Computer Science Terminology
A.2 Derivatives of Elementary Functions
A.3 Antiderivative of Elementary Functions
A.4 Fourier Series of Important Electrotechnical Voltage Characteristics
A.5 Correspondence Table of Important Inverse Laplace Transforms
A.6 Bibliography
The Author
Index

โœฆ Subjects


Python Programming Language; Computer Programming


๐Ÿ“œ SIMILAR VOLUMES


Python for Engineering and Scientific Co
โœ Veit Steinkamp ๐Ÿ“‚ Library ๐Ÿ“… 2024 ๐Ÿ› Rheinwerk Publishing ๐ŸŒ English

<div> <p>Itโ€™s finally hereโ€”your guide to Python for engineers and scientists, by an engineer and scientist! Get to know your development environments and the key Python modules youโ€™ll need: NumPy, SymPy, SciPy, Matplotlib, and VPython. Understand basic Python program structures and walk through pra

Python for Engineering and Scientific Co
โœ Veit Steinkamp ๐Ÿ“‚ Library ๐Ÿ“… 2024 ๐Ÿ› Rheinwerk Publishing ๐ŸŒ English

<p><span>Itโ€™s finally hereโ€”your guide to Python for engineers and scientists, by an engineer and scientist! Get to know your development environments and the key Python modules youโ€™ll need: NumPy, SymPy, SciPy, Matplotlib, and VPython. Understand basic Python program structures and walk through prac

Scientific Computing: For Scientists and
โœ Timo Heister, Leo G. Rebholz ๐Ÿ“‚ Library ๐Ÿ“… 2023 ๐Ÿ› De Gruyter ๐ŸŒ English

Scientific Computing for Scientists and Engineers is designed to teach undergraduate students relevant numerical methods and required fundamentals in scientific computing. Most problems in science and engineering require the solution of mathematical problems, most of which can only be done on a com

Scientific Computing: For Scientists and
โœ Timo Heister; Leo G. Rebholz ๐Ÿ“‚ Library ๐Ÿ“… 2015 ๐Ÿ› De Gruyter ๐ŸŒ English

<p><em>Scientific Computing for Scientists and Engineers</em> is designed to teach undergraduate students relevant numerical methods and required fundamentals in scientific computing.</p> <p>Most problems in science and engineering require the solution of mathematical problems, most of which can onl

Scientific Computing: For Scientists and
โœ Timo Heister; Leo G. Rebholz ๐Ÿ“‚ Library ๐Ÿ“… 2015 ๐Ÿ› De Gruyter ๐ŸŒ English

<p><em>Scientific Computing for Scientists and Engineers</em> is designed to teach undergraduate students relevant numerical methods and required fundamentals in scientific computing.</p> <p>Most problems in science and engineering require the solution of mathematical problems, most of which can onl