
Explore inverse physics-informed neural networks (I-PINNs) to predict viscosity and convection-diffusion coefficients in Burgers and 2D Navier–Stokes flows, using TVD schemes, finite differences, and PyTorch backpropagation.
Install Anaconda on Windows and install libraries via pip or conda. Launch Jupyter Notebook, navigate to your working directory, and run code to print Hello, world.
Understand how inverse physics informed neural networks apply deep learning to extract patterns and classify, using weights, biases, and activation functions like ReLU and sigmoid, guided by loss and backpropagation.
Discover tensors in PyTorch, from scalars to vectors and matrices, create random and zeros tensors, perform multiplication and addition, index elements, and reshape with view and -1.
Learn to convert between torch tensors and numpy arrays for seamless data exchange in deep learning. Handle GPU tensors with CUDA, move data to CPU, and convert back to numpy.
Learn how backpropagation in inverse physics informed neural networks optimizes training by forward and backward passes, using the chain rule to compute loss gradients with respect to weights.
Apply a simple pytorch backpropagation example in a jupyter notebook to compute a forward pass and loss, then perform backward propagation to obtain the gradient d loss/d w.
Pre-processing introduces solving the burgers equation with explicit time stepping, backward in space convection, and central difference diffusion on a finite difference mesh with an initial sine wave.
Explore forward-time, finite-difference discretization of the Burgers equation: update u with dt, discretize du/dx and d2u/dx2, and assemble convection and diffusion terms for time stepping.
Post-process the I-PINNs results by plotting the initial state and the final time step to visualize diffusion and wave evolution, including contour and heat map visuals.
Demonstrate how the solver fails when viscosity, diffusivity, and shocks challenge the scheme, and outline using inverse physics-informed neural networks with a proper scheme to handle shocks.
Explore how physics-informed neural networks fuse neural networks with physics to solve PDEs. Train with boundary and initial conditions, enforce PDE residuals across domain points, and minimize loss.
Define a neural network that maps space and time to u to solve burgers equation, capturing du/dt, du/dx, and viscosity term with d^2u/dx^2, using a PyTorch model and boundary data.
Set up data for inverse physics-informed neural networks by defining the net class, selecting the device, and building initial and boundary condition data on a x-t grid for Burgers equation.
Assign the data to the device for ipinns training, with x requiring gradient and y and x_train not. Define two optimizers: adam for rough training and lbfgs for refinement.
Calculate loss by combining data loss and PDE loss using a mean squared error criterion, then backpropagate to adjust weights.
Train the I-PINNs model by building the neural network and domain, applying sine-wave initial and zero boundary conditions, and optimizing with data and PDE losses using Adam.
Evaluate the neural network model by changing the computational domain and grid, and examine how boundary and initial conditions influence predictions of Burgers equation using PyTorch and contour plots.
Pre-processing for solving the burgers equation with a TVD scheme, using CFL-based time stepping, initial and boundary conditions, and a Python setup to compare PINN results.
Solve the Burgers equation using a TVD scheme, form the right-hand side with diffusion and convection, and advance with a Runge-Kutta step.
Post-process by plotting the initial and final conditions to illustrate the shock wave, and use a heat map to show diffusion and energy reduction, with a TVD-pens code comparison.
compare pins with tvd scheme using identical initial and boundary conditions and neural networks, assess convergence, and note tvd is sharper near shocks while pins remain aligned.
Explore inverse physics informed neural networks that predict the viscosity parameter from Burgers equation data by fusing physics loss with data loss for velocity fields, pivx, and cfd applications.
Create the training data for inverse PINNs by generating x–t samples with the TVD scheme, building a two-column tensor of x and time, and mapping to uf values.
Define the neural network for inverse physics informed neural networks, set and optimize the lambda viscosity coefficient, and build a PyTorch sequential model with 2–20–30–20–20 layers and a 1-element output.
Set up a neural network with a learnable lambda, and input domain data from X_train and Y_train encoded by the TVD scheme for training on the chosen device.
Apply the Adam optimizer to train an I-PINNs model, including weights, biases, and lambda as parameters, with mean squared error loss guiding updates and iteration starting at one.
Declare and compute a loss function for I-PINNs by combining data loss with burgers equation PDE loss, using predictions from the model and data y_train, with a learned lambda parameter.
Define and run train function, performing 3000 optimization steps with Adam and a loss function, then evaluate model. Track convergence to 0.02 and compare with pins network and tvd values.
Compare PINNs, TVD, and IPINNs results, showing y predicted versus inverse, convergence at 0.02 after 5000 steps, and close alignment with the DVD numerical solution.
Apply inverse PINNs to estimate C1 and C2 in the Navier-Stokes equation from velocity and pressure data, linking convection, diffusion, and viscosity in cylinder flow.
Build the training data pipeline for the inverse pins app by loading a Matlab mat file and extracting x, u, v, p, t to form 7000 samples.
Create and prepare the training data for I-PINNs by flattening x, reshaping t, filtering to the computational domain, and concatenating x, y, t with u, v, p for learning.
Define the neural network for inverse physics informed neural networks solving the Navier–Stokes PDE, with inputs (x, y, t) and outputs (u, v, p), enforcing continuity and momentum via gradients.
Define the computation domain as a rectangle with space and time domains, apply boundary conditions to U, V, and P using anchor values to guide initial conditions for PINN training.
Define the training data and loss type, then let the library compute the loss using the Navier-Stokes PDE and observable boundary conditions across domain points and boundary points.
Configure and finalize the optimization for the inverse physics informed neural network, including model setup and loss tracking. Train with Adam and evaluate predictions against the Navier PDE.
Define the optimization and run the training iterations for the network, compile the model, save it, fix syntax errors, and wait for results.
Evaluate the results of Navier-Stokes inverse physics-informed neural networks, discussing code corrections, plotting outcomes, fitting with and without pressure, and comparing predictions to real data.
This comprehensive course is designed to equip you with the skills to effectively utilize Inverse Physics-Informed Neural Networks (IPINNs). We will delve into the essential concepts of solving partial differential equations (PDEs) and demonstrate how to compute simulation parameters through the application of Inverse Physics Informed Neural Networks using data generated by solving PDEs with the Finite Difference Method (FDM).
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 Inverse-PINNs using Pytorch.
Write and build Machine Learning Algorithms to solve Inverse-PINNs using DeepXDE.
We will cover:
Pytorch Matrix and Tensors Basics.
Finite Difference Method (FDM) Numerical Solution for 1D Burgers Equation.
Physics-Informed Neural Networks (PINNs) Solution for 1D Burgers Equation.
Total variation diminishing (TVD) Method Solution for 1D Burgers Equation.
Inverse-PINNs Solution for 1D Burgers Equation.
Inverse-PINNs for 2D Navier Stokes Equation using DeepXDE.
If you lack prior experience in Machine Learning or Computational Engineering, please dont worry. as This course is comprehensive and course, providing a thorough understanding of Machine Learning and the essential aspects of partial differential equations PDEs and Inverse Physics Informed Neural Networks IPINNs.
Let's enjoy Learning PINNs together