An analytical model for vortex core pinning in a micromagnetic disk