Theory of applied-B ion diodes