-
Notifications
You must be signed in to change notification settings - Fork 238
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
Fix some bugs in the modular properties implementation #1425
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -469,6 +469,8 @@ def state_initialization(b): | |
K = None | ||
break | ||
|
||
# Default is no initialization of VLE | ||
vap_frac = None | ||
Comment on lines
+472
to
+473
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this change because of PyLint? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No - this was from issue #1424. Later steps expect There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I see. I looked at the different branches of the inner if statement, but forgot it was nested inside an outer if statement. |
||
if init_VLE: | ||
raoult_init = False | ||
if tdew is not None and b.temperature.value > tdew: | ||
|
@@ -490,9 +492,7 @@ def state_initialization(b): | |
l_only_comps, | ||
v_only_comps + henry_conc + henry_other, | ||
) | ||
else: | ||
# No way to estimate phase fraction | ||
vap_frac = None | ||
# else: No way to estimate phase fraction, do nothing | ||
|
||
if vap_frac is not None: | ||
b.phase_frac[v_phase] = vap_frac | ||
|
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.
If we don't expect these objects to be mutated, wouldn't it be better to have them as tuples?
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.
This is from deeper in the framework so now would not be the time to change this. That said, a tuple might make sense here.