Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
joyxyz1994 committed Sep 5, 2023
2 parents f3d20a6 + 7d1b75a commit c1d23ba
Show file tree
Hide file tree
Showing 13 changed files with 174 additions and 119 deletions.
13 changes: 10 additions & 3 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ Change Log
This document records notable changes to `QSDsan <https://github.com/QSD-Group/QSDsan>`_. We aim to follow `Semantic Versioning <https://semver.org/>`_.


Ongoing
-------
`1.3.0`_
--------
- Enhance and use QSDsan's capacity for dynamic simulation for emerging technologies and benchmark configurations (see EXPOsan METAB and PM2 (on the algae branch, still under development) modules).
- New publications

- The paper introducing `DMsan <https://doi.org/10.1021/acsenvironau.2c00067>`_, the package developed for decision-making of sanitation and resource recovery technologies, is published in *ACS Environmental Au*!
- QSDsan was used to evaluate the sustainability of the `NEWgenerator <https://doi.org/10.1021/acsenvironau.3c00001>`_ system as in this paper on *ACS Environmental Au*!

- New modules

- :class:`qsdsan.processes.KineticReaction`
Expand All @@ -19,7 +25,7 @@ Ongoing
`1.2.0`_
--------
- The `QSDsan paper <https://www.doi.org/10.1039/d2ew00455k>`_ is accepted by *Environmental Science: Water Research & Technology*!
- The first paper using QSDsan for the design of sanitation is accepted by `ACS Environmental Au <https://pubs.acs.org/doi/10.1021/acsenvironau.2c00022>`_! The Biogenic Refinery system described in this paper is also available in ``QSDsan``/``EXPOsan`` now.
- The first paper using QSDsan for the design of sanitation is accepted by *ACS Environmental Au*! Read the `Biogenic Refinery <https://pubs.acs.org/doi/10.1021/acsenvironau.2c00022>`_ paper and check out the system module in ``QSDsan``/``EXPOsan``.
- Added multiple systems (including their unit operations), check out the details on the `Developed System <https://qsdsan.readthedocs.io/en/latest/Developed_Systems.html>`_ page!

- Biogenic Refinery
Expand Down Expand Up @@ -179,6 +185,7 @@ Official release of ``QSDsan`` v1.0.0!
.. _Trimmer et al.: https://doi.org/10.1021/acs.est.0c03296

.. Commit links
.. _1.3.0: https://github.com/QSD-Group/QSDsan/releases/tag/v1.3.0
.. _1.2.0: https://github.com/QSD-Group/QSDsan/releases/tag/v1.2.0
.. _1.1.0: https://github.com/QSD-Group/QSDsan/releases/tag/v1.1.0
.. _1.0.0: https://github.com/QSD-Group/QSDsan/releases/tag/v1.0.0
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# built documents.
#
# The short X.Y version.
version = '1.2.5'
version = '1.3.0'
# The full version, including alpha/beta/rc tags.
release = version

Expand Down
2 changes: 1 addition & 1 deletion docs/source/tutorials/8_LCA.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
"metadata": {},
"source": [
"### 2.1. `ImpactItem`\n",
"For example, assume we need some electricity, and that to generate 1 kWh of electricity, 0.15 kg of CO<sub>2</sub> is emitted, and it uses 4500 kJ of fossil energy."
"For example, assume we need some electricity, and that to generate 1 kWh of electricity, 0.25 kg of CO<sub>2</sub> is emitted, and it uses 4500 kJ of fossil energy."
]
},
{
Expand Down
10 changes: 5 additions & 5 deletions qsdsan/_lca.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class LCA:
...
>>> # Retrieve impacts associated with a specific indicator
>>> lca.get_total_impacts()[GWP.ID] # doctest: +ELLIPSIS
349737807.9765445...
349737809...
>>> # Or breakdowns of the different category
>>> lca.get_impact_table('Construction') # doctest: +SKIP
>>> # Below is for testing purpose, you do not need it
Expand All @@ -192,17 +192,17 @@ class LCA:
You can also allocate the impact based on mass, energy, value, or a ratio you like
>>> lca.get_allocated_impacts(sys.products, allocate_by='mass')['waste_brine']['FossilEnergyConsumption'] # doctest: +ELLIPSIS
46018518.870...
46018554...
>>> lca.get_allocated_impacts(sys.products, allocate_by='energy')['alcohols']['GlobalWarming'] # doctest: +ELLIPSIS
11063009.556...
11063012...
>>> alcohols.price = 5
>>> waste_brine.price = 1
>>> GWP_alcohols = lca.get_allocated_impacts(sys.products, allocate_by='value')['alcohols']['GlobalWarming']
>>> GWP_brine = lca.get_allocated_impacts(sys.products, allocate_by='value')['waste_brine']['GlobalWarming']
>>> GWP_alcohols + GWP_brine # doctest: +ELLIPSIS
5469807.9765...
5469809...
>>> lca.get_total_impacts(exclude=sys.products)['GlobalWarming'] # doctest: +ELLIPSIS
5469807.9765...
5469809...
>>> # Clear all registries for testing purpose
>>> from qsdsan.utils import clear_lca_registries
>>> clear_lca_registries()
Expand Down
2 changes: 1 addition & 1 deletion qsdsan/_tea.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class TEA(BSTTEA):
>>> # QSDsan's dependent packages (e.g., thermo)
>>> tea.show() # doctest: +ELLIPSIS
TEA: sys
NPV : -258,...
NPV : -259,...
See Also
--------
Expand Down
6 changes: 3 additions & 3 deletions qsdsan/_waste_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ def from_stream(stream, ID='', **kwargs):
WasteStream-specific properties:
pH : 7.0
Component concentrations (mg/L):
H2O 1012485.4
H2O 992181.4
>>> ws.price
8.0
'''
Expand Down Expand Up @@ -991,8 +991,8 @@ def mix_from(self, others, **kwargs):
WasteStream-specific properties:
pH : 7.0
Component concentrations (mg/L):
S_O2 303021.4
H2O 303021.4
S_O2 450614.6
H2O 450614.6
'''
SanStream.mix_from(self, others, **kwargs)

Expand Down
9 changes: 5 additions & 4 deletions qsdsan/equipments/_electrode.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# modifying electrode script to include 'reference' option
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

Expand Down Expand Up @@ -30,7 +31,7 @@ class Electrode(Equipment):
N : int
Number of units of the given electrode.
electrode_type : str
Type of the electrode, can only be "anode" or "cathode".
Type of the electrode, can only be "anode", "cathode" or "reference".
material: str
Material of the electrode.
unit_cost: float
Expand Down Expand Up @@ -85,14 +86,14 @@ def N(self, i):

@property
def electrode_type(self):
'''[str] Type of the electrode, either "anode" or "cathode".'''
'''[str] Type of the electrode, either "anode", "cathode" or "reference".'''
return self._electrode_type
@electrode_type.setter
def electrode_type(self, i):
if i.lower() in ('anode', 'cathode'):
if i.lower() in ('anode', 'cathode', 'reference'):
self._electrode_type = i
else:
raise ValueError(f'Electrode can only be "anode" or "cathode", not "{i}".')
raise ValueError(f'Electrode can only be "anode", "cathode" or "reference", not "{i}".')

@property
def unit_cost(self):
Expand Down
2 changes: 2 additions & 0 deletions qsdsan/sanunits/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
Lane To <lane20@illinois.edu>
Smiti Mittal <smitimittal@gmail.com>
Anna Kogler <akogler@stanford.edu>
Jianan Feng <jiananf2@illinois.edu>
Expand Down
Loading

0 comments on commit c1d23ba

Please sign in to comment.