The book covers intimately all the topics necessary for the development of a robust magnetohydrodynamic (MHD) code within the framework of the cell-centered finite volume method (FVM) and its applications in space weather study. First, it presents a brief review of existing MHD models in studying solar corona and the heliosphere. Then it introduces the cell-centered FVM in three-dimensional computational domain. Finally, the book presents some applications of FVM to the MHD codes on spherical coordinates in various research fields of space weather, focusing on the development of the 3D Solar-InterPlanetary space-time Conservation Element and Solution Element (SIP-CESE) MHD model and its applications to space weather studies in various aspects. The book is written for senior undergraduates, graduate students, lecturers, engineers and researchers in solar-terrestrial physics, space weather theory, modeling, and prediction, computational fluid dynamics, and MHD simulations. It helps readers to fully understand and implement a robust and versatile MHD code based on the cell-centered FVM.