Mathematical Modeling of the Drug Particles Deposition in the Human Respiratory System—Part 1: Development of Virtual Models of the Upper and Lower Respiratory Tract

: In order to carry out mathematical modeling of the drug particles or drop movement in the human respiratory system, an approach to reverse prototyping of the studied areas based on the medical data (computed tomography) results is presented. To adapt the computational grid, a mathematical model of airflow in channels of complex geometry (respiratory system) has been developed. Based on the data obtained, the results of computational experiments for a single-phase system are presented


Introduction
Currently, mathematical modeling of the flight and deposition of drug particles in the human respiratory system stands as an important task from a practical standpoint, the resolution of which will accelerate the development and market launch of new drugs for the treatment of socially significant diseases.
Socially significant diseases are typically divided into two groups: non-communicable and infectious diseases.The former group includes cardiovascular diseases, oncological diseases, chronic obstructive pulmonary disease, asthma, and serious mental and behavioral disorders.Among these, cardiovascular diseases contribute to the majority of deaths from non-communicable socially significant diseases, accounting for 17.9 million deaths annually [1].The latter group encompasses infectious lung diseases such as tuberculosis, bronchitis, and multi-drug-resistant tuberculosis [2].The main feature of infectious socially significant diseases is their ability to spread widely and massively among the population [3].Diseases within this category pose a substantial threat to society, as evidenced by disability, impairment, and mortality rates among the population.Tuberculosis ranks thirteenth among the leading causes of death.In 2021, approximately 10.6 million people contracted tuberculosis, resulting in 1.6 million fatalities [4,5].
The development and market launch of promising pharmaceuticals based on modern delivery systems and new formulations for the treatment of diseases of significant social concern is a pressing task today.The most promising technologies for drug delivery in the treatment of these diseases are intranasal and inhalation technologies [6][7][8].Both intranasal and inhalation delivery methods offer direct access of the drug to the systemic circulation and the potential for direct drug delivery to the brain via olfactory nerves, as well as convenience and rapid achievement of therapeutic drug levels in the bloodstream [9].Inhalation and intranasal drug administration routes present established approaches to disease treatment.However, the attainment of the required therapeutic effect hinges on the deposition of the drug in the targeted area of the respiratory system [10][11][12][13][14].Thus, the study and prediction of drug deposition zones via intranasal or inhalation routes represent significant scientific and technical challenges to ensure maximal therapeutic effectiveness.
Currently, in vivo studies enable the acquisition of reliable and accurate results regarding the movement and deposition of drugs in the respiratory system across various administration methods.Modern medical data visualization methods, such as scintigraphy or single-photon emission computed tomography, are employed to study the deposition of medicinal substances [15].The use of radiolabeled particles facilitates the tracking of drug movement and precise determination of deposition sites.However, this approach is constrained by the high cost of visualization tools, the complexity of particle labeling, and the associated risk of exposure due to the use of radioactive markers.Furthermore, in vivo studies are hampered by patient-specific anatomical features and the complexity of drug administration, rendering the analysis of acquired data and the understanding of drug transport and deposition mechanisms challenging [16,17].
An alternative to in vivo studies is in vitro diagnostics, which facilitates the examination of drug deposition zones utilizing simplified devices or physical replicas of the respiratory system [18][19][20].While this approach is cost-effective and not bound by medical ethics, it is limited by the difficulty of accurately replicating the human respiratory system, accounting for anatomical variations [21].
With the increase in computing power, the feasibility of conducting in silico studies on drug behavior in the respiratory system has emerged, overcoming the limitations of in vivo and in vitro studies.Notably, mathematical models based on computational fluid dynamics equations have been applied to the design of inhalation and intranasal delivery devices [22][23][24][25][26][27][28], as well as the prediction of drug particle or droplet movement and deposition across various administration routes [29][30][31][32].Computational fluid dynamics represents a promising approach to the development of advanced inhalation and intranasal drug delivery systems and the enhancement of their bioavailability [33].
Modern methods of medical data visualization permit the construction of anatomically accurate respiratory system models for in silico studies aimed at predicting the movement and deposition of drug particles or droplets using computational fluid dynamics methods.However, at present, there is not a sufficient number of publications in the literature describing the step-by-step reconstruction of the human respiratory system based on the analysis of medical data.It has been noted in [34][35][36]] that a complete three-dimensional model of the entire lung is not currently feasible due to the challenges of alveolar region segmentation using computed tomography (CT) images.Moreover, even if the entire lung were fully segmented, accurate modeling of the complete lung tree would be unattainable computationally, as it would necessitate billions of grid elements [34,36].
The pulmonary trunk presented in [34,35] had from 2•10 6 to 4•10 6 cells of the computational grid.Such grid cell numbers pose potential challenges in the mathematical modeling of drug particle flight and deposition, attributed to the high computing power and time requirements for a single computational experiment.Hence, there is a need to explore methods and approaches aimed at reducing the number of computational grid cells while ensuring high convergence and calculation efficiency.Thus, the works [37,38] describe the stochastic individual path (SIP) approach based on dividing the airways into three separate sections: from the mouth-throat to bifurcation three, bifurcation four to seven, and bifurcation eight to fifteen, modeling particle deposition in each of them.This approach solves the problems associated with limited computing power, while the simulation can be carried out in related series so the calculation results will reflect the complete path of drug particles in the respiratory tract.Another paper [39] describes a Markov chain model in which each state corresponds to a segment of the respiratory tract where a particle can be located.In the Markov chain model, the probability of transition between allowed states is calculated [40], and the allowed state is considered to be one when the particle is in the corresponding segment of the respiratory tract, either suspended in a fluid flow or deposited on the wall of the respiratory tract.This approach allows us to evaluate the influence of body position and airway narrowing, for example, in the alveolar region, on the likelihood of drug particle deposition.
However, to the authors of the present paper, a computational fluid dynamics approach appears to be more effective for modeling drug particle deposition in anatomically similar human airways.Therefore, the overall goal of this study is to develop a mathematical model of drug particle flight and deposition in the human respiratory system, as well as to devise an approach that simultaneously facilitates the construction of anatomically accurate virtual models of human respiratory system organs while also reducing the number of computational grid cells, thereby enhancing computational experiment efficiency.
Part 1 of this study will explore the methods employed in the development of virtual models of the human nasal cavity and lungs, conducting preliminary computational experiments aimed at adapting computational grids.Part 2 of this study will present a complex, sophisticated mathematical model describing the movement of the dispersed phase in the human respiratory system, as well as the results of computational experiments for particles of various compositions.

