Numerical Solution of Periodic Heat and Mass Transfer with Adsorption in Regenerators: Analysis and Optimization