A Framework for Modeling Multifunctional Building Systems and Co-Simulating with Whole Building Energy Models