Development of a Virtual Model of the Human Respiratory System
To study the spraying of particles or droplets of a drug in the human respiratory system (nasal cavity and lungs), an approach is proposed that consists of four main and two intermediate stages as follows: 1.
Reconstruction of 3D models of the lungs and nasal cavity from CT images with the elimination of geometric defects (Part 1 of the article); 2.
Construction of a computational grid (Part 1 of the article); • Conducting preliminary computational experiments using computational fluid dynamics methods-an intermediate stage (Part 1 of the article); • Adaptation of the computational grid-intermediate stage (Part 1 of the article).

3.
Calculation of the trajectory of movement and deposition of drug particles in the organs of the human respiratory system using computational fluid dynamics methods (Part 2 of the article); 4.
Analysis of the results and determination of places where drug particles are deposited depending on their size (Part 2 of the article).
Intermediate steps are necessary to select the main parameters or characteristics of the computational grid.The described approach will be valid both for a sick patient and for a patient with completely different anatomical features, for example, with a different structure of the septum in the nasal cavity.This is due to the fact that the stages of the approach themselves and their sequence will not change.However, it should be noted that the reconstruction of 3D models of the lungs and nasal cavity, for each case, must be performed separately because CT images are individual for each patient.Subsequent stages of the approach can be automated because they will only require loading the resulting 3D geometry into the appropriate software package and performing calculations.
This part of the article will describe, in detail, the stages of constructing virtual geometries of the nasal cavity and lungs based on CT data processing and the development of a mathematical model of the movement of the continuous phase in the human nasal cavity and lungs using computational fluid dynamics methods and a series of preliminary computational experiments aimed at adapting computational grids.

Examination and Processing of Computed Tomography Results
CT serves as a pivotal tool for visualizing and assessing morphological alterations in the respiratory tract and lung parenchyma, remaining the sole reliable imaging method for diagnosing and monitoring early lung pathologies.CT scans employ X-ray radiation, providing insights into the physical characteristics of the substance.While magnetic resonance imaging (MRI) scanners, operating on magnetic field and radio frequency radiation principles, have been proposed as potential alternatives to CT, CT remains a cost-effective and informative method for medical data visualization.Consequently, CT data are acquired and processed to visualize the nasal cavity and human lungs within this study.
This study used CT images from a healthy female patient.The patient's height and weight are 173 cm and 58 kg, respectively.
The obtained CT results for the upper respiratory tract, particularly the human nasal cavity, are depicted in Figure 1 across three distinct projections: frontal, sagittal, and axial planes.
providing insights into the physical characteristics of the substance.While magnetic resonance imaging (MRI) scanners, operating on magnetic field and radio frequency radiation principles, have been proposed as potential alternatives to CT, CT remains a costeffective and informative method for medical data visualization.Consequently, CT data are acquired and processed to visualize the nasal cavity and human lungs within this study.
This study used CT images from a healthy female patient.The patient's height and weight are 173 cm and 58 kg, respectively.
The obtained CT results for the upper respiratory tract, particularly the human nasal cavity, are depicted in Figure 1 across three distinct projections: frontal, sagittal, and axial planes.Figure 2 shows the obtained CT results for the lower respiratory tract (human lungs) in three different projections.
The CT images above clearly show the boundaries between the airways (dark area of the CT images) and soft or bone tissue (light area of the CT images).
The construction of virtual models of the human nasal cavity and lungs is carried out by layer-by-layer processing of visualized CT images in three different planes using special computer programs aimed at constructing three-dimensional objects.The CT images above clearly show the boundaries between the airways (dark area of the CT images) and soft or bone tissue (light area of the CT images).
The construction of virtual models of the human nasal cavity and lungs is carried out by layer-by-layer processing of visualized CT images in three different planes using special computer programs aimed at constructing three-dimensional objects.

Construction of Virtual Models of the Respiratory System Organs (Upper and Lower Respiratory Tract)
CT images of the nasal cavity and lungs were processed in the 3D Slicer 5.2.2 software, which is a free open-source program containing the necessary set of tools for image analysis and visualization of medical data.
The 3D Slicer software enables the loading of CT data and their visualization in three distinct projections: frontal, sagittal, and axial planes, facilitating subsequent analysis and image processing.The software provides a comprehensive set of tools, allowing for the segmentation of various areas, volumetric rendering of images, and ultimately, the generation of a virtual 3D model of the human respiratory system based on the CT results.

