Optimization of time-flow parameters for thermal modulation