A model for an expanding magnetic bubble or plasmoid is introduced, corresponding to a large aspect ratio torus, having one-dimensional (cylindrical) symmetry but with three dimensional expansion, with the length of the cylinder expanding in time in the same manner as the radius. This model has a general class of similarity equations in ideal magnetohydrodynamics (MHD) for spherical expansion. There are two parameters c, d characterizing the similarity solutions, depending on boundary conditions and conservation relations. These solutions exhibit either tangential discontinuities or shocks at the boundary, depending on the values of the constants c and d. Some of the solutions have magnetic fluxes within the bubble increasing with time, but with smaller or zero magnetic fields outside the bubble, requiring a shock and a dynamo in the shock region. The results of simulations of one class of solutions with a Lagrangian MHD code show good agreement. Some of the properties of fully toroidal solutions of the similarity equations are derived. This model has applications to a magnetic bubble from an accretion disk around an active galactic nucleus (AGN), appropriate to the phase in which the bubble has expanded to a size much greater than the disk field length scales but much smaller than any exterior scales. At this stage the magnetic reconnection and flux conversion stage associated with setting up the expanding bubble is completed. The model may also apply to a plasmoid formed in the solar corona. (C) 2004 American Institute of Physics.