GithubHelp home page GithubHelp logo

pinns's Introduction

PINNs (Physics-informed Neural Networks)


This is a simple implementation of the Physics-informed Neural Networks (PINNs) using PyTorch and Tensorflow.


Attribute

Original Work: Maziar Raissi, Paris Perdikaris, and George Em Karniadakis

Github Repo : https://github.com/maziarraissi/PINNs

Link: https://github.com/maziarraissi/PINNs/tree/master/appendix/continuous_time_identification%20(Burgers)

@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} }


Dependencies

Major Dependencies:

  • Tensorflow (for Tensorflow Implementation): pip install --upgrade tensorflow
  • PyTorch (for PyTorch Implementation): ```pip install --upgrade torch``
  • Jupyter Notebook/Lab: pip install jupyterlab (JupyterLab) or pip install notebook

Peripheral Dependencies:

  • numpy: pip install numpy
  • seaborn: pip install seaborn
  • matplotlib: pip install matplotlib
  • pyDOE (for Tensorflow Implementation): pip install pyDOE

pinns's People

Contributors

jayroxis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pinns's Issues

Burgers inference discrete time

Hi @jayroxis and thank you very much for this useful repository, really appreciated.

I was wondering if by any chance your pytorch implementation for the Burgers Equation inference solution, "time discrete" approach was also available and open to public?

Thank you again!

PS: sorry for asking this in an issue, I could not find your email.

Data Creating Method

Hey Jay,

Thanks so much for creating this repository. It is quite helpful. I was wondering how you created the "burgers_shock.mat" data? Is this data computed by analytically solving the Burgers equation? Would it be possible to have the code you used to generate that?

Best,
-Amir

Unable to visualize data in test code

Screen Shot 2021-10-18 at 4 11 53 PM

I am currently trying out the Burgers Identification (PyTorch) code, however, It was able to train, but I cannot visualize the result. Any suggestionn on how to fix it? Thanks

OMP: Error in the file named "Burgers Inference (PyTorch).ipynb"

when i run file "Burgers Inference (PyTorch).ipynb" error_u = np.linalg.norm(u_star-u_pred,2)/np.linalg.norm(u_star,2) in the folder “continuous_time_inference (Burgers)”, An error occurred that

OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://www.intel.com/software/products/support/.

Coefficient (0.01 / math.pi) without parentheses

class Net:
    ...
    def loss_func(self):
        ...
        loss_pde = self.criterion(du_dt + u.squeeze() * du_dx, 0.01 / math.pi * du_dxx)
        ...
        return loss

Here the code of loss_pde = self.criterion(du_dt + u.squeeze() * du_dx, 0.01 / math.pi * du_dxx) of coefficient 0.01 / math.pi need to be (0.01 / math.pi) , and the code will be loss_pde = self.criterion(du_dt + u.squeeze() * du_dx, (0.01 / math.pi) * du_dxx).
Then the result will change. It's so amazing.

why two optimizers are needed during the training?

Hello, thanks a lot for your hard work and your sharing.
I would like to ask why two optimizers are needed during the training.
self.optimizer.step(self.loss_func)
self.optimizer_Adam.step()

Thank you so much in advance for your answers.

Error issue

The L2 test error in the original PINN text is 6.7e-4, but training with the pytorch version yields results of 1e-3~3e-3. What is the reason for this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.