Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
dirt_granular
Granular contact physics for DIRT: Hertz/Hooke normal contact, Mindlin tangential friction, rolling and twisting resistance, adhesion, rotational dynamics, and granular temperature output.
What it does
Core DEM physics for spherical particle simulations:
- Normal contact: Hertz (nonlinear
F_n ∝ δ^1.5, default) or Hooke (linearF_n ∝ δ), with viscoelastic damping - Tangential friction: Mindlin spring-history with Coulomb cap and viscous damping; per-contact spring rotated into the tangent plane each step
- Rolling resistance: constant torque (default) or SDS spring-dashpot-slider
- Twisting friction: constant torque (default) or SDS
- Adhesion / cohesion: JKR (extended range), DMT (contact-only), or SJKR area-based cohesion
- Rotational dynamics: quaternion velocity Verlet (
I = 2/5 m r²for solid spheres) - Output: granular temperature (velocity fluctuation) time series
Overlap is guarded: pairs exceeding LARGE_OVERLAP_WARN_THRESHOLD warn (forces still computed, capped), and more than MAX_OVERLAP_WARNINGS per step aborts with an actionable message.
Key types
| Item | Role |
|---|---|
GranularDefaultPlugins |
Default DEM granular plugin group (contact + rotation + insertion + temp) |
HertzMindlinContactPlugin |
Fused normal + tangential contact (primary code path) |
RotationalDynamicsPlugin |
Quaternion velocity Verlet for angular DOF |
GranularTempPlugin |
Granular temperature file output |
Modules: contact (fused Hertz–Mindlin + Hooke), tangential (ContactHistoryStore), rotational, granular_temp.
TOML configuration
[[]]
= "glass"
= 8.7e9 # Pa
= 0.3
= 0.95 # coeff. of restitution (0–1)
= 0.4 # sliding friction μ
= 0.1 # rolling friction μ_r
= 0.0 # J/m² (SJKR, 0 = disabled)
= 0.0 # J/m² (JKR/DMT, 0 = disabled)
[]
= "hertz" # "hertz" (default) or "hooke"
= "jkr" # "jkr" (default) or "dmt"
= "constant" # "constant" (default) or "sds"
= "constant" # "constant" (default) or "sds"
Usage
use *;
let mut app = new;
app.add_plugins.add_plugins;
app.start;
GranularDefaultPlugins adds per-atom material properties, particle insertion, velocity Verlet, Hertz–Mindlin contact, rotational dynamics, and granular temperature output. It does not include infrastructure plugins; pair it with CorePlugins for input, comm, domain, neighbor, run, and print.
Part of the DIRT workspace.
License
MIT OR Apache-2.0