Distribution of the pressure and tidal volume in multicompartment model of the lung during mechanical ventilation