PyADM1ODE
A comprehensive Python framework for modeling, simulating, and optimizing agricultural biogas plants based on the Anaerobic Digestion Model No. 1 (ADM1).
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)
- Clone the repository: git clone <repository_url> PyADM1ODE cd PyADM1ODE
- Create the conda environment from the provided file: conda env create -f environment.yml
- Activate the environment: conda activate <environment_name>
- Run the program: python main.py
Option B: Virtual environment with pip
- Clone the repository: git clone <repository_url> PyADM1ODE cd PyADM1ODE
- Install dependencies from requirements.txt: pip install -r requirements.txt
- 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
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
mcp-yfinance
Real-time stock API with Python, MCP server example, yfinance stock analysis dashboard
cloudwatch-logs
MCP server from serkanh/cloudwatch-logs-mcp
text2sim
Text2Sim MCP Server is a conversational simulation engine that transforms natural language into working simulation models. Supporting Discrete-Event Simulation (DES) and System Dynamics (SD), it integrates with LLMs via the Model Context Protocol (MCP) to transform plain English descriptions into simulation models within environments like Claude.
servicenow-api
ServiceNow MCP Server and API Wrapper
the -company
TheMCPCompany: Creating General-purpose Agents with Task-specific Tools