Skip to content

Commit

Permalink
adopt new biosteam units to qsdsan
Browse files Browse the repository at this point in the history
  • Loading branch information
yalinli2 committed Jul 12, 2024
1 parent ceacacd commit 30bf3a4
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/source/api/sanunits/_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Individual Unit Operations
DynamicInfluent
ElectrochemicalCell
Excretion
facilities
Flash
heat_exchanging
hydroprocessing
Expand Down
4 changes: 4 additions & 0 deletions docs/source/api/sanunits/facilities.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Distillation
============
.. automodule:: qsdsan.sanunits._facilities
:members:
2 changes: 1 addition & 1 deletion qsdsan/_sanunit.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

# %%

import numpy as np
import numpy as np, biosteam as bst
from collections import defaultdict
from collections.abc import Iterable
from warnings import warn
Expand Down
3 changes: 3 additions & 0 deletions qsdsan/sanunits/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
from ._dynamic_influent import *
from ._electrochemical_cell import *
from ._excretion import *
from ._facilities import *
from ._heat_exchanging import *
from ._junction import *
from ._non_reactive import *
Expand Down Expand Up @@ -89,6 +90,7 @@
_dynamic_influent,
_electrochemical_cell,
_excretion,
_facilities,
_flash,
_heat_exchanging,
_hydroprocessing,
Expand Down Expand Up @@ -132,6 +134,7 @@
*_dynamic_influent.__all__,
*_electrochemical_cell.__all__,
*_excretion.__all__,
*_facilities.__all__,
*_flash.__all__,
*_heat_exchanging.__all__,
*_hydroprocessing.__all__,
Expand Down
18 changes: 16 additions & 2 deletions qsdsan/sanunits/_distillation.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@

import biosteam as bst, qsdsan as qs

__all__ = ('BinaryDistillation',)
__all__ = (
'BinaryDistillation',
'ShortcutColumn',
)

_lb_to_kg = qs.utils.auom('lb').conversion_factor('kg')

Expand All @@ -42,4 +45,15 @@ def _design(self):
self.construction = [
qs.Construction('carbon_steel', linked_unit=self, item='Carbon_steel',
quantity=(D['Rectifier weight'] + D['Stripper weight'])*_lb_to_kg, quantity_unit='kg'),
]
]



class ShortcutColumn(bst.units.ShortcutColumn, qs.SanUnit):
'''
biosteam.units.ShortcutColumn with QSDsan properties.
See Also
--------
`biosteam.units.ShortcutColumn <https://biosteam.readthedocs.io/en/latest/API/units/distillation.html>`_
'''
29 changes: 29 additions & 0 deletions qsdsan/sanunits/_facilities.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

'''
QSDsan: Quantitative Sustainable Design for sanitation and resource recovery systems
This module is developed by:
Yalin Li <mailto.yalin.li@gmail.com>
This module is under the University of Illinois/NCSA Open Source License.
Please refer to https://github.com/QSD-Group/QSDsan/blob/main/LICENSE.txt
for license details.
'''

import biosteam as bst, qsdsan as qs

__all__ = (
'ProcessWaterCenter',
)

class ProcessWaterCenter(bst.facilities.ProcessWaterCenter, qs.SanUnit):
'''
biosteam.facilities.ProcessWaterCenter with QSDsan properties.
See Also
--------
`biosteam.facilities.ProcessWaterCenter <https://biosteam.readthedocs.io/en/latest/API/facilities/ProcessWaterCenter.html>`_
'''

0 comments on commit 30bf3a4

Please sign in to comment.