Construction of Virtual Models of the Respiratory System Organs (Upper and Lower Respiratory Tract)
CT images of the nasal cavity and lungs were processed in the 3D Slicer 5.2.2 software, which is a free open-source program containing the necessary set of tools for image analysis and visualization of medical data.
The 3D Slicer software enables the loading of CT data and their visualization in three distinct projections: frontal, sagittal, and axial planes, facilitating subsequent analysis and image processing.The software provides a comprehensive set of tools, allowing for the segmentation of various areas, volumetric rendering of images, and ultimately, the generation of a virtual 3D model of the human respiratory system based on the CT results.The subsequent section outlines the results obtained from generating virtual models of the respiratory system organs, focusing separately on the nasal cavity and human lungs.
To generate a 3D model of the upper respiratory tract, CT images of the nasal cavity were loaded into the 3D Slicer program and displayed in three projections: frontal, sagittal, and axial (Figure 3).
The subsequent section outlines the results obtained from generating virtual models of the respiratory system organs, focusing separately on the nasal cavity and human lungs.
To generate a 3D model of the upper respiratory tract, CT images of the nasal cavity were loaded into the 3D Slicer program and displayed in three projections: frontal, sagittal, and axial (Figure 3).During the construction of a 3D model utilizing the Segment Editor tools in the 3D Slicer program, the anatomical components of the human nasal cavity were delineated.These components include the primary airspace, the inferior turbinate, the middle turbinate, the superior turbinate, the sphenoid sinuses, and the ethmoidal labyrinth cells.Subsequently, geometric adjustments were made to adapt to these identified anatomical sections (Figure 4).During the construction of a 3D model utilizing the Segment Editor tools in the 3D Slicer program, the anatomical components of the human nasal cavity were delineated.These components include the primary airspace, the inferior turbinate, the middle turbinate, the superior turbinate, the sphenoid sinuses, and the ethmoidal labyrinth cells.Subsequently, geometric adjustments were made to adapt to these identified anatomical sections (Figure 4).
The subsequent section outlines the results obtained from generating virtual models of the respiratory system organs, focusing separately on the nasal cavity and human lungs.
To generate a 3D model of the upper respiratory tract, CT images of the nasal cavity were loaded into the 3D Slicer program and displayed in three projections: frontal, sagittal, and axial (Figure 3).During the construction of a 3D model utilizing the Segment Editor tools in the 3D Slicer program, the anatomical components of the human nasal cavity were delineated.These components include the primary airspace, the inferior turbinate, the middle turbinate, the superior turbinate, the sphenoid sinuses, and the ethmoidal labyrinth cells.Subsequently, geometric adjustments were made to adapt to these identified anatomical sections (Figure 4).The 3D Slicer program allows you to generate a virtual structure with specified characteristics based on CT results.A complete visualization of the human nasal cavity is shown in Figure 5.The main parts of the nasal cavity are highlighted in color.
The 3D Slicer program allows you to generate a virtual structure with specified characteristics based on CT results.A complete visualization of the human nasal cavity is shown in Figure 5.The main parts of the nasal cavity are highlighted in color.The resulting 3D model was saved in STL format and imported into the ANSYS SpaceClaim 17.0 software package, which provides a set of geometric design tools for additional smoothing and elimination of existing defects.The 3D model of the lungs was processed in the same way, so a detailed description of the process of smoothing and eliminating defects will be given below.
To generate a 3D model of the lower respiratory tract, CT images of the lungs were loaded into the 3D Slicer program and displayed in three projections.Figure 6 shows the result of the automatic generation of a 3D lung model.The resulting 3D model was saved in STL format and imported into the ANSYS SpaceClaim 17.0 software package, which provides a set of geometric design tools for additional smoothing and elimination of existing defects.The 3D model of the lungs was processed in the same way, so a detailed description of the process of smoothing and eliminating defects will be given below.
To generate a 3D model of the lower respiratory tract, CT images of the lungs were loaded into the 3D Slicer program and displayed in three projections.Figure 6 shows the result of the automatic generation of a 3D lung model.
The 3D Slicer program allows you to generate a virtual structure with specified characteristics based on CT results.A complete visualization of the human nasal cavity is shown in Figure 5.The main parts of the nasal cavity are highlighted in color.The resulting 3D model was saved in STL format and imported into the ANSYS SpaceClaim 17.0 software package, which provides a set of geometric design tools for additional smoothing and elimination of existing defects.The 3D model of the lungs was processed in the same way, so a detailed description of the process of smoothing and eliminating defects will be given below.
To generate a 3D model of the lower respiratory tract, CT images of the lungs were loaded into the 3D Slicer program and displayed in three projections.Figure 6 shows the result of the automatic generation of a 3D lung model.The automatic generation of the lungs' 3D model from CT images resulted in the amalgamation of the bronchopulmonary trunk and pulmonary lobes into a singular 3D model, lacking the capability to differentiate between them.However, for the subsequent modeling of drug dispersion within the lower respiratory tract, isolating the bronchopulmonary trunk becomes imperative.Hence, CT images, loaded in three projections, underwent layer-by-layer processing using the Segment Editor toolkit in the 3D Slicer program.This meticulous process of identifying the free volume of the airways enabled the generation of a distinct 3D model representing the bronchopulmonary trunk.The outcome of processing the CT lung images and the resulting 3D model are depicted in Figure 7.
The automatic generation of the lungs' 3D model from CT images resulted in the amalgamation of the bronchopulmonary trunk and pulmonary lobes into a singular 3D model, lacking the capability to differentiate between them.However, for the subsequent modeling of drug dispersion within the lower respiratory tract, isolating the bronchopulmonary trunk becomes imperative.Hence, CT images, loaded in three projections, underwent layer-by-layer processing using the Segment Editor toolkit in the 3D Slicer program.This meticulous process of identifying the free volume of the airways enabled the generation of a distinct 3D model representing the bronchopulmonary trunk.The outcome of processing the CT lung images and the resulting 3D model are depicted in Figure 7.The generated 3D model of the bronchopulmonary trunk exhibits several imperfections, including uneven surfaces, gaps between solid parts of the geometry, and inaccuracies in the replication of individual elements of the bronchopulmonary trunk.These geometry defects render the application of a computational mesh and subsequent calculations unfeasible.Consequently, the identified defects of the 3D model were rectified using the ANSYS SpaceClaim 17.0 software package.To initiate this process, the 3D model of the bronchopulmonary trunk, obtained from the 3D Slicer program, was saved in the STL format compatible with ANSYS SpaceClaim 17.0.
The rectification of defects in the 3D model involved several steps: editing or volumetric rendering of missing parts of the geometry, smoothing of surfaces, and elimination of defects of individual triangular faces describing the surface of the 3D geometry.
During the first stage, adjustments were made to individual components of the geometry, which included volumetric rendering to fill in missing parts and eliminate gaps between triangular geometry faces.
Subsequently, in the second stage, the surface of the three-dimensional lung geometry underwent smoothing utilizing the built-in tools within the ANSYS SpaceClaim 17.0 software package.The outcome of this smoothing process is illustrated in Figure 8.The generated 3D model of the bronchopulmonary trunk exhibits several imperfections, including uneven surfaces, gaps between solid parts of the geometry, and inaccuracies in the replication of individual elements of the bronchopulmonary trunk.These geometry defects render the application of a computational mesh and subsequent calculations unfeasible.Consequently, the identified defects of the 3D model were rectified using the ANSYS SpaceClaim 17.0 software package.To initiate this process, the 3D model of the bronchopulmonary trunk, obtained from the 3D Slicer program, was saved in the STL format compatible with ANSYS SpaceClaim 17.0.
The rectification of defects in the 3D model involved several steps: editing or volumetric rendering of missing parts of the geometry, smoothing of surfaces, and elimination of defects of individual triangular faces describing the surface of the 3D geometry.
During the first stage, adjustments were made to individual components of the geometry, which included volumetric rendering to fill in missing parts and eliminate gaps between triangular geometry faces.
Subsequently, in the second stage, the surface of the three-dimensional lung geometry underwent smoothing utilizing the built-in tools within the ANSYS SpaceClaim 17.0 software package.The outcome of this smoothing process is illustrated in Figure 8. Finally, during the third and final stage, defects within individual triangular faces describing the surface of the three-dimensional geometry were addressed.This was followed by the generation of a solid body representing the 3D model of the bronchopulmonary trunk, as depicted in Figure 9. Finally, during the third and final stage, defects within individual triangular faces describing the surface of the three-dimensional geometry were addressed.This was followed by the generation of a solid body representing the 3D model of the bronchopulmonary trunk, as depicted in Figure 9. Finally, during the third and final stage, defects within individual triangular faces describing the surface of the three-dimensional geometry were addressed.This was followed by the generation of a solid body representing the 3D model of the bronchopulmonary trunk, as depicted in Figure 9.The resulting solid body (3D model of the bronchopulmonary trunk), in the form shown in Figure 9, can be used at the next stage when generating a computational mesh.However, in order to construct an adequate computational mesh with a minimum number of computational cells and determine the inlet and outlet zones, the solid body must be smoothed as much as possible.Therefore, using the reverse prototyping method, the elements of the resulting solid body were replaced with cylinders.For this purpose, additional working planes were constructed in several sections, in which sections of the original geometry were described by circles of a similar diameter, followed by the transformation of the circle into a surface.The resulting surfaces were sequentially combined using the Blend function in ANSYS SpaceClaim 17.0 and converted into a solid.The processing result is presented in Figure 10.The resulting solid body (3D model of the bronchopulmonary trunk), in the form shown in Figure 9, can be used at the next stage when generating a computational mesh.However, in order to construct an adequate computational mesh with a minimum number of computational cells and determine the inlet and outlet zones, the solid body must be smoothed as much as possible.Therefore, using the reverse prototyping method, the elements of the resulting solid body were replaced with cylinders.For this purpose, additional working planes were constructed in several sections, in which sections of the original geometry were described by circles of a similar diameter, followed by the transformation of the circle into a surface.The resulting surfaces were sequentially combined using the Blend function in ANSYS SpaceClaim 17.0 and converted into a solid.The processing result is presented in Figure 10.Finally, during the third and final stage, defects within individual triangular faces describing the surface of the three-dimensional geometry were addressed.This was followed by the generation of a solid body representing the 3D model of the bronchopulmonary trunk, as depicted in Figure 9.The resulting solid body (3D model of the bronchopulmonary trunk), in the form shown in Figure 9, can be used at the next stage when generating a computational mesh.However, in order to construct an adequate computational mesh with a minimum number of computational cells and determine the inlet and outlet zones, the solid body must be smoothed as much as possible.Therefore, using the reverse prototyping method, the elements of the resulting solid body were replaced with cylinders.For this purpose, additional working planes were constructed in several sections, in which sections of the original geometry were described by circles of a similar diameter, followed by the transformation of the circle into a surface.The resulting surfaces were sequentially combined using the Blend function in ANSYS SpaceClaim 17.0 and converted into a solid.The processing result is presented in Figure 10.On the generated 3D model of the bronchopulmonary trunk (Figure 10), consisting of cylinders of various diameters, it is possible to determine the inlet and outlet zones used to set material flows.The resulting 3D model was used for further generation of the computational mesh.

