Real-time visualization of indoor aerosol dispersion based on a new Markov chain model

. Accurate acquisition of real-time aerosol distribution indoors is crucial to both estimating real-time infection risk of indoor respiratory infectious diseases as well as rapidly optimizing the ventilation effectiveness of building structure during the design stage. Real-time prediction of aerosol distribution can hardly be achieved by CFD model due to its iterative solution strategy, while the Markov chain model can greatly reduce computing time by implementing the non-iterative state transfer process. In this study, a real-time visualization algorithm for aerosol dispersion in limited space is developed based on the Markov chain principle and pre-solved flow field. Then the reliability of the proposed algorithm is verified by experimental data. An interactive user interface is further constructed based on the validated algorithm to realize real-time simulation of the dynamic release process of multiple indoor pollution sources. Results show that the simulation outcomes agree well with the experimental validation data, and the dynamic real-time distribution of aerosols can be well visualized for steady-state airflow. The present study aims to provide a new effective prediction method for real-time visualization of indoor pollutant dispersion and rapid evaluation of the impacts of building structure on ventilation effectiveness.


Introduction
In recent decades, various airborne respiratory infectious diseases, such as tuberculosis, influenza, severe acute respiratory syndrome (SARS), and coronavirus disease 2019 (COVID-19), led to a series of public health events.Research has demonstrated that these pandemics are mainly transmitted through airflow, and strongly associated with the distribution of indoor airflow [1].Particles generated by breathing, coughing, and sneezing will diffuse with indoor airflow fields by infected persons [2], resulting in non-contact infection of other people in a shared room.Therefore, quickly and accurately predicting the dynamic transport process and real-time distribution of particles in an enclosed environment is crucial to reducing the risk of infection and optimizing the design of indoor ventilation systems.Visualization of the abovementioned real-time prediction results is more helpful for infection prevention and control.
Eulerian model and Lagrangian model based on Computational Fluid Dynamics (CFD) simulation have been used extensively for particle transport process.Chen et al. [3] applied RANS model with the Eulerian method to obtain person-to-person contaminant transport data.Seepana et al. [4] analyzed the interaction between full-scale indoor airflow and exhaled droplets with an Eulerian approach.Wang et al. [5] tracked particle transport based on CFD-calculated ventilation flow fields by using the Lagrangian model.Zhang et al. [6] used the Lagrangian model to investigate the diffusion process of respiratory droplets released by * Corresponding author: xmei@csust.edu.cncoughing.Both Lagrangian and Eulerian models can compute detailed information related to transient particle concentration distributions, however, both are quite time-consuming due to continuous iteration during simulation.
The Markov chain model is implemented for particle phase simulation due to its non-aftereffect property.Besides, the Markov chain model is usually performed with simple vector multiplications instead of continuous iteration to obtain particle distribution.Chen et al. [7,8] combined the Markov chain framework with CFD model to perform particle phase and airflow simulation, they found that the calculating speed increased by 6.3 and 8.0 times compared with the Eulerian model and the Lagrangian model, respectively.Anthony et al. [9] mainly studied the method based on the set theory approach to construct Markov matrices, and strictly determined the number of Markov states and the time step.Mei et al. [10,11] proposed a modified Markov chain model to predict particle deposition caused by thermophoresis and gravitational forces.Hu et al. [12] optimized the Markov chain state transfer matrix constructed based on a set theory, which improved the accuracy of particle distribution prediction.However, none of abovementioned models can simultaneously provide real-time prediction and visualization of particle distribution.
For a fixed flow field, the Markov chain technique can avoid repeatedly solving particle transport equations for different pollution source locations.Therefore in the present study, a real-time visualization algorithm for aerosol dispersion in limited space is developed based on the Markov chain principle and pre-solved flow field.An interactive user interface is further constructed based on the validated algorithm to realize the real-time simulation of the dynamic release process of multiple indoor pollution sources.

