Skip to content
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

Implement get_solver for WaterTAP #1353

Merged
merged 7 commits into from
Apr 18, 2024
Merged

Conversation

bknueven
Copy link
Contributor

@bknueven bknueven commented Apr 8, 2024

Fixes #1348

Summary/Motivation:

Presently, when import watertap runs we change the IDAES default to utilize the ipopt-watertap solver. This can mess with down stream projects as it is a side-effect of importing WaterTAP, e.g., prommis/prommis#52.

This PR would remove this behavior, and replace it with WaterTAP's own implementation of get_solver which works identically to the IDAES version except it returns ipopt-watertap by default.

However, as a consequence, the behavior of get_solver within IDAES has changed for WaterTAP -- it now gets the IDAES defaults when imported from idaes.core.solvers. As a result, we would need to specify the ipopt-watertap solver when calling certain IDAES methods, e.g., f5a55cc, to get the ipopt-watertap solver for initialization. Usually this does not matter, but this PR would make this change on flowsheets that fail without ipopt-watertap for unit model initialization.

Changes proposed in this PR:

  • Implement new get_solver method for WaterTAP (e8d7b85)
  • Remove code which changes the default IDAES sovler to ipopt-watertap (510b948)
  • Update all imports of get_solver to watertap.core.solvers (f628c03)
  • Several fixes for affected flowsheets (519a85f, b99eee9, f5a55cc)

Legal Acknowledgement

By contributing to this software project, I agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the license terms described in the LICENSE.txt file at the top level of this directory.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@lbianchi-lbl lbianchi-lbl added the 1.0 Hard requirement for the 1.0 release label Apr 11, 2024
@ksbeattie ksbeattie added the Priority:Normal Normal Priority Issue or PR label Apr 11, 2024
@ksbeattie ksbeattie added Priority:High High Priority Issue or PR and removed Priority:Normal Normal Priority Issue or PR labels Apr 11, 2024
@ksbeattie ksbeattie enabled auto-merge (squash) April 18, 2024 20:35
@ksbeattie ksbeattie merged commit 0c142e3 into watertap-org:main Apr 18, 2024
22 checks passed
lbianchi-lbl pushed a commit to watertap-org/parameter-sweep that referenced this pull request May 1, 2024
* implement new get_solver for watertap

* remove code which changes the idaes default solver

* update watertap with new get_solver function

* fix ASM2D flowsheet

* fix MVC single stage

* fix electrodialysis 1stack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.0 Hard requirement for the 1.0 release Priority:High High Priority Issue or PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove side effect of import watertap
5 participants