Energy engineering and management for building systems