Introduction to Computer-based Physical Modeling Logo

Course Information:

  • This Website
  • Course Schedule
  • Assignments
  • Exams
  • Resources
    • Molecular Nanophotonics Group
    • Python Documentation
    • Python Tutorials
  • Instructor

Jupyter Notebooks:

  • Overview
  • Introduction to Jupyter
    • What is Jupyter Notebook?
    • Notebook editor
    • Kernels
    • Notebook documents
  • Notebook editor
    • Edit mode
    • Command mode
    • Keyboard navigation
    • Running code
    • Managing the kernel
  • Entering code
  • Entering Markdown
    • Markdown basics
    • Headings
    • Embedded code
    • LaTeX equations
    • Images
    • Videos

Lecture 1:

  • Lecture Contents
  • Variables and types
    • Symbol names
    • Variable Assignment
    • Number types
      • Integers
      • Floating Point
      • Complex Numbers
      • Type casting
  • Operators and comparisons
  • Data Types in Python
    • Strings
    • Lists
    • Tuples
    • Dictionaries
  • Modules and namespaces
    • Modules
    • Namespaces
    • Contents of a module
  • Exercise 1

Lecture 2:

  • Lecture Contents
  • NumPy arrays
    • Creating Numpy Arrays
      • From lists
      • Using array-generating functions
        • linspace and logspace
        • mgrid
        • diag
        • zeros and ones
    • Manipulating NumPy arrays
      • Slicing
      • Reshaping
      • Adding a new dimension: newaxis
      • Stacking and repeating arrays
        • Tile and repeat
        • Concatenate
        • Hstack and vstack
    • Applying mathematical functions
      • Operation involving one array
      • Operations involving multiple arrays
  • Plotting data
    • Simple Plotting
      • Line Plot
        • Axis Labels
        • Legends
      • Scatter plot
      • Histograms
      • Combined plots
    • Saving figures
    • Plots with error bars
      • Setting plotting limits and excluding data
        • Masked arrays
    • Logarithmic plots
      • Semi-log plots
      • Log-log plots
    • Arranging multiple plots
    • Contour and Density Plots
      • Simple contour plot
      • Color contour plot
      • Image plot
    • 3D Plotting
      • Projection Scence
      • Line Plotting in 3D
      • Surface Plotting
    • Additional Plotting
      • Insets
      • Spine axis
      • Polar plot
    • Text annotation
  • Random numbers
    • Uniformly distributed random numbers
    • Normally distributed random numbers
    • Exponentially distributed numbers
    • Random distribution of integers
  • Exercise 2

Lecture 3:

  • Lecture Contents
  • Input and output
    • Keyboard input
    • Screen output
    • File input/output
      • File I/O with NumPy
        • Reading data from a text file
        • Writing data to a text file
      • File I/O with Pandas
        • Short intro to Pandas
        • Reading CSV data with Pandas
  • Flow Control
    • Conditionals: if, elif, and else statements
      • If example
      • If else example
      • If, elif, else example
      • Combining conditions
    • Loops
      • For loops
      • While loops
      • Loops and array operations
      • List comprehensions
  • Functions
    • Function definition
    • Variables in functions
    • Functions with more than one input or output
      • Positional and keyword arguments
      • Functions with variable number of arguments
    • Unnamed functions (lambda function)
    • Functions as arguments of functions
  • Exceptions
  • Exercise 3

Lecture 4:

  • Lecture Contents
  • Classes and Objects
    • Definition of Classes
    • Class Methods
      • The __init__ method
      • The __str__ method
    • Class and object variables
  • Brownian Motion
    • Physics
    • Class Planning
    • Simulating
    • Plotting the trajectories
    • Characterizing the Brownian motion
      • Calculate the particle velocity
      • Calculate the particle mean squared displacement
  • Animations
    • Import Modules
    • Particle class
    • Create a set of particles
    • Canvas and drawing function
    • Threading for animation
  • Exercise 4

