This repository contains a Python-based simulation tool for a Paper-Based Analytical Device (μPAD) designed for the point-of-care detection of High-Risk HPV strains (16 & 18).
It acts as a "Digital Twin" for wet-lab experiments, modeling the fluid dynamics and reaction kinetics of a Loop-mediated Isothermal Amplification diagnostic test.
The simulation breaks the diagnostic process into two scientifically accurate phases:
-
Model: Simulates fluid transport through porous media (Whatman No. 1 / Nitrocellulose) using the Lucas-Washburn Equation:
$$L = S \sqrt{t}$$ (Where $L$ is distance, $S$ is sorptivity, and $t$ is time). - Visual: Visualizes the sample (DNA + Master Mix) traveling from a single inlet, splitting at a trident junction, and wetting three distinct reaction zones.
- Model: Simulates the time-dependent colorimetric change of a LAMP reaction at 65°C.
-
Logic:
- Channel 1 (Left): Specific for HPV16.
- Channel 2 (Center): Specific for HPV18.
-
Channel 3 (Right): Internal Control (
$\beta$ -Actin).
- Outcome: The detection zones transition from Purple (Negative) to Green (Positive) only if the specific target DNA is present and sufficient heating time is applied.
Because this tool uses ipywidgets for interactivity, it runs best in a Jupyter environment like Google Colab.
- Copy the code from
simulation.py. - Open a new Google Colab Notebook.
- Paste the code into a cell and run it (
Shift + Enter).
- Clone the repository:
git clone [https://github.com/CreedxAsif/HPV-Paper-Microfluidics-Simulator.git](https://github.com/CreedxAsif/HPV-Paper-Microfluidics-Simulator.git)
- Install dependencies:
pip install -r requirements.txt
- Launch Jupyter Notebook:
jupyter notebook
- Copy the code into a notebook cell and execute.
🧪 Simulation Controls Sample Input: Select the type of DNA sample (e.g., "HPV16 Positive", "Water Control").
Flow Slider: Drag to simulate the passage of time (seconds) as fluid wicks up the paper.
Heating Slider: Drag to simulate the incubation period (minutes) required for the LAMP reaction to occur.
🔬 Scientific Context This tool was developed to assist in the design of low-cost microfluidic devices for cervical cancer screening in resource-limited settings. By simulating flow path lengths and reaction times, we can optimize the geometry of the paper chip before fabrication.
Created by Mohamed Asif Shajahan