We consider an algorithmic model of diffusion networks, in which n nodes are distributed in a 2D Euclidean space and communicate by diffusing and sensing molecules. Such a model is interesting on its own right, although from the distributed computing point of view it may be seen as a generalization or even a framework for other wireless communication models, such as the SINR model, radio networks or the beeping model. Additionally, the diffusion networks model formalizes and generalizes recent case studies of simple processes in environment where nodes, often understood as biological cells, communicate by diffusing and sensing simple chemical molecules. To demonstrate the algorithmic nature of our model, we consider a fundamental problem of reaching consensus by nodes: in the beginning each node has some initial value, e.g., the reading from its sensor, and the goal is that each node outputs the same value. Our deterministic distributed algorithm runs at every node and outputs the consensus value equal to the sum of inputs divided by the sum of the channel coefficients of each cells. For a node v consensus is reached in (formula presented) communication rounds, where dv is the sum of molecule reachability ratios to node v in the medium, dmin=minidi, dmax=maxidi and b is the sum of the initial values. p represents the second largest eigenvalue of a matrix of normalised molecule reachability ratios, that we analyze together with an associated Markov Chain.