How to create 3D sun magnetic field

I am doing magnetic field from the biggest (the whole universe) to the smallest (one atom), and now I have challenges making the sun’s magnetic field.

As the picture shows it needs vector force pointing out from the center and lots of point force and spin force on the surface. I have no idea how to start it.
This is the code for Earth’s magnetic field against the solar wind, I hope that shows what I want to do.
assignment (39.2 KB)
Thank you all for your help!