Containment and interaction of charged pions in a solid linear implosion system are simulated. Pions are generated from annihilation of antiprotons at the surface of a compressed target. A three-dimensional Monte Carlo code has been developed to simulate the interaction of charged pions with the system. Neutron yields are presented for several 27-g uranium targets compressed under different initial plasma conditions. Effects on neutron yields from the diffused magnetic field and density profiles at peak compression are discussed. Results show that the magnetic field at peak compression significantly increases overall neutron yields.