Computers, Waves, Simulations: A Practical Introduction to Numerical Methods using Python

Ludwig-Maximilians-Universität München (LMU) via Coursera

Go to Course: https://www.coursera.org/learn/computers-waves-simulations

Introduction

### Course Review: Computers, Waves, Simulations - A Practical Introduction to Numerical Methods using Python #### Overview Are you passionate about understanding the mechanics of wave equations and numerical methods? If so, the **"Computers, Waves, Simulations: A Practical Introduction to Numerical Methods using Python"** course on Coursera may be precisely what you need. This comprehensive course will guide you through the intricate processes of solving partial differential equations (PDEs) using numerical methods, presented in an engaging and practical format through Python programming in Jupyter notebooks. Designed for individuals with a foundational knowledge of mathematics and programming, this course combines theoretical understanding with practical applications, making it an excellent resource for physics students, engineers, and anyone interested in computational modeling. ### Course Structure and Syllabus The course spans **nine weeks**, each dedicated to a crucial aspect of numerical methods. Below is a brief overview of what each week entails: - **Week 1: Discrete World, Wave Physics, Computers** The journey begins with understanding numerical methods in the context of Earth sciences. You'll learn about discretization and how it affects the accuracy of simulations, while foundation concepts in parallel computing will be introduced. - **Week 2: The Finite-Difference Method - Taylor Operators** Dive into the finite-difference method, utilizing Taylor series to improve the accuracy of numerical derivatives, a skill you'll apply using Python. - **Week 3: The Finite-Difference Method - 1D Wave Equation - von Neumann Analysis** This week focuses on developing a finite-difference algorithm for the acoustic wave equation, examining boundary conditions, initialization techniques, and stability analyses. - **Week 4: The Finite-Difference Method in 2D - Numerical Anisotropy, Heterogeneous Media** Transitioning to two dimensions, you'll explore the limitations of numerical methods, call upon real-world examples, and introduce elastic wave equations. - **Week 5: The Pseudospectral Method, Function Interpolation** You'll learn about function interpolation and Fourier series, implementing these concepts to tackle wave problems in both one and two dimensions. - **Week 6: The Linear Finite-Element Method - Static Elasticity** Delve into finite elements and their application to static elasticity problems. This week introduces the Galerkin principle and boundary conditions. - **Week 7: The Linear Finite-Element Method - Dynamic Elasticity** Expand your finite-element knowledge to dynamic wave equations while comparing your results with those from finite-difference methods. - **Week 8: The Spectral-Element Method - Lagrange Interpolation, Numerical Integration** Introduction to spectral-element methods, focusing on Lagrange interpolation, and understanding the essence of numerical integration. - **Week 9: The Spectral Element Method - 1D Elastic Wave Equation, Convergence Test** Finally, consolidate your understanding by deriving the spectral-element solution and conducting convergence tests for both homogenous and heterogeneous media. ### Course Experience The interactive nature of the course stands out, facilitated through Python code examples embedded within Jupyter notebooks. This format allows learners to implement theoretical concepts in a practical setting, reinforcing understanding and competency. The progression from foundational concepts to more complex scenarios provides clarity and confidence as you advance. ### Recommendations **Who Should Take This Course:** This course is ideal for physics enthusiasts, engineers involved in wave propagation, data scientists interested in numerical simulations, and anyone seeking a deeper understanding of computational methods in wave physics. Basic programming knowledge in Python, along with some familiarity with calculus and differential equations, will be extremely beneficial. **Pros:** - Hands-on practical exposure through coding in Jupyter notebooks. - A robust framework combining theory with application. - Well-structured syllabus that progresses logically. - Access to a vast array of resources and community support through Coursera. **Cons:** - The course demands a commitment of time and effort, which might be challenging for those with busy schedules. - May require prior knowledge in calculus and programming to optimize learning experience fully. ### Conclusion In conclusion, **"Computers, Waves, Simulations: A Practical Introduction to Numerical Methods using Python"** is an exceptional course that successfully bridges theory and practice in numerical methods centered around wave equations. Its structured approach, practical coding applications, and supportive community make it a highly recommendable choice for anyone eager to deepen their understanding of computational wave physics. By the end of the course, you will not only have a theoretical foundation but also the practical skills needed to tackle real-world problems through computational simulations using Python. Embrace the opportunity to enhance your skills and knowledge—enroll today!

Syllabus

Week 01 - Discrete World, Wave Physics, Computers

