Thermal energy storage (TES) plays a crucial role in energy sustainability, enabling the efficient storage and utilization of thermal energy from various sources. In this paper, we propose a novel TES system that utilizes reclaimed minerals as the heat storage medium. The system comprises a tightly packed bed of processed minerals enclosing a circular pathway for heat transfer fluid (HTF). To achieve optimal performance, we develop a computational method and algorithm to estimate the required pipe length for efficient charge and discharge cycles. The analysis encompasses various factors, including pipe length, storage material thickness, tube material, schedule, and contact resistance. Through a systematic examination of these parameters, we propose an algorithmic design for an effective pipe length tailored to the specific requirements of diverse applications in heat storage systems. A significant aspect of the proposed system is its adaptability. The system parameters, such as the temperature and mass flow rate of the HTF, can be modified based on the established effective length of the pipe. This adaptability contributes not only to increased cost-effectiveness but also to diminished energy loss in the overall energy storage system. This research employs Computational Fluid Dynamics (CFD) modeling to simulate charge and discharge cycles, incorporating varying scenarios of pipe lengths and system parameters. By evaluating the exit temperatures of the HTF and the average temperature of the storage material at different stages, the study identifies a suitable pipe length that ensures adequate discharge time for the storage material once the cutoff temperature is achieved. This tailored approach aligns with the specific demands of diverse applications, ranging from solar power plants to industrial processes, showcasing the versatility and practicality of the proposed methodology.