Markov chain model
The fluid computational domain is divided into ݊ cells, and the outlet is linked to a space labelled as, the (݊ + 1) ௧ cell to store particles escaping the computational domain.The distribution state of particles in the current space-time (state ‫ݐ‬ ) is represented by a vector: ) where ܵ ௧, represents the quantity of particles in the cell ݅ at state ‫.ݐ‬It is presumed that the particles in the cell can only have two transfer probabilities within a certain time step ‫,)ݐ∆(‬ one is the probability of a particle staying in the current cell ‫(‬ , ), and the other is the probability of a particle transferring to the adjacent cell ݆ ‫(‬ , ).We constructed the (ܰ + 1) × ( ܰ + 1) matrix ܲ of the transfer probabilities: where ܲ ାଵ represents the probability that the particle will move from internal cell ݅ to the (݊ + 1) ௧ space.It is assumed that particles in the (݊ + 1) ௧ space will not return to the computational domain, so we have: (3) For the first-order homogeneous Markov chain model, the corresponding state transfer matrix must satisfy the following properties: ∑ ‫‬ ୀଵ = 1 ‫‬ ≥ 0 (4) Thus, the state ܵ ௧ା∆௧ after one time step can be calculated by: ା∆ = ܲ (5) Under steady-state airflow condition, the transfer matrix is fixed.If we calculate the particle transport from state ‫ݐ‬ , the particle number vector after ݇ time steps can be calculated by: ା∆ = ܲ (6)

Producing the state transfer matrix
Acquiring a precise state transfer matrix is critical for particle transport calculations.This study adopted the flux-based method to calculate the probability of the contaminant transfer.Parameters of the flow field were calculated using the RNG k-ε model.Information such as flow velocities and, cell centroid locations are exported from the commercial software Ansys Fluent through a user-defined function (UDF).Thus, the probabilities of particle transfer, ‫‬ , and ‫‬ , , can be calculated by the flow flux between cells: where ܳ , consists of the mean airflow rate (ܳ ,, ) and the turbulent fluctuating airflow rate (ܳ ୪୳ୡ୲୳ୟ୲୧୬,, ) from cell ݅ to its neighbouring cell, ܸ is the volume of cell ݅.The state transfer matrix ܲ is sparsely stored since most of its elements are zero, which can remarkably reduce storage need.

Investigation of the construction of an interactive Interface
Existing research mainly focuses on the accuracy and computational cost of the Markov chain model, the process and result of particle transport are two independent parts.If the numerical information cannot be visualized in real time, the practicality of this method will be greatly reduced.Combining the above mentioned algorithms, an interactive user interface for visualizing the transport paths of particles in enclosed spaces is developed under the integrated development environment.
The overall interface design is shown in Fig. 1.Different computational domain and its pre-calculated flow field can be selected/loaded in the child window of the interactive main interface.Besides, the release locations, patterns and quantities of pollution source can be set per users' choices.When the initialization button is pressed, the initial distribution of particles is automatically generated for subsequent particle transport calculations.The right side of the interface will display the real-time particle distribution contour chart when the start button is activated.

Model validation with 3D case
In this study, the airflow distribution is assumed not to be affected by particle motion.The adopted validation case [13] simulated particle distribution and deposition in a ventilated chamber under a steady-state flow field .The configuration of the ventilated chamber is shown in Fig. 2. The chamber had spatial dimensions of ‫)ܮ(݉8.0‬× 0.4݉(ܹ) × ‫)ܪ(݉4.0‬ in ‫ݔ‬ × ‫ݕ‬ × ‫ݖ‬ .The supply-inlet(0.04݉× 0.04݉) and the outlet(0.04݉× 0.04݉) are symmetrical about the y=0.2 plane, and are 0.02݉ away from the ceiling and the floor, respectively.The averaged supply-air velocity magnitude of 0.225݉/ ‫ݏ‬ was tested.When the flow field was stable, the particles were continuously released into the ventilation chamber from the inlet.In the validation case, CFD software was adopted to calculate the flow field parameters.A grid resolution of 40 × 20 × 20, which has been processed to be qualified for the grid independency test, was used for the airflow calculation.The x-velocity component and normalized particle concentration are compared on the three vertical lines ‫ݔ(‬ = 0.2 ݉, ‫ݔ‬ = 0.4 ݉, ‫ݔ‬ = 0.6 ݉) as shown in Fig. 2. Fig. 3 shows the comparison of the x-velocity component with the experimental data.As can be seen, the simulation flow results agree well with experimental data.Therefore, the transfer probability between grids can be directly calculated by Eq. (7-8), and then the state transfer matrix is generated.Finally, the particle transport calculation is performed by solving Eq. ( 6).Normalized particle number concentration along three sampling lines ‫ݔ(‬ = 0.2 ݉, ‫ݔ‬ = 0.4 ݉, ‫ݔ‬ = 0.6 ݉) are presented in Fig. 4. The results show that the algorithm seems to be quite feasible.The grid resolution of 300 × 100 was found to be sufficiently fine.The time step size was set as ‫.ݏ20.0‬Both the continuous release of contaminants from the inlet and the point source pulsed release within one time step were tested with the newly developed interactive interface, results are shown in Fig. 5.In both cases, the number of particles released is 5000.
As can be seen from Fig. 5, different initial states have little effect on the computation time, which is even at least 5 times faster than real-time.

Discussion
The time step size is an important factor in determining the accuracy of the state transfer matrix.If the time step is too small, there will be absorbed states meaning, particles cannot leave the current cell.If the time step is too large, particles will move across all adjacent cells.These problems can generate a defective state transfer matrix, which can lead to inaccurate results of particle transport calculations.Currently, how to define a suitable time step is still a problem.In this study, the minimum time step (MTS) is determined by: ‫ݐ∆‬ = ௨ ೌೣ (9) where ℎ represents the minimum distance from the cell centroid to the grid surface, and ‫ݑ‬ ௫ represents the maximum velocity in the fluid internal domain.The MTS for the studied validation case in this paper is 0.003s.The simulative results for eight different time steps are shown in Fig. 6.There is an exponential relationship between ‫‬ , and time step.The ‫‬ , will be closer along with increase of the time step, which leads to similar particle transport results.The normalized rootmean-square deviation (NRMSD) between numerical and experimental results for several time steps are calculated and presented in Table 1.The NRMSD can be calculated by: మ / సభ ೣ,ೌೣ ି ೣ, (10) where ‫ܥ‬ ௫, is the ݅ ௧ experimental data point, and ‫ܥ‬ ௨, is the corresponding numerical data point.‫ܥ‬ ௫,௫ and ‫ܥ‬ ௫, are the maximum and minimum values of experimental data, respectively.As shown in Table 1, the numerical results agree well with the experimental data especially when ‫ݐ߂‬ = ‫.ݏ3.0‬The time step size has a great influence on the particle transport results.However, how to directly determine the optimal time step size still needs to be further studied.

Fig. 1 .
Fig. 1.Design drawing of the interactive interface

Fig. 4 .
Fig. 4. Comparison of normalized particle number concentration along three sampling lines

Fig. 6 .
Fig. 6.Comparison of results at different time steps This research was supported by Natural Science Foundation of Hunan Province (Youth Program) (No. 2021JJ40591), the Doctoral Scientific Research Foundation of Changsha University of Science and Technology (No. 097/000301518), the Scientific Research Project of Hunan Provincial Department of Education (No. 20C0033), and the Graduate Research Innovation Program of Changsha University of Science and Technology (SJCX202165).

Table 1 .
The NRMSD between numerical and experimental results for different time steps