This thesis describes a new methodology for modeling and designing numerical relays. The methodology uses a Visual C++ program to generate FORTRAN code representing the functional blocks of a relay from user specifications. This code is incorporated into a PSCAD/EMTDC case using a component resource. Protection system studies are then performed with the modeled relays, including adjustment of distance and differential relays, and investigation of relay performance under different conditions. Tests show the numerical relay models respond as expected.