Skip to content

Commit

Permalink
README updates (#86)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Kaustubh Tangsali <[email protected]>
  • Loading branch information
ram-cherukuri and ktangsali authored Nov 18, 2023
1 parent fdfef8e commit 698406c
Show file tree
Hide file tree
Showing 5 changed files with 167 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
<!-- markdownlint-enable -->

Modulus Symbolic (Modulus Sym) provides an abstraction layer for using PDE-based symbolic
loss functions. Additional information can be found in the [Modulus documentation](https://docs.nvidia.com/modulus/index.html#sym).
Modulus Symbolic (Modulus Sym) provides pythonic APIs, algorithms and utilities to be used with Modulus core, to explicitly physics inform the model training. This includes symbolic APIs for PDEs, domain sampling and PDE-based residuals. Please refer to the [DeepONet example](https://github.com/modulus/tree/main/examples/cfd/darcy_deeponet_physics) that illustrates the concept.

It also provides higher level abstraction to compose a training loop from specification of the geometry, PDEs and constraints like boundary conditions using simple symbolic APIs.
Please refer to the [Lid Driven cavity](https://docs.nvidia.com/deeplearning/modulus/modulus-sym/user_guide/basics/lid_driven_cavity_flow.html) that illustrates the concept.
Additional information can be found in the [Modulus documentation](https://docs.nvidia.com/modulus/index.html#sym).

Users of Modulus versions older than 23.05 can refer to the [migration guide](https://docs.nvidia.com/deeplearning/modulus/migration-guide/index.html)
for updating to the latest version.

Expand Down
75 changes: 75 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<!-- markdownlint-disable MD043 -->
# NVIDIA Modulus Sym Examples

## Introduction

This repository provides sample applications demonstrating use of specific Physics-ML
model architectures that are easy to train and deploy. These examples aim to show how
such models can help solve real world problems.

## Introductory

|Use case|Model|Level|Attributes|
| --- | --- | --- | --- |
|Ldc| Fully Connected MLP PINN |Introductory|Steady state, Multi-GPU|
|Anti_derivative| Data and Physics informed DeepONet |Introductory|Steady state, Multi-GPU|
|Darcy Flow| FNO, AFNO, PINO |Introductory|Steady state, Multi-GPU|
|ODE_spring_mass| Fully Connected MLP PINN |Introductory|Steady state, Multi-GPU|
|Surface_pde| Fully Connected MLP PINN |Introductory|Steady state, Multi-GPU|

## Turbulence

|Use case|Model|Level|Attributes|
| --- | --- | --- | --- |
|Taylor_green| Fully Connected MLP PINN | Intermediate |Steady state, Multi-GPU|
|Turbulent_channel| Fourier Feature MLP PINN |Intermediate|Steady state, Multi-GPU|
|Super_resolution| Super Resolution Network, Pix2Pix |Intermediate|Steady state, Multi-GPU|

## Electromagnetics

|Use case|Model|Level|Attributes|
| --- | --- | --- | --- |
|Waveguide| Fourier Feature MLP PINN |Intermediate|Steady state, Multi-GPU|

## Solid Mechanics

|Use case|Model|Level|Attributes|
| --- | --- | --- | --- |
|Plane_displacement| Fully Connected MLP PINN, VPINN |Intermediate|Steady state, Multi-GPU|

## Design Optimization

|Use case|Model|Level|Attributes|
| --- | --- | --- | --- |
|Chip_2D| Fully Connected MLP PINN |Advanced|Steady state, Multi-GPU|
|Three_fin_3D| Fully Connected MLP PINN | Advanced |Steady state, Multi-Node|
|FPGA| Multiple Models (including Fourier Feature MLP PINN, SIRENS, etc.) |Advanced|Steady state, Multi-Node|
|Limerock| Fourier Feature MLP PINN |Advanced|Steady state, Multi-Node|

## Geophyscis

|Use case|Model|Level|Attributes|
| --- | --- | --- | --- |
|Reservoir simulation| FNO, PINO | Advanced | Steady state, Multi-Node|
|Seismic wave| Fully Connected MLP PINN |Intermediate|Steady state, Multi-Node|
|Wave_equation| Fully Connected MLP PINN |Intermediate|Steady state, Multi-Node|

## Healthcare

|Use case|Model|Level|Attributes|
| --- | --- | --- | --- |
|Aneurysm| Fully Connected MLP PINN |Intermediate|Steady state, Multi-Node|


## NVIDIA support

In each of the example READMEs, we indicate the level of support that will be provided.
Some examples are under active development/improvement and might involve rapid changes.
For stable examples, please refer the tagged versions.

## Feedback / Contributions

We're posting these examples on GitHub to better support the community, facilitate
feedback, as well as collect and implement contributions using
[GitHub issues](https://github.com/NVIDIA/modulus-launch/issues) and pull requests.
We welcome all contributions!
26 changes: 26 additions & 0 deletions examples/aneurysm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# PINNs for simulating flow in a complex structure of an aneurysm

This example uses PINNs for emulating flow in an aneurysm taking the specific blood vessel geometry as the input.

## Problem overview
This sample illustrates the features in Modulus Symbolic such as the geometry utilities to train a PINN model for a complex geometry. The trained surrogate PINN can be used to predict the pressure and velocity of blood flow inside the aneursym. You can get more details on this sample from the [documentation](https://docs.nvidia.com/deeplearning/modulus/modulus-sym-v110/user_guide/intermediate/adding_stl_files.html). This sample can be extended to incroporate parameterized geometry using CCSG instead of STL to leverage the surrogate model to provide patient specific geometry. You can refer to the documentaion [here](https://docs.nvidia.com/deeplearning/modulus/modulus-sym/user_guide/advanced/parametrized_simulations.html#creating-nodes-and-architecture-for-parameterized-problems) for more details.

## Dataset

This example does not require any dataset as it solves of the Navier Stokes flow using the equations, the physical geometry and the boundary conditions.

## Model overview and architecture

We use a simple fully connected MLP to approximate the solution of the Navier-Stokes equations for the given boundary conditions. The neural network will have two inputs x,y and three outputs u, v, p.

## Getting Started

To get started, simply run

```bash
python aneurysm.py
```

## References

- [Modulus Documentation](https://docs.nvidia.com/deeplearning/modulus/modulus-sym-v110/user_guide/intermediate/adding_stl_files.html)
27 changes: 27 additions & 0 deletions examples/seismic_wave/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# PINNs for simulating 2D seismic wave propagation

This example uses PINNs for emulating 2D time-dependent seismic wave propagation using a simple domain geometry.

## Problem overview
This sample illustrates how to solve the acoustic wave equation
You can get more details on this sample from the [documentation](https://docs.nvidia.com/deeplearning/modulus/modulus-sym-v110/user_guide/foundational/2d_wave_equation.html)

## Dataset

This example does not require any dataset as it solves of the acoustic wave equation, the physical geometry and the boundary conditions.

## Model overview and architecture

We use a simple fully connected MLP to approximate the solution of the 2D time-dependent wave equation for the given boundary conditions. The neural network will have x, y and t inputs and u, c (pressure response and velocity) and outputs .

## Getting Started

To get started, simply run

```bash
python wave_2d.py
```

## References

- [Modulus Documentation](https://docs.nvidia.com/deeplearning/modulus/modulus-sym-v110/user_guide/foundational/2d_wave_equation.html)
33 changes: 33 additions & 0 deletions examples/three_fin_3d/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# PINNs as parameterized surrogate model for Heat Sink design optimization

This example uses PINNs to create a parameterized surrogate model that can be used to explore the design space of certain design parameters to identify an optimal design.

## Problem overview
This sample illustrates the capabilities in Modulus Sym to specify a paramterized geometry of a 3-fin heat sink whose fin height, fin thickness, and fin length are variable. It illustrates use of the CSG module to construct a parameterized geometry and then to use the trained surrogate to explore the design space for a range of values of the fin height, fin thickness, and fin length.
You can get more details on this sample from the [documentation](https://docs.nvidia.com/deeplearning/modulus/modulus-sym-v110/user_guide/advanced/parametrized_simulations.html)

## Dataset

This example does not require any dataset as it solves of the Navier Stokes flow using the equations, the physical geometry and the boundary conditions.

## Model overview and architecture

This is a multi-physics problem where we have to emulate both the flow and heat tranfer. This example has three neural networks - one for emulating the flow governed by the Navier-Stokes equations, one for heat transfer in the fluid for Advection diffusion and one for heat transfer in the solid due to diffusion. We use a simple fully connected MLP for all three networks.

## Getting Started

To train, simply run

```bash
python three_fin_flow.py
python three_fin_thermal.py
```
To infer in a design exploration loop

```bash
python three_fin_design.py
```

## References

- [Modulus Documentation](https://docs.nvidia.com/deeplearning/modulus/modulus-sym/user_guide/advanced/parametrized_simulations.html)

0 comments on commit 698406c

Please sign in to comment.