The foraging scenario is important in robotics, because it has many different applications and demands several fundamental skills from a group of robots, such as collective exploration, shortest path finding, and efficient task allocation. Particularly for large groups of robots emergent behaviors are desired that are decentralized and based on local information only. But the design of such behaviors proved to be difficult because of the absence of a theoretical basis. In this paper, we present a macroscopic model based on partial differential equations for the foraging scenario with virtual pheromones as the medium for communication. From the model, the robot density, the food flow and a quantity describing qualitatively the stability of the behavior can be extracted. The mathematical model is validated in a simulation with a large number of robots. The predictions of the model correspond well to the simulation.