Location: Pulmonary Acinus pFTU @ ee4cf115a7c1 / Readme.md

Author:
Jagirhussan <r.jagir@auckland.ac.nz>
Date:
2025-06-10 12:56:52+12:00
Desc:
Consistent SI units
Permanent Source URI:
https://staging.physiomeproject.org/workspace/d35/rawfile/ee4cf115a7c1cbe2a64ac1e68d1313f66b2b1af0/Readme.md

# An Functional Tissue Unit model of Pulmonary Acinus


This repository provides a modular FTU for the simulation of a **pulmonary acinus**, the functional gas exchange unit of the lung, designed to support modeling and analysis of respiratory mechanics and gas transport under varying breathing conditions. The FTU model averages the behavior of multiple alveoli and includes physiologically grounded representations of gas exchange, transport, mechanical pressure–volume dynamics, and dynamic alveolar recruitment.

---

## Model Overview

This multi-component model simulates the dynamic behavior of a single acinus, incorporating interactions between gas exchange and mechanical ventilation. It is structured to reflect core physiological subsystems:

1. **Mechanical Dynamics (`Acinus`)**: Models alveolar and pleural pressures, airflow resistance, tissue viscoelasticity, and volume changes across respiratory compartments.
2. **Alveolar Recruitment (`AlveolarRecruitment`)**: Models the activation and deactivation of alveoli based on breathing frequency.
3. **Gas Exchange (`gasExchange`)**: Models oxygen and carbon dioxide diffusion between alveolar air and capillary blood.
4. **Gas Transport (`gasTransport`)**: Simulates hemoglobin oxygen binding using a cooperative saturation model and tracks total oxygen transport.
5. **Lung-Level Coupling (`AcinusToLungScaleCoupling`)**: Scales single-acinus parameters to whole-lung level parameters observed in experiments using anatomical ratios.

---

## Key Equations

### 1. **Acinus: Mechanical Lung Model**

**Alveolar Flow**
```
QA = (numAlveoli / 1000) * (1 / numAlveoli) * (Pc - Pl - Pve) / Rs
```

**Lung Elastic Pressure**
```
Pl = Al_effective * exp(Kl * V_lung) + Bl_effective
```

**Pleural Pressure**
```
Ppl = -Pcw - Pmus
```

**Alveolar Pressure**
```
PA = (Pl + Pve) * 133.33
```

**Central Airway Pressure (Piecewise)**
```
Pc = if (Vc/Vcmax < 0.5):
        Ac - Bc * (Vc/Vcmax - 0.7)^2
     else:
        5.6 - Bcp * ln(Vcmax/Vc - 0.999)
```

**Viscoelastic Pressure**
```
Pve = Vve / Cve
```

**Volume Dynamics**
```
dVc/dt  = (-2 * Pc + Pl + Pve + Pcw + Pmus) / Rs
dVA/dt  = (1 / numAlveoli) * (Pc - Pl - Pve) / Rs
dVve/dt = (Pc - Pl - ((Rs + Rve) / Rve) * Pve) / Rs
```

---

### 2. **Alveolar Recruitment**

**Normalized Breathing Rate**
```
S = breathsPerMin / (60 * 0.64)
```

**Recruitment Ratio**
```
Ra = k2 / (k1 * S^10 + k2)
```

**Recruitment Factor (bounded)**
```
recruitmentFactor = clamp(Less_active_alveoli, 0.1, 1.0)
```

**Alveolar State ODEs**
```
d(Less_active_alveoli)/dt  = -k1 * Less_active_alveoli * S^10 + k2 * Fully_active_alveoli
d(Fully_active_alveoli)/dt =  k1 * Less_active_alveoli * S^10 - k2 * Fully_active_alveoli
```

---

### 3. **Gas Exchange**

**Flow Between Alveolar Compartments**
```
q = (Pm - PA) / (numAlveoli * AlveolarResistance)
```

**Partial Pressures for Diffusion**
```
p_ao = f_o * (PA - Pw)
p_ac = f_c * (PA - Pw)
```

**Total Alveolar Outflow**
```
QA = q + (1 L/mol) * Dc * (p_c - p_ac) + (1 L/mol) * Do * (p_o - p_ao)
```

