This repository provides basic PINNs to solve continuous time models without reference data for model training. That is, this approach does not use any observation data except for initial and boundary condition data.
- This repository provides easy codes for educational purposes.
- The purpose of the repository is to set a baseline using Pytorch for our PINN project.
- Our model and the reference are not exactly the same.
[Reference] M.Raissi, P.Perdikaris, G.E.Karniadakis (2019) Physics-informed neural networks - A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations, Journal of Computational Physics Vol 378 (2019) pages 686–707, https://doi.org/10.1016/j.jcp.2018.10.045
Use the pinns.ipynb file
num_t = 100 # the number of t-grids
num_x = 256 # the number of x-grids
num_epochs = 200000 # the number of epochs
num_hidden = 4 # the number of hidden layers
num_nodes = 128 # the number of nodes in each hidden layer
lr = 1e-3 # a learning rate
eq='bg' #'bg': Burgers' equation, 'ac': Allen-Cahn equation
L2 relative error, a training loss graph, and two result figures