Modeling the ring current magnetic field during storms