**Fractional Oxygen Update**
```
df_o/dt = (1 / (VA * numAlveoli)) * [ (1 L/mol) * Do * (p_o - p_ao)
             + (f_oi - f_o) * q 
             - f_o * ((1 L/mol) * Dc * (p_c - p_ac) + (1 L/mol) * Do * (p_o - p_ao)) ]
```

**Fractional CO₂ Update**
```
df_c/dt = (1 / (VA * numAlveoli)) * [ (1 L/mol) * Dc * (p_c - p_ac)
             + (f_ci - f_c) * q 
             - f_c * ((1 L/mol) * Do * (p_o - p_ao) + (1 L/mol) * Dc * (p_c - p_ac)) ]
```

---

### 4. **Gas Transport and Hemoglobin Saturation**

**Hemoglobin Saturation Function (Cooperative Binding)**
```
satpo = (1 + KR * sigma * p_o)^4 / (L * (1 + KT * sigma * p_o)^4 + (1 + KR * sigma * p_o)^4)
saturation = 0.003 * (p_o / 133.322) + Hb * 1.34 * satpo
```

**Oxygen Partial Pressure ODE**
```
dp_o/dt = Do / (sigma * Vc) * (1 + (4 * Th / sigma) * df_satdp / 133.332)^(-1) * (f_o * (PA - Pw) - p_o)
```

**Capillary CO₂ Partial Pressure**
```
dp_c/dt = Dc / (sigma_c * Vc) * (p_ac - p_c) + (delta * l2 * h * z / sigma_c) - delta * r2 * p_c
```

**Bound Buffer Dynamics**
```
dz/dt = (delta * r2 * sigma_c * p_c) / (1 mol/L) - delta * l2 * h * z
```

**Total Oxygen Transport**
```
dC_O2/dt = saturation * Q / 100
```

---

### 5. **Acinus-to-Lung Coupling**

**Whole-Lung Scaling**
```
V_A = VA_acinus * LungToAcinusVolRatio
P_A = PA_acinus * 133.33
Resistance = LungToAcinusVolRatio * AlveolarResistance
```

---

## Nomenclature

