lululxvi / deepxde

A library for scientific machine learning and physics-informed learning
https://deepxde.readthedocs.io
GNU Lesser General Public License v2.1
2.55k stars 725 forks source link

How could I reproduce the Burgers equation's data? #600

Open ZirconWu opened 2 years ago

ZirconWu commented 2 years ago

Dear professor, I'd like to ask how could I reproduce the Burgers equation's data in the "\examples\ dataset \ Buegers.npz" document? Because I have a try to use the expression of One-soliton solution to got the same data. But it is not success. And I saw that both positive and negative numbers in the data. I hope to get an answer, thank you.

praksharma commented 2 years ago

https://github.com/lululxvi/deepxde/blob/master/examples/dataset/Burgers.npz

ZirconWu commented 2 years ago

Thank you for your reply. I had gain those data in the link before. But I want to reproduce the same data using Matlab or Python. It made me puzzled.

praksharma commented 2 years ago

sorry. Didn't read your question carefully. There are multiple ways to simulate the Burgers equation in Python or Matlab.If you want to use software without going into detail use OpenFOAM. By the way, you can find lots of Python code here on Github. Have a look at this manual. They have a python code for you to play with.

http://www.thevisualroom.com/burgers_equation.html

Once you have the simulation results use numpy.savez() to create a npz file.

praksharma commented 2 years ago

Just to elaborate, you could possibly use finite difference, finite elements, finite volumes, lattice Boltzmann etc. The easiest would be using finite difference. However, It would be much easier to run a code that is already available.

For MATLAB codes, I would suggest you try MATLAB central. For Python codes, Github is the best place I guess.