We present a room model for thermal building simu- lation that we implemented in Modelica. The room model can be used for controls analysis and energy analysis of one or several rooms that are connected through airflow or heat conduction. The room model can assess energy storage in the air and in the build- ing construction materials, heat transfer between the room and the outside environment and the humidity and CO2 release to the room air. The humidity storage in the building construction materials is not modeled. We also describe a novel separation of heat transfer mechanisms on which our room model is built on. The separation allowed a significant reduction in model de- velopment time, and it allows using state-of-the-art programs for computing prior to the thermal building simulation certain energy flows, such as solar heat gain of an active facade without breaking feedback loops between the HVAC system and the room.