  A finite difference scheme is used to develop a numerical method to solve the
flow of an unbounded viscoelastic fluid with zero to moderate inertia around a
prolate spheroidal particle. The equations are written in prolate spheroidal
coordinates, and the shape of the particle is exactly resolved as one of the
coordinate surfaces representing the inner boundary of the computational
domain. As the prolate spheroidal grid is naturally clustered near the particle
surface, good resolution is obtained in the regions where the gradients of
relevant flow variables are most significant. This coordinate system also
allows large domain sizes with a reasonable number of mesh points to simulate
unbounded fluid around a particle. Changing the aspect ratio of the inner
computational boundary enables simulations of different particle shapes ranging
from a sphere to a slender fiber. Numerical studies of the latter particle
shape allow testing of slender body theories. The mass and momentum equations
are solved with a Schur complement approach allowing us to solve the zero
inertia case necessary to isolate the viscoelastic effects. The singularities
associated with the coordinate system are overcome using L'Hopital's rule. A
straightforward imposition of conditions representing a time-varying
combination of linear flows on the outer boundary allows us to study various
flows with the same computational domain geometry. {For the special but
important case of zero fluid and particle inertia we obtain a novel formulation
that satisfies the force- and torque-free constraint in an iteration-free
manner.} The numerical method is demonstrated for various flows of Newtonian
and viscoelastic fluids around spheres and spheroids (including those with
large aspect ratio). Good agreement is demonstrated with existing theoretical
and numerical results.
