Simulation of RPC performance for 511 keV photon detection