J.S. Haldane first theorized a decompression model for the Royal Navy, from which most modern decompression models originate.
It consisted of the following postulates:
This last statement is what really makes computer simulation possible.
Each modeled tissue is characterized by two parameters of interest:
Short halftime are tipical of "fast" tissues, like blood, that absorb and release nitrogen quickly.
Long halftimes are tipical of "slow" tissues like fat.
For this simulation, the PADUA (Pennsylvania Analysis of Decompression for Undersea and Aerospace) model was adopted. The PADUA model uses 10 tissues, and is considered more accurate and safe than the U.S. Navy model which uses only 6 tissues.
Tissue  T_{1/2}[minutes]  M_{0}[bar] 
1  5  3,04 
2  10  2,5536 
3  20  2,0672 
4  40  1,6112 
5  80  1,5808 
6  120  1,5504 
7  160  1,52 
8  240  1,4896 
9  320  1,4896 
10  480  1,4592 
Nitrogen ambient pressure [bar] is:
where:

Nitrogen pressure [bar] in a tissue is:
where:

(1) Thus nitrogen pressure change after 1 second is:
(2) Remaining decompression time, i.e. time to reach nitrogen saturation in tissue, is:
where:

(3) Safe Ascent Depth, i.e. the shallowest depth [meters] that can be safely reached during decompression, is:
where:

Once a second the computer calculates the nitrogen pressure Pt in each tissue, at the current depth, using equation (1). Depending on Pa (i.e. depth) and Pt we can have 5 possible situations:
1)  P_{a}  <  M_{0}  Safe depth, the tissue will never become saturated  
2)  P_{t}  <  M_{0}  <  P_{a}  Normal condition. Tissue will become saturated after a time t_{d} that can be calculated with equation (2)  
3)  M_{0}  <  P_{a}  <  P_{t}  These are no decompression situations. Tissue is saturated but will never desaturate, so we must ascend in order to bring P_{a} below M_{0}  
4)  M_{0}  <  P_{t}  <  P_{a}  
5)  P_{a}  <  M_{0}  <  P_{t}  Decompression. Tissue is currently saturated, but will desaturate after a time t_{d} that can be calculated with equation (2). To allow for a safe decompression, P_{a} must not exceed certain limits, i.e. we cannot ascend above a ceiling SAD that can be calculated with equation (3) 