Generation of a Computational Mesh for Various Areas of the Human Respiratory System and Its Adaptation Depending on the Route of Drug Administration
A computational mesh comprises a set of grid nodes delineated within the domain of a specified function.In this study, the utilization of a computational mesh is imperative for numerically solving differential and integral equations pertinent to the flight and deposition of drug particles within the human respiratory system.
The generation of the computational mesh was conducted utilizing the ANSYS Meshing 17.0 software package.This software is recognized for its multifaceted capabilities and high performance, facilitating the creation of mesh models tailored for precise multidisciplinary calculations.ANSYS Meshing 17.0 facilitates the generation of a computational mesh optimized to suit the specific geometry of interest.It selects suitable computational mesh parameters based on the analysis type being executed and the geometry of the 3D model.
In the generation of the computational mesh for both the upper and lower respiratory tracts, automatic mesh adjustment was employed.This functionality is inherent to the analysis type being conducted, namely, hydrodynamic calculation, and is contingent on the geometry of the 3D model.Irregular computational grids were constructed utilizing the tetrahedron method.
Figure 11 illustrates the resultant computational mesh generated for the upper respiratory tract, specifically the human nasal cavity.
to set material flows.The resulting 3D model was used for further generation of the computational mesh.

Generation of a Computational Mesh for Various Areas of the Human Respiratory System and Its Adaptation Depending on the Route of Drug Administration
A computational mesh comprises a set of grid nodes delineated within the domain of a specified function.In this study, the utilization of a computational mesh is imperative for numerically solving differential and integral equations pertinent to the flight and deposition of drug particles within the human respiratory system.
The generation of the computational mesh was conducted utilizing the ANSYS Meshing 17.0 software package.This software is recognized for its multifaceted capabilities and high performance, facilitating the creation of mesh models tailored for precise multidisciplinary calculations.ANSYS Meshing 17.0 facilitates the generation of a computational mesh optimized to suit the specific geometry of interest.It selects suitable computational mesh parameters based on the analysis type being executed and the geometry of the 3D model.
In the generation of the computational mesh for both the upper and lower respiratory tracts, automatic mesh adjustment was employed.This functionality is inherent to the analysis type being conducted, namely, hydrodynamic calculation, and is contingent on the geometry of the 3D model.Irregular computational grids were constructed utilizing the tetrahedron method.
Figure 11 illustrates the resultant computational mesh generated for the upper respiratory tract, specifically the human nasal cavity.The generated computational mesh for the upper respiratory tract comprises 575 568 mesh elements.It is important to note that the computational grid depicted in Figure 11 is preliminary, as further adaptation of the computational grid is underway.The generated computational mesh for the upper respiratory tract comprises 575,568 mesh elements.It is important to note that the computational grid depicted in Figure 11 is preliminary, as further adaptation of the computational grid is underway.
Adaptation of the computational mesh is essential to ensure that the solution to the model equations remains independent of the topology of the 3D geometry.This adaptation process follows an iterative approach, gradually increasing the number of mesh elements (mesh quality or density).Adaptation occurs subsequent to the preliminary calculation of the model equations within the framework of the initially created computational grid.To execute the adaptation of the computational grid, a parameter is selected, the value of which dictates the accuracy of the ongoing calculations.Cells of the computational grid, wherein the gradient of the selected parameter exceeds the user-specified threshold, are identified and subsequently refined.
Adaptation of the computational grid for the nasal cavity and lungs was carried out using a simplified system of equations.The calculation was carried out in the ANSYS Fluent 17.0 software package.Specifically, a single-phase problem was addressed, focusing on the airflow through the system encompassing the upper and lower respiratory tracts, without considering the dispersion of particles or droplets of the drug, in a stationary state.The mathematical description is presented by the equations of conservation of mass and momentum; heat transfer is not taken into account in the following model: where ρ is the density of the continuous medium, kg/m 3 ; → v is the continuum velocity vector, m/s; p is static pressure, Pa; = τ is the viscous stress tensor; ρ → g is gravity, kg/m 2 •s 2 ; µ is dynamic viscosity, Pa•s; I is the unit tensor; P is gas pressure, Pa; T is gas temperature, K; and R is universal gas constant, J/(mol•K).
The given system of equations is solved under the following initial and boundary conditions: where x, y, and z are the spatial coordinates, m; in is the inlet; init is the initial condition; and w is the wall.
To adapt the computational mesh of the nasal cavity and carry out calculations, a volumetric flow rate of 30 L/min (0.0005 m 3 /s) is taken.However, in the ANSYS Fluent 17.0 software package, calculations are carried out at a given mass airflow rate, so the volume flow rate was converted to mass flow as follows: where M is the mass flow, kg/s; Q is the volume flow, m 3 /s; and ρ air is air density, kg/m 3 .The air mass flow rate at the inlet was 0.00064 kg/s.The inlet pressure corresponds to atmospheric pressure.
In this work, the average value of the flow rate was used as a parameter for adaptation.To determine the average speed and adjust the computational domain based on the geometry, auxiliary parallel planes were created.For example, in the case of the nasal cavity, sections were created in the OY plane, as shown in green in Figure 12.
For the computational mesh presented in Figure 11, the required number of adaptation steps is carried out until the relative change in the average value of the flow velocity along all auxiliary cutting planes (Figure 12) becomes equal to 0.5%.
Table 1 shows the initial number of cells for the preliminary computational grid (Figure 11), and the increase in the number of grid cells at each adaptation step.
Table 2 shows the average calculated values of the flow velocity along the cutting planes of the Y axis in the nasal cavity at each step of adaptation of the computational grid.For the computational mesh presented in Figure 11, the required number of adaptation steps is carried out until the relative change in the average value of the flow velocity along all auxiliary cutting planes (Figure 12) becomes equal to 0.5%.
Table 1 shows the initial number of cells for the preliminary computational grid (Figure 11), and the increase in the number of grid cells at each adaptation step.Table 2 shows the average calculated values of the flow velocity along the cutting planes of the Y axis in the nasal cavity at each step of adaptation of the computational grid.
Table 2. Average velocity values along the cutting planes of the Y axis in the nasal cavity.

