ibpsa / modelica-ibpsa

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

PrescribedHeatFlow in PartialFlowMachine #399

Closed Mathadon closed 8 years ago

Mathadon commented 8 years ago

Buildings has its own Buildings.HeatTransfer.Sources.PrescribedHeatFlow that is used in Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine. In Annex 60 this is not the case. What is the reason for this? I thought the models were merged?

The reason I ask is because the Buildings implementation is a lot more efficient in some cases. The is because the PrescribedHeatFlow from MSL has a non-fixed parameter alpha. In the default case (Evaluate=false) Dymola allows this parameter to be changed after compilation. The flattened equation for a pump then becomes:

pump.vol.heatPort.Q_flow := pump.prePow.Q_flow*(1+
      pump.prePow.alpha*(pump.heatPort.T-
      pump.prePow.T_ref));

when alpha is non-zero this can form a non-linear equation when the pump is configured to steady state if heatPort.Q_flow=f(heatPort.T). When alpha is zero this is a linear equation. In the general case Dymola therefore treats this as a non-linear equation.

This can be very important in the case where you have large steady state hydronic systems because large non-linear algebraic loops are formed. If the equations were linear, then the algebraic loops would also be linear and then they can be solved without requiring iterations.

Either we should change the PrescribedHeatFlow component in PartialFlowMachine, or we should set final alpha=0.

Mathadon commented 8 years ago

Need to discuss with other library developers if we want to have a HeatTransfer/Sources package.

mwetter commented 8 years ago

For Buildings, it would be good to have Annex60.HeatTransfer.Sources. What is the position of Aachen and Berlin?

Mathadon commented 8 years ago

I think setting final alpha=0 would be a good alternative solution that does not require the creation of another top level package.

mlauster commented 8 years ago

From Aachen side, I don't think we need such a package.

mlauster commented 8 years ago

closed by #420