Analysis of current flow at a component's edge
This is the kind of thing you solve with finite element analysis.

Basically, you model the region of interest as a mesh of lots of small parts.  Then each little part follows the laws of physics, but you can make simplifying assumptions, like that the current is uniform over the small volume.  After running enough relaxation iterations, you get the current into and out of the faces of each little element.  From that you find the macro current.

There are a lot of details about doing finite element analysis correctly and efficiently, but those are the basic principles.  Surely there is software out there already that will do most of this for you.