Metal powders are selectively molten layer by layer during Selective Electron Beam Melting (SEBM) processes. The density of the resulting material, the spatial resolution as well as the surface roughness of the completed components are complex functions of material and processing parameters. The purpose of this work is to achieve a better understanding of the beam based additive manufacturing process with the help of numerical simulations. A two-dimensional lattice Boltzmann model is developed to investigate melting and re-solidifying of a randomly packed powder bed under the irradiation of a Gaussian beam. Numerical simulations are presented where individual powder particles are considered. This approach makes many physical phenomena accessible which can not be described in a standard continuum picture. The potential of the proposed model to simulate the SEBM process is demonstrated by means of some examples for single tracks and multilayer parts. The simulation results are compared with experimental findings during SEBM. The comparison shows good agreement between simulation results and experiments.