particle in cell 2D implementation based on the Richard Fitzpatrick course from Texas University.