Project information
- Category: Simulation
- Model: Particle Collision - Spring-Mass Model, Data Structures
- Project date: 27 April, 2022
Fluid Simulation with Spring-Mass Particle Collision Model
Particle collision implementing spring-mass model.
Spring Hooke's Law:
\[F_k=k_s(L-L_0)\]
where:
\(k_s:\) Spring strength constant factor
\(L-L_0:\) Rest length
In spring-mass collision model, rest length is the addition of the radius of both particles \(L_0=r_1+r_2\).
If \(L > L_0\) the spring does not make force, otherwise if \(L \le L_0\) spring acts making particles be repelled.
For saving computing time, data structures are used where particle collision is only calculated within neighbor particles, defined by cells in a "Grid" or "HashTable" structure. Otherwise, particle collision computational cost has a \(n^2\) order.