
Introduction Welcome
Learn numerical PDE solutions from finite difference methods to physics informed neural networks, solving 1D heat/diffusion and Burgers and Navier–Stokes in 1D/2D with PyTorch and the NXT library.
Install Anaconda on Windows, install libraries using pip or conda, and launch Jupyter notebooks to write and run code.
Explore how artificial neurons form networks, tune weights and biases through training, and assess performance with loss functions such as mean squared error and cross entropy, like relu and sigmoid.
Master PyTorch tensor basics by distinguishing scalars, vectors, matrices, and tensors, creating tensors with random values or zeros, converting lists to tensors, and reshaping with view.
Learn how to connect tensors with numpy and convert between torch tensors and numpy arrays. Handle cpu and cuda gpu workflows to move data appropriately for numpy conversion.
Backpropagation trains neural networks by adjusting weights and biases through a forward pass and backward pass, using the chain rule to minimize loss between y hat and y.
demonstrates a simple backpropagation workflow in PyTorch within a Jupyter notebook, showing forward pass, loss computation, and gradient calculation using loss.backward.
Learn to solve the 1d heat equation numerically by discretizing space and time with finite difference schemes, using an aluminum rod with two heat sources, and explore neural networks.
Pre-process the heat equation for PINNs by setting up a 10 meter rod with boundary temps 100 and 200, initialize zero, and create space-time grids with numpy.
Solving the equation using an explicit finite difference scheme: discretize in time and space, update u at the next time step from the current one using du/dt = k d^2u/dx^2.
Post-process the 1D heat equation solution by plotting its time evolution, observe diffusion from the initial condition over many time steps, and note boundary handling and indexing choices for code.
Pre-process the 2D Burgers equation by building a 51 by 51 grid on 0 to 2, setting initial and boundary conditions, and configuring an explicit finite-difference scheme.
Learn to solve Burgers' equations by explicit time stepping using a central-difference discretization of diffusion and convection terms on a mesh, with fixed boundary and initial conditions.
Perform post-processing to validate the computed solution, visualize u and v velocity fields and diffusion over time, and interpret peak values as the solution evolves.
Physics informed neural networks (PINNs) merge deep neural networks with physics laws to solve partial differential equations using boundary and initial conditions, domain points, and a physics-based loss.
Define a neural network that maps space and time to u for the Burgers equation, using a PyTorch model with tanh activations and boundary and initial conditions.
Define the data pipeline for physics-informed neural networks by implementing the Net class, selecting a compute device, and inputting boundary and initial conditions for the Burgers equation.
Assign data to device with requires_grad for x, train with Adam, then refine with LBFGS, configuring learning rate, max iterations, history size, tolerance, and line search.
Train the model by computing data and pde losses, using a mean squared error loss criterion, zeroing gradients, and performing backpropagation to update weights.
Develop and debug a physics informed neural networks training loop using Adam, computing data and PDE losses from du/dx and du/dt, with sine initial condition and zero boundary condition.
Evaluate the PINN on a defined domain with chosen boundary and initial conditions, vary the grid and time range, and visualize the predicted burgers equation solution with PyTorch.
Define a simple physics-informed neural network to solve the 2d heat equation, using x, y, and t inputs, a 3-64-64-1 architecture with tanh activations and Adam optimizer.
Define the initial condition using a sine-based function and impose a boundary condition on a simple box domain; generate domain and boundary points to train a physics-informed neural network.
Build a physics informed neural network training loop with the Adam optimizer, generating domain and boundary data to compute PDE, initial, and boundary losses for a 2D heat equation.
Compute residual loss and data loss in PINNs by forming the PDE residual from ux x, uy y, and ut, then train with backpropagation and boundary conditions.
Train the PINN with 10,000 iterations and 1,000 points, then run the model while debugging issues like torch.zeros, autograd.grad, and initial values to ensure convergence.
Assess the model's results by evaluating a time-dependent 2d heat equation on a mesh grid, and visualize diffusion with a jet heat map of the predicted solution.
Set geometry, boundary conditions, and initial conditions to solve the 1D heat equation with Deep XD PINNs, using tensor-based backends and lambda definitions.
Define the PDE and network in a physics-informed neural network (PINN) by computing du/dt, Jacobians, Hessians, and residual, then train with initial, boundary, and domain data.
Train a physics-informed neural network by pairing data with the model's neural network using Adam. Use a learning rate of 1e-3 and run 15,000 iterations, then consider limited-memory BFGS.
Evaluate the PINN results by plotting the loss history, including train and test losses, and observe how the u values converge toward the initial condition and boundary conditions over time.
Set up a 2d steady-state Navier-Stokes solver within a physics-informed neural network framework by defining the geometry and boundary conditions, including inlet, walls, and constant pressure domain.
Define boundary conditions for wall, inlet, and outlet in a pinns context, assigning u, v, and pressure through geometry and logical boundary checks.
Define the Navier-Stokes PDE for PINNs by detailing u, v, p on x and y, deriving derivatives, forming the residual, and preparing geometry and boundary data for a 2-input, 3-output network.
Train the PINN by defining the model with data and network, set initial and boundary conditions for a steady-state problem, and use Adam before LBFGS to reach convergence.
Evaluate PINN results by sampling random points, visualizing velocity and pressure fields, and noting boundary condition implications for fast Navier-Stokes solutions.
Description
This is a complete course that will prepare you to use Physics-Informed Neural Networks (PINNs). We will cover the fundamentals of Solving partial differential equations (PDEs) and how to solve them using finite difference method as well as Physics-Informed Neural Networks (PINNs).
What skills will you Learn:
In this course, you will learn the following skills:
Understand the Math behind Finite Difference Method .
Write and build Algorithms from scratch to sole the Finite Difference Method.
Understand the Math behind partial differential equations (PDEs).
Write and build Machine Learning Algorithms to solve PINNs using Pytorch.
Write and build Machine Learning Algorithms to solve PINNs using DeepXDE.
Postprocess the results.
Use opensource libraries.
We will cover:
Finite Difference Method (FDM) Numerical Solution 1D Heat Equation.
Finite Difference Method (FDM) Numerical Solution for 2D Burgers Equation.
Physics-Informed Neural Networks (PINNs) Solution for 1D Burgers Equation.
Physics-Informed Neural Networks (PINNs) Solution for 2D Heat Equation.
Deepxde Solution for 1D Heat.
Deepxde Solution for 2D Navier Stokes.
If you do not have prior experience in Machine Learning or Computational Engineering, that's no problem. This course is complete and concise, covering the fundamentals of Machine Learning/ partial differential equations (PDEs) Physics-Informed Neural Networks (PINNs). Let's enjoy Learning PINNs together.