Three-dimensional electrostatic field simulation of a resistive plate chamber