Lung Mechanics Lab

Rest at FRC · no airflow
1.0 L6.0 L
2.50 L
Actual volume
2.50 L
Actual volume Set volume FRC 2.50 L
Pressure · cm H₂O
① Alveolar② Intrapleural fluid
Lung recoil Chest wall recoil Airflow
Across lung +5.0 cm H₂O
Airflow 0.00 L/s

Graphs

Mechanics settings

3.5 cm H₂O·s/L
0.0 cm H₂O·s/L
100%
100%
Off
60 cm H₂O
Illustrative respiratory muscle pressure limit
Muscle effort 0.0 cm H₂O

Lung Mechanics Lab

Teaching concept and instructional design by David Julian.

Developed with assistance from Codex (OpenAI).

How the model works

Set and actual volume: the slider sets a target. The simulation continually calculates airflow. On each time step, change in actual volume = airflow × elapsed time. Positive flow adds air and negative flow removes it, so actual volume can lag behind the set volume. The Play buttons gradually increase inspiratory support, followed by a rapid initial drop and a slower decline in remaining effort. A breath begun at a held volume retains the muscle support needed to return to that held volume.

Early expiration: some inspiratory muscle activity persists during quiet breathing, braking elastic recoil and slowing outward airflow. The Play breaths include this declining support; Relax muscles removes it immediately.

Elastic recoil and muscle effort: separate elastic curves describe inward lung recoil and chest wall recoil. Higher compliance reduces the magnitude of recoil pressure at a given volume. Chest wall recoil is negative when outward and positive when inward. Muscle effort is chosen to oppose the combined recoil at the set volume, up to the selected muscle pressure limit. Relax muscles sets effort to zero. The balance of the two elastic curves then determines the resting volume, or FRC.

Pressures: pressure across the lung equals its elastic recoil pressure. Intrapleural pressure equals chest wall recoil pressure minus signed muscle pressure (positive for inspiration, negative for active expiration). Alveolar pressure equals intrapleural pressure plus pressure across the lung. Pressures are relative to atmospheric pressure, defined as zero.

Airflow: flow into the lungs = (atmospheric pressure − alveolar pressure) ÷ airway resistance. Positive flow adds volume; negative flow removes it. The extra expiratory resistance setting increases resistance only during outward flow. When alveolar pressure returns to atmospheric pressure, airflow stops.

Hysteresis: when enabled, a smooth volume history adjustment raises lung recoil on inflation and lowers it on deflation. The adjustment is retained when volume stops changing.

Relative muscle effort: the graph shows the magnitude of signed muscle pressure divided by a fixed reference pressure of 10 cm H₂O. One relative unit always represents the same model pressure, even if maximum muscle pressure changes. It reflects the pressure demand on the muscles, rather than a measured force, work, power, or metabolic energy expenditure. At rest at FRC and during passive motion after Relax muscles, effort is zero. Holding a volume away from the elastic balance requires sustained effort even when airflow is zero. Both inspiratory and expiratory muscle pressure contribute to the magnitude.

Maintain breathing pattern: when airway resistance increases, the nervous system can increase respiratory muscle activity. The muscles generate a larger pressure difference to help maintain airflow and the amount of air moved with each breath. This option illustrates that compensation: the same breath size and timing require greater muscle effort as resistance rises. Watch the Relative muscle effort graph to see how breathing can become more demanding even when the volume changes look similar. If the required pressure exceeds muscle capacity, the breath can become smaller or slower. Maintaining expiration against increased resistance can also require expiratory muscle activity. This option applies to Play tidal breath and Play deep breath.

This is a single compartment teaching model with illustrative elastic curves and control ranges. It models recoil and resistive flow, rather than applying Boyle’s law to a sealed, fixed amount of gas. It does not simulate individual alveoli or dynamic airway collapse.

What these controls represent

Hysteresis: lung recoil depends on volume and recent inflation or deflation. Inflation tends toward a higher pressure curve; deflation tends toward a lower one. Direction changes are smooth, and holding still preserves the current pressure history.

This is an illustrative volume history adjustment. The setting controls the maximum pressure difference from the reference curve; it does not identify a physiological mechanism or simulate individual lung units.

Hysteresis is Off by default for introductory experiments. Turn it on to explore how recent inflation and deflation change lung recoil. Reset restores the mechanics controls with hysteresis Off while retaining current lung volume and recorded graphs.

Compliance: 100% is the baseline. Higher compliance reduces the magnitude of recoil pressure at a given volume; lower compliance increases it. The balance of lung and chest wall recoil determines FRC. With hysteresis enabled, that balance also depends on recent volume history.

Expiratory obstruction: extra resistance applies only to outward airflow. It represents slower emptying. Pressure dependent airway collapse and effort independent flow limitation are omitted.

Use the Across lung pressure graph to see lung hysteresis. The alveolar pressure loop also reflects airway resistance. Volumes and control ranges are illustrative.

Elastic balance: lung, chest wall, and combined recoil are plotted at the volumes you visit. Earlier graph paths keep the mechanics present when they were recorded. Changing settings starts a separate path; Clear graphs removes the comparisons.

Graph detail