Adaptation
Step   Figure 13 shows the distribution of the average relative error along the auxiliary cutting planes of the Y axis in the nasal cavity at each step of the computational mesh adaptation.

Average Velocity along Cutting Planes at Different Positions of the Plane along the Y Axis
Based on the adaptation cycles performed, we can conclude that the relative deviation of the average speed along the cutting planes at the last adaptation step does not exceed 0.5%.
The resulting computational mesh for the nasal cavity consists of 733,021 cells.Below are the contours of the airflow velocity distribution along each auxiliary plane of the Y axis in the nasal cavity (Figure 14a), as well as the velocity vector (Figure 14b), which were obtained for the final step of mesh adaptation.
Figure 13 shows the distribution of the average relative error along the auxiliary cutting planes of the Y axis in the nasal cavity at each step of the computational mesh adaptation.
Figure 13.The relative deviation of the average calculated velocity for each section at each step of adaptation of the computational mesh for the nasal cavity.
Based on the adaptation cycles performed, we can conclude that the relative deviation of the average speed along the cutting planes at the last adaptation step does not exceed 0.5%.
The resulting computational mesh for the nasal cavity consists of 733 021 cells.Below are the contours of the airflow velocity distribution along each auxiliary plane of the Y axis in the nasal cavity (Figure 14a), as well as the velocity vector (Figure 14b), which were obtained for the final step of mesh adaptation.Based on the adaptation cycles performed, we can conclude that the relative deviation of the average speed along the cutting planes at the last adaptation step does not exceed 0.5%.
The resulting computational mesh for the nasal cavity consists of 733 021 cells.Below are the contours of the airflow velocity distribution along each auxiliary plane of the Y axis in the nasal cavity (Figure 14a), as well as the velocity vector (Figure 14b), which were obtained for the final step of mesh adaptation.From the results obtained (Figure 14), it is clear that the maximum value of airspeed is observed in the narrowest parts of the virtual geometry, which is associated with a decrease in the cross-sectional area of the airways.The speed of airflow is maximum along the shortest path from the entrance to the exit of the nasal cavity.
The generated computational mesh for the lower respiratory tract (human bronchopulmonary trunk) is presented in Figure 15.When generating the computational mesh, automatic tuning was also used, just like for the upper respiratory tract.
is observed in the narrowest parts of the virtual geometry, which is associated with a decrease in the cross-sectional area of the airways.The speed of airflow is maximum along the shortest path from the entrance to the exit of the nasal cavity.
The generated computational mesh for the lower respiratory tract (human bronchopulmonary trunk) is presented in Figure 15.When generating the computational mesh, automatic tuning was also used, just like for the upper respiratory tract.The generated computational mesh for the lower respiratory tract has 1 000 292 mesh elements.The calculation grid presented in Figure 15 is preliminary since further adaptation is carried out on its basis.
To carry out preliminary calculations in the bronchopulmonary trunk, which are necessary for adapting the calculation grid, a volumetric airflow rate of 30 L/min is taken (0.0005 m 3 /s).Volumetric airflow was converted to mass flow using Equation (7).The air mass flow rate at the inlet was 0.00064 kg/s.The inlet pressure corresponds to atmospheric pressure.
In order to adapt the computational domain, a criterion similar to that of the nasal cavity, namely, the average velocity, was used.Due to the particular geometry of the lungs, parallel sections were created in the OZ plane, as shown schematically in Figure 16.The generated computational mesh for the lower respiratory tract has 1,000,292 mesh elements.The calculation grid presented in Figure 15 is preliminary since further adaptation is carried out on its basis.
To carry out preliminary calculations in the bronchopulmonary trunk, which are necessary for adapting the calculation grid, a volumetric airflow rate of 30 L/min is taken (0.0005 m 3 /s).Volumetric airflow was converted to mass flow using Equation (7).The air mass flow rate at the inlet was 0.00064 kg/s.The inlet pressure corresponds to atmospheric pressure.
In order to adapt the computational domain, a criterion similar to that of the nasal cavity, namely, the average velocity, was used.Due to the particular geometry of the lungs, parallel sections were created in the OZ plane, as shown schematically in Figure 16.
For the computational grid presented in Figure 15, the required number of adaptation steps is carried out until the relative change in the average value of the flow velocity along all auxiliary cutting planes (Figure 16) becomes equal to 0.5%.
Table 3 shows the initial number of cells for the preliminary computational grid (Figure 15) and the increase in the number of grid cells at each adaptation step.
Table 4 shows the average calculated velocity values along the cutting planes of the Z axis in the bronchopulmonary trunk at each step of adaptation of the computational mesh.
Figure 17 shows the distribution of the average relative error along the auxiliary cutting planes of the Z axis in the bronchopulmonary trunk at each step of adaptation of the computational grid.For the computational grid presented in Figure 15, the required number of adaptation steps is carried out until the relative change in the average value of the flow velocity along all auxiliary cutting planes (Figure 16) becomes equal to 0.5%.
Table 3 shows the initial number of cells for the preliminary computational grid (Figure 15) and the increase in the number of grid cells at each adaptation step.Based on the conducted adaptation cycles, it can be deduced that the relative deviation of the average speed along the cutting planes at the last adaptation step does not surpass 0.5%.Figure 17 shows the distribution of the average relative error along the auxiliary cutting planes of the Z axis in the bronchopulmonary trunk at each step of adaptation of the computational grid.Based on the conducted adaptation cycles, it can be deduced that the relative deviation of the average speed along the cutting planes at the last adaptation step does not surpass 0.5%.
The resultant computational mesh for the bronchopulmonary trunk comprises 2 501 703 cells.The given number of computational grid cells (2 501 703) when modeling airflow, i.e., the single-phase system (without taking into account drug particles) in the threedimensional geometry of the bronchopulmonary trunk, is acceptable.However, for a system consisting of continuous and dispersed phases, the number of grid cells equal to 2 501 703 is not suitable because a lot of computing power will be required to solve the equations The resultant computational mesh for the bronchopulmonary trunk comprises 2,501,703 cells.The given number of computational grid cells (2,501,703) when modeling airflow, i.e., the single-phase system (without taking into account drug particles) in the three-dimensional geometry of the bronchopulmonary trunk, is acceptable.However, for a system consisting of continuous and dispersed phases, the number of grid cells equal to 2,501,703 is not suitable because a lot of computing power will be required to solve the equations of the conservation of mass and momentum for each of the phases.Therefore, in the future, the Polyhedral method will be applied to computational grids, which, with further modeling of the trajectory of movement and deposition of particles in the human respiratory system, will significantly reduce the number of grid cells.
The following depictions illustrate the contours of the airflow velocity distribution along each auxiliary plane of the Z axis in the bronchopulmonary trunk (Figure 18a) along with the streamlines (Figure 18b) obtained during the final step of adapting the computational mesh.
The presented contours (Figure 18) from blue to red reflect the velocity value at each local point of the virtual geometry of the bronchopulmonary trunk.From the results obtained, it is clear that the maximum value of airspeed is observed in the narrowest parts of the virtual geometry, which is associated with a decrease in the cross-sectional area of the bronchi.
modeling of the trajectory of movement and deposition of particles in the human respiratory system, will significantly reduce the number of grid cells.
The following depictions illustrate the contours of the airflow velocity distribution along each auxiliary plane of the Z axis in the bronchopulmonary trunk (Figure 18a) along with the streamlines (Figure 18b) obtained during the final step of adapting the computational mesh.The presented contours (Figure 18) from blue to red reflect the velocity value at each local point of the virtual geometry of the bronchopulmonary trunk.From the results obtained, it is clear that the maximum value of airspeed is observed in the narrowest parts of the virtual geometry, which is associated with a decrease in the cross-sectional area of the bronchi.

