Ogunnaike, Demola1, Srikrishnan, Vivek1,2, Goldfarb, Jillian L.1,2,3*
1 Systems Engineering, Cornell University, Ithaca, New York 14853, USA
2 Department of Biological & Environmental Engineering, Cornell University, Ithaca, NY, 14853, USA
3 Robert Frederick Smith School of Chemical and Biomolecular Engineering, Cornell University, Ithaca, NY, 14853, USA
* corresponding author: goldfarb@cornell.edu
Hydrothermal carbonization (HTC) is a thermochemical process that upgrades wet agro-industrial and food waste feedstocks into a solid hydrochar with coal-like properties. Despite its ability to mitigate environmental impacts from food waste and produce a bioenergy resource, HTC integrated biorefineries have not progressed beyond pilot scale. Identifying favorable reaction conditions that can simultaneously reduce environmental externalities and improve economic performance can enhance viability. Here we conduct a prospective lab scale gate-to-gate attributional life cycle assessment (ALCA) of an HTC-based biorefinery based on the three largest food waste sources subject to the 2022 New York State Food Donation and Food Scraps Recycling Law. We demonstrate how process details in HTC, including feedstock choice and reaction condition choice, affect environmental impacts. Using multi-objective systems optimization and multi-criteria decision making to consider trade-offs in HTC’s functionality, we identify that mixtures of food waste source feedstocks have smaller environmental impacts than any individual food waste source feedstock.
DO was partially funded by the the National GEM Consortium and Robert F. Smith Fellowship at Cornell University and the National Science Foundation CBET Grant 2144862. VS was partially funded by the Biological and Environmental Research Program. JLG was partially funded by the National Science Foundation CBET Grant 2144862. This research was conducted with support from the Cornell University Center for Advanced Computing.
Before using this repository, ensure you meet the following requirements:
-
Brightway2.5 Environment:
- This repository assumes the use of Brightway 2.5 for Life Cycle Assessment (LCA) calculations. Ensure your Python and pip version is compatible with Brightway 2.5. For more information, see Brightway2 Documentation. This analysis was conducted using Python 3.10.0 and pip 24.3.1.
-
Datasets:
- You must have ecoinvent datasets compatible with Brightway 2.5. These should include the required Life Cycle Inventory (LCI) databases.
- While impact assessment and other results can be downloaded, the analyis cannot be run without ecoinvent.
- Place these datasets in a folder that can be accessed from the location of the cloned repository. For example:
. ├── ecoinvent_v3.10 │ ├── cutoff │ ├── relevant datasets and MasterData compatible with Brightway 2.5. ├── main folder │ ├── HTC-lab-exploratory
Access to a cluster for high-performance computing is highly recommended, though this script can be run on a local desktop in a reasonable timeframe, if needed. Here are some helpful resources that may be helpful for comprehending key components
- Industrial Ecology Open Online Course: Foundations of Industrial Ecology.
- Brightway LCA Software Framework: Brightway 2.5 Python Documentation.
- Brightway Tutorials: “Learn Brightway” Book.
- Additional Brightway Resources: Documentation: Brightway Tutorials.
- LCA Textbook.
- Ecoinvent Database: Requires a license to view data.
This repository includes the following main folders:
experimental-data: Contains experimental data from the studies:results: Contains Life Cycle Impact Assessment (LCIA) results and data on TOPSIS scores and uncertainty analysis relevant to the project.
Analysis was mainly done in the Jupyter notebook, HTC-Uncertainty.ipynb. Other Python files in the repository include helper functions designed for organizational purposes and to support the main analyses.
We assume that you have seen and used virtualenv, but if not, go here to install.
# Create a new python3 virtualenv named venv.
virtualenv -p python3 venv
# Activate the environment
source venv/bin/activate
venv\Scripts\activate # for Windows
# Install all requirements
pip install -r requirements.txtSelect the virtual environment kernel and run the cells in the Jupyter notebook, HTC-Uncertainty.ipynb.
In the example above, we created a virtual environment for a Python 3 environment and installed the necessary requirements based on the current setup. While I don't anticipate issues running the script in a newly created environment, there have been reported issues in Brightway 2.5 when using newer versions of ecoinvent. Here are some troubleshooting tips to help ensure a smooth setup:
-
Create a Virtual Environment:
- Follow standard instructions to create a virtual environment for Python 3.
-
Installing Dependencies:
- If the
requirements.txtfile does not work:- On Windows:
pip uninstall -r requirements.txt -y
- On Linux or macOS:
pip freeze | xargs pip uninstall -y
- On Windows:
- If the
-
Install Basic Python Libraries:
- Install key libraries & initialize the Jupyter Notebook kernel:
pip install ipykernel matplotlib pandas seaborn
- Install key libraries & initialize the Jupyter Notebook kernel:
-
Resolve Version Conflicts:
- Brightway 2.5 is not compatible with
numpy-2.0.1, which may be automatically installed withmatplotlib. To fix this:pip install numpy==1.26.4
- Brightway 2.5 is not compatible with
-
Install Brightway2 Core Packages:
- Install Brightway2 and initialize the project:
pip install brightway2
- Set up the project and initialize the biosphere flows.
- Install Brightway2 and initialize the project:
-
Install Brightway 2.5 and Supporting Libraries:
- Restart the Python environment (e.g., restart Jupyter Notebook or your terminal session) before proceeding.
- Install the necessary dependencies for importing the ecoinvent database by running:
pip install -r requirements.txt
Upon successful installation, skip the
bi.bw2setup()codeblock, as the biosphere has been initalized using Brightway2. Prior to conducting LCA calculations, the project will be upgraded to a Brightway 2.5 environment that's compatible with the Brightway 2.5 package.⚠️ Note: Directly installingbrightway25 pypardisomay cause import errors when working with the ecoinvent database due to ongoing development of the Brightway package. Therequirements.txtfile includes tested dependencies for this project’s environment.
For better package control, consider using Anaconda or Miniconda. These tools allow you to manage dependencies more effectively in isolated environments.
For trouble-shooting, general questions, or other inquiries, contact the developer, Demola Ogunnaike, at dko22[at]cornell.edu