Implementation of Magnetic Field

Hello,

I would like to implement magnetic field which is following Ampère’s circuital law.
Could someone tell me there is some way to implement magnetic field by equation, as B = a/r ?

I know how to implement uniform magnetic field and also from field map file.
Is it necessary to create field map file?

Best Regards,
Tomoya