Conclusions
This paper delineates the process of reverse prototyping for both the upper and lower respiratory tracts, predicated on findings from medical research.With the aim of facilitating further mathematical modeling, the process entails geometry adaptation, followed by the adjustment of the calculation stack.
This study presents two distinct approaches to adapting the geometry of the investigated regions.Specifically, for prototyping the organs of the upper respiratory tract, conventional functions were employed to rectify defects emerging after processing the CT results.However, as the complexity of the regions' geometry increases, particularly evident in the case of the lower respiratory tract, a notable rise in defects is observed.This escalation in defects can potentially lead to an augmentation in computational domain elements and, consequently, an escalation in computational requirements.Thus, in constructing the geometry of the organs of the lower respiratory tract, the principles of reverse prototyping were applied.This approach facilitated the elimination of geometry defects while preserving the principal geometric dimensions.
Preliminary computational experiments were conducted utilizing the constructed geometries.Subsequently, based on the outcomes of these experiments, adjustments were made to the computational mesh.The resultant computational domains will be utilized in forthcoming endeavors involving mathematical modeling to analyze the movement and assess the deposition zones of particles or droplets.

Conclusions
This paper delineates the process of reverse prototyping for both the upper and lower respiratory tracts, predicated on findings from medical research.With the aim of facilitating further mathematical modeling, the process entails geometry adaptation, followed by the adjustment of the calculation stack.
This study presents two distinct approaches to adapting the geometry of the investigated regions.Specifically, for prototyping the organs of the upper respiratory tract, conventional functions were employed to rectify defects emerging after processing the CT results.However, as the complexity of the regions' geometry increases, particularly evident in the case of the lower respiratory tract, a notable rise in defects is observed.This escalation in defects can potentially lead to an augmentation in computational domain elements and, consequently, an escalation in computational requirements.Thus, in constructing the geometry of the organs of the lower respiratory tract, the principles of reverse prototyping were applied.This approach facilitated the elimination of geometry defects while preserving the principal geometric dimensions.
Preliminary computational experiments were conducted utilizing the constructed geometries.Subsequently, based on the outcomes of these experiments, adjustments were made to the computational mesh.The resultant computational domains will be utilized in forthcoming endeavors involving mathematical modeling to analyze the movement and assess the deposition zones of particles or droplets.

