lbl-srg / modelica-buildings

Modelica Buildings library
254 stars 157 forks source link

Alternative pump implementation #208

Closed Mathadon closed 10 years ago

Mathadon commented 10 years ago

Hello Michael,

currently pump flow rates are calculated based on a discrete set of nominal operating points. From my understanding a piecewise polynomial is fitted through these operating points. This piecewise polynomial is then used for evaluating the mass flow rate at non-nominal angular velocities of the pump.

I wonder whether you have tried to give a polynomial as input to the model instead of the operating points (from which different polynomials are constructed). Based on a data sheet for one of the Wilo pumps it seems that the entire pump characteristic can be represented using a third order polynomial at nominal speed (H_nom=f(Q_nom)). Other speeds can be calculated directly using the equations Q/Q_nom = n/n_nom and H/H_nom = (n/n_nom)^2. This would significantly reduce the amount of code required for the implementation of a pump and I would also expect a reduced computational time because less switching between the piecewise polynomials would be necessary. Pump power can be calculated in a similar way. Is this something you have considered. I expect such an implementation can be useful. Both implementations can also be implemented in one model.

I would be glad to hear your insights on this :)

Filip

mwetter commented 10 years ago

The problem with using polynomials are that it is difficult to prove that there is always one intersection between the pump curve and the flow resistance of the piping network.

The first pump that was implemented in the Buildings library was Buildings.Fluid.Movers.FlowMachinePolynomial. This is based on polynomials, and we intend to remove this in the future. I don't think anyone is using this anymore.

Until September 2011, we used polynomials rather than cubic hermite splines to represent the pump curvesin Buildings.Fluid.Movers. This led in some simulation, in particular during initialization, to situations where there were multiple or no intersection between the pump (or fan) curve and the pressure drop of the piping (or duct) network. We then analyzed the model, as described in the paper below. It turned out that we needed the condition (10) in the paper below to guarantee that there is always a unique solution. This condition is easy to impose formally with cubic hermite spline. I don't think this would be the case with a polynomial. I don't think that the overhead for using cubic hermite splines is large as the evaluation done at each time or iteration step primarily involves evaluating Modelica.Fluid.Utilities.cubicHermite. Unless we see a reason to use polynomials and will be able to also establish the properties of the paper below, I think such a change would not benefit the library.

Michael Wetter. Fan and pump model that has a unique solution for any pressure boundary condition and control signal. Proc. of the 13th IBPSA Conference, p. 3505--3512, Chambéry, France, August 2013. http://simulationresearch.lbl.gov/wetter/download/2013-IBPSA-Wetter.pdf