QSD-Group / QSDsan

Quantitative Sustainable Design (QSD) of sanitation and resource recovery systems.
https://qsdsan.com
Other
30 stars 13 forks source link

`SanUnit.__init__` #59

Closed yalinli2 closed 2 years ago

yalinli2 commented 2 years ago

Many of the the __init__ methods are error-prone, e.g.,

    def __init__(self, ID='', ins=None, outs=(), **kwargs):
        SanUnit.__init__(self, ID, ins, outs, F_BM_default=1)

This won't allow the unit to init with the correct thermo object and stream types, please update those to be

    def __init__(self, ID='', ins=None, outs=(), thermo=None, init_with='WasteStream',
                 **kwargs):
        SanUnit.__init__(self, ID, ins, outs, thermo=thermo, init_with=init_with,
                         F_BM_default=1)

Please DO modify this based on your units - e.g., some units' might other other attributes (e.g., lifetime, CAPEX_over_OPEX that need to be included)

haclohman commented 2 years ago

Finished for SCG Aquonic.

yalinli2 commented 2 years ago

Forgot to note that this is done for BR as well, on the gates branch

shionwatabe commented 2 years ago

Finished for NEWgenerator :)

yalinli2 commented 2 years ago

I think this is largely done, any remaining ones will be updated when I merge gates into main