A general two-dimensional simulation of semiconductor device is regularly arranged in rectangle meshes, such as the 20x20 rectangle meshes. However, the accuracy is limited when rectangle meshes are applied to the circular junction. In this thesis, we develop the four quadrants of right-angled triangle meshes to alter the grid into irregular arrangement. By these five types of mesh, we can fit any shapes of semiconductor device in the two-dimensional simulation. Furthermore, in order to verify the accuracy of this module, we use rectangle meshes and right-angled triangle meshes to simulate the resistors and PN diodes,, and it perfectly matches with the simulation result of regular grid arrangement. Finally, we apply this module to MOS-Capacitor simulation, and compare the simulation result with the theoretical result of threshold voltage.