| Name                 | Type        | Value       | Description                                          | Physical Dimensions           |
|----------------------|-------------|-------------|------------------------------------------------------|------------------------------|
| time                 | parameter   | input       | Simulation time (independent variable)              | seconds (s)                  |
| numAlveoli           | parameter   | input       | Number of alveoli in the acinus                      | count (dimensionless)        |
| V_lung               | parameter   | input       | Total lung volume                                    | liters (L)                   |
| Vc                   | state       | 0.1818      | Volume of central compartment (conducting airways)  | liters (L)                   |
| VA                   | state       | 0.00014     | Volume of alveolar air space (acinus)                | liters (L)                   |
| Vve                  | state       | 1.5082e-05  | Volume of viscoelastic tissue compartment            | liters (L)                   |
| RV                   | parameter   | 1.9         | Residual lung volume                                 | liters (L)                   |
| TLC                  | parameter   | 7.3         | Total lung capacity                                  | liters (L)                   |
| VD                   | parameter   | 0.185       | Dead space volume                                    | liters (L)                   |
| breathsPerMin        | parameter   | input       | Breathing frequency in breaths per minute            | breaths per minute (bpm)     |
| Ac                   | parameter   | 695.29      | Central airway elastic coefficient                    | pressure per volume (Pascal/L)|
| Acw                  | parameter   | 137.29      | Chest wall pressure coefficient                       | pressure per volume (Pascal/L)|
| Al                   | parameter   | 19.61       | Lung pressure coefficient                             | pressure per volume (Pascal/L)|
| As                   | parameter   | 215.75      | Serial airway resistance coefficient                  | resistance (Pascal·s/L)       |
| Bc                   | parameter   | 3657.88     | Central airway recoil constant                        | pressure (Pascal)             |
| Bcp                  | parameter   | 365.788     | Alternate central recoil constant                     | pressure (Pascal)             |
| Bcw                  | parameter   | -343.23     | Chest wall pressure decay                             | pressure (Pascal)             |
| Bl                   | parameter   | -49.03      | Lung pressure offset                                 | pressure (Pascal)             |
| PEEP                 | parameter   | 0.0         | Positive end-expiratory pressure                      | pressure (Pascal)             |
| k_peep               | parameter   | -0.1        | PEEP gain factor                                     | dimensionless                |
| Bs                   | parameter   | 1.961       | Serial resistance pressure offset                      | pressure (Pascal)             |
| Cve                  | parameter   | 0.0051      | Viscoelastic compliance                              | compliance (L/Pascal)         |
| Rve                  | parameter   | 0.0102      | Viscoelastic resistance                              | resistance (Pascal·s/L)       |
| Kl                   | parameter   | 1           | Lung elasticity factor                               | dimensionless                |
| Ks                   | parameter   | -10.9       | Volume-dependent resistance factor                    | dimensionless                |
| Kc                   | parameter   | 0.21        | Central resistance coefficient                        | dimensionless                |
| Vstar                | parameter   | 5.3         | Reference lung volume                                | liters (L)                   |
| Vcmax                | parameter   | 0.185       | Maximum volume of central compartment                 | liters (L)                   |
| Amus                 | parameter   | 196.133     | Amplitude of respiratory muscle pressure              | pressure (Pascal)             |
| PA                   | state       | derived     | Alveolar pressure                                    | pressure (Pascal)             |
| Pc                   | state       | derived     | Central airway pressure                              | pressure (Pascal)             |
| Pl                   | state       | derived     | Lung recoil pressure                                 | pressure (Pascal)             |
| Pcw                  | state       | derived     | Chest wall pressure                                  | pressure (Pascal)             |
| Pmus                 | state       | derived     | Muscle-generated pressure                            | pressure (Pascal)             |
| Pve                  | state       | derived     | Viscoelastic pressure                               | pressure (Pascal)             |
| Ppl                  | state       | derived     | Pleural pressure                                    | pressure (Pascal)             |
| QA                   | output      | derived     | Airflow through alveoli                             | liters per second (L/s)      |
| f_o                  | state       | 0.21        | Alveolar oxygen fraction                            | fraction (dimensionless)     |
| f_c                  | state       | 2.77e-06    | Alveolar carbon dioxide fraction                    | fraction (dimensionless)     |
| p_o                  | state       | input       | Oxygen partial pressure in blood                    | pressure (Pascal)             |
| p_c                  | state       | input       | CO₂ partial pressure in blood                        | pressure (Pascal)             |
| p_ao                 | intermediate| derived     | Oxygen pressure in alveolar air                      | pressure (Pascal)             |
| p_ac                 | intermediate| derived     | CO₂ pressure in alveolar air                         | pressure (Pascal)             |
| Do                   | parameter   | 1.17e-07    | Oxygen diffusion capacity                            | volume per time (L/s)        |
| Dc                   | parameter   | 2.37e-07    | CO₂ diffusion capacity                               | volume per time (L/s)        |
| Pw                   | parameter   | 6266.15     | Water vapor pressure                                | pressure (Pascal)             |
| C_O2                  | state       | 0.0         | Total oxygen content in blood                         | concentration (mol/L)        |
| saturation           | state       | derived     | Hemoglobin oxygen saturation                          | fraction (dimensionless)     |
| z                    | state       | 4.42e-7     | Buffered CO₂ state variable                           | concentration (mol/L)        |
| Less_active_alveoli  | state       | 0.5         | Fraction of less active alveoli                       | fraction (dimensionless)     |
| Fully_active_alveoli | state       | 0.5         | Fraction of fully active alveoli                      | fraction (dimensionless)     |
| recruitmentFactor    | output      | derived     | Fraction of alveoli actively participating in gas exchange | fraction (dimensionless) |


---

## Attribution
The FTU is based on the simplified models of lung published by

Ben-Tal, A. (2006). *Simplified models for gas exchange in the human lungs*. Journal of Theoretical Biology, **238**(2), 474–495. [Elsevier](https://doi.org/10.1016/j.jtbi.2005.05.004)

Athanasiades, A., Ghorbel, F., Clark Jr, J.W., Niranjan, S.C., Olansen, J., Zwischenberger, J.B., & Bidani, A. (2000). *Energy analysis of a nonlinear model of the normal human lung*. Journal of Biological Systems, **8**(2), 115–139. [World Scientific](https://doi.org/10.1142/S0218339000000347)