Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fea ext lagrangian MeshGraphNet #667

Merged
merged 16 commits into from
Nov 6, 2024

Conversation

zongyi-li
Copy link
Contributor

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

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • 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

@michaltakac
Copy link

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!

@zongyi-li
Copy link
Contributor Author

Thanks for the comments! I have just addressed them and added a unit test test/datapipes/test_lagrangian.py. Please take a look!

@mnabian
Copy link
Collaborator

mnabian commented Nov 4, 2024

/blossom-ci

@mnabian
Copy link
Collaborator

mnabian commented Nov 5, 2024

/blossom-ci

@mnabian
Copy link
Collaborator

mnabian commented Nov 5, 2024

/blossom-ci

1 similar comment
@mnabian
Copy link
Collaborator

mnabian commented Nov 5, 2024

/blossom-ci

@mnabian
Copy link
Collaborator

mnabian commented Nov 5, 2024

/blossom-ci

@zongyi-li
Copy link
Contributor Author

/blossom-ci

@mnabian
Copy link
Collaborator

mnabian commented Nov 6, 2024

/blossom-ci

@mnabian
Copy link
Collaborator

mnabian commented Nov 6, 2024

/blossom-ci

@mnabian mnabian self-requested a review November 6, 2024 02:00
Copy link
Collaborator

@mnabian mnabian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mnabian mnabian merged commit da40b3f into NVIDIA:main Nov 6, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants