Analytical Solution for the Problem of Gridded Gap-Electron Flow Interaction