QSDsan: Quantitative Sustainable Design for sanitation and resource recovery systems


What is QSDsan?

QSDsan is an open-source, community-led platform for the quantitative sustainable design (QSD) of sanitation and resource recovery systems. It is one of a series of platforms that are being developed for the execution of QSD - a methodology for the research, design, and deployment of technologies and inform decision-making. 1 It leverages the structure and modules developed in the BioSTEAM platform 2 with additional functions tailored to sanitation processes.

As an open-source and impact-driven platform, QSDsan aims to identify configuration combinations, systematically probe interdependencies across technologies, and identify key sensitivities to contextual assumptions through the use of quantitative sustainable design methods (techno-economic analysis and life cycle assessment and under uncertainty).

All systems developed with QSDsan are included in the package EXPOsan - exposition of sanitation and resource recovery systems.

Additionally, another package, DMsan (decision-making for sanitation and resource recovery systems), is being developed for decision-making among multiple dimensions of sustainability with consideration of location-specific contextual parameters.

To capitalize, or not to capitalize?

That is a good question. We prefer to use the capitalized version (e.g., QSDsan instead of qsdsan) because:

  • It refers to the platform, not just the core package (i.e., it includes the entire ecosystem that supports the core package).

  • We style the name to convey the name’s meaning (e.g., the “QSD” part stands for “quantitative sustainable design”).

But names of the actual packages are all in lower cases per PEP-8:

Modules should have short, all-lowercase names. Underscores can be used in the module name if it improves readability. Python packages should also have short, all-lowercase names, although the use of underscores is discouraged.


The easiest way is through pip, in command-line interface (Anaconda prompt, terminal):

pip install qsdsan

If you need to update:

pip install -U qsdsan

Or for a specific version (replace X.X.X with the version number):

pip install qsdsan==X.X.X

If you want to install the latest GitHub version at the main branch:

pip install git+https://github.com/QSD-Group/QSDsan.git

You can also download the package from PyPI.

Note that development of this package is currently under initial stage with limited backward compatibility, please feel free to submit an issue for any questions regarding package upgrading.

If you are a developer and want to contribute to QSDsan, please follow the steps in the Contributing to QSDsan section of the documentation to clone the repository.

Getting Started

Follow the tutorial to get started! All tutorials are written using Jupyter Notebook, you can run your own Jupyter environment, or you can visit this page to run the Jupyter environment in your browser.

We are updating the tutorials (you will see a note at the start of some tutorials saying updates are coming) and we will add new ones related to uncertainty/sensitivity analyses.

For each of these tutorials, we are also recording videos where one of the QSD group members will go through the tutorial step-by-step. We are gradually releasing these videos on our YouTube channel so subscribe to receive updates!

How does QSDsan work?


Simplified unified modeling language (UML) diagram of QSDsan

The core package QSDsan follows the structure of biosteam, a rapid and agile package for the design, simulation, and techno-economic analysis of biorefineries under uncertainty, but QSDsan is enhanced with features geared toward quantitative sustainable design of sanitation systems.

Work is also in progress to develop the package DMsan and connect QSDsan to DMsan for decision-making under different contexts.

The above Unified Modeling Language (UML) diagram of the package shows the relationship between QSDsan and its dependencies.

In particular, QSDsan introduces:

  • Component, a subclass of thermosteam.Chemical, instance of this class does not necessarily corresponds to a specific chemical, but represents commonly used/modeled component such as biodegradable colloidal substrate.

  • SanStream and WasteStream. SanStream is a sublcass of thermosteam.Stream that has an additional attribute impact_item for life cycle assessment. WasteStream is a subclass of SanStream with additional composite properties such as chemical oxygen demand (COD) that are widely used in sanitation systems.

  • Process, a new class that describes a certain biological, chemical, or physical process in a unit operation, it is similar in concept with thermosteam.Reaction, but has unique features and utilities.

About the developers

Development and maintenance of the platform is supported by the Quantitative Sustainable Design Group led by members of the Guest Group at the University of Illinois Urbana-Champaign (UIUC), as well as other developers that have contributed to the repository.


Lead developers:
Tutorials and videos:
Module development:
Funding support:
Special acknowledgement:
  • Yoel Cortés-Peña for helping many of the QSDsan members get started on Python and package development.

Join the community

We would like to build an open and welcoming community, you can always post issues on our GitHub homepage or contact any of the Quantitative Sustainable Design Group memebers. We are always excited to have new members in our team.

If you would like to contribute, please follow our contribution guide, thank you for making QSDsan better!

QSDsan is and will stay open source under University of Illinois/NCSA Open Source License. Any third-party packages copied from QSDsan must be strictly open-source (not copy-left nor open-access). Please refer to LICENSE and CONTRIBUTION for details.

More resources

Additionally, to get the full value of QSDsan, we highly recommend reading through the documents of these packages:

What's new



Li, Y.; Trimmer, J. T.; Hand, S.; Zhang, X.; Chambers, K. G.; Lohman, H. A. C.; Shi, R.; Byrne, D. M.; Cook, S. M.; Guest, J. S. Quantitative Sustainable Design (QSD): A Methodology for the Prioritization of Research, Development, and Deployment of Technologies. Critial Review Proposal Submitted, 2021.


Cortés-Peña, Y.; Kumar, D.; Singh, V.; Guest, J. S. BioSTEAM: A Fast and Flexible Platform for the Design, Simulation, and Techno-Economic Analysis of Biorefineries under Uncertainty. ACS Sustainable Chem. Eng. 2020, 8 (8), 3302–3310. https://doi.org/10.1021/acssuschemeng.9b07040.