Hertzian contact condition for irregular polygons?

Hello everyone, I am trying to simulate an ensemble of arbitrarily shaped polygonal structures in 2D and obtain the forces form when they make contact with each other under applied external shear. I tried defining my structures using the body rounded/polygon atom style. However, it seems like the pair_style for this atom style can only be a linear Hookean contact, but I would like to simulate Hertzian contact. Is there some way to do this, or advice? Thanks.

You have to write your own pair style in C++ that implements your alternate model. 3. Modifying & extending LAMMPS — LAMMPS documentation

Thanks for your prompt advice! Would this also be the way to compute/dump forces for bodies, as I only see an option to do that for atoms? Thanks again!

No special compute needed. You can use the functionality for atoms, as each body is managed as an “atom”. The individual constituent particles are only processed inside the pair style and then looked up by their body index.

Thanks, this is very helpful! I’ll see what I can do.