
Explore pinns to solve partial differential equations by enforcing physics during training. Learn finite difference approaches and PyTorch implementations, accelerated by the Deep XD library.
Install Anaconda on Windows, install libraries using pip or conda, and launch Jupyter notebooks to write and run code.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.