Get the FREE Ultimate OpenClaw Setup Guide →

PyADM1ODE

A comprehensive Python framework for modeling, simulating, and optimizing agricultural biogas plants based on the Anaerobic Digestion Model No. 1 (ADM1).

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio dgaida-pyadm1ode python main.py

How to use

PyADM1ODE implements the Anaerobic Digestion Model No. 1 (ADM1) in Python as a system of ordinary differential equations to simulate anaerobic digestion processes, especially for agricultural substrates and co-digestion scenarios. The repository provides a Python script (main.py) which runs the ADM1 model and computes the input stream from substrate parameters. To use it, ensure your environment has the required Python packages installed, then execute the main program to run a default simulation. The model is designed to be run from the repository root and is suitable for quick experiments and further development of ADM1-based simulations.

Once dependencies are installed, you can run the simulation with: python main.py. You can customize the run by modifying parameter values in the source code or by adding your own input substrates if you extend the code. Since the README notes environment management files (environment.yml and requirements.txt), you can rely on those to install the needed packages, though they may not be fully up-to-date, so you might need to install some packages manually if you encounter import errors.

How to install

Prerequisites:

  • Git (optional, to clone the repository)
  • Python 3.x (recommended 3.8+)
  • Optional: Conda (if you prefer using environment.yml)

Install options: Option A: Conda (recommended if environment.yml is present)

  1. Clone the repository: git clone <repository_url> PyADM1ODE cd PyADM1ODE
  2. Create the conda environment from the provided file: conda env create -f environment.yml
  3. Activate the environment: conda activate <environment_name>
  4. Run the program: python main.py

Option B: Virtual environment with pip

  1. Clone the repository: git clone <repository_url> PyADM1ODE cd PyADM1ODE
  2. Install dependencies from requirements.txt: pip install -r requirements.txt
  3. Run the program: python main.py

Notes:

  • The README mentions both environment.yml and requirements.txt may not be up-to-date; you may need to install missing packages manually.
  • If you encounter Python package version conflicts, consider creating an isolated virtual environment and installing dependencies one by one to identify the problematic package.

Additional notes

Tips and common issues:

  • Ensure you are running the script from the repository root where main.py is located.
  • If main.py expects specific input data (substrates or initial conditions), you may need to modify the code or provide input through the script as described in the code comments.
  • The environment.yml and requirements.txt files may be out of date; if you hit ImportError, install the missing package(s) individually and update the requirements files as needed.
  • Since this is a Python implementation of ADM1, you may want to validate results against known ADM1 benchmarks and adjust parameters for your substrate mix to reflect agricultural co-digestion scenarios.
  • If you plan to integrate this into a larger MCP workflow, consider wrapping main.py into a function you can call with arguments rather than running as a script, to enable programmatic control.

Related MCP Servers

Sponsor this space

Reach thousands of developers