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

Issue2859 dual source TES #2899

Merged
merged 473 commits into from
Aug 19, 2023
Merged

Issue2859 dual source TES #2899

merged 473 commits into from
Aug 19, 2023

Conversation

hcasperfu
Copy link
Contributor

This closes #2859.

A draft model of the system and most of its control objectives described in the issue post are implemented in Buildings.Fluid.Storage.Plant (but it may be more suitable somewhere else in the library).
The control objective not yet implemented is that P2 (supply pump of chiller + tank) being able to compensate P1 (supply pump of chiller only) when needed. It also assumes that the tank is closed (i.e. not exposed to the atmosphere) to avoid system pressurisation issues for now.

Copy link
Contributor

@bravache bravache left a comment

Choose a reason for hiding this comment

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

This is a first round of review, which was mostly around understanding the model and how it works. It would be easier to read if you could separate the control logic in its own controller, and also rename valve 1/2 and pump 1/2 with actual descriptor of their role, like "Discharge/Charge valve" and "Tank/Chiller pumps" for instance (although if you have a better suited name, go ahead).

Do you want me to also comment on the draft models or are you still working on those?

Buildings/Fluid/Storage/Plant/BaseClasses/SignalThrough.mo Outdated Show resolved Hide resolved
Buildings/Fluid/Storage/Plant/BaseClasses/FluidThrough.mo Outdated Show resolved Hide resolved
Buildings/Fluid/Storage/Plant/ChillerAndTank.mo Outdated Show resolved Hide resolved
Buildings/Fluid/Storage/Plant/ChillerAndTank.mo Outdated Show resolved Hide resolved
Buildings/Fluid/Storage/Plant/ChillerAndTank.mo Outdated Show resolved Hide resolved
Buildings/Fluid/Storage/Plant/ChillerAndTank.mo Outdated Show resolved Hide resolved
Buildings/Fluid/Storage/Plant/ChillerAndTank.mo Outdated Show resolved Hide resolved
Buildings/Fluid/Storage/Plant/ChillerAndTank.mo Outdated Show resolved Hide resolved
Buildings/Fluid/Storage/Plant/ChillerAndTank.mo Outdated Show resolved Hide resolved
Buildings/Fluid/Storage/Plant/ChillerAndTank.mo Outdated Show resolved Hide resolved
@hcasperfu
Copy link
Contributor Author

@bravache
Thanks for the review!
Please go ahead and comment on the draft models as well.

Copy link
Contributor

@bravache bravache left a comment

Choose a reason for hiding this comment

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

Still need to get to the ChillerBranch, the controller and the two large example, but we are getting there with this review. It's a lot of nit picky, mostly style comment, but I think the form is approaching the final stage.

Buildings/Fluid/Storage/Plant/TankBranch.mo Outdated Show resolved Hide resolved
Buildings/Fluid/Storage/Plant/TankBranch.mo Outdated Show resolved Hide resolved
Buildings/Fluid/Storage/Plant/TankBranch.mo Outdated Show resolved Hide resolved
Buildings/Fluid/Storage/Plant/TankBranch.mo Outdated Show resolved Hide resolved
Buildings/Fluid/Storage/Plant/TankBranch.mo Outdated Show resolved Hide resolved
Buildings/Fluid/Storage/Plant/TankBranch.mo Outdated Show resolved Hide resolved
@mwetter
Copy link
Member

mwetter commented Mar 24, 2022

Let's discuss this on Friday's coordination meeting. I don't quite understand it. In part because in Examples.OneSourceOneUser the user (=load or building) is at a lower pressure than the tank. The tank should be atmospheric if it is open and the load at a higher static pressure to allow for changes in height across the district energy system distribution network. The example has it backwards.

Also, please add a diagram as is used for example at Buildings.Examples.Tutorial.Boiler (without the pressure drops and temperatures) so it is clear what system is modeled. Otherwise users will not understand without digging into considerable detail while taking into account conditionally removable models.

I also find the locations of the ports in TankBranch not intuitive or natural. Consider the image below which has a pressurized tank. The dotted module with the tank and bypass has two connections to the left and right. This module is what TankBranch ought to replace, so its connectors should be at the same place. Then the model can be dropped in instead of using the dotted configuration.
image

The check valves were removed because of numerical issues and control logics were designed to prevent substantial back flow at the supply pump. However, these logics have been found to be incompatible with the main control objectives. In the meantime, because the numerics of the models have been substantially improved with extensive use of junction models, the check valve no longer causes OPTIMICA to fail simulation. This is then thought to be a simpler solution than convoluted control logic.
This simplifies the model. After this change, DualSource can be simulated in OPTIMICA.
A mistake is corrected where the density of air instead of water was used to convert mass flow rate to volumetric flow rate. The following command was run under the Plant folder: sed -i 's/1\.2\*{0,2}/1000*{0,2}/g' $(find . -iname '*.mo')
Copy link
Contributor

@dhblum dhblum left a comment

Choose a reason for hiding this comment

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

@hcasperfu has resolved my comments, thank you. @hcasperfu Just please update the release notes to include the new models. @mwetter This is ready for a final review by you.

  • Update release notes.

@dhblum
Copy link
Contributor

dhblum commented Jul 6, 2023

@hcasperfu One thing I forgot to mention actually. Please update the release notes to include the new models.

@hcasperfu
Copy link
Contributor Author

@mwetter -
I have completed the revisions to address your comments.
Most notably, I have removed the "cooled vs. overcooled" logic in the control blocks. Now Cooling.Controls.TankStatus
only outputs two signals which are for being "charged" and "empty". The block turns the isCharged signal true when the measured TTop goes below the threshold TLow + dTHys and turns it false when it goes above TLow + 2 * dTHys.
Cheers.

@hcasperfu
Copy link
Contributor Author

@mwetter -
I have further revised Controls.TankStatus according to our discussion in office.

  • This block no longer uses the hysteresis as error margin.
  • An assert(THig > TLow) is added.
  • Its validation model is redesigned. Now its results more clearly display how the hysteresis behaves. This is also better explained in its documentation.

Cheers.

@mwetter mwetter enabled auto-merge (squash) August 18, 2023 17:54
@mwetter mwetter merged commit ce39f49 into master Aug 19, 2023
2 checks passed
@mwetter mwetter deleted the issue2859_dualSourceTES branch August 19, 2023 02:10
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.

Dual-source TES system
4 participants