Our Story

PulmoSim was inspired by a close friend on our team who battled pneumonia twice. The first time, his treatment failed because the prescribed medication did not effectively reach the infected regions of his lungs. Not only did this delay his recovery, but it also left him vulnerable to relapse—he developed pneumonia again soon after. Seeing how poor drug delivery can directly affect patient outcomes motivated us to create a tool that could bridge the gap between diagnosis and effective treatment.

Through this project, we learned how critical it is to translate medical imaging into actionable insights. We discovered that drug deposition in the lungs is a complex process, influenced by airflow dynamics, particle size, and anatomical variations. To address this, we combined computational fluid dynamics (CFD) with modern AI and web technologies. At its core, our system uses voxel data from CT slices to reconstruct volumetric meshes of lung structures, and then we apply OpenFOAM simulations to approximate airflow and particle transport. For example, airflow resistance in a bronchial tube can be modeled by:

$$ R = \frac{8 \mu L}{\pi r^4} $$

where (R) is resistance, (\mu) is air viscosity, (L) is airway length, and (r) is radius. Running CFD on realistic geometries helped us simulate where inhaled drugs are most likely to deposit.

On the computer science side, we experimented with using the Gemini API to create a retrieval-augmented generation (RAG) pipeline that connects medical literature with our simulations. This allowed us to provide personalized medication delivery advice backed by both physics and clinical evidence. For the user experience, we built an intuitive frontend in React, where clinicians can upload CT scans, view interactive 3D lung models, and receive treatment guidance in real time. Integrating heavy backend computation with a responsive, browser-based interface was one of our biggest challenges—we had to optimize API calls, handle large DICOM datasets, and ensure that simulations didn’t overwhelm the system.

Building PulmoSim was both technically and emotionally demanding. None of us had previously integrated medical imaging with CFD and AI-driven knowledge systems, so we had to learn DICOM handling, mesh generation, and RAG architectures from scratch. Debugging mismatched CT scan formats, dealing with convergence errors in OpenFOAM, and handling incomplete patient datasets tested our patience. Yet, our friend’s experience—his determination to push through with us on this project despite his past struggles—kept us motivated.

In the end, PulmoSim became more than just a hackathon project; it became our way of addressing a problem that had deeply affected someone we care about. By blending physics, computer science, and medicine, we believe this tool can one day help clinicians personalize treatments and reduce the chances of patients like him suffering avoidable relapses.

Built With

  • faiss
  • gemini-api
  • gemini-vision
  • openfoam
  • react-native
  • sentencetransformers
  • simpleitk
  • skimage
  • trimesh
Share this project:

Updates