The virtual respiratory system (VRS) is proposed for testing physical respirators, new methods of ventilatory support, and scientific hypotheses. VRS may be also helpful in students education and staff training. Method: VRS simulates the relationship between the air flow and the pressure. The main features of the model are: separation of the lungs and the chest, division of the lungs into five lobes, closing bronchi, gravity influence. Real-to-virtual converter is based on the gas flow source, which is controlled by the calculated value of the air flow that should exist, for the measured pressure being the VRS input. Results: several phenomena are discussed, e.g. the influence of compliance nonlinearity and resistance changeability on ventilation, the CPAP efficiency, differences in lobes ventilation, breathing frequency determination.