Skip to the content.

Anaerobic Digestion model & shiny app

Motivation

This app is associated with my senior design project in chemical engineering at Drexel University.1 The model was developed to simulate the degradation of heavy organic compounds through anaerobic digestion. Five unique processes take place in the simulated batch reactor, including the enzymatic hydrolysis of guar gum, acidogenesis of polysaccharide chains, acetogensis, methanogenesis, and anaerobic degredation using bacteroides. See the Background of Process tab within the app for a more detailed process description.

The purpose of this app is to optimize the model parameters in order to increase the profitability of the bioreactor. The user will be able to adjust initial bacteria concentrations, reactor temperature (both static and dynamic), etc., and see a visual representation of the outcome. Note that not all adjustable parameters will have an effect on every plot.

Getting Started

Prerequisites and Running the App (locally)

Most of the important R packages are version controlled via pkgr. If using install.packages() make sure you point to the MPN snapshot referenced in the pkgr.yml file.

Installing the above packages prior to running will speed up the initial loading by a lot. Make sure each of the packages can be loaded via library(). Note: You will need Rtools (windows) or Xcode (mac) installed in order to use mrgsolve. See footnote for further details on mac install.2

Proposed Reaction Mechanisms

Contaminants being converted in bioreactor:

Below is the overall proposed reaction mechanism. Specific reaction mechanisms are illustrated more clearly within the app.

CMT Model

Side Tabs in App

Screenshot

Sensitivity Analysis

The simulation option will allow for a sensitivity analysis of a chosen parameter. Below is an example of how to perform a sensitivity analysis on a given parameter:

Screenshot

Acknowledgments

Footnotes

See Footnotes 1: Year: 2019, Team Name: “Frack Off”, Senior Design Project at Drexel University 2: Note for mac install: The following lines *may* have to be entered into the Terminal if you receive an error mentioning a `math.h` file not being found: sudo installer -pkg \ /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg \ -target /