This paper reviews the development of first-principles based mathematical models for batteries developed on a framework parallel to computation fluid dynamics (CFD), herein termed computational battery dynamics (CBD). This general-purpose framework makes use of the similarity in the equations governing different battery systems, and has resulted in the development of robust models in a relatively short time. Here we review this framework, in the context of applications to the coupled modeling of the thermal and electrochemical behavior of cells, and to the modeling at three different scales, namely pore-level, cell-level and stack-level. The similarity and differences of our approach with other research groups are exemplified. Significant results from each of these advanced applications of modeling are highlighted with emphasis on the insights that can be gained from a first-principles model. In addition, we also demonstrate the usefulness of a combined experimental-modeling approach in describing cells. The models reviewed here are expected to be useful in predicting the behavior of advanced batteries used in electric vehicles (EVs) and hybrid electric vehicles (HEVs).