In-situ magnetic alignment model for additive manufacturing of anisotropic bonded magnets