Question: when the diaphragm contracts the volume of the lungs?
Answer: This increases the size of the thoracic cavity and decreases the pressure inside. As a result, air rushes in and fills the lungs. During expiration, the diaphragm relaxes, and the volume of the thoracic cavity decreases, while the pressure within it increases. As a result, the lungs contract and air is forced out.