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

Supercritical co2 example #69

Merged
merged 84 commits into from
Feb 19, 2024

Conversation

JavalVyas2000
Copy link
Contributor

@JavalVyas2000 JavalVyas2000 commented Aug 8, 2023

Title

Adding a surrogate example with ALAMO, OMLT and PySMO.

{Description}
The surrogate models estimate the enthalpy and entropy of the supercritical CO2 and are embedded in the properties package, thereby are used in the simulation of supercritical CO2 cycle for cooling.

Legal Acknowledgement

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

I agree my contributions are submitted under the license terms described in the LICENSE.txt file at the top level of this directory.
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.

📚 Documentation preview 📚: https://idaes-examples--69.org.readthedocs.build/en/69/

Copy link
Member

@andrewlee94 andrewlee94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't read throguh the notebooks in detail yet, but here are some general comments on things I saw at first glance. The main thing is that I think there are some files included here that should not be, and one case where we have duplicate files that we should try to avoid.

@ksbeattie ksbeattie added the Priority:Normal Normal Priority Issue or PR label Aug 10, 2023
@ksbeattie
Copy link
Member

@JavalVyas2000 will this be ready for the Aug release? That's scheduled for Aug 24th.

@JavalVyas2000
Copy link
Contributor Author

JavalVyas2000 commented Aug 11, 2023 via email

@andrewlee94
Copy link
Member

andrewlee94 commented Aug 22, 2023

@JavalVyas2000 We only have a little over a week until the August release, so we need to get things cleaned up quickly if we want this to make it. I suggest the following checklist of things to do - this way we can also more easily see progress on addressing issues as notebooks do not work well with GitHub diffs making it hard to see what changes in each iteration.

  • Remove unnecessary changes to HDA example from PR. @ksbeattie or @lbianchi-lbl can help guide you through how to do this in git.
  • Clean up pdf copies of plots and remove the filename option in the plot statements in the cells 5 and 6 of ALAMOpy notebook (or provide a justification for why they are needed).
  • Do we need to check for ALAMO in every cell? My first reaction is that we should only check once (at or before cell 4) and raise an exception if it is not found - there is no point continuing with the notebook if ALAMO is not there. This might make it a bit harder to do testing, but I think it is better to get failures saying the notebook failed than for it to silently run even if ALAMO was not found.

@JavalVyas2000
Copy link
Contributor Author

@andrewlee94 I have removed the changes in the HDA files. Kindly let me know if there are other changes necessary.

Copy link
Contributor

@bpaul4 bpaul4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job on the notebooks! They all look very nice, just a couple of comments.

Besides the content, I think you'll need to add the notebooks to Table of Contents. Follow these instructions to do so: https://github.com/IDAES/examples/blob/main/README-developer.md#add-a-new-example. @dangunter may also want you to build supporting notebook files related to the documentation and tests and check those into GitHub: https://github.com/IDAES/examples/blob/main/README-developer.md#building-documentation.

@lbianchi-lbl
Copy link
Contributor

@JavalVyas2000 I apologize if this has been discussed or tried before - is it possible to move the pysmo_poly_surrogate.json file into the pysmo subdirectory? This might be enough to make the code work without any other changes.

Copy link
Contributor

@lbianchi-lbl lbianchi-lbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pushing this through @JavalVyas2000! I think this is pretty close. A few things it'd be good to fix before merging:

  • The header of the three initial notebooks has "Part -1" instead of "Part 1":
    image
  • The links pointing to other notebooks use a full https://github.com/... URL, which aside from being not-existent in this particular case, it's not needed. Should be able to refer to another notebook simply by putting its relative path according to this syntax (more information available here):
    [](./file-in-same-dir.md)
    
    [](../other-dir/other-file.md)

Copy link
Contributor

@lbianchi-lbl lbianchi-lbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job, thanks again @JavalVyas2000!

@andrewlee94 andrewlee94 requested a review from bpaul4 February 16, 2024 20:46
Copy link
Contributor

@agarciadiego agarciadiego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lbianchi-lbl lbianchi-lbl merged commit 104e3cb into IDAES:main Feb 19, 2024
7 checks passed
@JavalVyas2000 JavalVyas2000 deleted the supercritcial_CO2_example branch March 13, 2024 06:39
@JavalVyas2000 JavalVyas2000 restored the supercritcial_CO2_example branch March 13, 2024 06:40
@JavalVyas2000 JavalVyas2000 deleted the supercritcial_CO2_example branch March 13, 2024 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:Normal Normal Priority Issue or PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants