Simulation and analysis of solenoidal ion sources.