|
peclet-dem 1.1.0
Performance-portable XPBD Discrete Element Method (Kokkos + ArborX)
|
Report for the user's choice of the PGS restitution target (docs/contact_physics_followups.md §4, R-C1). Branch restlaw, base dem 77ba917. Newton stays the default; Moreau is sim.diagnostics.set_restitution_target('moreau'). Nothing here changes a default.
The two laws. Both act only on the g ≠ 0 path, which runs the projected Gauss–Seidel. Each closed contact gets a separation-velocity target from its pre-solve normal velocity u⁻.
Below v_rest, and on one-sided contacts, e = 0 under both laws.
The ratio is KE after / KE before, in the centre-of-mass frame. Each case is one converged step (2000 PGS iterations, no adaptive stop) with frictionless spheres. Newton adds energy whenever a pre-separating contact ends up loaded (§4.1). Moreau has a theorem: KE cannot rise when e is uniform.
| scene | contacts | e = 0.5 N / M | e = 0.9 N / M | e = 1.0 N / M |
|---|---|---|---|---|
| model A.4 of the note (numpy) | 670 | 0.743 / 0.664 | 1.204 / 0.915 | 1.364 / 1.0000 |
| pytest scene: A.4 in peclet.dem, v_rest = 2e-4 | 803 | 0.7256 / 0.6627 | 1.1490 / 0.9146 | 1.2979 / 0.99999991 |
| harness cluster_pgs_e (925 spheres), v_rest = 0.2, np 1 | – | 0.7288 / 0.6998 | 1.0274 / 0.9241 | 1.1298 / 1.000126 |
| the same, np 2 / 4 / 8 | – | agrees with np 1 to ≤ 3e-8 | ≤ 3e-8 | ≤ 3e-8 |
| the same on CUDA: np 1 fused device loop, np 2 step_mpi | – | – | 1.02737 / 0.92406 | 1.12978 / 1.000126 |
Kinetic energy over 10 steps in the harness cluster (KE₀ = 3536.7, np 1):
| e | law | step 1 | 2 | 3 | 5 | 10 |
|---|---|---|---|---|---|---|
| 0.5 | N | 2577.5 | 2007.3 | 1680.5 | 1448.9 | 1267.7 |
| 0.5 | M | 2475.1 | 1924.4 | 1607.9 | 1376.9 | 1201.9 |
| 0.9 | N | 3633.5 | 3403.0 | 3199.9 | 3000.6 | 2824.3 |
| 0.9 | M | 3268.1 | 3044.0 | 2855.2 | 2663.6 | 2505.6 |
| 1.0 | N | 3995.7 (+13 %) | 3996.3 | 3996.2 | 3995.7 | 3995.5 |
| 1.0 | M | 3537.1 | 3537.0 | 3536.7 | 3536.0 | 3535.6 |
At e = 1, Newton adds 13 % of the energy in the first step. After that step it neither gains nor loses: once the pre-separating pairs are released, the cluster behaves as if elastic. Moreau stays within 0.03 % of KE₀ over the whole run.
The resting-threshold channel is measured, not only bounded (R-C3). At the harness's dt = 1e-2, v_rest = 0.2, while contact velocities are about 1.5. So some loaded contacts sit below v_rest and are held at e = 0. The e = 1 Moreau step then gains 1.26e-4. That is above G-C1's 1e-5 bound, although the note says no creation was observed in its model. Shrinking v_rest makes the gain vanish:
| dt (so v_rest = 20 dt) | 1e-2 | 3e-3 | 1e-3 | 1e-4 |
|---|---|---|---|---|
| Moreau KE₁/KE₀ − 1, e = 1 | +1.26e-4 | −2.1e-5 | +6.9e-6 | +3e-9 |
| Newton KE₁/KE₀ − 1, e = 1 | +0.130 | +0.126 | +0.107 | +0.115 |
Method: every get_* array read by the tests was hashed at OMP 1 under each law, and the hashes compared.
| observable | Newton | Moreau | change |
|---|---|---|---|
| Dosta silo (100k M1 spheres, large orifice, e = 0.5, CUDA): discharge rate 0.5–2.5 s | 27 913 /s | 28 314 /s | +1.4 % |
| silo: grains discharged in 0–0.5 s | 25 624 | 27 379 | +6.8 % |
| silo: grains left at t = 2 s | 28 389 | 25 836 | −9.0 % |
| Dosta 25k impact (steel ball at 5 m/s into an M1 bed, CUDA): lowest ball displacement | −0.1399 m | −0.1401 m | +0.1 % |
| impact: displacement at t = 0.1 s | −0.1053 m | −0.1124 m | |
| impact: rebound (end − lowest) | 0.0346 m | 0.0277 m | −20 % |
| pytest rotating drum (264 grains, e = 0.1, ω = 0.5): bed tilt, mean ± sd over the last 1000 steps | +38.4 ± 4.8° | +37.4 ± 4.2° | within noise |
| drum: surface speed (mean |v| of the 10 % of grains nearest the axis, same window) | 6.11 ± 1.29 | 5.46 ± 2.38 | within noise |
| drum: static-bed tilt (the fill phase differs) | +1.8° | +2.6° | |
| statics column (1728 grains, e = 0.5, 800 steps): z95 / mean|vz| / max overlap | 7.61 / 0.0042 / 5e-4 | 7.63 / 0.0009 / 3e-4 | comes to rest faster |
| statics pour-collapse (1500 steps): z95 / mean|vz| / zmin | 7.66 / 0.0007 / 0.382 | 7.68 / 0.0005 / 0.431 | |
| Enskog cooling, φ = 0.35, e = 0.8, OMP 1, measured slope / Enskog: g = 0 (one-shot path) | 1.8044 | 1.8044 | bitwise identical |
| cooling, periodic free fall g = 0.01 (PGS path, v_rest = 4e-4) | 1.7827 | 1.8135 | +1.7 % |
| cooling, periodic free fall g = 10 (PGS path, v_rest = 0.4) | 1.8781 | 1.9166 | +2.0 % |
| cooling, T(t = 1)/T₀ at g = 0.01 | 0.3093 | 0.3018 | −2.4 % |
The same cooling gas at OMP 2 scatters by about ±1.3 % in the slope from thread order alone. The +1.7–2.0 % above is at OMP 1, where each run is deterministic, but it is a small effect.
The Dosta harness ~/Codes/dem-bench/peclet/case{1_silo,3_impact}.py still uses the pre-1.0 API. These runs used scratch copies ported to 1.0: initialize_shape, 3-sequence set_gravity, set_dt + step(), and a --rest-target flag. The note expected the 25k rebound to move by less than 2 %. It moved by −20 % on the rebound displacement; the depth of penetration is unchanged.