UNLABELLED: A lung gas exchange simulator was tested which produces simultaneous uptake and/or elimination of multiple gases by an artificial test lung with physiologically realistic gas expired and exhaust gas flows, using a combination of infusion of diluting/enriching gases into the lung with lung gas extraction. A deterministic algorithm is incorporated which calculates required gas infusion and extraction flow rates for any set of possible target gas exchange values with any given set of fresh gas flows and concentrations. Six different scenarios were simulated, comprising a range of gas exchange values for each gas species which lie within a physiologically realistic range for anaesthetized patients. For each of these experiments the system was tested for 15 consecutive measurements over 25 min by measurement of gas exchange in the system using the Haldane transformation. RESULTS: the mean bias and standard error of the mean bias (SE, in parentheses) relative to the target value was: +0.001 (0.002) l min(-1) for O(2) uptake, -0.002 (0.005) l min(-1) for CO(2) production, -0.001 (0.002) l min(-1) for uptake of nitrous oxide and +0.3 (0.1) ml min(-1) for uptake of a volatile anaesthetic agent (isoflurane). The confidence limits of the mean bias were within 5% of the target value for all gases and scenarios with the exception of those where a low uptake of anaesthetic gas was specified. The confidence limits of the mean bias for the lower uptakes of isoflurane were within 10% of the target value for these scenarios and within 15% for the low uptake of N(2)O. Good accuracy and precision of this approach to lung gas exchange simulation were demonstrated, resulting in a versatile simulator.