The state variables, Gujer (Petersen) stoichiometric matrix, rate equations, and stoichiometric and kinetic parameters of PM 2 were integrated into QSDsan as a Process module, which enables automatic calculation of the production rate of each component. In addition, the batch reactor (for kinetic assays) and EcoRecover system (the full-scale, monitored system) were also coded using the QSDsan classes (WasteStream, SanUnit, System), and changes in state variables due to microalgal activity within each system were dynamically simulated.