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,
Pages 9554-9571,
ISSN 0021-9991,

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.

hemalchowdhurym... | Wed, 08/23/2023 - 12:04

Hi Matthew,
I am working on separating magnetic particles from non-magnetic particles in a vibrating screen. I want to simulate the influence of external magnetic field. Can anyone tell me how to add magnetic force command in LIGGGHTS? My simulation will deal with dry non-spherical particles, and I won't use any coupling technique.

dusty_sikka | Fri, 09/22/2023 - 23:23

I had added a new library and worked with it, only to realize it doesn't natively support OpenMPI. Can you elaborate on what you meant by "extra_math" type header files?