1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//! DEM granular contact models: Hertz normal, Mindlin tangential, and rotational dynamics.
pub use GranularTempPlugin;
pub use HertzNormalForcePlugin;
pub use RotationalDynamicsPlugin;
pub use MindlinTangentialForcePlugin;
use *;
use DemAtomPlugin;
use DemAtomInsertPlugin;
pub use HertzMindlinContactPlugin;
/// √(5/3) — viscoelastic damping coefficient
pub const SQRT_5_3: f64 = 0.9128709291752768;
/// Epsilon to avoid division by zero in tangential force
pub const TANGENTIAL_EPSILON: f64 = 1e-30;
/// Large overlap warning threshold (ratio of distance to sum of radii)
pub const LARGE_OVERLAP_WARN_THRESHOLD: f64 = 0.90;
/// Max overlap warnings per step before panic
pub const MAX_OVERLAP_WARNINGS: usize = 100;
/// Default DEM granular physics plugin group.
///
/// Includes, in registration order:
/// - [`DemAtomPlugin`] — per-atom material properties (radius, density) and
/// `MaterialTable` for per-material Young's modulus, Poisson ratio, restitution,
/// friction with geometric-mean mixing
/// - [`DemAtomInsertPlugin`] — random particle insertion from `[[particles.insert]]` config
/// - [`HertzNormalForcePlugin`] — Hertz elastic contact + viscoelastic normal damping
/// - [`MindlinTangentialForcePlugin`] — Mindlin spring-history tangential force with
/// Coulomb friction cap and torque accumulation; ordered after Hertz via `.after("hertz_normal")`
/// - [`RotationalDynamicsPlugin`] — quaternion Velocity Verlet for angular degrees of freedom
/// (I = 2/5 m r² for solid spheres)
/// - [`GranularTempPlugin`] — granular temperature output to file
///
/// Does **not** include infrastructure plugins (input, comm, domain, neighbor,
/// run, verlet, print). Use [`CorePlugins`] to get all infrastructure.
///
/// # Usage
/// ```rust,ignore
/// use mddem::prelude::*;
///
/// let mut app = App::new();
/// app.add_plugins(CorePlugins).add_plugins(GranularDefaultPlugins);
/// app.start();
/// ```
;