Formation and dynamics of electrostatic solitary waves associated with relativistic electron beam