Skip to content
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

Issue1287 DHW model #1355

Merged
merged 71 commits into from
Oct 17, 2024
Merged

Issue1287 DHW model #1355

merged 71 commits into from
Oct 17, 2024

Conversation

lucasverleyen
Copy link
Member

@lucasverleyen lucasverleyen commented Mar 27, 2024

Fixes #1287

Issues as described in #1287 have been addressed. The unit test for the old example has been removed and two new unit tests have been added for the two new examples covering the two DHW tap models. The reference results can be found in #1287 .

@lucasverleyen lucasverleyen self-assigned this Mar 27, 2024
Copy link
Contributor

@jelgerjansen jelgerjansen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lucasverleyen thanks for refactoring this model. I've focused on the implementation of PartialTap for now. Please have a look at my remarks and use that feedback in the other models as well if possible. When that's done, I'll do a second review.

@lucasverleyen
Copy link
Member Author

@louisher thanks a lot for the review. I have implemented and resolved all of your suggestions, except 1. @jelgerjansen can you give your opinion?

@jelgerjansen
Copy link
Contributor

@lucasverleyen I did some quick checks with a new implementation for the mass flow calculation. The old implementation gives small but unrealistic results around the transition are (m>m_set, blue curve below).
I removed the delTSca component and its inputs and replaced the mFloHot component (and its inputs) by the following RealExpression:
Modelica.Blocks.Sources.RealExpression mFloHot(y=smooth(2, if noEvent(THot<TSet) then m_flow_set else m_flow_set*(TSet - TCol)/(THot.T - TCol)))
This results in a twice differentiable function (red). I therefore propose to keep the latter implementation, as this gives better results and is more understandable for other users.

The simulation results below have the a constant m_flow_set of 0.1kg/s and TSet of 45°C.

image

@lucasverleyen
Copy link
Member Author

@jelgerjansen I fully agree with your suggestion! It is indeed more elegant and easier to interpret.

@lucasverleyen
Copy link
Member Author

@jelgerjansen all comments have been addressed. Unit tests pass. If you agree with the implementation of the discomfort calculation in the Tap.mo example, this pull request is ready to be merged.

@jelgerjansen jelgerjansen merged commit de75e35 into master Oct 17, 2024
2 checks passed
@jelgerjansen jelgerjansen deleted the issue1287_DHWmodel branch October 17, 2024 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Review DHW tap model and add typical DHW tap profiles
3 participants