How ai4science-westlakeu/diffphycon works
DiffPhyCon is a generative-model approach to controlling physical systems: users train models on simulated trajectories, then run inference to find control sequences that satisfy objectives. Its documented tasks are 1D Burgers, 2D jellyfish, and 2D smoke; jellyfish and smoke also use surrogate simulation components, while the repository includes RL baseline implementations. Edges are limited to relationships documented in the README or visible in the supplied source index and excerpts; unsampled internals are represented only where the tree or README supports them.
Main entry points: inference_2d_jellyfish.py Jellyfish Inference · inference_2d_smoke.py Smoke Inference · evaluate_solver.py Solver Evaluation · main.py BC Smoke Runner
Components 23
Data and Simulation
- Burgers Data
dataset/apps/generate_burgers.py - Jellyfish Data
dataset/data_2d.py - Smoke Data
dataset/apps/a_gen_dataset_128.py - Solver Evaluation
dataset/apps/evaluate_solver.py
Generative Models
- Burgers Training
train/train_1d_burgers.py - Burgers Diffusion
diffusion/diffusion_1d_burgers.py - Jellyfish Diffusion
diffusion/diffusion_2d_jellyfish.py - Smoke Diffusion
diffusion/diffusion_2d_smoke.py - Video Diffusion Network
model/video_diffusion_pytorch/video_diffusion_pytorch_conv3d.py
Control and Baselines
- Burgers Inference
inference/inference_1d_burgers.py - Jellyfish Inference
inference/inference_2d_jellyfish.py - Smoke Inference
inference/inference_2d_smoke.py - Surrogate Pipeline
inference/sim_ppl_2d.py - BC Smoke Runner
baselines/BC_smoke/main.py - BC PPO Learner
baselines/BC_smoke/bppo.py - Value and Q Learners
baselines/BC_smoke/critic.py - Replay Buffers
baselines/BC_smoke/buffer.py - Replay Memory
baselines/BC_smoke/scripts/replay_memory.py
Physics Runtime
- Fluid Simulation
phi/flow.py - Fluid Data Format
phi/fluidformat.py - Grid Mathematics
phi/math/nd.py - Sparse Solver
phi/solver/sparse.py
Other components
- Researcher
Connections 33
- Researcher → Burgers Data: generates data
README.md - Researcher → Jellyfish Data: uses datasets
README.md - Researcher → Smoke Data: generates data
README.md - Researcher → Burgers Training: trains model
README.md - Researcher → Jellyfish Diffusion: trains model
README.md - Researcher → Smoke Diffusion: trains model
README.md - Researcher → Burgers Inference: runs control
README.md - Researcher → Jellyfish Inference: runs control
README.md - Researcher → Smoke Inference: runs control
README.md - Burgers Training → Burgers Diffusion: trains
train/train_1d_burgers.py - Burgers Training → Video Diffusion Network: uses network
train/train_1d_burgers.py - Burgers Inference → Burgers Diffusion: loads model
inference/inference_1d_burgers.py - Burgers Inference → Burgers Data: uses data generator
inference/inference_1d_burgers.py - Jellyfish Inference → Jellyfish Data: loads data
inference/inference_2d_jellyfish.py - Jellyfish Inference → Jellyfish Diffusion: loads model
inference/inference_2d_jellyfish.py - Jellyfish Inference → Video Diffusion Network: uses network
inference/inference_2d_jellyfish.py - Jellyfish Inference → Surrogate Pipeline: runs simulator
inference/inference_2d_jellyfish.py - Smoke Inference → Jellyfish Data: loads dataset
inference/inference_2d_smoke.py - Smoke Inference → Smoke Diffusion: loads model
inference/inference_2d_smoke.py - Smoke Inference → Video Diffusion Network: uses network
inference/inference_2d_smoke.py - Smoke Inference → Solver Evaluation: evaluates solver
inference/inference_2d_smoke.py - Smoke Data → Solver Evaluation: evaluates output
dataset/apps/a_gen_dataset_128.py - Solver Evaluation → Fluid Data Format: uses format
dataset/apps/evaluate_solver.py - Solver Evaluation → Fluid Simulation: uses simulation
dataset/apps/evaluate_solver.py - Fluid Simulation → Grid Mathematics: uses grid math
phi/flow.py - Fluid Simulation → Sparse Solver: uses solver
phi/flow.py - Grid Mathematics → Sparse Solver: supports solve
phi/solver/sparse.py - Surrogate Pipeline → Jellyfish Inference: serves inference
inference/inference_2d_jellyfish.py - BC Smoke Runner → BC PPO Learner: trains policy
baselines/BC_smoke/main.py - BC Smoke Runner → Replay Buffers: uses buffer
baselines/BC_smoke/main.py - BC Smoke Runner → Replay Memory: uses memory
baselines/BC_smoke/main.py - BC PPO Learner → Replay Buffers: samples batches
baselines/BC_smoke/bppo.py - Value and Q Learners → Replay Buffers: samples batches
baselines/BC_smoke/critic.py