The two-sided pyramid wavefront sensor has been extensively simulated in the direct phase mode using a wave optics code. The two-sided pyramid divides the focal plane so that each half of the core only interferes with the speckles in its half of the focal plane. A relayed image of the pupil plane is formed at the CCD camera for each half. Antipodal speckle pairs are separated so that a pure phase variation causes amplitude variations in the two images. The phase is reconstructed from the difference of the two amplitudes by transforming cosine waves into sine waves using the Hilbert transform. There are also other corrections which have to be applied in Fourier space. The two-sided pyramid wavefront sensor performs extremely well: After two or three iterations, the phase error varies purely in y. The twosided pyramid pair enables the phase to be completely reconstructed. Its performance has been modeled closed loop with atmospheric turbulence and wind. Both photon noise and read noise were included. The three-sided and four-sided pyramid wavefront sensors have also been studied in direct phase mode. Neither performs nearly as well as does the two-sided pyramid wavefront sensor.