Conversation
|
Please sort the conflict with the merged PRs from @ZedongPeng before we revise this |
bernalde
left a comment
There was a problem hiding this comment.
Good work. There are some lingering TODO and TOCHECK notes that should be addressed or rewritten.
The most important one is regarding an updated logical expression system in Pyomo. If the model does not run with the current version of Pyomo, we need to update it in this PR.
Finally, put all the units between square brackets
| @@ -1,103 +1,204 @@ | |||
| """ Side feed flash """ | |||
There was a problem hiding this comment.
Can you add more documentation to this and the rest of the files at the header level? Check the other models for reference
|
|
||
| @msf.Constraint(msf.nc, | ||
| doc="Vapor-liquid equilibrium constant") | ||
| # TODO: Is it computed using the Peng-Robinson equation of state? |
There was a problem hiding this comment.
I don't think this classifies as a TODO (as there is no action to be taken). I would add it as a Note. Moreover, I would encourage you to contact Soraya asking for these and other questions you might have
| msf.OBJ = Objective( | ||
| expr=1, | ||
| sense=minimize) | ||
| # TODO: Is it computed using the Peng-Robinson equation of state? |
| m.Tbot = m.TB0 # Bottom-most tray temperature in K | ||
| m.Ttop = m.TD0 # Top-most tray temperature in K | ||
| m.Tcon = m.TD0 - 5 # Condenser temperature in K | ||
| m.Treb = m.TB0 + 5 # Reboiler temperature in K |
There was a problem hiding this comment.
instead of "in UNITS" let's use "[UNITS]" to standardize with other models
|
|
||
| m.flow_max = 1e3 # Flowrates upper bound in mol/s |
| for comp in m.comp: | ||
| m.dHvap[comp] = dHvapb[comp] / m.Hscale | ||
|
|
||
| ## Heat capacity calculation for liquid and vapor phases using Ruczika-D method for each component in the feed, section, and tray |
There was a problem hiding this comment.
Can we add a link or reference to the method to the header of the file?
| >= m.min_num_trays | ||
| ) | ||
|
|
||
| # TOCHECK: pyomo.GDP Syntax |
There was a problem hiding this comment.
For whom is this TOCHECK note?
| else: | ||
| return Constraint.NoConstraint | ||
|
|
||
| # TOCHECK: Update the logic proposition constraint for the main section with the new pyomo.gdp syntax |
There was a problem hiding this comment.
Does the code run with the current version of Pyomo? If it doesn't then this update needs to be made in this PR
bernalde
left a comment
There was a problem hiding this comment.
Units should be added in many missing places and between [].
The most important comment is: does this run with the last version of Pyomo without warnings from the logical expression system?
| mn.Tr2nmin = Var( | ||
| mn.cols, | ||
| mn.sec, | ||
| mn.nc2, |
There was a problem hiding this comment.
Missing units here and in many other places
|
|
||
| from gdplib.kaibel.kaibel_side_flash import calc_side_feed_flash | ||
|
|
||
| # from .kaibel_side_flash import calc_side_feed_flash |
| m.P = Var( | ||
| m.section, | ||
| m.tray, | ||
| doc="Pressure at each potential tray in bars", |
| m.section, | ||
| m.tray, | ||
| m.comp, | ||
| doc="Liquid composition", |
There was a problem hiding this comment.
Missing units [mol/mol], similar below
| @disj.Constraint(m.comp, doc="Top section 4 vapor enthalpy") | ||
| def top_vapor_enthalpy(disj, comp): | ||
| """ | ||
| Vapor enthalpy for the top section in the column. |
There was a problem hiding this comment.
Missing units here and in many other functions
| m = build_model() | ||
|
|
||
| # Fixing variables | ||
| m.F[1].fix(50) # feed flowrate in mol/s |
|
Does #47 supersede this? SHould we merge this beforehand? |
This pull request contains changes to the documentation of the ´kaibel_prop.py´ file.