Numerical modeling of a compact ECR ion source