Dynamic Modeling Of Thermal Management System With Exergy Based Optimization