-
Notifications
You must be signed in to change notification settings - Fork 84
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
Issue1576 Heat pump model integration #1628
Conversation
@FWuellhorst Greetings!
|
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.
@FWuellhorst
Please see in-line comments. Please also refer to the style guide.
This is the first round of review where I mainly suggested changes to comply with the style and format conventions. I only looked at the codes briefly and didn't go through everything, so please bear with me if I mistakenly marked something that was intentional.
Please let me know when you are done and I will do another round of style review.
Cheers,
Casper
@hcasperfu Thank you very much for this first round of style check review. I included most of your comments, please check my answers in some comments. Especially regarding the naming rule, we sometimes make exceptions in the AixLib if the longer name improves understanding of the model. What is your take on that? |
Maybe a note on the review-order regarding documentation. I did not update the existing documentation, as maybe some functions will be changed due to the review process. Would it be possible to do a functional review and then a style review with regard to documentation? Or should I update the documentation now and adjust if necessary? |
I think it would make sense to first give a verbal feedback if we set aside half an hour or an hour for a meeting to discuss higher level feedback before going down into details. |
I went through all models and checked syntax, documentation, icons, and 80 column line width. I agree that a short meeting would help. Are you free on Friday morning? Else, next week looks better for me. |
Sounds good! I plan to do another round of format review later this week. |
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.
Please see inline comments.
This concludes the second round of format review. I mainly
- caught variable names that did not comply with the naming convention,
- caught variables missing description strings,
- and tried to make some long descriptions more concise.
Also as a side note, although I didn't pay too much attention to the content, I feel I saw some code repetitions. They may benefit from improved inheritance structure. But this is a discussion for the functionality review.
Good work and see you at the meeting!
Casper
IBPSA/Fluid/HeatPumps/BlackBoxData/BaseClasses/PartialBlackBox.mo
Outdated
Show resolved
Hide resolved
IBPSA/Fluid/Chillers/BlackBoxData/BaseClasses/PartialChillerBlackBox.mo
Outdated
Show resolved
Hide resolved
IBPSA/Fluid/HeatPumps/Validation/BaseClasses/PartialHeatPumpValidation.mo
Outdated
Show resolved
Hide resolved
@hcasperfu : Please check my comment regarding partial models, I can't seem to get your implementation to work without errors. Other than this minor request, I accepted everything and revisited style guides, added documentation etc. @mwetter: I will try to fix the travis CI for the existing .mos-scripts. Even though there is still room for improvement (e.g. dp_nominal could be extracted from datasheets), such new features would require substantial research and modelling time. We can tackle those improvements in future issues in my opinion. |
@FWuellhorst - |
Yes, let's do that! |
@hcasperfu @mwetter : From what I see, the examples fail because there are Warnings in the model checks: As these warnings have bugged me and other IBPSA / AixLib users for quite some time: Why is this if condition in the nominal attribute even necessary? You implemented this for #408 (39e8628) quite some time ago @mwetter, but I don't see why a mass flow rate does not allow for a zero nominal attribute? Or why setting the |
@FWuellhorst -
The same errors messages were generated in the fail log file when I ran the CI tests locally. |
Thanks for the hint! I fixed all errors appearing with pedantic mode on. Is there a tutorial on how to run the CI locally? I have a dymola docker, which python scripts do I need to execute? |
@FWuellhorst - |
@FWuellhorst - |
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 the last round of format review, mainly focused on clarity and crispness of documentation. I suggested various language edits through the inline comments. Most of them are straightforward suggestions and can be directly committed.
- They are mostly suggestions, because I want to make sure I understood them correctly. For clear typos, I made pushes instead.
- A lot of them shorten long three-line sentences after a class or variable declaration - those details should be reserved for the documentation.
- There are various places where a reference or source link (e.g. "the UK standard", "the German standard", "the conference paper", etc.) should be provided.
- There are a few expressions commonly used throughout this package that I find confusing or misleading (both as variable names and as in the description/documentation).
- Related to the safety control blocks:
- "Runtime" and "lock time"/"loctime" - I suggest calling them "on-time" and "off-time" (the latter is already used in the documentation of
Controls.Safety.OnOff
). - "Runs per hour" can be called "cycle ratio".
- "Runtime" and "lock time"/"loctime" - I suggest calling them "on-time" and "off-time" (the latter is already used in the documentation of
- "Useful side" and "not useful side" of the chiller/heat pump look like very awkward expressions to me. I suggest perhaps calling them the "interior side" and "exterior side".
- Whenever the word "power" is used in the context of a chiller or heat pump, please be clear if it is the "electric power consumption", or "heating/cooling output". This comes from teaching experiences where students seem to confuse these often, because they all can use the same unit.
- Related to the safety control blocks:
There is one issue that needs to be fixed before this PR can move forward.
- Example/validation models under
Fluid.HeatPumps.ModularReversible.Controls.Safety.Examples
don't have.mos
scripts. Please add those and ping me to create the results files for you.
Other items up for discussion.
- As we chatted in our meeting, there are extensive (in my opinion) code repetitions between some of the sister class pairs, namely
LargeScaleWaterToWater
,ModularReversible
,ReversibleCarnotWithLosses
at the top level andRefrigerantCycle.EuropeanNorm2D
. Trying to combine them may be worthwhile in terms of code maintainability, if this doesn't increase the inheritance complexity too much. - A small new package for string signal blocks
IBPSA.Utilities.IO.Strings
was created in this PR. It looks suitable for general use and is lightweight (unlikeEvaporatorCondenserWithCapacity
which we discussed in our meeting). I believe it is fine to have it outside of theModularReversible
package, but the documentation needs to be revised to remove any language that makes it seem to have specific use only. Basically, either move this package toModularReversible
, or delete all "Used to enable String comparison in optional models".
This concludes the last round of format review from me.
IBPSA/Fluid/Chillers/ModularReversible/BaseClasses/RefrigerantCycle.mo
Outdated
Show resolved
Hide resolved
IBPSA/Fluid/Chillers/ModularReversible/Data/EuropeanNorm2D/EN14511/Vitocal200AWO201.mo
Outdated
Show resolved
Hide resolved
IBPSA/Fluid/HeatPumps/ModularReversible/RefrigerantCycle/Inertias/BaseClasses/PartialInertia.mo
Outdated
Show resolved
Hide resolved
IBPSA/Fluid/HeatPumps/ModularReversible/RefrigerantCycle/Inertias/NoInertia.mo
Outdated
Show resolved
Hide resolved
IBPSA/Fluid/HeatPumps/ModularReversible/Validation/BaseClasses/PartialValidation.mo
Outdated
Show resolved
Hide resolved
@hcasperfu: First, thanks for the really nice review and all the comments. I responded to some of them for clarifications or to state my opinion, please check those first. Regarding your longer message:
I disagree, it is the number of starts per hour. The term ratio indicates some ratio, but it is an absolute value.
Interior and exterior sides do not make sense here. Please check my comment in your suggested change.
As discussed, I still think this adds a lot of complexity for new users. I am against adding extra partial classes.
I made the doc more generic. |
@FWuellhorst -
|
@hcasperfu : Thanks for the reference results. If fixed the failing example, this may lead to a new reference result as I changed a structural parameter. The cycle rate is a good name, thanks! |
Additional review comments from @mwetter :
|
@mwetter: Regarding COP outputs: Regarding COP with inertia: I don't see the added value, as this will lead to further weird values if inertia are considered and no difference to the ones from the already added efficiencies if inertia is not modelled. |
@FWuellhorst : b4d34a2 conditionally enables Can you please finish up the implementation, as various models fail the regression test due to unknown data records. |
…n_strings Removed use of string connectors. Introduced boolean parameter to allow different device id.
|
@mwetter This behavior was changed as requested by @AntoineGautier. The From the UserGuide:
The descriptions holds for all models types, as the scaling factor in turn is used to calculate the nominal electrical power. For table-data however, it's best to warn about different scaling, as the nominal electrical powers may differ in reality, as well. Does this clarify your concern? |
…limWarSca This was done as we use nowhere percentage in the library, and the renaming will allow making conversion scripts
IBPSA/Fluid/HeatPumps/ModularReversible/RefrigerantCycle/BaseClasses/PartialRefrigerantCycle.mo
Outdated
Show resolved
Hide resolved
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.
@FWuellhorst : Please see the inline comment for a couple of places where I need your help. Thanks.
IBPSA/Fluid/Chillers/ModularReversible/Data/TableData2D/EN14511/SingleSplitRXM20R.mo
Show resolved
Hide resolved
IBPSA/Fluid/Chillers/ModularReversible/Data/TableData2D/EN14511/Vitocal251A08.mo
Show resolved
Hide resolved
IBPSA/Fluid/HeatPumps/ModularReversible/Data/TableData2D/EN14511/SingleSplitRXM20R.mo
Show resolved
Hide resolved
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.
@FWuellhorst Please see inline comment for some more feedback.
IBPSA/Fluid/HeatPumps/ModularReversible/Data/TableData2D/EN14511/Vitocal251A08.mo
Show resolved
Hide resolved
@FWuellhorst : Thanks again for all your hard work on implementing these large models! They are ready to be merged. |
I have added the heat pump model from the AixLib with all relevant submodels. During this implementation, I've added some changes (easier design, more safety control) and followed the naming convention more thoroughly.
The last remaining todo would be to add more Examples and maybe a Validation package with data from the paper.
But before I add these, a review of the underlying structure etc. would be good.