# Forward Computational Modeling of Respiratory Airflow
## 4 Boundary Conditions and Simulation Methods  
The CFD simulations of gas flow in the airway tree are usually calculated numerically based on the Navier-Stokes equation using a CFD solver. Given the regional variations in oxygen, carbon dioxide, and nitrogen within the lung and over the breathing cycle, the actual density and viscosity of gases may not be uniform throughout the organ. Air density and viscosity are also temperature-dependent. However, for the simplicity of the simulations, air is typically assumed to be incompressible and Newtonian, with a nominal density \(\rho\) of 1.225 kg m\({}^{-3}\) and a viscosity \(\mu\) of 1.81 \(\times\) 10\({}^{-5}\) kg m\({}^{-1}\) s\({}^{-1}\). Mesh-free methods can also be used for respiratory flow simulations, such as smoothed particle hydrodynamics (SPH) [47; 48], element-free Galerkin method (EFG) [49; 50], and the moving particle semi-implicit method (MPS) [51]. Discretizing the flow region remains a commonly used approach to solving the Navier-Stokes equation. Examples of these discretization methods include the Finite Element Method (FEM), Finite Volume Method (FVM), and Finite Difference Method (FDM) [52]. Generally, the finer the mesh, the more spatially detailed and accurate the solution becomes. However, there are a few exceptions where the resulting solution is unchanged [53]. This increase in detail and accuracy is, nonetheless, accompanied by an increase in computational time and resources. The numerical solution is solved iteratively until convergence is attained (i.e., when the residual is less than a pre-assigned value, typically on the order of 10\({}^{-5}\)). Figure 3: 3D Spatial, 1D Structural Model generated using the Volume Filling Method. The generated airways are shown in different colors for each lobe: green for left upper lobe (LUL), magenta for left lower lobe (LLL), blue for right upper lobe (RUL), red for right middle lobe (RML) and orange for right lower lobe (RLL). Modified from reference [44], with permission. Because of the anatomic complexity of the upper airway (i.e., nasal and oral regions), most CFD simulations rely on airway models with an inlet beginning along the trachea [16]. Airflow profiles in the intra- and extrathoracic regions are described using dimensionless numbers, such as the Reynolds (Re) and Womersley (\(\alpha\)) numbers. \[\text{Re}=\frac{\rho\overline{v}d}{\mu} \tag{11}\]  
\[\alpha=\frac{d}{2}\sqrt{\frac{\omega\rho}{\mu}} \tag{12}\]  
where \(\rho\) is the fluid density, \(d\) is the diameter of the airway segment, \(\overline{v}\) is the average velocity with the segment, and \(\omega\) is the angular frequency of gas cycling in units of rad s\({}^{-1}\). For steady airflow, the regime is considered laminar for Re less than 2000, transitional for Re between 2000 and 3000, and turbulent for Re greater than 3000. For oscillatory airflow, the regime is considered quasi-steady for \(\alpha\) less than 1 and unsteady for \(\alpha\) greater than 10. Laminar flow is assumed when resistive pressure losses due to air viscosity dominate over inertial pressures. When airflow is turbulent, either Reynolds-averaged Navier-Stokes (RANS), large eddy simulation (LES), or direct numerical simulation (DNS) computational techniques may be employed. RANS (e.g., k-\(\epsilon\), k-\(\omega\), SST) filters turbulent eddies using time averaging, LES filters small turbulent eddies using spatial averaging, and DNS directly solves the incompressible Navier-Stokes equations. Either of these three computational techniques can be utilized, depending on the complexity of result needed and the available computational resources. RANS has a low computational cost, is suitable for steady-state simulations, and well-developed for models incorporating turbulent flow. However, it is less accurate for unsteady and complex flows with strong separation or large vortices. LES has better accuracy for unsteady flows, is applicable to complex flow problems, and has more precision than RANS, but comes with a higher computational cost.