A numerical analysis of bulk-barrier diodes