Modeling of fluid-induced seismicity during injection and after shut-in