The pandemic has disrupted people's daily lives. As the nations are slowly opening offices, schools, and other indoor spaces, we do not know how an infectious person affects the environment. Buildings have different occupancy characteristics, density, HVAC, and varying building parameters. These factors affect the spread of COVID indoors. We use BIM data to simulate the spread of viral particles in the buildings and improve decision making.

What it does

We extended the BIM-to-DEVS API from the previous AEC hackathon to incorporate COVID spread models. We used the BIM-to-DEVS API for data extraction. In this hackathon, we created new models using Cell-DEVS that considers scientific data from published papers to project the spread of viral particles indoors. We use Autodesk Forge for BIM data extraction and visualization. CADMIUM (Cell-DEVS) tool for Discrete Event Simulation of COVID models.

COVID Model: Our labs' simulator, Cadmium, was used to build the indoor viral particle spread model. We can classify every cell as a different type, impermeable structure (used for walls), VP sources (the source of the viral particles), VP Receivers (healthy occupant/susceptible), chairs (used for occupants sitting down), and air cells. The chairs start as unoccupied and get converted to viral particle sources or receivers when the occupants sit down. The viral aerosols spread depending on their location in the scenario, i.e., if the infectious person is sitting in front of a vent, the particles will get pushed in the direction of the airflow. After an uninfected person inhales too many particles over a period of time, they become infected.

Visualization: For visualization purposes, geometries were grouped and plotted by their x-y coordinates. Geometries were built based on cell type. If the cell represented virus particles, THREE.Geometry and/or THREE.BoxGeometry was used alongside THREE.PointCloudMaterial. When the cell represented a human, THREE.BufferGeometry was used since a sprite had to be created. Therefore, to visualize a cell, proper geometry and material had to be considered. The coloring for the virus particles was done through D3.js, whereas the human sprites' coloring was through THREE.js. When a user runs the visualization, a color gradient legend (D3.js) emerges to reflect the color change of the virus particle concentration level in different time frames.

How I built it

We built it using a cloud based developer tool, Forge API. The programming languages we used are JavaScript, Python, Cadmium and C++.

Challenges I ran into

Cell-DEVS Model: In the DEVS model, we faced challenges when assigning a direction to the cells in front of the ventilation systems. It was particularly difficult to distribute particles based on airflow. Through vector manipulation and cadmium simulator’s powerful features, we managed to assign each ventilation system its own airflow field and weight for particle distribution.

Visualization: Autodesk Forge Viewer integrates a customized version of THREE.js r71 (March 2015) for data visualizations. The current version of THREE.js is r121 (Oct 2020). Due to the lack of documentation, and support for new extensions, a lot of troubleshooting was required to work with outdated/buggy code—for example, THREE.PointCloudMaterial (r71) in Forge Viewer would not load textures onto point clouds, whereas in the newer THREE.js (r121), THREE.PointsMaterial loads textures just fine. The only way to load textures onto geometries was to use THREE.BufferGeometry. In this case, the textures were called sprites and required custom shaders and/or very precise RGB values when trying to manipulate sprite's characteristics.

Accomplishments that I'm proud of

By the end of the hackathon project, we were able to successfully visualize COVID spread within buildings. This accomplishment will enhance facility management in the future. There were definitely challenges in the beginning, but through perseverance and much problem-solving, we skillfully produced and implemented our first prototype.

What I learned

We are a pro now and we had fun.

What's next for COVID-BIM

The COVID spread model could be extended through adding parameters such as coughing, and sneezing. The new parameters could also be applied to much larger BIM models. To load simulation data for much larger BIM models, we would need to consider writing code for a file chunker since web browsers limit the size of blobs being uploaded.

Share this project: