Basic implementations of Physics Informed Neural Networks (PINN) with PyTorch.
PINN is a machine learning framework that integrates deep neural networks with physical laws or constraints, involving the solution of complex inverse problems and partial differential equations (PDEs). These combine domain knowledge with standard techniques and offer a powerful approach for solving inverse problems, identifying parameters, and predicting physical systems' behavior. These networks are trained on both observed data and governing equations, facilitating accurate predictions while ensuring adherence to underlying physics principles. PINNs find applications across various domains, including fluid dynamics, solid mechanics, and medical imaging, providing a versatile tool for scientific discovery and engineering applications.
I have implemented a PINN on the Burgers' Equation as discussed in the article linked below. I also provided an option to track the losses with using the residual term or not, which can be adjusted by the parameter physics
.
The Burgers' Equation is as follows :
I am also trying to implement the nonlinear Schrodinger Equation, which is as follows :
@article{raissi2017physicsI, title={Physics Informed Deep Learning (Part I): Data-driven Solutions of Nonlinear Partial Differential Equations}, author={Raissi, Maziar and Perdikaris, Paris and Karniadakis, George Em}, journal={arXiv preprint arXiv:1711.10561}, year={2017} }
@article{raissi2017physicsII, title={Physics Informed Deep Learning (Part II): Data-driven Discovery of Nonlinear Partial Differential Equations}, author={Raissi, Maziar and Perdikaris, Paris and Karniadakis, George Em}, journal={arXiv preprint arXiv:1711.10566}, year={2017} }
Also credits to : https://github.com/jayroxis/PINNs/tree/master for forming the baseline for the code.
Major Dependencies:
- PyTorch:
pip install --upgrade torch
Peripheral Dependencies:
- numpy:
pip install numpy
- plotly:
pip install plotly
- matplotlib:
pip install matplotlib
- scipy:
pip install scipy