Fea ext lagrangian MeshGraphNet
Modulus Pull Request for Lagrangian MeshGraphNet
Description
We implemented Meshgraphnet for particle-based simulation on the water dataset based on https://github.com/google-deepmind/deepmind-research/tree/master/learning_to_simulate in PyTorch. It demonstrates how to train a Graph Neural Network (GNN) for evaluation of the Lagrangian fluid.
In this project, we provide an example of Lagrangian mesh simulation for fluids. The Lagrangian mesh is particle-based, where vertices represent fluid particles and edges represent their interactions. Compared to an Eulerian mesh, where the mesh grid is fixed, a Lagrangian mesh is more flexible since it does not require tessellating the domain or aligning with boundaries.
As a result, Lagrangian meshes are well-suited for representing complex geometries and free-boundary problems, such as water splashes and object collisions. However, a drawback of the Lagrangian mesh is that it typically requires smaller time steps to maintain physically valid simulations.
The main code consists of dataloader, train, and inference
modulus/datapipes/gnn/lagrangian_dataset.pyexamples/cfd/lagrangian_mgn/train.pyexamples/cfd/lagrangian_mgn/inference.py
Checklist
- [x] I am familiar with the Contributing Guidelines.
- [x] New or existing tests cover these changes.
- [x] The documentation is up to date with these changes.
- [ ] The CHANGELOG.md is up to date with these changes.
- [ ] An issue is linked to this pull request.
Dependencies
- tensorflow to load the datasets
This is really great! Was thinking that it would make sense to also have an example for lagrangian GNN based on DeepMind's paper... Great work!
Thanks for the comments! I have just addressed them and added a unit test test/datapipes/test_lagrangian.py. Please take a look!
/blossom-ci
/blossom-ci
/blossom-ci
/blossom-ci
/blossom-ci
/blossom-ci
/blossom-ci
/blossom-ci