On the left, you can see a Current Mirror; On the right is the electric circuit model of a battery; You can change the keys to change the charging/discharging process by changing them. You can convert the battery capacity(mAh) to Capacitance(Coulombs), just search for it on google. I’m using a “low capacity battery” only for didactic purpose.