Nanoscale phase field microelasticity theory of dislocations: model and 3D simulations