English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 184 lectures (20h 55m) | 4.69 GB
From numerical methods to exciting applications: Differential equations, eigenvalue problems, Monte Carlo methods & more
This course is for everyone who wants to learn and get better in Python and physics.
Except for some school mathematics, no prior knowledge is required. We will start from the basics and climb the ladder up to advanced projects!
Python is an enormously powerful tool and widely used in theoretical and computational physics.
It is not difficult to use but the whole topic can be overwhelming to learn if you are on your own.
In computational physics we use numerical techniques from mathematics, such as:
- Interpolation & Model fitting
- Derivatives & Integrals
- Differential equations
- Eigenvalue problems
- Monte Carlo methods
to solve problems from all areas of physics.
You are kindly invited to join this carefully prepared course that will teach you all you need to know about Python for scientific programming. It includes a crash course, quizzes, exercises, solutions and, of course, hands-on programming sessions in which we will solve real-life examples, such as
- Calculating the magnetic field of a charged wire (integrals & derivatives)
- Chaos & the butterfly effect (differential equations)
- Heat propagation in a sample (differential equations)
- Simulating (and navigating) a spaceship interacting with sun, earth and moon (differential equations)
- The strange behavior of coupled oscillators (Eigenvalue problems, Fourier analysis & fitting procedure)
- Ferromagnets & Antiferromagnets (Monte Carlo methods)
- Special properties of graphene (Advanced science lecture about the Nobel prize winning material)
- … & many more
What you’ll learn
- Getting Started: A beginner-friendly crash course about NumPy, functions, loops, conditionals, lists, arrays & plots
- Numerical methods: Derivatives & integrals, differential equations & eigenvalue problems, interpolation & Monte Carlo methods
- Practice at Physics Problems: Moment of inertia, magnetic field of a wire, radioactive decay, harmonic oscillators, free fall, rolling balls
- Application to Advanced Problems: Chaotic systems, heat equation, 3-body problem, spaceship mission, coupled pendulums, magnetism, graphene & quantum physics
Table of Contents
Python installation via Anaconda & Alternatives
1 Hello & Welcome!
2 Structure & Overview of this course
3 Installing Python via Anaconda for free
4 Jupyter notebook – Our tool of choice
5 Style your notebook
6 Test your knowledge about the basics Python in Jupyter notebooks
7 HOW TO use this course
8 LET’S GET STARTED with scientific programming!
9 (FAQ) Typical problems & errors
10 (optional) Style sheets for your notebook
11 (optional) Alternative development environments For large projects – PyCharm
12 (optional) Alternative development environments Allrounder – Visual Studio Code
13 (optional) Environments & Updates
[Optional] Python Crash Course
14 Introduction to section Optional Python crash course
15 Template file
16 Numpy & Basic mathematics
17 Data types of numbers
18 Strings
19 Test your knowledge Numbers, data types & strings
20 Basic programming sqrt
21 [Solution] Coding Exercise Basic programming sqrt
22 Lists
23 Arrays
24 Vectors & Matrices
25 Test your knowledge Lists, arrays & matrices
26 Dictionaries
27 Loops & If statements
28 Working with data files
29 Functions
30 Implement a function with loops
31 [Solution] Coding Exercise Implement a function with loops
32 Plots with matplotlib
33 Contour plot (or density plot)
34 D Plots
35 Test your knowledge Plots
36 Crash course recap
37 Resources & Links
Series expansion, interpolation & data fitting
38 Introduction
39 Template file
40 Taylor expansion of exponential function
41 Taylor expansion of sin function
42 Numerically calculating (higher) derivatives
43 Taylor expansion of general function
44 Interpolation
45 Linear and cubic splines
46 Using splines to fit perturbed data
47 Perfect interpolation using polynomials – Solving a system of linear equations
48 [Exercise] (optional) Generalize the procedure for more data points
49 Fitting a polynomial model function
50 Calculating the fitting error
51 Calculating the gradient of the error
52 Update the coefficients using gradient descent
53 [Exercise] (optional) Try a different model function of your choice
54 Section recap
55 Resources & Links
Derivatives
56 Introduction
57 Template file
58 Background Derivatives
59 Implementation of derivatives in Python
60 Why is the central-differences method better
61 Better accuracy Richardson method
62 Implementing second derivative
63 [Exercise] Calculate velocity and acceleration
64 Exercise files Calculate velocity and acceleration
65 [Solution] Calculate velocity and acceleration
66 Multidimensional derivatives Gradient
67 Multidimensional derivatives Divergence & curl
68 Section recap
69 Resources & Links
Integrals
70 Introduction
71 Template files
72 Background on integrals
73 Discretizing integrals & Trapezoidal method
74 Improving accuracy Simpson rule and beyond
75 [Project] Rotational energy & Moment of inertia – Start with a point mass
76 Rotating a stick around one end
77 [Exercise] Rotating a stick around the center
78 [Solution] Rotating a stick around the center
79 Rotating a sphere Analytical solution
80 Rotating a sphere Numerical solution
81 [Exercise] Rotating a spherical shell
82 [Solution] Rotating a spherical shell
83 [Project] Magnetic field of a wire – Explaining the problem
84 Preparing the arrays
85 Calculating the vector potential of a charged wire
86 Calculating the magnetic field of a charged wire
87 Quiver plot of the magnetic field
88 Analyzing a periodic signal via Fourier transforms
89 Fourier transform
90 Numpy Fast fourier transform (FFT)
91 Section recap
92 Resources & Links
Differential equations I Basics and 1-dimensional problems
93 Introduction
94 Template file
95 Background Euler method
96 Example 1 Radioactive decay
97 Defining a general function for the Euler method
98 Example 2 Time-amplified radioactive decay
99 Higher-order differential equations
100 Example 3 Free fall
101 Example 4 Pendulum
102 Accurate solution of the pendulum
103 Adding damping and driving forces
104 Improvement Use the SciPy function solve_ivp
105 Higher-order differential equations with solve_ivp
106 Compare different methods for solving differential equations
107 Implementation of Runge Kutta 4th order method
108 Implementation of RK45
109 Comparison of our three methods to solve differential equations
110 Section recap
111 Resources & Links
Differential equations II Multiple dimensions
112 Introduction
113 Template files
114 [Project] Simulating a rolling ball – Two decoupled oscillators
115 Solving the differential equation of a rolling ball
116 Different starting conditions & external forces acting on the ball
117 [Project] Chaos & Lorenz systems – Explanation of the differential equation
118 Solving the Lorenz differential equation for the chaotic case
119 Solving the Lorenz differential equation for the non-chaotic case
120 [Project] Heat equation – Explanation of the differential equation
121 Solving the heat equation in one dimension
122 Solving the heat equation in two dimensions
123 [Project] 3-body problem Coupled differential equations for sun, earth & moon
124 Coding the differential equations for sun, earth & moon
125 Solving the differential equations for sun, earth & moon (3-body problem)
126 Analyzing the orbital motion of earth & moon
127 Comment on inclination of the moon
128 [Project] Rocketship – Coding & Solving the differential equations
129 Changing starting velocity Elliptical orbit around earth
130 Simulating earth escape
131 Simulating a moon encounter
132 Brake maneuver to reach moon orbit
133 Section recap
134 Resources & Links
Eigenvalue problems
135 Introduction
136 Template file
137 Three coupled oscillators Equations of motion
138 Numerical solution of the coupled differential equations
139 Why is it an eigenvalue problem
140 [Exercise] Write your own routine to calculate the eigenvalues
141 [Solution] Write your own routine to calculate the eigenvalues
142 Analyzing the eigenmodes of the three coupled oscillators
143 Correction Here are the corrected eigenvectors
144 Fourier transform Find the characteristic frequencies of the numerical solution
145 [Exercise] Fit three harmonic oscillations to our numerical solution
146 [Solution] Fit three harmonic oscillations to our numerical solution
147 Comment errorFitGradient function
148 Generalization to n coupled oscillators
149 Introduce periodic boundary conditions
150 Resources & Links
Monte Carlo algorithms
151 Introduction
152 Template files
153 [Project] Calculating Pi – Explaining the idea
154 Approximating Pi using a Monte Carlo algorithm
155 Alternative solution and time comparison for approximating Pi
156 [Project] Simulating a magnet – Setting up & plotting the initial state
157 Defining the energy
158 Simulating a Metropolis step
159 Running the Monte Carlo algorithm
160 Improve code using finite temperatures
161 Implement interaction with a magnetic field
162 Dzyaloshinskii–Moriya interaction giving rise to non-collinear spin textures
163 Section recap
164 Resources & Links
[Add On] Quantum mechanics Solving the Schrödinger equation
165 Introduction
166 Physical background
167 [Project] Particle in a box
168 Finding the first solution via the shooting method
169 Determining & Discussing the eigensystem of the particle in a box
170 [Project] Quantum harmonic oscillator
171 Adapting our notebook to the new potential
172 Determining & Discussing the eigensystem of the quantum harmonic oscillator
173 How can we solve this problem more easily
174 Use Mathematica to solve the problem with only a few lines of code
175 Section recap
176 Resources & Links
[Add on] Nobel prize lecture Electronic properties of graphene
177 Introduction
178 Template file
179 From free electrons to band structures
180 Plotting a graphene lattice
181 Band structure of graphene
182 Dirac points and massless electrons
183 Plotting a graphene nanoribbon
184 Band structure of a graphene nanoribbon
185 Applying magnetic field Landau quantization & Quantum Hall effect
186 Moire lattice of twisted bilayers of graphene
187 Section recap
188 Resources & Links
189 THANK YOU & GOODBYE!
190 Congratulations! Bonus Content!
Resolve the captcha to access the links!