ibpsa / modelica-ibpsa

Modelica library for building and district energy systems developed within IBPSA Project 1
https://ibpsa.github.io/project1
143 stars 84 forks source link

Annex60.Fluid.Interfaces.FourPortHeatMassExchanger is not used #353

Closed mwetter closed 7 years ago

mwetter commented 8 years ago

The model Annex60.Fluid.Interfaces.FourPortHeatMassExchanger is not used anywhere in the library, and hence it is also not part of any regression test. I suggest to keep the model in the library as it is similar to TwoPortHeatMassExchanger and libraries the are based on Annex60 are using it, for example in Buildings.Fluid.Chillers.Carnot.

To avoid breaking the model, a regression test needs to be added.

mwetter commented 8 years ago

If Carnot where to be moved to Annex60, it should be called Carnot_y.

All should comment whether this should be moved to the Annex60 library.

thorade commented 8 years ago

Is this related to https://github.com/iea-annex60/modelica-annex60/issues/223 ??

mwetter commented 8 years ago

223 is much bigger as its main purpose is to model an actual heat pump, whereas the Carnot model is idealized and meant for applications where no data of the heat pump is available, e.g., it is solely based on thermodynamics 2nd law, plus an efficiency correction that optionally takes the load as an input.

damienpicard commented 8 years ago

According to me, Annex60 could benefit of having the Buildings.Fluid.Chillers.Carnot model. I've revised the model and I've listed my comments in https://github.com/lbl-srg/modelica-buildings/issues/471. Once these comments are adressed and if everybody agrees, the Carnot model can be added.

damienpicard commented 8 years ago

As discussed in lbl-srg/modelica-buildings/issues/471, I did the following changes: . Add a Carnot heat pump, and rename these models to Carnot_y (similarly than for the heater/cooler) to avoid a clash in names. . remove actualStream in computing the states that are used to compute the Carnot efficiency.

I also added the example from the building library and i've updated the reference result.

I've pushed the changes on issue353_addCarnot_y

mwetter commented 8 years ago

@damienpicard I will also integrate the Chiller.Carnot_TEva, HeatPumps.Carnot_TCon and HeatPumps.Carnot_y.

I will also correct the COP computation so that the useful heat is the heat of the evaporator for the chiller, and the heat of the condenser for the heat pump.

To eliminate code duplication, I will refactor that Chiller.Carnot_y so that it uses a base class that can also be shared by HeatPump.Carnot_y, as is done for Chiller.Carnot_TEva and HeatPumps.Carnot_TCon.

mwetter commented 8 years ago

The above models have been integrated and documented. The following still needs to be done:

damienpicard commented 8 years ago

@mwetter notice that Annex60.Fluid.Interfaces.FourPortHeatMassExchanger is still not used in the Annex60 library, as the implementation of the the Carnot model extends now PartialFourPortInterface instead of FourPortHeatMassExchanger.

mwetter commented 7 years ago

Note from Corsica meeting: Michael to ensure that the model is used in a regression test in Annex60, and then we keep it in the library for release 1.0.