BioSTEAMDevelopmentGroup / Bioindustrial-Park

BioSTEAM's Premier Repository for Biorefinery Models and Results
MIT License
38 stars 18 forks source link

Cornstover biorefinery: sub-system TEA #9

Closed yalinli2 closed 4 years ago

yalinli2 commented 4 years ago

Description In using the bst.TEA.like function, sub-system TEA inherit all settings of the given TEA, which is fine for most of the parts, but OSBL_units, and labor_cost should be adjusted based on the sub-system, not copied from the given TEA.

This is most evident for the Area100 TEA, which only contains the FeedstockHandling unit and shouldn't have any installation cost associated with it, but

Screen Shot 2020-04-13 at 8 41 36 PM

Environment OS: macOS Catalina 10.15.3 python: v3.7.6 biosteam: v2.12.0 biorefineries: v2.9.0

yoelcortes commented 4 years ago

The "Area" TEA objects are not used for performing techno-economic analysis. They are only used to get installation cost for making plots. Please ignore the "Area" TEA objects, they are just for internal use.

yalinli2 commented 4 years ago

Yes I figured, indeed that doesn't affect calculation, thanks!

A side note, in the model.py script for doing system evaluation, there are:

def cooling_duty_function(tea):
    heat_utilities = sum([i.heat_utilities for i in tea.units if i._N_heat_utilities], ())
    cooling_utilities = [i for i in heat_utilities if i.duty < 0]
    return lambda: sum([i.duty for i in cooling_utilities])

for i, tea in enumerate(areas, 1):
    Area = f'Area {i}00'
    metrics.extend(
        (Metric('Electricity', electricity_rate_function(tea), 'MW', Area),
         Metric('Cooling duty', cooling_duty_function(tea), 'MMkcal/hr', Area),
         Metric('Installation cost', installation_cost_function(tea), '10^6 USD', Area)))

I think the unit for 'Cooling duty' should be MMkJ/hr as opposed to MMkcal/hr?

Screen Shot 2020-04-14 at 11 42 33 AM

Thanks!

yoelcortes commented 4 years ago

Ahh, yeah, @scyjth let me know that the cooling duty may be wrong. I think you found the error. I didn't actually use the cooling duty results myself so I didn't notice. Thanks!

yalinli2 commented 4 years ago

😃 Yeah!

yalinli2 commented 4 years ago

Well, turns out in the reply below the cooling_duty should be in kJ/hr (not MMkJ/hr) and installation_cost should be in USD (not 10^6 USD). Thanks @scyjth for pointing this out! (I hope I get it right this time)

Yes I figured, indeed that doesn't affect calculation, thanks!

A side note, in the model.py script for doing system evaluation, there are:

def cooling_duty_function(tea):
    heat_utilities = sum([i.heat_utilities for i in tea.units if i._N_heat_utilities], ())
    cooling_utilities = [i for i in heat_utilities if i.duty < 0]
    return lambda: sum([i.duty for i in cooling_utilities])

for i, tea in enumerate(areas, 1):
    Area = f'Area {i}00'
    metrics.extend(
        (Metric('Electricity', electricity_rate_function(tea), 'MW', Area),
         Metric('Cooling duty', cooling_duty_function(tea), 'MMkcal/hr', Area),
         Metric('Installation cost', installation_cost_function(tea), '10^6 USD', Area)))

I think the unit for 'Cooling duty' should be MMkJ/hr as opposed to MMkcal/hr?

Screen Shot 2020-04-14 at 11 42 33 AM

Thanks!