在模擬元件結構時,若遇到特殊型元件,由於矩形網格較規則性,因此受限較大,使得在圓弧設計的元件以及較不規則性的元件模擬其易造成極大的誤差,因此在本論文中,我們開發正三角形網格,進而開發出四合一正三角形網格,我們運用網格來滿足任意形狀的二維半導體元件模擬。為了實現網格的準確性,我們以簡單電阻及特殊型電阻和PN二極體進行驗證,與理論值及估算理論值做比較, 驗證無誤後,最後再利用我們的網格探討PN二極體內的電流擁擠效應。;The rectangle mesh is restricted for the simulation of 2D semiconductor device with special structure. Therefore, the rectangle mesh can introduce serious errors into the simulation in irregular region device and arc-shaped device. In this thesis, we develop regular triangle mesh and four-in-one regular triangle mesh. It can be applied to fit any shapes of semiconductor device in the 2D simulation. In order to verify the accuracy of this module, we simulate simple resistor and particular resistor for comparison to the theoretical value. Finally, we apply the four-in-one module to discuss current crowding of the PN diode.