An analytic model for solar flare development