-
Notifications
You must be signed in to change notification settings - Fork 36
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
NGFC Flowsheet Improvements #105
Conversation
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 don't see any major issues, however we do need to resolve the testing issue due to PySimpleGUI
.
@@ -725,7 +726,7 @@ def set_reformer_inputs(m): | |||
m.fs.reformer_bypass.split_fraction[0, "bypass_outlet"].fix(0.6) | |||
|
|||
# air to reformer | |||
m.fs.air_compressor_s1.inlet.flow_mol[0] == 1332.9 # mol/s | |||
m.fs.air_compressor_s1.inlet.flow_mol[0] = 1332.9 # mol/s |
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.
Minor comment for the future - using var.set_value()
is probably the better way to do this, as it avoid a number of potential issues.
for t, c in unit.isentropic.items(): | ||
iscale.constraint_scaling_transform(c, 1e-1, overwrite=False) | ||
|
||
# pressure changer | ||
if hasattr(unit, "isentropic_energy_balance"): |
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.
Probably outside the scope of this PR, but are all these 'if' checks required? They make sense for a generic unit model where users have options over what terms might be included, but for a flowsheet example I would have thought most of these would be concretely defined (i.e. you know if it is here or not).
" \"nlp_scaling_method\": \"user-scaling\"\n", | ||
"}\n", | ||
"\n", | ||
"# suppress warnings about missing scaling factors\n", |
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.
Minor comment, should we have this warnings suppressed?
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.
Yes, we should suppress all these warnings in examples.
"scaling_log.setLevel(idaeslog.ERROR)\n", | ||
"\n", | ||
"# suppress NL writer warnings\n", | ||
"nl_writer_log = logging.getLogger(\"pyomo.repn.plugins.nl_writer\")\n", |
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.
Similarly, here as well should we this warnings suppressed?
@andrewlee94 should we move this example from archive to docs? |
@JavalVyas2000 I believe it was on the list of examples Miguel suggested we make public so the answer is yes (assuming we can get it working reliably). I'll leave it up to you and @AlexNoring as to whether that should be done in this PR or not - note that if we do that we should add more diagnostics checks as well ( |
Let's leave moving this example to docs for a separate PR. |
NGFC Flowsheet Improvements
Updates to the NGFC flowsheet to fix initialization failure
Legal Acknowledgement
By contributing to this software project, I agree to the following terms and conditions for my contribution:
📚 Documentation preview 📚: https://idaes-examples--105.org.readthedocs.build/en/105/