  We present an upgrade to the particle-in-cell ion beam simulation code OPAL
that enables us to run highly realistic simulations of the spiral inflector
system of a compact cyclotron. This upgrade includes a new geometry class and
field solver that can handle the complicated boundary conditions posed by the
electrode system in the central region of the cyclotron both in terms of
particle termination, and calculation of self-fields. Results are benchmarked
against the analytical solution of a coasting beam. As a practical example, the
spiral inflector and the first revolution in a 1 MeV/amu test cyclotron,
located at Best Cyclotron Systems, Inc., are modeled and compared to the
simulation results. We find that OPAL can now handle arbitrary boundary
geometries with relative ease. Comparison of simulated injection efficiencies,
and beam shape compare well with measured efficiencies and a preliminary
measurement of the beam distribution after injection.
