Update SWRO flowsheet costing#1847
Conversation
MarcusHolly
left a comment
There was a problem hiding this comment.
Two questions about why things have been commented out, but we also need to ensure the GUI builds properly. From my preliminary testing, the flowsheet is unable to build. Maybe you're already aware of this.... regardless, I can look more into the failure, if necessary.
| # # For non-zero order unit operations, we need to register costed flows | ||
| # # separately. | ||
| # # We will register electricity flow for detailed models with the ZO | ||
| # # Costing package | ||
| # m.fs.costing.cost_flow(desal.P1.work_mechanical[0], "electricity") | ||
| # if m.erd_type == "pressure_exchanger": | ||
| # m.fs.costing.cost_flow(desal.P2.work_mechanical[0], "electricity") | ||
| # elif m.erd_type == "pump_as_turbine": | ||
| # pass | ||
| # # m.fs.costing.cost_flow( | ||
| # # desal.ERD.work_mechanical[0], "electricity") | ||
| # else: | ||
| # raise ConfigurationError( | ||
| # f"erd_type was {m.erd_type}, costing only implemented " | ||
| # "for pressure_exchanger or pump_as_turbine" | ||
| # ) |
There was a problem hiding this comment.
Why is this commented out?
There was a problem hiding this comment.
This should be deleted. Now that costing is consolidated to one package, I am just accounting for electricity cost in detailed models through the cost_electricity_flow arg (e.g., https://github.com/watertap-org/watertap/pull/1847/changes#r3538762503)
| desal.PXR.costing = UnitModelCostingBlock( | ||
| flowsheet_costing_block=m.fs.ro_costing | ||
| ) | ||
| # desal.S1.costing = UnitModelCostingBlock(flowsheet_costing_block=m.fs.costing) |
There was a problem hiding this comment.
Why is this commented out?
There was a problem hiding this comment.
It was previously commented out, and my guess is because we didn't deem it necessary to cost out a splitter.
|
@MichaelPesce @dangunter can you verify whether this will work with idaes-flowsheet-processor? @MarcusHolly and I tried opening in the GUI (by manually adding the flowsheet and export files), and for some reason there is a failure during the build process. I am wondering if this might have to do with the way we tried testing and whether this is a real failure or not. If it is a real failure, I am unsure what is wrong with the export file. |
FWIW, when I run this GUI flowsheet locally using the dev installation, I don't get any errors. Hopefully this issue is just a byproduct of the latest GUI release (1.7.dev0) being outdated. |
|
@MarcusHolly @adam-a-a I tested it out with the latest WaterTAP GUI build and I get the following error when trying to build the flowsheet:
Not sure if that error makes sense given any recent WaterTAP updates, but either way, I can build a version of the GUI based off of the current WaterTAP main and see if this flowsheet will build in that version. |
That error implies the GUI is pulling from the wrong version of the SWRO flowsheet. |
That's exactly it. This PR changes |
|
@adam-a-a @MarcusHolly OK great. I just built a version of the GUI using this PR for the WaterTAP version and verified that the flowsheet does indeed work there. |
MarcusHolly
left a comment
There was a problem hiding this comment.
LGTM - GUI works fine on my end
| m = main(erd_type="pressure_exchanger", RO_1D=False) | ||
| m = main(erd_type="pump_as_turbine", RO_1D=False) |
There was a problem hiding this comment.
Just noting that the default config option was changed here. I don't think it's a big deal either way, but if there's a good reason we had pressure_exchanger as the default before, we should consider undoing this change.
There was a problem hiding this comment.
I think it should be ok because the default is still the same; this just calls pump_as_turbine in main if someone tries running the file itself.
kurbansitterley
left a comment
There was a problem hiding this comment.
This is fine with me. @adam-a-a I will leave it to you to decide if you want to add ERD costing in this PR.
Fixes/Resolves:
Summary/Motivation:
A bug was identified for costing of the seawater RO flowsheet. Because two cost packages are used in the flowsheet, at least one shared parameter (each costing package has its own parameter)--i.e., wacc factor-- had a different values used. For example, the ZO costing package used a value of 5% for WACC, while the watertap costing package used a value near 10%.
This PR eliminates usage of two costing packages and associated complexities (e.g., add custom constraints to remedy usage of more than one costing package) of doing so.
Changes proposed in this PR:
Legal Acknowledgement
By contributing to this software project, I agree to the following terms and conditions for my contribution: