Simulation of three-dimensional solar wind disturbances and resulting geomagnetic storms