Intensidad: 70%

Microalgae Culture: Batch Photobioreactor Simulator

Comparison of batch cultures under light integration (good mixing)
and local rate integration (poor mixing) conditions

Author: José María Fernández Sevilla (CIESOL/UAL)  ·  Assisted by Claude (Anthropic)  ·  CC BY-NC 4.0  ·  July 2026

1. Overview

This single-page application (SPA) simulates the growth of microalgae in a batch photobioreactor (PBR), comparing two limiting hypotheses about how cells experience light inside the culture:

HypothesisDescriptionAssumed mixing
Light integration (Iav)Every cell sees the spatially averaged irradiance $I_{av}$Perfect / instantaneous
Local rate integration (Av)The volumetric growth rate is the spatial average of local rates $\mu(I(x))$Poor / slow

Both trajectories are integrated simultaneously with a 4th-order Runge-Kutta (RK4) scheme, plotted on the same axes, and analysed for optimal batch operation.

2. Input Parameters

2.1 Optics & Geometry

ParameterSymbolUnitsDefaultDescription
Incident irradiance$I_o$µmol/m²·s1000Surface photon flux density
Absorption coefficient$k_a$m²/g0.10Biomass-specific absorption
Path length / Radius$L$ or $R$m0.10Reactor thickness (flat panel) or radius (cylindrical)
Initial biomass$C_{b0}$g/m³50Inoculum concentration
Seeding time$t_s$h10Pre-culture time before $t=0$ (for $P_{bm}$)
Incidence angle$\theta$°0Angle of light relative to surface normal

Geometry selector: Flat panel 1-D Beer-Lambert attenuation along $L$.   Cylindrical 2-D numerical integration over a circular cross-section (40×40 grid).

2.2 Kinetics & Maintenance

ParameterSymbolUnitsDefaultNotes
Max. specific growth rate$\mu_{max}$h⁻¹0.080All models
Half-saturation irradiance$I_k$µmol/m²·s150Molina, Bannister, Van Oorshot
Shape exponent$n$2.0Molina, Bannister
Inhibition parameter$\alpha$µmol/m²·s300Camacho-Rubio only
Inhibition coefficient$\kappa$0.10Camacho-Rubio only
Maintenance coefficient$m$h⁻¹0.005All models

3. Mathematical Model

3.1 Light attenuation — Beer-Lambert

$$I(x) = I_o \, \exp\!\left(-\frac{k_a \, C_b \, x}{\cos\theta}\right)$$

3.2 Average irradiance (flat panel)

$$I_{av} = \frac{I_o}{k_a C_b L / \cos\theta} \left(1 - e^{-k_a C_b L / \cos\theta}\right)$$

3.3 Batch mass balance

$$\frac{dC_b}{dt} = \left(\mu - m\right) C_b$$

The two hypotheses differ only in how $\mu$ is computed: $\mu_{Iav} = \mu(I_{av})$ vs. $\mu_{Av} = \frac{1}{V}\int_V \mu(I(\mathbf{x}))\,dV$.

3.4 Kinetic models

Molina et al.$$\mu = \mu_{max} \frac{I^n}{I_k^n + I^n}$$
Bannister$$\mu = \frac{\mu_{max} \, I}{\left(I_k^n + I^n\right)^{1/n}}$$
Van Oorshot$$\mu = \mu_{max} \left(1 - e^{-I / I_k}\right)$$
Camacho-Rubio$$\mu = \frac{\mu_{max}\,I}{2\alpha} \left[\left(1 + \kappa + \frac{\alpha}{I}\right) - \sqrt{\left(1 - \kappa - \frac{\alpha}{I}\right)^2 + 4\kappa}\,\right]$$

3.5 Productivity

Instantaneous volumetric productivity$$P_{bi}(t) = \frac{dC_b}{dt} = (\mu - m)\,C_b$$
Cumulative average productivity$$P_{bm}(t) = \frac{C_b(t) - C_{b0}}{t + t_s}$$

3.6 Numerical integration — RK4

$$k_1 = f(C_b^n),\quad k_2 = f\!\left(C_b^n + \tfrac{h}{2}k_1\right),\quad k_3 = f\!\left(C_b^n + \tfrac{h}{2}k_2\right),\quad k_4 = f\!\left(C_b^n + h\,k_3\right)$$ $$C_b^{n+1} = C_b^n + \frac{h}{6}\left(k_1 + 2k_2 + 2k_3 + k_4\right)$$

Step size $h = 1$ h. Simulation stops when $|\dot{C}_b| < 10^{-9}$ g/m³·h and $t > 10$ h, or after 2000 steps.

4. Outputs

4.1 Chart (dual Y-axis)

TraceAxisStyleColour
$C_b$ — Good mixingLeft (g/m³)Solid 3 pxGreen
$C_b$ — Poor mixingLeft (g/m³)Solid 3 pxRed
$P_{bm}$ — Good/Poor mixingRight (g/m³·h)Dashed 5-5Green / Red
$P_{bi}$ — Good/Poor mixingRight (g/m³·h)Dotted 2-2Green / Red

4.2 Result boxes

Four coloured panels report: Optimal — time and value of max $P_{bi}$ and $P_{bm}$; Stationary — final $C_b$ and end time. Green = good mixing (Iav); red = poor mixing (local).

4.3 CSV export

Exports a UTF-8 CSV: Time(h), Cb_Iav, Cb_Local, Pbm_Iav, Pbm_Local, Pbi_Iav, Pbi_Local, preceded by a configuration header.

5. Interface Features

6. Technical Notes