Thermal design of multi-stream heat exchangers