|
peclet-dem 0.4.0
Performance-portable XPBD Discrete Element Method (Kokkos + ArborX)
|
Soft-sphere Hertz–Mindlin DEM (reference force model) for SPHERES. More...
#include <Kokkos_Core.hpp>#include <Kokkos_Sort.hpp>#include "contact_preprocessing.hpp"#include "narrowphase.hpp"#include "particles.hpp"Go to the source code of this file.
Namespaces | |
| namespace | peclet |
| namespace | peclet::dem |
Functions | |
| void | peclet::dem::hertzPairEMu (int matA, int matB, PairTableView pairTable, float eGlobal, float muGlobal, float &e, float &mu) |
| Pairwise (e, mu) lookup shared with the narrowphase convention: pair table if present, global fallback otherwise. | |
| float | peclet::dem::hertzBetaD (float e) |
| Restitution -> damping ratio beta_d = ln e / sqrt(ln^2 e + pi^2) (e in (0, 1]; e <= 0 -> -1, the critically-damped limit used by LIGGGHTS for e -> 0). | |
| F3 | peclet::dem::hertzForce (float delta, F3 nhat, F3 vrel, float rStar, float mStar, float eStar, float gStar, float e, float mu, float dt, F3 &xi) |
| One Hertz–Mindlin force evaluation for a sphere-sphere or sphere-wall contact. | |
| void | peclet::dem::hertzPairForcesKokkos (Kokkos::View< const int *[2], CpMem > pairs, int numPairs, Kokkos::View< const float *[3], CpMem > pos, Kokkos::View< const float *[3], CpMem > vel, Kokkos::View< const float *[3], CpMem > angVel, Kokkos::View< const float *, CpMem > rad, Kokkos::View< const float *, CpMem > invMass, MatIdView matId, PairTableView pairTable, float eGlobal, float muGlobal, Kokkos::View< const float *, CpMem > hertzE, Kokkos::View< const float *, CpMem > hertzNu, float dt, Kokkos::View< float *[3], CpMem > xi, Kokkos::View< float *[3], CpMem > force, Kokkos::View< float *[3], CpMem > torque) |
| Cached-pair forces: overlap from current positions; history resets when a cached pair is currently separated. | |
| void | peclet::dem::hertzWallForcesKokkos (Kokkos::View< const int *, CpMem > candSlots, int numCand, Kokkos::View< const WallSdf *, CpMem > walls, GridView wallGrid, Kokkos::View< const float *[3], CpMem > pos, Kokkos::View< const float *[3], CpMem > vel, Kokkos::View< const float *[3], CpMem > angVel, Kokkos::View< const float *, CpMem > rad, Kokkos::View< const float *, CpMem > invMass, MatIdView matId, PairTableView pairTable, float eGlobal, float muGlobal, Kokkos::View< const float *, CpMem > hertzE, Kokkos::View< const float *, CpMem > hertzNu, float dt, Kokkos::View< float *[3], CpMem > xiWall, int maxWalls, Kokkos::View< float *[3], CpMem > force, Kokkos::View< float *[3], CpMem > torque, Kokkos::View< const float *[4], CpMem > quat={}, Kokkos::View< const float *, CpMem > scale={}, ScalarI shapeId={}, Kokkos::View< const ShapeDesc *, CpMem > shapes={}, ShellView shell={}, float globalScale=1.0f, float contactRadiusFrac=0.5f, bool hasShapes=false, Kokkos::View< float *, CpMem > snWall={}) |
| SDF-wall forces (per particle x wall). | |
| int | peclet::dem::hertzBuildWallCandidatesKokkos (int numReal, int numWalls, Kokkos::View< const WallSdf *, CpMem > walls, GridView wallGrid, Kokkos::View< const float *[3], CpMem > pos, Kokkos::View< const float *, CpMem > rad, float skin, Kokkos::View< int *, CpMem > outSlots, Kokkos::View< int, CpMem > outCount) |
| Build the wall candidate list: particles within (radius + skin) of any wall's zero level. | |
| void | peclet::dem::hertzIntegrateKokkos (int numReal, Kokkos::View< float *[3], CpMem > force, Kokkos::View< float *[3], CpMem > torque, Kokkos::View< const float *, CpMem > invMass, Kokkos::View< const float *[3], CpMem > invInertia, F3 gravity, float dt, Kokkos::View< float *[3], CpMem > vel, Kokkos::View< float *[3], CpMem > angVel, Kokkos::View< float *[3], CpMem > pos, Kokkos::View< float *[4], CpMem > quat={}, bool integrateOrientation=false) |
| Symplectic-Euler kick-drift (MUSEN-style) + displacement tracking for the Verlet rebuild. | |
| float | peclet::dem::hertzMaxDisp2Kokkos (int numReal, Kokkos::View< const float *[3], CpMem > pos, Kokkos::View< const float *[3], CpMem > refPos) |
| Max squared displacement since the last pair build (called only at rebuild checks – keeping this out of the integrate kernel avoids a per-step single-address atomic). | |
| void | peclet::dem::hertzShapePairForcesKokkos (Kokkos::View< const int *[2], CpMem > pairs, int numPairs, Kokkos::View< const float *[3], CpMem > pos, Kokkos::View< const float *[4], CpMem > quat, Kokkos::View< const float *[3], CpMem > vel, Kokkos::View< const float *[3], CpMem > angVel, Kokkos::View< const float *, CpMem > scale, ScalarI shapeId, Kokkos::View< const ShapeDesc *, CpMem > shapes, ShellView shell, GridView sdfGrid, float globalScale, float contactRadiusFrac, Kokkos::View< const float *, CpMem > invMass, MatIdView matId, PairTableView pairTable, float eGlobal, float muGlobal, Kokkos::View< const float *, CpMem > hertzE, Kokkos::View< const float *, CpMem > hertzNu, float dt, Kokkos::View< float *[3], CpMem > xi, Kokkos::View< float *, CpMem > snPrev, Kokkos::View< float *[3], CpMem > force, Kokkos::View< float *[3], CpMem > torque) |
| Non-spherical pairs: per-point Hertz springs over A's point shell against B's SDF (the same one-sided sampling convention as the narrowphase), ONE Mindlin patch history per pair. | |
Soft-sphere Hertz–Mindlin DEM (reference force model) for SPHERES.
The benchmark contact model of Dosta et al. (2024): viscoelastic Hertz normal force with restitution-matched damping + "no-slip" Mindlin tangential spring with history, Coulomb-clamped (LIGGGHTS gran model hertz tangential history formulas). This is an explicit force model — time step limited by the Rayleigh time — living beside the impulse (XPBD/NSCD) solver as a physics reference and cross-check. Spheres only, non-periodic domains, SDF walls (no planes).
Structure: a cached Verlet pair list (broadphase margin = skin, rebuilt when any particle has moved skin/2) carries the per-pair tangential history xi through its slots; on rebuild the history is carried over by pair key. Wall contacts are evaluated per particle per wall each step with per-(particle, wall) history. The inner time loop runs device-side per call.
Definition in file solver_hertz.hpp.