Views
No views yet
| Property | Value |
|---|---|
| Architecture | Edge-conditioned GNN with residual message passing |
| Node features | [is_fluid, is_solid, is_wall, is_piston, vx, vy] (6 channels) |
| Edge features | [Δx, Δy, Δz, ‖r‖] (4 channels) — relative positions + distance |
| Output heads | Displacement (dx, dy, dz) + Velocity (vx, vy) |
| Particle types | 1 = fluid, 2 = solid, 3 = wall, 4 = piston |
| Neighbour radius | 0.003 (with periodic BC in x) |
| Domain | x ∈ [−0.1, 0.1], y ∈ [−0.08, 0.13] |
1import torch
2from model import SimpleGnnPredictor, load_checkpoint
3
4model, hparams = load_checkpoint("model.pt")
5
6# Build a torch_geometric Data object for your particle state
7# (see inference.py for a complete example)
8displacement, velocity = model(data)
9next_pos = current_pos + displacementinference.py for a self-contained single-step and multi-step rollout example.1{
2 "model_state_dict": OrderedDict, # model weights
3 "model_hparams": {
4 "in_channels": 6,
5 "hidden_channels": int, # e.g. 64 or 128
6 "edge_channels": 4,
7 "num_layers": int, # e.g. 2 or 3
8 },
9}@software{sph_gnn_2025,
title = {SPH Particle Dynamics GNN},
url = {https://huggingface.co/YOUR_USERNAME/sph-particle-gnn},
year = {2025},
}