This package implements performance curves for fans and pumps.
The following performance curves are implemented:
dp =f(V_flow, r_N, {V_flow_nominal, dp_nominal}) P =f(V_flow, r_N, {V_flow_nominal, dp_nominal}) eta=f(r_V, {r_V_nominal, eta_nominal})where
dp
is the pressure raise,
P
is the power consumption,
eta
is the efficiency,
V_flow
is the volume flow rate,
r_N=N/N_nominal
is the normalized revolution
and the quantities in curly brackets are points used to parameterize the curves.
Each curve can be a constant, a linear function, a quadratic function or a polynomial
of arbitrary order.
The package is similar to Modelica.Fluid.Machines.BaseClasses.PumpCharacteristics, with the following exceptions:
V_flow/r_N
,
where r_N=N/N_nominal
,
and the mover model computes, for example
for a quadratic performance curve,
dp = r_N^2 * f(V_flow/r_N) = r_N^2 * ( c1 + c2 * V_flow/r_N + c3 * (V_flow/r_N)^2) = r_N^2 * c1 + r_N * c2 * V_flow + c3 * V_flow^2.Since
f(V_flow/r_N) = c1 + c2 * V_flow/r_N + c3 * (V_flow/r_N)^2
is
singular for r_N=0
, we redefined this function as
dp = f(V_flow, r_N)
= r_N^2 * c1 + r_N * c2 * V_flow + c3 * V_flow^2
which allows computing dp
for r_N=0
.
Note, however, that the model of the Buildings library, as well as the
model of Modelica.Fluid, is still singular for r_N=0
for performance curves that have a higher order than 2.
Name | Description |
---|---|
baseFlow | Base class for fan or pump flow characteristics |
basePower | Base class for fan or pump power consumption characteristics |
baseEfficiency | Base class for efficiency characteristics |
linearFlow | Linear flow characteristic |
quadraticFlow | Quadratic flow characteristic |
polynomialFlow | Polynomial flow characteristic |
linearPower | Linear power consumption characteristic |
quadraticPower | Quadratic power consumption characteristic |
polynomialPower | Polynomial power consumption characteristic |
constantEfficiency | Constant efficiency characteristic |
linearEfficiency | Linear efficiency characteristic |
quadraticEfficiency | Quadratic efficiency characteristic |
polynomialEfficiency | Polynomial efficiency characteristic |
solve | Wrapper for Modelica.Math.Matrices.solve |
der_solve | Derivative for function solve |
Examples | Examples to test implementation of derivative function |
Type | Name | Default | Description |
---|---|---|---|
VolumeFlowRate | V_flow | Volumetric flow rate [m3/s] | |
Real | r_N | Relative revolution, r_N=N/N_nominal [1] |
Type | Name | Description |
---|---|---|
Pressure | dp | Fan or pump total pressure [Pa] |
partial function baseFlow "Base class for fan or pump flow characteristics" extends Modelica.Icons.Function; input Modelica.SIunits.VolumeFlowRate V_flow "Volumetric flow rate"; input Real r_N(unit="1") "Relative revolution, r_N=N/N_nominal"; output Modelica.SIunits.Pressure dp(min=0, displayUnit="Pa") "Fan or pump total pressure"; end baseFlow;
Type | Name | Default | Description |
---|---|---|---|
VolumeFlowRate | V_flow | Volumetric flow rate [m3/s] | |
Real | r_N | Relative revolution, r_N=N/N_nominal [1] |
Type | Name | Description |
---|---|---|
Power | consumption | Power consumption [W] |
partial function basePower "Base class for fan or pump power consumption characteristics" extends Modelica.Icons.Function; input Modelica.SIunits.VolumeFlowRate V_flow "Volumetric flow rate"; input Real r_N(unit="1") "Relative revolution, r_N=N/N_nominal"; output Modelica.SIunits.Power consumption "Power consumption"; end basePower;
Type | Name | Default | Description |
---|---|---|---|
Real | r_V | Volumetric flow rate divided by nominal flow rate [1] |
Type | Name | Description |
---|---|---|
Real | eta | Efficiency [1] |
partial function baseEfficiency "Base class for efficiency characteristics" extends Modelica.Icons.Function; input Real r_V(unit="1") "Volumetric flow rate divided by nominal flow rate"; output Real eta(min=0, unit="1") "Efficiency"; end baseEfficiency;
Type | Name | Default | Description |
---|---|---|---|
VolumeFlowRate | V_flow | Volumetric flow rate [m3/s] | |
Real | r_N | Relative revolution, r_N=N/N_nominal [1] | |
VolumeFlowRate | V_flow_nominal[2] | Volume flow rate for two operating points (single fan or pump) [m3/s] | |
Pressure | dp_nominal[2] | Fan or pump total pressure for two operating points [Pa] |
Type | Name | Description |
---|---|---|
Pressure | dp | Fan or pump total pressure [Pa] |
function linearFlow "Linear flow characteristic" extends baseFlow; input Modelica.SIunits.VolumeFlowRate V_flow_nominal[2] "Volume flow rate for two operating points (single fan or pump)"; input Modelica.SIunits.Pressure dp_nominal[2](each min=0, each displayUnit="Pa") "Fan or pump total pressure for two operating points"; /* Linear system to determine the coefficients: dp_nominal[1] = c[1] + V_flow_nominal[1]*c[2]; dp_nominal[2] = c[1] + V_flow_nominal[2]*c[2]; */ protected Real c[2] = Buildings.Fluid.Movers.BaseClasses.Characteristics.solve( [ones(2),V_flow_nominal],dp_nominal) "Coefficients of linear total pressure curve"; algorithm dp := r_N^2 * c[1] + r_N*V_flow*c[2];end linearFlow;
Type | Name | Default | Description |
---|---|---|---|
VolumeFlowRate | V_flow | Volumetric flow rate [m3/s] | |
Real | r_N | Relative revolution, r_N=N/N_nominal [1] | |
VolumeFlowRate | V_flow_nominal[3] | Volume flow rate for three operating points (single fan or pump) [m3/s] | |
Pressure | dp_nominal[3] | Fan or pump total pressure for three operating points [Pa] |
Type | Name | Description |
---|---|---|
Pressure | dp | Fan or pump total pressure [Pa] |
function quadraticFlow "Quadratic flow characteristic" extends baseFlow; input Modelica.SIunits.VolumeFlowRate V_flow_nominal[3](each min=0) "Volume flow rate for three operating points (single fan or pump)"; input Modelica.SIunits.Pressure dp_nominal[3](each min=0, each displayUnit="Pa") "Fan or pump total pressure for three operating points"; protected Real V_flow_nominal2[3] = {V_flow_nominal[1]^2,V_flow_nominal[2]^2, V_flow_nominal[3]^2} "Squared nominal flow rates"; /* Linear system to determine the coefficients: dp_nominal[1] = c[1] + V_flow_nominal[1]*c[2] + V_flow_nominal[1]^2*c[3]; dp_nominal[2] = c[1] + V_flow_nominal[2]*c[2] + V_flow_nominal[2]^2*c[3]; dp_nominal[3] = c[1] + V_flow_nominal[3]*c[2] + V_flow_nominal[3]^2*c[3]; */ Real c[3] = Buildings.Fluid.Movers.BaseClasses.Characteristics.solve( [ones(3), V_flow_nominal, V_flow_nominal2],dp_nominal) "Coefficients of quadratic total pressure curve"; algorithm // Flow equation: dp = c[1] + V_flow*c[2] + V_flow^2*c[3]; dp := r_N^2*c[1] + r_N*V_flow*c[2] + V_flow^2*c[3];end quadraticFlow;
Type | Name | Default | Description |
---|---|---|---|
VolumeFlowRate | V_flow | Volumetric flow rate [m3/s] | |
Real | r_N | Relative revolution, r_N=N/N_nominal [1] | |
VolumeFlowRate | V_flow_nominal[:] | Volume flow rate for N operating points (single fan or pump) [m3/s] | |
Pressure | dp_nominal[:] | Fan or pump total pressure for N operating points [Pa] |
Type | Name | Description |
---|---|---|
Pressure | dp | Fan or pump total pressure [Pa] |
function polynomialFlow "Polynomial flow characteristic" extends baseFlow; input Modelica.SIunits.VolumeFlowRate V_flow_nominal[:](each min=0) "Volume flow rate for N operating points (single fan or pump)"; input Modelica.SIunits.Pressure dp_nominal[:](each min=0, each displayUnit="Pa") "Fan or pump total pressure for N operating points"; protected Integer N = size(V_flow_nominal,1) "Number of nominal operating points"; Real V_flow_nominal_pow[N,N] = {{V_flow_nominal[i]^(j-1) for j in 1:N} for i in 1:N} "Rows: different operating points; columns: increasing powers"; /* Linear system to determine the coefficients (example N=3): dp_nominal[1] = c[1] + V_flow_nominal[1]*c[2] + V_flow_nominal[1]^2*c[3]; dp_nominal[2] = c[1] + V_flow_nominal[2]*c[2] + V_flow_nominal[2]^2*c[3]; dp_nominal[3] = c[1] + V_flow_nominal[3]*c[2] + V_flow_nominal[3]^2*c[3]; */ Real c[N] = Buildings.Fluid.Movers.BaseClasses.Characteristics.solve( V_flow_nominal_pow,dp_nominal) "Coefficients of polynomial total pressure curve"; algorithm // Flow equation (example N=3): dp = c[1] + V_flow*c[2] + V_flow^2*c[3]; // Note: the implementation is numerically efficient only for low values of N dp := r_N^(N-1)*c[1] + sum(r_N^(N-i)*V_flow^(i-1)*c[i] for i in 2:N-1) + V_flow^(N-1)*c[N];end polynomialFlow;
Type | Name | Default | Description |
---|---|---|---|
VolumeFlowRate | V_flow | Volumetric flow rate [m3/s] | |
Real | r_N | Relative revolution, r_N=N/N_nominal [1] | |
VolumeFlowRate | V_flow_nominal[2] | Volume flow rate for two operating points (single fan or pump) [m3/s] | |
Power | P_nominal[2] | Power consumption for two operating points [W] |
Type | Name | Description |
---|---|---|
Power | consumption | Power consumption [W] |
function linearPower "Linear power consumption characteristic" extends basePower; input Modelica.SIunits.VolumeFlowRate V_flow_nominal[2] "Volume flow rate for two operating points (single fan or pump)"; input Modelica.SIunits.Power P_nominal[2] "Power consumption for two operating points"; /* Linear system to determine the coefficients: P_nominal[1] = c[1] + V_flow_nominal[1]*c[2]; P_nominal[2] = c[1] + V_flow_nominal[2]*c[2]; */ protected Real c[2] = Buildings.Fluid.Movers.BaseClasses.Characteristics.solve( [ones(3),V_flow_nominal],P_nominal) "Coefficients of linear power consumption curve"; algorithm consumption := r_N^3*c[1] + r_N^2*V_flow*c[2]; end linearPower;
Type | Name | Default | Description |
---|---|---|---|
VolumeFlowRate | V_flow | Volumetric flow rate [m3/s] | |
Real | r_N | Relative revolution, r_N=N/N_nominal [1] | |
VolumeFlowRate | V_flow_nominal[3] | Volume flow rate for three operating points (single fan or pump) [m3/s] | |
Power | P_nominal[3] | Power consumption for three operating points [W] |
Type | Name | Description |
---|---|---|
Power | consumption | Power consumption [W] |
function quadraticPower "Quadratic power consumption characteristic" extends basePower; input Modelica.SIunits.VolumeFlowRate V_flow_nominal[3] "Volume flow rate for three operating points (single fan or pump)"; input Modelica.SIunits.Power P_nominal[3] "Power consumption for three operating points"; protected Real V_flow_nominal2[3] = {V_flow_nominal[1]^2,V_flow_nominal[2]^2, V_flow_nominal[3]^2} "Squared nominal flow rates"; /* Linear system to determine the coefficients: P_nominal[1] = c[1] + V_flow_nominal[1]*c[2] + V_flow_nominal[1]^2*c[3]; P_nominal[2] = c[1] + V_flow_nominal[2]*c[2] + V_flow_nominal[2]^2*c[3]; P_nominal[3] = c[1] + V_flow_nominal[3]*c[2] + V_flow_nominal[3]^2*c[3]; */ Real c[3] = Buildings.Fluid.Movers.BaseClasses.Characteristics.solve( [ones(3),V_flow_nominal,V_flow_nominal2],P_nominal) "Coefficients of quadratic power consumption curve"; algorithm consumption := r_N^3*c[1] + r_N^2*V_flow*c[2] + r_N*V_flow^2*c[3]; end quadraticPower;
Type | Name | Default | Description |
---|---|---|---|
VolumeFlowRate | V_flow | Volumetric flow rate [m3/s] | |
Real | r_N | Relative revolution, r_N=N/N_nominal [1] | |
VolumeFlowRate | V_flow_nominal[:] | Volume flow rate for N operating points (single fan or pump) [m3/s] | |
Power | P_nominal[:] | Power consumption for N operating points [W] |
Type | Name | Description |
---|---|---|
Power | consumption | Power consumption [W] |
function polynomialPower "Polynomial power consumption characteristic" extends basePower; input Modelica.SIunits.VolumeFlowRate V_flow_nominal[:] "Volume flow rate for N operating points (single fan or pump)"; input Modelica.SIunits.Power P_nominal[:] "Power consumption for N operating points"; protected Integer N = size(V_flow_nominal,1) "Number of nominal operating points"; Real V_flow_nominal_pow[N,N] = {{V_flow_nominal[i]^(j-1) for j in 1:N} for i in 1:N} "Rows: different operating points; columns: increasing powers"; /* Linear system to determine the coefficients (example N=3): P_nominal[1] = c[1] + V_flow_nominal[1]*c[2] + V_flow_nominal[1]^2*c[3]; P_nominal[2] = c[1] + V_flow_nominal[2]*c[2] + V_flow_nominal[2]^2*c[3]; P_nominal[3] = c[1] + V_flow_nominal[3]*c[2] + V_flow_nominal[3]^2*c[3]; */ Real c[N] = Buildings.Fluid.Movers.BaseClasses.Characteristics.solve( V_flow_nominal_pow,P_nominal) "Coefficients of polynomial power consumption curve"; algorithm // Efficiency equation (example N=3): W = c[1] + V_flow*c[2] + V_flow^2*c[3]; // Note: the implementation is numerically efficient only for low values of N consumption := r_N^N*c[1] + sum(r_N^(N-i+1)*V_flow^(i-1)*c[i] for i in 2:N); end polynomialPower;
Type | Name | Default | Description |
---|---|---|---|
Real | r_V | Volumetric flow rate divided by nominal flow rate [1] | |
Real | eta_nominal | Nominal efficiency [1] |
Type | Name | Description |
---|---|---|
Real | eta | Efficiency [1] |
function constantEfficiency "Constant efficiency characteristic" extends baseEfficiency; input Real eta_nominal(min=0, unit="1") "Nominal efficiency"; algorithm eta := eta_nominal; end constantEfficiency;
Type | Name | Default | Description |
---|---|---|---|
Real | r_V | Volumetric flow rate divided by nominal flow rate [1] | |
Real | r_V_nominal[2] | Volumetric flow rate divided by nominal flow rate for two operating points (single fan or pump) [1] | |
Real | eta_nominal[2] | Nominal efficiency [1] |
Type | Name | Description |
---|---|---|
Real | eta | Efficiency [1] |
function linearEfficiency "Linear efficiency characteristic" extends baseEfficiency; input Real r_V_nominal[2](each unit="1") "Volumetric flow rate divided by nominal flow rate for two operating points (single fan or pump)"; input Real eta_nominal[2](each min=0, each unit="1") "Nominal efficiency"; /* Linear system to determine the coefficients: eta_nominal[1] = c[1] + V_flow_nominal[1]*c[2]; eta_nominal[2] = c[1] + V_flow_nominal[2]*c[2]; */ protected Real c[2] = Buildings.Fluid.Movers.BaseClasses.Characteristics.solve( [ones(2),r_V_nominal],eta_nominal) "Coefficients of linear total efficiency curve"; algorithm // Efficiency equation: eta = q*c[1] + c[2]; eta := c[1] + r_V*c[2]; end linearEfficiency;
Type | Name | Default | Description |
---|---|---|---|
Real | r_V | Volumetric flow rate divided by nominal flow rate [1] | |
Real | r_V_nominal[3] | Volumetric flow rate divided by nominal flow rate for three operating points (single fan or pump) [1] | |
Real | eta_nominal[3] | Nominal efficiency for three operating points [1] |
Type | Name | Description |
---|---|---|
Real | eta | Efficiency [1] |
function quadraticEfficiency "Quadratic efficiency characteristic" extends baseEfficiency; input Real r_V_nominal[3](each unit="1") "Volumetric flow rate divided by nominal flow rate for three operating points (single fan or pump)"; input Real eta_nominal[3](each min=0, each unit="1") "Nominal efficiency for three operating points"; protected Real r_V_nominal2[3] = {r_V_nominal[1]^2,r_V_nominal[2]^2, r_V_nominal[3]^2} "Squared nominal flow rates"; /* Linear system to determine the coefficients: eta_nominal[1] = c[1] + r_V_nominal[1]*c[2] + r_V_nominal[1]^2*c[3]; eta_nominal[2] = c[1] + r_V_nominal[2]*c[2] + r_V_nominal[2]^2*c[3]; eta_nominal[3] = c[1] + r_V_nominal[3]*c[2] + r_V_nominal[3]^2*c[3]; */ Real c[3] = Buildings.Fluid.Movers.BaseClasses.Characteristics.solve( [ones(3), r_V_nominal, r_V_nominal2],eta_nominal) "Coefficients of quadratic efficiency curve"; algorithm // Efficiency equation: eta = c[1] + V_flow*c[2] + V_flow^2*c[3]; eta := c[1] + r_V*c[2] + r_V^2*c[3]; end quadraticEfficiency;
Type | Name | Default | Description |
---|---|---|---|
Real | r_V | Volumetric flow rate divided by nominal flow rate [1] | |
Real | r_V_nominal[:] | Volumetric flow rate divided by nominal flow rate for N operating points (single fan or pump) [1] | |
Real | eta_nominal[:] | Nominal efficiency for N operating points [1] |
Type | Name | Description |
---|---|---|
Real | eta | Efficiency [1] |
function polynomialEfficiency "Polynomial efficiency characteristic" extends baseEfficiency; input Real r_V_nominal[:](each unit="1") "Volumetric flow rate divided by nominal flow rate for N operating points (single fan or pump)"; input Real eta_nominal[:](each min=0, each unit="1") "Nominal efficiency for N operating points"; protected Integer N = size(r_V_nominal,1) "Number of nominal operating points"; Real r_V_nominal_pow[N,N] = {{r_V_nominal[i]^(j-1) for j in 1:N} for i in 1:N} "Rows: different operating points; columns: increasing powers"; /* Linear system to determine the coefficients (example N=3): eta_nominal[1] = c[1] + r_V_nominal[1]*c[2] + r_V_nominal[1]^2*c[3]; eta_nominal[2] = c[1] + r_V_nominal[2]*c[2] + r_V_nominal[2]^2*c[3]; eta_nominal[3] = c[1] + r_V_nominal[3]*c[2] + r_V_nominal[3]^2*c[3]; */ Real c[N] = Buildings.Fluid.Movers.BaseClasses.Characteristics.solve( r_V_nominal_pow,eta_nominal) "Coefficients of polynomial total pressure curve"; algorithm // Efficiency equation (example N=3): eta = c[1] + r_V*c[2] + r_V^2*c[3]; // Note: the implementation is numerically efficient only for low values of N eta := c[1] + sum(r_V^(i-1)*c[i] for i in 2:N); end polynomialEfficiency;
Type | Name | Default | Description |
---|---|---|---|
Real | A[:, size(A, 1)] | ||
Real | x[size(A, 1)] |
Type | Name | Description |
---|---|---|
Real | b[size(A, 1)] |
function solve "Wrapper for Modelica.Math.Matrices.solve" annotation(derivative=Buildings.Fluid.Movers.BaseClasses.Characteristics.der_solve); input Real A[:,size(A,1)]; input Real x[size(A,1)]; output Real b[size(A,1)]; algorithm b:=Modelica.Math.Matrices.solve(A,x);end solve;
Type | Name | Default | Description |
---|---|---|---|
Real | A[:, size(A, 1)] | ||
Real | x[size(A, 1)] | ||
Real | Ader[:, size(A, 1)] | ||
Real | xder[size(A, 1)] |
Type | Name | Description |
---|---|---|
Real | b[size(A, 1)] |
function der_solve "Derivative for function solve" input Real A[:,size(A,1)]; input Real x[size(A,1)]; input Real Ader[:,size(A,1)]; input Real xder[size(A,1)]; output Real b[size(A,1)]; algorithm b:=Modelica.Math.Matrices.solve(A,xder-Ader*Modelica.Math.Matrices.solve(A,x)); end der_solve;