adding new force model | math libraries

Submitted by dusty_sikka on Wed, 07/27/2022 - 22:45

I am trying to add a spherical harmonics solver model (Keaveny and Maxey) for magnetic force calculation between paramagnetic particles in a uniform magnetic field. Currently, I have the solver written in python using many scipy libraries like linear system solver, combination formula, and associated Legendre functions. Is there a simple way to write these in c++ for LIGGGHTS, or can I include some other libraries like Eigen which may help me?

Eric E. Keaveny, Martin R. Maxey,
Modeling the magnetic interactions between paramagnetic beads in magnetorheological fluids,
Journal of Computational Physics,
Volume 227, Issue 22,
2008,
Pages 9554-9571,
ISSN 0021-9991,
https://doi.org/10.1016/j.jcp.2008.07.008.

mschramm | Wed, 08/03/2022 - 22:39

It is possible to add extra libraries but please look into the "extra_math" type header files to see if what you are looking for is already there.
Do you need to have the calculation use all of the particles at the same time, or can you loop through your local atoms and "sum up" the effects?
If the later is fine, then you shouldn't need anything extra and build the function inside a fix command.