Computer representations of plants (virtual plants) are used as the basis for a model simulating leaf transpiration and sap flow. The virtual plants provide a detailed description of plant geometry and topology and, once positioned in a scene, enable a highly realistic reconstruction of a portion of the canopy. Stomatal conductance as well as energy balance are simulated by the model at the level of individual leaves in order to calculate their transpiration. Leaf transpiration is then cumulated to get the sap flow throughout the plant. Owing to its structure, the model can take into account feedbacks such as the effect of the temperature of a leaf on its stomatal conductance, transpiration and water potential, and in return, the effect of water potential of a leaf on its stomatal conductance. The model has been validated on a coffee tree stand in Costa Rica. The geometry (i.e. 3D position, area and diameter of organs) of six adult coffee trees in a row was measured in the field in order to generate a computer scene. Stomatal conductance, sap flow, water potential and wood hydraulic conductivity were measured for model parameterisation and validation. Analysis of model outputs lead to a correction of leaf boundary layer thickness. After calibration, the model exhibited correct values of transpiration and water potential in different microclimatic conditions.