Hi all. I am analyzing a case with different kinds of forces, e.g., harmonic bond force, sph pair force, external force, viscous force … I want to compare each kind of force exerted on a particle so that I can do some force analysis and know which kind of force has the greatest impact at each timestep. For fix external and fix viscous, the forces can be easily obtained because they are not local forces. However, when it comes to the bond force and pair force, they can only be output in the form of local force (via compute bond/local & compute pair/local). I need extra time to sum the local force during post-processing to get the per-atom bond or pair force. Worse still, SPH pair forces, e.g., sph/taitwater and sph/taitwater/morris, DO NOT SUPPORT compute pair/local. So I wonder whether there is any way to sum the pair force or the bond force for each particle on the fly and output it to the dump file.
The model is not pair-wise additive and thus one cannot implement a meaning for Pair::single() method
The developer that contributed the code didn’t care to implement it, then you could consider implementing it and then setting the single_enable flag in the pair style constructor.
SPH apparently modifies forces based on the local density surrounding each particle – as such, as written*, it is abundantly a many-body force for which pair decomposition doesn’t make sense.
*Presumably any local-density-based force should be re-writeable in terms of sums of terms based on particle-particle distances. But if SPH also uses density gradients, as it seems to, then that is a much harder task. In either case, this isn’t something the LAMMPS developers have capacity to develop.
Thank you @akohlmey@srtee . I will try to implement my PairSPHTaitwaterMorris::single method. I guess PairGranHooke::single can be a good example to follow.