A phase field model for fracture