Lecture 5:

  • Lecture Contents
  • Numerical Differentiation
    • First order derivative
      • Matrix version of the first derivative
    • Second order derivative
    • SciPy Module
      • Matrix version
  • Numerical Integration
    • Box method
    • Trapezoid method
    • Simpson method
  • Solving ODEs
    • Harmonic Oscillator
    • Implicit Solution - Crank Nicholson
      • Define Matrices
      • Use Initial Conditions
      • Solution
    • Explicit Solution - Numerical Integration
      • Euler Method
      • Euler Cromer Method
      • Midpoint Method
      • Putting it all together
        • The definition of the problem
        • Solving the problem
    • Solving the Harmonic Oscillator in SciPy
      • Setup
      • Definition
      • Solution
      • Plotting
    • Damped Driven Pendulum in SciPy
      • Setup
      • Definition
      • Solution
      • Plotting

Lecture 6:

  • Lecture Contents
  • COVID19
    • The Kermack-McKendrick Model
      • Model Equation
    • Setup
    • Definition
    • Solution
    • Plotting
    • Real COVID19 numbers
      • Total number of cases
      • Number of Deaths
      • New cases per day
      • Current cases
  • Coupled Pendula
    • Description of the problem
      • Sketch
      • Equations of motion
    • Solving the problem
      • Setting up the function
      • Define initial parameters
      • Solve the equation of motion
      • Plotting
      • Animation
    • Normal Modes
      • In-phase motion
      • Out-of-phase motion
      • Beat case
      • Computation of energy (here for the beat case)
        • Potential energy of the pendula
        • Potential energy of the spring
        • Kinetic energies
        • Total energy
        • Total energy exchange of the pendula
  • Fourier Analysis
    • Fourier series
    • Fourier transform
    • Frequency analysis of our coupled pendula

Lecture 7:

  • Lecture Contents
  • Spring Pendulum
    • Physical Model
      • Equations of motion
    • Numerical Solution
      • Initial parameters
      • Solution
      • Plotting
        • Angle and Length over Time
  • Planetary Motion
    • Physical Model
    • Numerical Solution
      • Initial Parameters: Planets
      • Solution: Planets
      • Plotting: Planets
        • Trajectory
        • Energy
  • Diffusion equation
    • Physical Model
      • Spatial derivative
      • Temporal derivative
      • Bringing all together
    • Numerical Solution
      • Setup Domain
      • Initial Conditions
      • Matrix Setup
      • Solution
  • Exercise 7

Lecture 8:

  • Lecture Contents
  • Curve fitting
    • Idea
    • Least squares
    • Data
    • Least square fitting
      • \(\chi\)-squared value
      • Residuals
    • Covariance matrix

Lecture 9:

  • Lecture Contents
  • Plane Waves
    • Equations
    • Electric field
    • Plane wave propagation
    • Imaginary wave vector
    • Animation
    • Interference of two plane waves
      • Plane wave at a boundary
    • Fresnel equations
    • Incident wave
    • Reflected wave
    • Refracted wave
  • Spherical waves
    • Equations
    • Electric field
    • Animation
    • Plot the intensity in an image plane
    • Interference between a spherical and a plane wave
  • Huygens principle
    • Diffraction pattern of a single slit
    • Farfield vs. nearfield
    • Comparison to the analytical solution
  • Gaussian Beam
    • Equations
    • Animation
    • Intensity plot
    • Intensity profiles
  • Exercise 9

Lecture 10:

  • Lecture Contents
  • Quantum Mechanics
    • Quantum Mechanics in a Nutshell
      • Time dependent Schrödinger equation
      • Stationary Schrödinger equation
    • Recap: Implicit Solution
      • Kinetic energy
      • Potential energy
  • Particle in a box
    • Definition of the problem
      • Potential energy
      • Kinetic energy
      • Solution
      • Plotting
      • Energies of bound states
    • Where to go from here?
  • Harmonic Oscillator
    • Definition of the problem
      • Potential energy
      • Kinetic energy
      • Solution
      • Plotting
      • Energies of the states
    • Where to go from here?
  • Periodic Potential
    • Definition of the problem
      • Potential energy
      • Kinetic energy
      • Solution
      • Plotting
    • Energy states
    • Where to go from here?

