Concentrated Solar Power (CSP) technology captures solar radiation and converts it into heat for electricity production. It has received an increasing attention because integrated thermal energy storage (TES) systems can largely enhancing the reliability and the dispatchability. Over the last decade, low-cost single storage tank based on the thermocline technology becomes an alternative to commonly-used two-tank TES system. However, the improper inlet/outlet manifolds may cause the strong mixing of hot and cold fluids and disturb the temperature stratification, resulting in reduced thermal performances of the storage tank. This study aims at solving the flow maldistribution problem in the single-tank thermocline storage system by appropriately structuring the inlet/outlet manifolds. The technical solution is based on the insertion of optimized perforated baffles in the manifolds. 2D Computational fluid dynamics simulations were performed to calculate the transient flow and temperature profiles in the storage tank during the charging and discharging operations. The optimal size distribution of orifices on the upper baffle has been determined for homogenizing passage times of the thermal front, so as to enhance the temperature stratification. A novel intermediate evaluation indicator was introduced to characterize the real-time thermal behavior, which could reduce the computational cost of the optimization problem by a factor of 6 at least. Numerical results shown that the proposed optimization algorithm could significantly improve the thermal performances, indicated by the increased values of charging/discharging efficiency, the capacity ratio and the overall efficiency, ex., the fully charging efficiency be increased by 29% by comparing the unstructured manifold geometry and the one with optimized baffles. The parametric study on certain geometry and operating factors also demonstrated that the proposed method for flow distribution optimization was robust, effective and efficient.