In this paper, we introduce a newly developed open source data center package in the Modelica Buildings library to support modeling and simulation of cooling and control systems of data centers. The data center package contains major thermal and control component models, such as Computer Room Air Handler, Computer Room Air Conditioner, models of different subsystem configurations such as chillers with differently configured waterside economizers, as well as templates for different systems. Two case studies based on this package are performed to investigate the performances of the cooling and electrical system under normal conditions and emergency situations such as a blackout: one is for a data center powered by conventional energy, and the other is for a data center powered by renewable energy. Simulation results show that the dynamic modeling and multi-domain simulation in the Modelica-based tool make it convenient for users to investigate both normal and emergent operations for conventional and renewable data centers.