NVIDIA / modulus

Open-source deep-learning framework for building, training, and fine-tuning deep learning models using state-of-the-art Physics-ML methods
https://developer.nvidia.com/modulus
Apache License 2.0
836 stars 190 forks source link

Added Physics-Informed Magnetohydrodynamics Example #386

Closed fresleven closed 3 months ago

fresleven commented 4 months ago

Modulus Pull Request

Description

Added a physics-informed MHD example and altered the loss function of SWE Nonlinear PINO to have the correct indexing.

Checklist

Dependencies

Uses tensorly, tltorch, plotly, and dedalus. More information on how to install these packages is included in the README in examples/cfd/mhd_pino/

fresleven commented 4 months ago

I also changed the SWE Nonlinear loss function that I previously put since I noticed that there was a slight problem with the indexing last time (it should've gone from [1:-1] for all values since we ignore the boundaries, but there were some values where it went from [0:-2] (i.e. for 2 * nt - 2. Thus, I made it simpler by just indexing at the end.

fresleven commented 4 months ago

Hi, I just wanted to know when you would be able to review my code?

loliverhennigh commented 3 months ago

Hey @fresleven, I have been looking at the code and it looks good but would like to try it out. Do you have a dataset already made you could send? Even if its a smaller subset. I was running into issues installing Dedalus.

fresleven commented 3 months ago

Hi, I just made a google drive with 100 samples: https://drive.google.com/drive/folders/10xeaTHRMLKnkPW5uXXEbBDktPgdQ5qW2?usp=sharing and you need to put it in the correct mhd_pino/mhd_data/simulation_outputs_Re250 directory as well

you may need to change the config files based on how much training/testing files there are, like in lines ~50 you may need to change the num, num_test, and num_train ones

fresleven commented 3 months ago

Also, please let me know what issues you were having with Dedalus and I can try and see to replicate/fix them soon. I was using conda, and that worked for me.

fresleven commented 3 months ago

also, Professor Huerta notified me that the deadline is by 5pm EST today. I know it's quite short, but hopefully could you complete the review by then?

ktangsali commented 3 months ago

/blossom-ci