3D Simulation of Rechargeable and Non Rechargeable batteries