Three-dimensional computer codes have been used to develop quasisymmetric stellarators with modular coils that are promising candidates for a magnetic fusion reactor. The mathematics of plasma confinement raises serious questions about the numerical calculations. Convergence studies have been performed to assess the best configurations. Comparisons with recent data from large stellarator experiments serve to validate the theory.M odular stellarators can be viewed as an advanced tokamak hybrid appropriate for implementation as a fusion reactor (1). Quasisymmetry of the magnetic spectrum is predicted to give good confinement at high temperatures, and adequate rotational transform from the external magnetic field is expected to stabilize the plasma. New configurations have been designed by making imaginative use of three-dimensional computer codes. Because the mathematics of these stellarators is complicated, we have performed convergence studies applicable to proof of principle experiments that are being planned.We are primarily concerned with the NSTAB equilibrium and stability code and the TRAN Monte Carlo transport code developed at New York University by Octavio Betancourt and Mark Taylor (2-5). The codes are applied to a compact stellarator called the MHH2 that has two field periods and excellent quasiaxial symmetry. For the calculations we selected a configuration with realistic physical parameters that provide good convergence, enabling us to perform long runs and make estimates of numerical errors. Theoretical conclusions can be drawn that are relevant to a wider range of examples, such as the optimized stellarator specified in Table 1.The NSTAB code is a computer implementation of the variational principle of ideal magnetohydrodynamics (MHD). If B is the magnetic field and p is the pressure, solutions of the magnetostatics equations are found by minimizing the potential energyin a coordinate system compatible with toroidal geometry in three dimensions. An accurate finite difference scheme is used in the radial direction, and dependence on the poloidal and toroidal angles is handled by the spectral method. It is assumed that there are nested toroidal flux surfaces, and the differential equations are written in a conservation form that captures islands and current sheets. The resolution is so good that questions of stability can be settled by a mountain pass theorem asserting that when more than one solution of the problem can be found then an unstable equilibrium must exist corresponding to a saddle point in the energy landscape. Bifurcated equilibria are calculated whose magnetic surfaces have Poincaré sections displaying the structure of the most unstable modes.The TRAN code uses a split time algorithm to calculate the confinement time of test particles by alternately tracking guiding center orbits and applying a random walk that represents collisions. The magnetic field B and the flow field U of the plasma in a background obtained by using NSTAB are held fixed during iterations that impose quasineutrali...