Learning Neural Constitutive Laws from Motion Observations for Generalizable PDE Dynamics
collision_surface.mp4
@inproceedings{ma2023learning,
title={Learning Neural Constitutive Laws from Motion Observations for Generalizable PDE Dynamics},
author={Ma, Pingchuan and Chen, Peter Yichen and Deng, Bolei and Tenenbaum, Joshua B and Du, Tao and Gan, Chuang and Matusik, Wojciech},
booktitle={International Conference on Machine Learning},
year={2023},
organization={PMLR}
}
This codebase is tested using the environment with the following key packages:
- Ubuntu 20.04
- CUDA 11.7
- GCC 11
- Python 3.10.11
- PyTorch 2.0.1
- Warp 0.6.1
Prepare conda environment with proper Python:
conda create -n nclaw python=3.10 # create env
conda activate nclaw # activate env
Install required packages:
conda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia
conda install numpy scipy pyvista hydra-core trimesh einops tqdm psutil tensorboard -c defaults -c conda-forge
Compile warp
and install nclaw
:
bash ./build.sh
Generate dataset:
python experiments/scripts/dataset/main.py
Train NCLaw:
python experiments/scripts/train/invariant_full_meta-invariant_full_meta.py
Evaluate NCLaw:
# Reconstruction
python experiments/scripts/eval/dataset.py --gt
# Generalization
python experiments/scripts/eval/time.py --gt # (a) time
python experiments/scripts/eval/vel.py --gt # (b) velocity
python experiments/scripts/eval/shape.py --gt # (c) geometry
python experiments/scripts/eval/slope.py # (d) boundary
# Extreme
python experiments/scripts/eval/large.py # (a) one-million
python experiments/scripts/eval/contact.py # (b) collision
# Multi-physics
python experiments/scripts/eval/pool.py # (a) coupled-physics
python experiments/scripts/eval/melting.py # (b) phase-transition