Figure 2
Figure2shows the obtained CT results for the lower respiratory tract (human lungs) in three different projections.

Figure 3 .
Figure 3. Layer-by-layer processing of CT images in three projections: frontal plane (a); sagittal plane (b); axial plane (c); generated 3D model of the nasal cavity (d).

Figure 4 .
Figure 4. Isolation of the anatomical areas of the human nasal cavity: layer-by-layer identification of anatomical areas (a); result of adaptation of individual parts of the geometry (b).

Figure 3 .
Figure 3. Layer-by-layer processing of CT images in three projections: frontal plane (a); sagittal plane (b); axial plane (c); generated 3D model of the nasal cavity (d).

Figure 3 .
Figure 3. Layer-by-layer processing of CT images in three projections: frontal plane (a); sagittal plane (b); axial plane (c); generated 3D model of the nasal cavity (d).

Figure 4 .
Figure 4. Isolation of the anatomical areas of the human nasal cavity: layer-by-layer identification of anatomical areas (a); result of adaptation of individual parts of the geometry (b).

Figure 4 .
Figure 4. Isolation of the anatomical areas of the human nasal cavity: layer-by-layer identification of anatomical areas (a); result of adaptation of individual parts of the geometry (b).

Figure 5 .
Figure 5. Visualization of the human nasal cavity.

