novaphy.BoundaryParticle¶
Akinci boundary particle entry. Boundary particles sample rigid-body surfaces and contribute to fluid density estimation, enabling two-way rigid-fluid coupling without requiring solid SDFs.
Attributes¶
| Attribute | Description |
|---|---|
local_position |
Position in the body-local frame [m]. |
body_index |
Owning rigid body index. -1 denotes a world-owned boundary (e.g. ground plane). |
world_index |
Boundary world index. -1 denotes the global boundary set. |
volume |
Akinci volume ψ used as density contribution weight. |
Example¶
import novaphy
bp = novaphy.sample_model_boundaries(model, spacing=0.05)
print(len(bp), "boundary particles sampled")
# Boundary particles owned by body 0
body0_bp = [p for p in bp if p.body_index == 0]
Notes¶
- Boundary particles are typically produced by sample_model_boundaries, then ingested by SolverPBF.initialize_state.
- World-owned boundaries (
body_index == -1) move with the world frame — use them for static walls / planes.