-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swap LCOW LCOT in REFLOSystemCosting #168
base: main
Are you sure you want to change the base?
Conversation
Not sure why but other 7 files got reformatted. @kurbansitterley |
Yes that is goofy! |
Added some features to ensure we get the behavior we want for the two likely scenarios:
To clarify, the "behavior we want" applies to the integrated flowsheet:
Implementing this behavior got slightly more complicated because all three costing packages inherit the So in that scenario, I added features that an LCOW parameter on This should preserve the ability to |
Smart design! It makes sense and thanks for extending its feasibility and consistency. @kurbansitterley |
# the parameter can be renamed from LCOW to LCOT and use the same flow rate. | ||
add_object_reference(self, "_LCOW_flow_rate", flow_rate) | ||
|
||
def add_LCOT(self, flow_rate): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this separate function? You can just use add_LCOW with name of "LCOT" and point to relevant flowrate, right?
_log.warning(warning_msg) | ||
treat_cost.del_component("LCOW") | ||
treat_cost.add_LCOT(treat_cost._LCOW_flow_rate) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure we should be doing this. Typically, we'd be more restrictive and just raise an error, telling the user that LCOW already exists and to specify a different name. Also not clear when just looking at the diff why we have a second add_LCOW
definition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All this monkey business I do here is to make a consideration for when the user add_LCOW
using the treatment costing package (e.g., m.fs.treatment.costing.add_LCOW(flow_rate)
) before doing add_LCOW
with REFLOSystemCosting
(e.g., m.fs.costing.add_LCOW(flow_rate)
) . In that scenario, you would have two different identically named variables (LCOW
) that are calculated differently.
This seemed problematic to me and potentially confusing to the user. Especially as the behavior we wanted to enforce is to have is swapping LCOW and LCOT (LCOT really just being a metric we sort of made up that is focused purely on the treatment side and to distinguish from LCOW, the levelized metric we are all familiar with). Thus, this is a way to make sure the metrics are where we want them to be. The _LCOW_flow_rate
attribute is for the (probably extreme) edge case where the user wants the two levelized metrics calculated on the basis of different flow rates. (I may have really over coddled the user on this one.)
I would need to read through and review this much more carefully, but my immediate thought is that we should really just have LCOW, LCOE, LCOH, and LCOW would account for energy costs via LCOE/LCOH. I don't see the immediate need and complexity added that comes with including a separate LCOT explicitly for treatment. In my view, LCOW should account for the treatment system and also account for energy costs, which would channel through as LCOE and LCOH. Now, maybe you want options to alter how energy costs are accounted for together with treatment costs, but I am just not totally clear on why you'd need to do this. |
The main reason to do this is to make sure that the proper capex/opex costs are going into the levelized metric we want them to. You can see my comment above but because of the way these are set up and costs/flows are aggregated, adding it to the wrong costing package would probably result in very different values for the same system. |
Swap the definition of LCOW and LCOT for the system level costing: