jaxdem.forces.spring#
Linear spring force model.
Classes
|
A ForceModel implementation for a linear spring-like interaction between particles. |
- class jaxdem.forces.spring.SpringForce(required_material_properties: Tuple[str, ...] = ('young_eff',), laws: Tuple[ForceModel, ...] = ())[source]#
Bases:
ForceModel
A ForceModel implementation for a linear spring-like interaction between particles.
Notes
The ‘effective Young’s modulus’ (\(k_{eff,\; ij}\)) is retrieved from the
jaxdem.System.mat_table
based on the material IDs of the interacting particles.The force is zero if \(i == j\).
A small epsilon is added to the squared distance (\(r^2\)) before taking the square root to prevent division by zero or NaN issues when particles are perfectly co-located.
The penetration \(\delta\) (overlap) between two particles \(i\) and \(j\) is:
\[\delta = (R_i + R_j) - r\]where \(R_i\) and \(R_j\) are the radii of particles \(i\) and \(j\) respectively, and \(r = ||r_{ij}||\) is the distance between their centers.
The scalar overlap \(s\) is defined as:
\[s = \max \left(0, \frac{R_i + R_j}{r} - 1 \right)\]The force \(F_{ij}\) acting on particle \(i\) due to particle \(j\) is:
\[F_{ij} = k_{eff,\; ij} s r_{ij}\]The potential energy \(E_{ij}\) of the interaction is:
\[E_{ij} = \frac{1}{2} k_{eff,\; ij} s^2\]where \(k_{eff,\; ij}\) is the effective Young’s modulus for the particle pair.
- static force(i: int, j: int, state: State, system: System) jax.Array [source][source]#
Compute linear spring-like interaction force acting on particle \(i\) due to particle \(j\).
Returns zero when \(i = j\).
- static energy(i: int, j: int, state: State, system: System) jax.Array [source][source]#
Compute linear spring-like interaction potential energy between particle \(i\) and particle \(j\).
Returns zero when \(i = j\).
- Parameters:
- Returns:
Scalar JAX array representing the potential energy of the interaction between particles \(i\) and \(j\).
- Return type:
jax.Array