Optimization of volume-limited thermal energy storage in non-continuous processes. (15th July 2020)