Learning Neural Constitutive Laws from Motion Observations for Generalizable PDE Dynamics
https://github.com/PingchuanMa/NCLaw/assets/16499005/e1fed91f-da58-4a79-a130-5ccd054091fa
@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:
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
https://github.com/PingchuanMa/NCLaw/assets/16499005/4860bce0-8d20-4641-9052-ea7430361bca
https://github.com/PingchuanMa/NCLaw/assets/16499005/7ea44615-564a-4fa1-bfd8-0ce5cfdecc31
https://github.com/PingchuanMa/NCLaw/assets/16499005/e1fed91f-da58-4a79-a130-5ccd054091fa
https://github.com/PingchuanMa/NCLaw/assets/16499005/37917f41-522c-4b3b-a845-cb2055b78c92