There was this:
That’s with point charges though (so radially symmetric). In the paper linked near the start of this thread it looks like they use these in Kangaroo with a positive and negative charge linked with a Length goal to model a dipole. When the magnets are small relative to the distances between them I guess that’s a reasonable approximation.
A goal with a full implementation of Maxwell’s equations could be an interesting and challenging project though!