This paper presents an algorithm to translate building topology in an object-oriented architectural building model (Building Information Modeling, BIM) into an object-oriented physical-based energy performance simulation by using an object-oriented programming approach. Our algorithm demonstrates efficient mapping of building components in a BIM model into space boundary conditions in an object-oriented physical modeling (OOPM)-based building energy model, and the translation of building topology into space boundary conditions to create an OOPM model. The implemented command, TranslatingBuildingTopology, using an object-oriented programming approach, enables graphical representation of the building topology of BIM models and the automatic generation of space boundaries information for OOPM models. The algorithm and its implementation allow coherent object-mapping from BIM to OOPM and facilitate the definition of space boundaries information during model translation for building thermal simulation. In order to demonstrate our algorithm and its implementation, we conducted experiments with three test cases using the BESTEST 600 model. Our experiments show that our algorithm and its implementation enable building topology information to be automatically translated into space boundary information, and facilitates the reuse of BIM data into building thermal simulations without additional export or import processes.