UdK-VPT / BuildingSystems

Modelica BuildingSystems library
http://modelica-buildingsystems.de/
BSD 3-Clause "New" or "Revised" License
70 stars 34 forks source link

FluidStorage uses end in connect statement #89

Closed thorade closed 7 years ago

thorade commented 7 years ago

That is valid Modelica, but OpenModelica does not yet support it: https://trac.openmodelica.org/OpenModelica/ticket/4541

https://libraries.openmodelica.org/branches/master/BuildingSystems/files/BuildingSystems_BuildingSystems.Technologies.ThermalStorages.Examples.FluidStorage.err

We could (here, in this model) easily rewrite the FluidStorage model to use nEle instead of end.

Also, the for-loops could be rewritten from e.g.

  for i in 1:nEle-3 loop
    connect(vol[i].ports[2], vol[i+1].ports[1]);
  end for;

to the shorter form

  connect(vol[1:nEle-3].ports[2], vol[2:nEle-2].ports[1]);
thorade commented 7 years ago

The FluidStorage examples do now simulate! https://libraries.openmodelica.org/branches/history/master/2017-10-19%2009:22:51..2017-10-20%2004:56:35.html