Visibility simulation of realistic grating interferometers including grating geometries and energy spectra