Numerical simulation and its verification for an active magnetic regenerator