modulus icon indicating copy to clipboard operation
modulus copied to clipboard

Fea ext lagrangian MeshGraphNet

Open zongyi-li opened this issue 5 months ago • 1 comments

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.py
  • examples/cfd/lagrangian_mgn/train.py
  • examples/cfd/lagrangian_mgn/inference.py

lagrangian_meshgraphnet

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

zongyi-li avatar Sep 06 '24 18:09 zongyi-li