In this talk I will report some of my recent work about the Earth's magnetic field, solar magnetic field, magnetic field of small bodies, and magnetic tide. These problems about geophysical and astrophysical fluid dynamics are investigated both numerically and analytically.