Lecture 11:

  • Lecture Contents
  • Time Dependent Quantum Mechanics
    • Time dependent Schrödinger equation
    • Wavepackets
      • Demonstration of superposition of plane waves
      • Wavepacket
      • Wavepacket with rectangular amplitude
      • Gaussian Wave Packet
    • Time evolution of a Gaussian Wavepacket
  • Wavepacket in a Potential Box
    • Problem Setup
    • Initial conditions
      • Eigenfunctions
      • Quality of the coefficients
    • Animation
    • Where to go from here?
  • Tunneling through a barrier
    • Schrödinger equation for the momentum
    • Crank Nicolson Solution
      • Setup Domain
      • Initial Conditions
      • Matrix Setup
      • Propagation Matrix
      • Animation setup
      • Animation
    • Split Step Method
      • Setup Domain
      • Potential energy landscape
      • Initial wavepacket
      • Fourier Transform Setup
      • Phase Factor per Timestep
      • Animation setup
      • Animation
    • Where to go from here?

Lecture 12:

  • Lecture Contents
  • Hydrodynamics
    • Falling sphere
      • Setup
      • Function definition
      • Initial Conditions
      • Numerical solution
      • Analytical solution
    • Stokes equation
    • Fundamental Solutions of the Stokes Equation
      • Stokeslet
      • Source dipole
      • Sum of both solutions
  • Machine Learning and Neural Networks
    • Overview
    • Reinforcement Learning
      • Markov Decision Process
        • Methods or RL
    • Navigating a Grid World
      • Initialize Reinforcement Learning
      • List of actions
      • Initial state
      • Reinforcement Learning Loop
      • Convergence of the Q-learning
      • Policy
      • Plot the policy
    • Where to go from here

Lecture 13:

  • Lecture Contents
  • Neural Networks
    • The MNIST Data Set
      • Load the data
      • Normalize the data
      • Preparing training and testing data
    • A Single Neuron
      • Forward Propogation
      • Loss Function
    • Trainging the Network
      • Backward Propagation
      • Stochastic Gradient Descent
      • Build an Train
      • Testing our model
    • Network with Hidden Layers
    • Multiclass Network
      • Changes to the model
        • Forward Pass
        • Loss Function
        • Back Propagation
      • Build and Train
        • Model performance
    • Test the model
  • Neural Network with Keras
    • MNIST Data Set (Keras)
    • Build the model
    • Compile the model
    • Train the model
    • Testing the model

Lecture 14:

  • Lecture Contents
  • Convolutional Neural Networks
    • Layout of a CNN
    • Convolutional Layer
      • Padding
      • Striding
    • RELU Activation
    • Pooling Layer
    • Output Size
    • Flattening
    • Dropout
    • Fully Connected Layer
  • Example CNN with Keras
    • Prepare the data
    • Build the network
    • Train the network
    • Evaluate the trained network
    • Evaluate the accuracy of your visual neural network ;-)
    • Where to go from here?
  • Autoencoder CNN for Time Series Denoising
    • Autoencoder Structure and Purpose
    • Data Generation
    • Create the Autoencoder network
      • Define model data
      • Encoder/Decoder Setup
      • Training the encoder
    • Reconstruction of the Data

Lecture 15:

  • Lecture Contents
  • Python and Hardware
    • Arduino Nano Board
      • Arduino Software
      • Setup your board
      • Select Firmata Sketch
    • Communicating with the board
    • Let the on-board LED blink
      • Tunable output
    • Creating an Oscilloscope
  • Project: YOUR PROJECT TITLE
    • Introduction
    • Fundamentals
    • Results and Discussion
    • Summary
Introduction to Computer-based Physical Modeling
  • »
  • Search
  • Edit on GitHub


© Copyright 2020, Frank Cichos Last updated on Apr 06, 2021.

Built with Sphinx using a theme provided by Read the Docs.