Four main factors, also known as Fick’s Law, influence the rate at which gasses will cross the layers of the respiratory membrane. They are: 1) thickness of the membrane; 2) surface area of the membrane; 3) diffusion coefficient of gasses in relation to the membrane; and 4) partial pressure differences of the gasses.
Thickness of the membrane: The thicker the membrane the slower gasses will diffuse across it. The most common way to increase the thickness of the membrane is by fluid buildup. Fluid buildup inside the alveoli can happen with pulmonary edema when the left side of the heart does not pump adequately. The excess blood left over then backs up into the pulmonary capillaries, increasing the capillary hydrostatic pressure, and causing excess fluid to remain in the alveoli. Inflammatory processes and infections such as pneumonia can also cause fluid buildup in the alveoli.
Surface area of the membrane: The alveoli greatly increase the surface area for gas exchange. If some become damaged or destroyed in cases such as emphysema, lung cancer, or tuberculosis, the surface area available for gas exchange can be dramatically reduced.
Diffusion coefficient of gasses: The diffusion coefficient of a gas is determined by molecule size and solubility of the gas in water. Taking these into account, carbon dioxide will cross the respiratory membrane 24 times more readily than oxygen.
Partial pressure difference of the gasses: Because gasses flow from a region of higher partial pressure to lower partial pressure the direction of movement of the gasses can always be determined. Oxygen partial pressures are higher in the alveoli compared to inside the pulmonary capillaries and carbon dioxide is the opposite. With increased ventilation rate (exercise), partial pressures inside the alveoli change even more - oxygen increases and carbon dioxide decreases. These increased gradients in turn drive the movement of oxygen and carbon dioxide to occur even faster.