The use of numerical methods to solve partial differential equations is motivated giving examples form Earth sciences. Concepts of discretization in space and time are introduced and the necessity to sample fields with sufficient accuracy is motivated (i.e. number of grid points per wavelength). Computational meshes are discussed and their power and restrictions to model complex geometries illustrated. The basics of parallel computers and parallel programming are discussed and their impact on realistic simulations. The specific partial differential equation used in this course to illustrate various numerical methods is presented: the acoustic wave equation. Some physical aspects of this equation are illustrated that are relevant to understand its solutions. Finally Jupyter notebooks are introduced that are used with Python programs to illustrate the implementation of the numerical methods.

Week 02 The Finite-Difference Method - Taylor Operators

In Week 2 we introduce the basic definitions of the finite-difference method. We learn how to use Taylor series to estimate the error of the finite-difference approximations to derivatives and how to increase the accuracy of the approximations using longer operators. We also learn how to implement numerical derivatives using Python.

Week 03 The Finite-Difference Method - 1D Wave Equation - von Neumann Analysis

We develop the finite-difference algorithm to the acoustic wave equation in 1D, discuss boundary conditions and how to initialize a simulation example. We look at solutions using the Python implementation and observe numerical artifacts. We analytically derive one of the most important results of numerical analysis – the CFL criterion which leads to a conditionally stable algorithm for explicit finite-difference schemes.

Week 04 The Finite-Difference Method in 2D - Numerical Anisotropy, Heterogeneous Media

We develop the solution to the 2D acoustic wave equation, compare with analytical solutions and demonstrate the phenomenon of numerical (non-physical) anisotropy. We extend the von Neumann Analysis to 2D and derive numerical anisotropy analytically. We learn how to initialize a realistic physical problem and illustrate that 2D solution are already quite powerful to understand complex wave phenomena. We introduced the 1D elastic wave equation and show the concept of staggered-grid schemes with the coupled first-order velocity-stress formulation.

Week 05 The Pseudospectral Method, Function Interpolation

We start with the problem of function interpolation leading to the concept of Fourier series. We move to the discrete Fourier series and highlight their exact interpolation properties on regular spatial grids. We introduce the derivative of functions using discrete Fourier transforms and use it to solve the 1D and 2D acoustic wave equation. The necessity to simulate waves in limited areas leads us to the definition of Chebyshev polynomials and their uses as basis functions for function interpolation. We develop the concept of differentiation matrices and discuss a solution scheme for the elastic wave equation using Chebyshev polynomials.

Week 06 The Linear Finite-Element Method - Static Elasticity

We introduce the concept of finite elements and develop the weak form of the wave equation. We discuss the Galerkin principle and derive a finite-element algorithm for the static elasticity problem based upon linear basis functions. We also discuss how to implement boundary conditions. The finite-difference based relaxation method is derived for the same equation and the solution compared to the finite-element algorithm.

Week 07 The Linear Finite-Element Method - Dynamic Elasticity

We extend the finite-element solution to the elastic wave equation and compare the solution scheme to the finite-difference method. To allow direct comparison we formulate the finite-difference solution in matrix-vector form and demonstrate the similarity of the linear finite-element method and the finite-difference approach. We introduce the concept of h-adaptivity, the space-dependence of the element size for heterogeneous media.

Week 08 The Spectral-Element Method - Lagrange Interpolation, Numerical Integration

We introduce the fundamentals of the spectral-element method developing a solution scheme for the 1D elastic wave equation. Lagrange polynomials are discussed as the basis functions of choice. The concept of Gauss-Lobatto-Legendre numerical integration is introduced and shown that it leads to a diagonal mass matrix making its inversion trivial.

Week 09 The Spectral Element Method - 1D Elastic Wave Equation, Convergence Test

We finalize the derivation of the spectral-element solution to the elastic wave equation. We show how to calculate the required derivatives of the Lagrange polynomials making use of Legendre polynomials. We show how to perform the assembly step leading to the final solution system for the elastic wave equation. We demonstrate the numerical solution for homogenous and heterogeneous media.

Overview

Interested in learning how to solve partial differential equations with numerical methods and how to turn them into python codes? This course provides you with a basic introduction how to apply methods like the finite-difference method, the pseudospectral method, the linear and spectral element method to the 1D (or 2D) scalar wave equation. The mathematical derivation of the computational algorithm is accompanied by python codes embedded in Jupyter notebooks. In a unique setup you can see how th

Skills

Reviews

Great experience. Really came to know about the theory of simulation techniques coupled with the introductory knowledge of python language.

Would have like more "empty" cells in notebooks for trying to establish loop one self and then having a "correct" output to aim for. Maybe followed by a solution cell with a correct implementation.

A fascinating teaching technique, delivering quality content with a well-thought quizzes system! It' hard to find better courses in the domain of Finite Difference and Spectral Element methods

I already know that I will learn a lot even though I am an undergrad. ( FTD from Colorado School of Mines)

This is a great course for intro to numerical course with additional bonus on python code, although a little bit too fast pace.