Phase field modeling the selection mechanism of primary dendritic spacing in directional solidification