Knudsen flow is easily simulated with a Monte Carlo method. In this study we develop a Visual Basic for Excel code to simulate the molecular beam from a vaporizing solid. The system at NASA Glenn uses the restricted collimation method of Chatillon and colleagues, which consists of two apertures between the effusion cell and the ionizer. The diameter of the first aperture is smaller than the diameter of the effusion cell orifice, so the ionizer effectively only sees inside the effusion cell. The code is able to calculate the transmission coefficient through the cell orifice, through the cell orifice and the first aperture, and through the cell orifice and first and second aperatures. Calculated transmission coefficients through the cell orifice are compared to tabulated values to validate the code. Then transmission coefficients are calculated through the cell orifice and both apertures to the ionizer. This allows the geometry of the sampling system the sampling system to be optimized. Calculated transmission factors are also compared to literature values calculated via an analytic method.