BioReact-Lite is an interactive platform designed for the dynamic exploration of continuous bioreactors (chemostats). This tool allows for modeling microbial growth, predicting system behavior under various operating conditions, and performing rigorous local stability analysis using non-linear systems dynamics tools.
๐ CLICK HERE TO LAUNCH THE LIVE APP
The core of BioReact-Lite is based on coupled mass balance modeling and linear stability analysis at the equilibrium point.
The engine uses the Monod kinetics to describe the specific growth rate (
Where:
-
$\mu_{max}$ : Maximum specific growth rate ($h^{-1}$ ). -
$K_s$ : Substrate saturation constant ($g/L$ ).
Reactor dynamics are governed by two fundamental mass balances that define the change in biomass (
- Biomass Balance (
$f_1$ ):
- Substrate Balance (
$f_2$ ):
In these equations,
To solve the coupled system of ODEs, the application implements the 4th Order Runge-Kutta (RK4) method. This method calculates four intermediate slopes (
The application does more than simulate curves; it analyzes the mathematical nature of equilibrium points using the First Method of Lyapunov.
A sensitivity matrix (Jacobian) is constructed to linearize the non-linear system in the neighborhood of the steady state (
-
Eigenvalues: Determine stability. If the real part of all
$\lambda$ is negative ($Re(\lambda) < 0$ ), the system is locally stable and will return to equilibrium after a perturbation. - Eigenvectors: Define the "directions" of approach or departure in the phase plane, showing how the system evolves toward the steady state.
BioReact-Lite is divided into three main interaction zones:
Allows the user to manipulate the simulation environment with a precision of three decimal places:
-
Physiological Tuning: Modify biological parameters such as
$\mu_{max}$ ,$K_s$ , and$Y_{x/s}$ . -
Operational Control: Change the dilution rate (
$D$ ) and substrate feed ($S_r$ ) to observe phenomena like washout (biomass washout). -
Numerical Configuration: Set initial conditions (
$X_0, S_0$ ) and the integrator step size ($dt$ ).
- Time Series: Interactive plots showing the evolution of biomass and substrate until reaching (or failing to reach) steady state.
-
Phase Plane: An
$S$ vs$X$ view plotting the simulation trajectory, the calculated critical point, and the eigenvectors guiding the system dynamics.
- Real-Time Analysis: Displays the calculated Jacobian matrix and Lyapunov stability results.
- Step-by-Step Guide: A pedagogical breakdown explaining the fundamental equations and the mathematical procedure the app executes in the background.
If you wish to run this simulator on your own machine:
- Clone the repository:
git clone https://github.com/ebalderasr/BioReact-Lite.git - Create a virtual environment:
python3 -m venv venv - Install dependencies:
pip install -r requirements.txt - Run the app:
streamlit run app.py
Developed by: Emiliano Balderas Ramรญrez Biotechnology Engineer | PhD Student in Biochemistry
Institute of Biotechnology, UNAM