Figure 6 .
Figure 6.Automatically generated 3D model of the lungs in the 3D Slicer program.

Figure 5 .
Figure 5. Visualization of the human nasal cavity.

Figure 5 .
Figure 5. Visualization of the human nasal cavity.

Figure 6 .
Figure 6.Automatically generated 3D model of the lungs in the 3D Slicer program.Figure 6. Automatically generated 3D model of the lungs in the 3D Slicer program.

Figure 6 .
Figure 6.Automatically generated 3D model of the lungs in the 3D Slicer program.Figure 6. Automatically generated 3D model of the lungs in the 3D Slicer program.

Figure 7 .
Figure 7. Layer−by−layer processing of CT images in three projections: frontal plane (a); sagittal plane (b); axial plane (c); generated 3D model of the bronchopulmonary trunk (d).

Figure 7 .
Figure 7. Layer−by−layer processing of CT images in three projections: frontal plane (a); sagittal plane (b); axial plane (c); generated 3D model of the bronchopulmonary trunk (d).

Computation 2024 , 19 Figure 8 .
Figure 8.The result of smoothing a 3D model of the bronchopulmonary trunk in the ANSYS Space-Claim software package.

Figure 8 .
Figure 8.The result of smoothing a 3D model of the bronchopulmonary trunk in the ANSYS SpaceClaim software package.

Figure 8 .
Figure 8.The result of smoothing a 3D model of the bronchopulmonary trunk in the ANSYS Space-Claim software package.

Figure 9 .
Figure 9. Generation of the bronchopulmonary trunk solid body.

Figure 10 .
Figure 10.Reverse prototyping and generation of the final 3D model of the bronchopulmonary trunk.

Figure 9 .
Figure 9. Generation of the bronchopulmonary trunk solid body.

Figure 8 .
Figure 8.The result of smoothing a 3D model of the bronchopulmonary trunk in the ANSYS Space-Claim software package.

Figure 9 .
Figure 9. Generation of the bronchopulmonary trunk solid body.

Figure 10 .
Figure 10.Reverse prototyping and generation of the final 3D model of the bronchopulmonary trunk.

Figure 10 .
Figure 10.Reverse prototyping and generation of the final 3D model of the bronchopulmonary trunk.

Figure 11 .
Figure 11.Computational mesh generated for the human nasal cavity.

Figure 11 .
Figure 11.Computational mesh generated for the human nasal cavity.

Figure 12 .
Figure 12.Auxiliary cutting planes perpendicular to the Y axis for adapting the computational mesh of the nasal cavity.

Figure 12 .
Figure 12.Auxiliary cutting planes perpendicular to the Y axis for adapting the computational mesh of the nasal cavity.

Figure 13 .
Figure13.The relative deviation of the average calculated velocity for each section at each step of adaptation of the computational mesh for the nasal cavity.

Figure 13 .
Figure13.The relative deviation of the average calculated velocity for each section at each step of adaptation of the computational mesh for the nasal cavity.

Figure 14 .
Figure 14.Distribution of airflow velocity in the nasal cavity: velocity contours (a); velocity vector (b).

Figure 15 .
Figure 15.Computational mesh generated for the bronchopulmonary trunk.

Figure 15 .
Figure 15.Computational mesh generated for the bronchopulmonary trunk.

Figure 16 .
Figure 16.Auxiliary cutting planes perpendicular to the Z axis for adapting the computational mesh of the bronchopulmonary trunk.

Figure 16 .
Figure 16.Auxiliary cutting planes perpendicular to the Z axis for adapting the computational mesh of the bronchopulmonary trunk.

Figure 17 .
Figure17.The relative deviation of the average calculated velocity for each section at each step of adaptation of the computational mesh for the bronchopulmonary trunk.

Figure 17 .
Figure17.The relative deviation of the average calculated velocity for each section at each step of adaptation of the computational mesh for the bronchopulmonary trunk.

Author Contributions:
Conceptualization, N.M.; methodology, E.M. and A.A.; formal analysis, N.M. and E.M.; investigation, E.M., A.A. and N.M.; writing-original draft, review, and editing, E.M., A.A. and N.M.All authors have read and agreed to the published version of the manuscript.Funding: The research was carried out with financial support from the Ministry of Science and Higher Education of the Russian Federation within the framework of scientific topics FSSM-2022-0004.

Table 1 .
Number of cells when adapting the computational mesh of the nasal cavity.

Table 1 .
Number of cells when adapting the computational mesh of the nasal cavity.

Table 2 .
Average velocity values along the cutting planes of the Y axis in the nasal cavity.

Table 3 .
Number of calculation cells when adapting the grid.

Table 3 .
Number of calculation cells when adapting the grid.

Table 4 .
Average velocity values along the cutting planes of the Z axis in the bronchopulmonary trunk.

Calculated Speed along the Cutting Planes of the Z Axis
Average Calculated