A software tool for the design of high power PiN diodes based on the numerical study of the reverse characteristics