The TRIUMF UltraCold Advanced Neutron (TUCAN) collaboration is currently engaged in building a next generation ultracold neutron (UCN) source, with a neutron electric dipole moment (nEDM) measurement as its flagship experiment. A permanent EDM is a violation of CP-symmetry, and thus the nEDM is relevant in standard model extensions and the baryon asymmetry problem. The nEDM measurement is currently in the design phase, for which detailed studies of systematic effects in the experiment are crucial. To study these effects the TUCAN collaboration is using PENTrack, a particle and spin tracking software package developed for simulating UCNs. Many of the systematic effects in the nEDM experiment arise due to inhomogeneities in the electromagnetic fields, which affect the neutron spin precession. PENTrack’s functionality allows these effects to be studied with realistic geometries and fields. This talk will discuss the use of PENTrack in performing such studies and how these results relate to the nEDM experiment.