Numerical study of electric potential formation in a weakly ionized plasma flowing supersonically through open magnetic field lines