Trucking¶
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.
- class qsdsan.unit_operations.static._trucking.Trucking(ID='', ins: Sequence[AbstractStream] | None = None, outs: Sequence[AbstractStream] | None = (), thermo=None, init_with='WasteStream', load_type='mass', load=1.0, load_unit='kg', distance=1.0, distance_unit='km', interval=1.0, interval_unit='hr', fee=0.0, fee_unit='USD', if_material_loss=True, loss_ratio=0.02, price_ratio=1.0)¶
For transportation of materials with considerations on material loss based on Trimmer et al.
To enable life cycle assessment, the following impact items should be pre-constructed: Trucking.
- Parameters:
load_type (str) – Either ‘mass’ or ‘volume’.
load (float) – Transportation load per trip.
load_unit (str) – Unit of the load.
distance (float) – Transportation distance per trip.
distance_unit (float) – Unit of the distance.
interval (float) – Time interval between trips.
fee (float) – Transportation fee per trip.
fee_unit (str) – Currency of the fee.
if_material_loss (bool) – If material loss occurs during transportation.
loss_ratio (float or dict) – Fractions of material losses due to transportation.
price_ratio (float.) – Calculated transportation cost will be multiplied by this number to consider the effect in cost difference from different locations.
Examples
>>> from qsdsan.utils import create_example_sanitation_components >>> cmps = create_example_sanitation_components() >>> from qsdsan import ImpactItem, WasteStream >>> from qsdsan.unit_operations import Trucking >>> # The 'Trucking' impact item must exist for the design (LCA) step >>> _ = ImpactItem('Trucking', functional_unit='tonne*km') >>> ws = WasteStream('ws', H2O=1000, OtherSS=50, units='kg/hr') >>> T1 = Trucking('T1', ins=ws, outs=('transported', 'loss'), ... load=1, load_unit='tonne', ... distance=5, distance_unit='km', ... interval=1, interval_unit='day') >>> T1.simulate() >>> round(T1.outs[1].F_mass, 1) # material lost in transit, kg/hr 21.0 >>> round(T1.design_results['Parallel trucks'], 1) 25.2
See bwaise systems for use in a complete sanitation system.
References
[1] Trimmer et al., Navigating Multidimensional Social–Ecological System Trade-Offs across Sanitation Alternatives in an Urban Informal Settlement. Environ. Sci. Technol. 2020, 54 (19), 12641–12653. https://doi.org/10.1021/acs.est.0c03296.
- property fee¶
[float] Transportation fee per trip.
- line: str = 'Trucking'¶
class-attribute Name denoting the type of Unit class. Defaults to the class name of the first child class
- property loss_ratio¶
[float] or [dict] Fractions of material losses due to transportation. If a single number is provided, then it is assumed that losses of all Components in the WasteStream are the same.
Note
Pre-set state variable values in
WasteStream(e.g., COD set through _COD rather than calculated) will be retained if the loss ratio is a single number (treated like the loss stream is split from the original stream), but will be overwritten when the ratio is a dict.
- run()¶
Run mass and energy balance. This method also runs specifications user defined specifications unless it is being run within a specification (to avoid infinite loops).
See also
_run,specifications,add_specification,add_bounded_numerical_specification