-
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
Add a modular heat pump approach #1576
Comments
I think this would be a good addition. Once it is added, we can see if it should indeed make the existing Carnot model obsolete, or whether both should be kept as the Carnot model is probably as simple as one can model a HP while taking the lift into account. I could see applications for early conceptual design/technology screening or MPC in which a simpler model that has not the discontinuities introduced by the safety control may still be applicable. |
Thanks for the quick answer! I will start to work on this. |
Additional tasks when integrating the model:
|
|
|
|
@DaJansenGit: Could you check for which size-range your automatic design is valid? I would like to add a warning and maybe state more clearly, that it was done for large-scale heat pumps. |
The data basis is ~ 20 data sets for water-to-water heat pumps in the range from 25 kW to 1 MW. This is already stated in the model information. However, I agree that an assert warning would help to avoid confusion. |
@mwetter : One question regarding warnings during check and translation.
In the AixLib version, this process is manual and very error-prone. In the examples, I overwrite the method to calculate |
|
|
@FWuellhorst : I would leave the warnings about the nominal attribute being ignored. It would be good to raise this problem to Dassault. We also have a few models in the Buildings library that exhibit exactly this issue. Best would be if Dymola can assign these nominal values once the model is initialized. Currently, they are written into |
Same in IDEAS. It would actually be even better if Dymola can assign the nominal values during translation. It should be perfectly possible to evaluate the Media functions during translation (unless their inputs depend on an initial equation). I think this actually works in OMC/JModelica but I'm not sure. |
Ok, thanks for the feedback! Then I will continue with this new design approach. @Mathadon : I checked and I don't get the error with the snippet below in OpenModelica:
|
|
@mwetter @Mathadon : Analyzing why this happens, I found the following: The scaling factor is calculated using an expression like this As I find this replaceable model definition in various locations in the MLS, I assume it's fine to use it (https://modelica.org/documents/MLS.pdf). Here is a minimal example showing the issue (the heat pump approach uses this replaceable structure).
I hope that OM compatibility is not a limiting factor when considering this model approach. I'm happy to raise this issue to the developers to fix this issue, or maybe we find a solution within my code that causes this error in the first place. |
@FWuellhorst if there is a bug in OpenModelica than we can best report it there and hope that it will be fixed soon. So far their response has been rather quick so I have good hopes :) |
The response was really fast, and the bug was already fixed in the latest version. The model works in OM 1.19.2 and simulates. At a first glance, the results at least look similar. |
@FWuellhorst Thanks for the minimum test model. I confirm that this works in OpenModelica 1.20.0~dev-250-gb17e1a0. |
Thanks for checking and confirming. I will raise the compatibility issue in the AixLib as well :) |
@mwetter fyi we have plans to use OM for CI testing in the future too. |
Digging deeper into the differences between Dymola and OM for my model, I found an error in one safety control (algebraic loop) which shouldn't be possible in the first place. Basically, Dymola accepted ySet = ySet as a connection. One question regarding the CI pipelines: Are you using the code from buildingspy? I've seen that OM itself tests our libraries as well (https://libraries.openmodelica.org/branches/master/). Do you you their code for testing as well? |
@FWuellhorst We run our own tests with OpenModelica to catch errors before they show up in the CI testing of openmodelica.org. Line 24 in 2584136
|
As discussed in #1628, the naming I am currently in favour of @DaJansenGit @LauraMaier : As users of the model in the AixLib, what do you think? |
Based on the discussions with @mwetter @hcasperfu, the following new todos arise:
|
@FWuellhorst It was nice talking to you this morning in the meeting!
This is (mainly) just for the control blocks. I will also be happy to look at the inheritance structure of the code some time later to see if some of the code repetition can be reduced. |
@mwetter : I used the following solution to disable the bus connector for Buildings and enable it in the AixLib:
Internally, sigBus is still used for the black box models. One question remains regarding the default of this parameter in the IBPSA. The example would require to disable this option. Otherwise, you would have to exclude these examples upon merging into Buildings. Thus, the default |
For each of these, an example will be introduced. With all 5, the usage should be clear enough. What do you think @hcasperfu @mwetter ? |
@FWuellhorst The list of examples look good. Regarding the connector, I would rather not include examples in |
Adding examples in the Regarding the proliferation: It seemed to me that a lot of commercial libraries use expandable connectors, especially for control applications. Showing users that buses can be used aside from the weather information would, in my opinion, not be a bad thing. Regarding merge, maybe a solution like this would come in handy:
If all the relevant information is in |
CDL does not allow expandable connectors, as the tooling for supporting them is quite complex. I think BuildingsPy could be updated to delete certain lines during the merge. That probably leads to the cleanest end result. |
Like this?
Libraries using the concept can remove the protected line and add it two lines below. Contrary, IBPSA defaults with no bus, and thus, Buildings as well. |
As discussed in the IBPSA Working Group meeting, I reverted some features:
|
Regarding the naming of Current implementationHeat exchangers are called
The same issue holds for names like Proposed Solution@hcasperfu came up with ambient side DiscussionI could just use these names for the operational envelope. However, the concept could also be applied for As the renaming would be some effort, let's decide before going into action. From my point of view, as the model is for system application, the naming could make the life of system engineers much simpler. At the same time, the existing models use |
We also had multiple iterations around that and could not come up with a good scheme. The issue of useful/not useful is that it won’t work for a heat recovery chiller, as both sides are useful. Maybe for reversible heat pumps we need to get back and use |
For the operational envelope, I have two instances for main and second mode. I could make two operational envelope models, one for chillers and one for heat pumps. Having a common base, extending and just adding the input connectors with the correct names would avoid code repetition. Regarding naming everything |
I agree with @FWuellhorst that naming things |
Let's leave it at |
Just to note it here, a comparison between the modular models and the
The additional state events occurs due to the output |
Many researches need models of heat pumps and chillers, and there are various approaches with different levels of detail.
Currently, the IPBSA supports basically two approaches, leading to four models:
The Carnot models are also available as a chiller option.
While the WaterToWater models explicitly model the refrigerant properties, many data driven / black-box approaches for the vapour compression cycle exists in literature. The Carnot model may be viewed as such a black-box approach.
To enable different black-box approaches for refrigerant cycles and thus heat pumps and chillers, we developed an approach in the AixLib and presented the results in the latest Modelica Conference (https://ecp.ep.liu.se/index.php/modelica/article/view/234).
The motivation for this model and the safety controls is stated in detail in the paper.
If there is an interest to integrate this approach into the core library, several steps would be necessary:
PartialVapourCompressionMachine
and the extendingChiller
andHeatPump
modelSafetyControl
models@mwetter : As we've already briefly disussed this in the last project 1 meeting. What is your opinion on this topic?
The text was updated successfully, but these errors were encountered: