A rationale is given for a modelling approach to identify the mechanisms involved in the functioning and metabolic activity of tissues in the wall of the gastrointestinal tract. Maintenance and productive functions are discussed and related to the distinct compartments of the gastrointestinal tract and the metabolic costs involved. Functions identified are: tissue turnover; tissue proliferation; ion transport; nutrient transport; secretions of digestive enzymes, mucus and immunoglobulins; production of immune cells. The major nutrients involved include glucose, amino acids and volatile fatty acids. In vivo measurements of net portal fluxes of these nutrients in pigs and ruminants are evaluated to illustrate the complexity of physiology and metabolic activity of the gastrointestinal tract. Experimental evidence indicates that high, but variable and specific, nutrient costs are involved in the functioning of the gastrointestinal tract.