Buildings.Fluid.Movers.BaseClasses.Characteristics

Functions for fan or pump characteristics

Information


This package is similar to Buildings.Fluid.Movers.BaseClasses.Characteristics, but instead of head in meters H20, total pressure in Pascal is used. This makes the models applicable for fans as well since the flow models from Modelica.Fluid use the density of the medium model, such as the density of air instead of water, to convert head to pressure.

This package also contains higher order functions for power consumption and efficiency.

Package Content

NameDescription
Buildings.Fluid.Movers.BaseClasses.Characteristics.baseFlow baseFlow Base class for fan or pump flow characteristics
Buildings.Fluid.Movers.BaseClasses.Characteristics.basePower basePower Base class for fan or pump power consumption characteristics
Buildings.Fluid.Movers.BaseClasses.Characteristics.baseEfficiency baseEfficiency Base class for efficiency characteristics
Buildings.Fluid.Movers.BaseClasses.Characteristics.linearFlow linearFlow Linear flow characteristic
Buildings.Fluid.Movers.BaseClasses.Characteristics.quadraticFlow quadraticFlow Quadratic flow characteristic
Buildings.Fluid.Movers.BaseClasses.Characteristics.polynomialFlow polynomialFlow Polynomial flow characteristic
Buildings.Fluid.Movers.BaseClasses.Characteristics.linearPower linearPower Linear power consumption characteristic
Buildings.Fluid.Movers.BaseClasses.Characteristics.quadraticPower quadraticPower Quadratic power consumption characteristic
Buildings.Fluid.Movers.BaseClasses.Characteristics.polynomialPower polynomialPower Polynomial power consumption characteristic
Buildings.Fluid.Movers.BaseClasses.Characteristics.constantEfficiency constantEfficiency Constant efficiency characteristic
Buildings.Fluid.Movers.BaseClasses.Characteristics.linearEfficiency linearEfficiency Linear efficiency characteristic
Buildings.Fluid.Movers.BaseClasses.Characteristics.quadraticEfficiency quadraticEfficiency Quadratic efficiency characteristic
Buildings.Fluid.Movers.BaseClasses.Characteristics.polynomialEfficiency polynomialEfficiency Polynomial efficiency characteristic
Buildings.Fluid.Movers.BaseClasses.Characteristics.solve solve Wrapper for Modelica.Math.Matrices.solve
Buildings.Fluid.Movers.BaseClasses.Characteristics.der_solve der_solve Derivative for function solve
Buildings.Fluid.Movers.BaseClasses.Characteristics.Examples Examples Examples to test implemenation of derivative function


Buildings.Fluid.Movers.BaseClasses.Characteristics.baseFlow Buildings.Fluid.Movers.BaseClasses.Characteristics.baseFlow

Base class for fan or pump flow characteristics

Information

Extends from Modelica.Icons.Function (Icon for a function).

Inputs

TypeNameDefaultDescription
VolumeFlowRateV_flow Volumetric flow rate [m3/s]

Outputs

TypeNameDescription
PressuredpFan or pump total pressure [Pa]

Modelica definition

partial function baseFlow 
  "Base class for fan or pump flow characteristics"
  extends Modelica.Icons.Function;
  input Modelica.SIunits.VolumeFlowRate V_flow "Volumetric flow rate";
  output Modelica.SIunits.Pressure dp(displayUnit="Pa") 
    "Fan or pump total pressure";
end baseFlow;

Buildings.Fluid.Movers.BaseClasses.Characteristics.basePower Buildings.Fluid.Movers.BaseClasses.Characteristics.basePower

Base class for fan or pump power consumption characteristics

Information

Extends from Modelica.Icons.Function (Icon for a function).

Inputs

TypeNameDefaultDescription
VolumeFlowRateV_flow Volumetric flow rate [m3/s]

Outputs

TypeNameDescription
PowerconsumptionPower consumption [W]

Modelica definition

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";
  output Modelica.SIunits.Power consumption "Power consumption";
end basePower;

Buildings.Fluid.Movers.BaseClasses.Characteristics.baseEfficiency Buildings.Fluid.Movers.BaseClasses.Characteristics.baseEfficiency

Base class for efficiency characteristics

Information

Extends from Modelica.Icons.Function (Icon for a function).

Inputs

TypeNameDefaultDescription
VolumeFlowRateV_flow Volumetric flow rate [m3/s]

Outputs

TypeNameDescription
RealetaEfficiency

Modelica definition

partial function baseEfficiency 
  "Base class for efficiency characteristics"
  extends Modelica.Icons.Function;
  input Modelica.SIunits.VolumeFlowRate V_flow "Volumetric flow rate";
  output Real eta "Efficiency";
end baseEfficiency;

Buildings.Fluid.Movers.BaseClasses.Characteristics.linearFlow Buildings.Fluid.Movers.BaseClasses.Characteristics.linearFlow

Linear flow characteristic

Information

Extends from baseFlow (Base class for fan or pump flow characteristics).

Inputs

TypeNameDefaultDescription
VolumeFlowRateV_flow Volumetric flow rate [m3/s]
VolumeFlowRateV_flow_nominal[2] Volume flow rate for two operating points (single fan or pump) [m3/s]
Pressuredp_nominal[2] Fan or pump total pressure for two operating points [Pa]

Outputs

TypeNameDescription
PressuredpFan or pump total pressure [Pa]

Modelica definition

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](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 
  // Flow equation: dp = q*c[1] + c[2];
  dp := c[1] + V_flow*c[2];
end linearFlow;

Buildings.Fluid.Movers.BaseClasses.Characteristics.quadraticFlow Buildings.Fluid.Movers.BaseClasses.Characteristics.quadraticFlow

Quadratic flow characteristic

Information

Extends from baseFlow (Base class for fan or pump flow characteristics).

Inputs

TypeNameDefaultDescription
VolumeFlowRateV_flow Volumetric flow rate [m3/s]
VolumeFlowRateV_flow_nominal[3] Volume flow rate for three operating points (single fan or pump) [m3/s]
Pressuredp_nominal[3] Fan or pump total pressure for three operating points [Pa]

Outputs

TypeNameDescription
PressuredpFan or pump total pressure [Pa]

Modelica definition

function quadraticFlow "Quadratic flow characteristic"
  extends baseFlow;
  input Modelica.SIunits.VolumeFlowRate V_flow_nominal[3] 
    "Volume flow rate for three operating points (single fan or pump)";
  input Modelica.SIunits.Pressure dp_nominal[3](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 := c[1] + V_flow*c[2] + V_flow^2*c[3];
end quadraticFlow;

Buildings.Fluid.Movers.BaseClasses.Characteristics.polynomialFlow Buildings.Fluid.Movers.BaseClasses.Characteristics.polynomialFlow

Polynomial flow characteristic

Information

Extends from baseFlow (Base class for fan or pump flow characteristics).

Inputs

TypeNameDefaultDescription
VolumeFlowRateV_flow Volumetric flow rate [m3/s]
VolumeFlowRateV_flow_nominal[:] Volume flow rate for N operating points (single fan or pump) [m3/s]
Pressuredp_nominal[:] Fan or pump total pressure for N operating points [Pa]

Outputs

TypeNameDescription
PressuredpFan or pump total pressure [Pa]

Modelica definition

function polynomialFlow "Polynomial flow characteristic"
  extends baseFlow;
  input Modelica.SIunits.VolumeFlowRate V_flow_nominal[:] 
    "Volume flow rate for N operating points (single fan or pump)";
  input Modelica.SIunits.Pressure dp_nominal[:](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 := sum(V_flow^(i-1)*c[i] for i in 1:N);
end polynomialFlow;

Buildings.Fluid.Movers.BaseClasses.Characteristics.linearPower Buildings.Fluid.Movers.BaseClasses.Characteristics.linearPower

Linear power consumption characteristic

Information

Extends from basePower (Base class for fan or pump power consumption characteristics).

Inputs

TypeNameDefaultDescription
VolumeFlowRateV_flow Volumetric flow rate [m3/s]
VolumeFlowRateV_flow_nominal[2] Volume flow rate for two operating points (single fan or pump) [m3/s]
PowerW_nominal[2] Power consumption for two operating points [W]

Outputs

TypeNameDescription
PowerconsumptionPower consumption [W]

Modelica definition

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 W_nominal[2] 
    "Power consumption for two operating points";
  /* Linear system to determine the coefficients:
  W_nominal[1] = c[1] + V_flow_nominal[1]*c[2];
  W_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],W_nominal) 
    "Coefficients of linear power consumption curve";
algorithm 
  consumption := c[1] + V_flow*c[2];
end linearPower;

Buildings.Fluid.Movers.BaseClasses.Characteristics.quadraticPower Buildings.Fluid.Movers.BaseClasses.Characteristics.quadraticPower

Quadratic power consumption characteristic

Information

Extends from basePower (Base class for fan or pump power consumption characteristics).

Inputs

TypeNameDefaultDescription
VolumeFlowRateV_flow Volumetric flow rate [m3/s]
VolumeFlowRateV_flow_nominal[3] Volume flow rate for three operating points (single fan or pump) [m3/s]
PowerW_nominal[3] Power consumption for three operating points [W]

Outputs

TypeNameDescription
PowerconsumptionPower consumption [W]

Modelica definition

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 W_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:
  W_nominal[1] = c[1] + V_flow_nominal[1]*c[2] + V_flow_nominal[1]^2*c[3];
  W_nominal[2] = c[1] + V_flow_nominal[2]*c[2] + V_flow_nominal[2]^2*c[3];
  W_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],W_nominal) 
    "Coefficients of quadratic power consumption curve";
algorithm 
  consumption := c[1] + V_flow*c[2] + V_flow^2*c[3];
end quadraticPower;

Buildings.Fluid.Movers.BaseClasses.Characteristics.polynomialPower Buildings.Fluid.Movers.BaseClasses.Characteristics.polynomialPower

Polynomial power consumption characteristic

Information

Extends from basePower (Base class for fan or pump power consumption characteristics).

Inputs

TypeNameDefaultDescription
VolumeFlowRateV_flow Volumetric flow rate [m3/s]
VolumeFlowRateV_flow_nominal[:] Volume flow rate for N operating points (single fan or pump) [m3/s]
PowerW_nominal[:] Power consumption for N operating points [W]

Outputs

TypeNameDescription
PowerconsumptionPower consumption [W]

Modelica definition

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 W_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):
  W_nominal[1] = c[1] + V_flow_nominal[1]*c[2] + V_flow_nominal[1]^2*c[3];
  W_nominal[2] = c[1] + V_flow_nominal[2]*c[2] + V_flow_nominal[2]^2*c[3];
  W_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,W_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 := sum(V_flow^(i-1)*c[i] for i in 1:N);
end polynomialPower;

Buildings.Fluid.Movers.BaseClasses.Characteristics.constantEfficiency Buildings.Fluid.Movers.BaseClasses.Characteristics.constantEfficiency

Constant efficiency characteristic

Information

Extends from baseEfficiency (Base class for efficiency characteristics).

Inputs

TypeNameDefaultDescription
VolumeFlowRateV_flow Volumetric flow rate [m3/s]
Realeta_nominal Nominal efficiency

Outputs

TypeNameDescription
RealetaEfficiency

Modelica definition

function constantEfficiency "Constant efficiency characteristic"
   extends baseEfficiency;
   input Real eta_nominal(min=0, max=1) "Nominal efficiency";
algorithm 
  eta := eta_nominal;
end constantEfficiency;

Buildings.Fluid.Movers.BaseClasses.Characteristics.linearEfficiency Buildings.Fluid.Movers.BaseClasses.Characteristics.linearEfficiency

Linear efficiency characteristic

Information

Extends from baseEfficiency (Base class for efficiency characteristics).

Inputs

TypeNameDefaultDescription
VolumeFlowRateV_flow Volumetric flow rate [m3/s]
VolumeFlowRateV_flow_nominal[2] Volume flow rate for two operating points (single fan or pump) [m3/s]
Realeta_nominal[2] Nominal efficiency

Outputs

TypeNameDescription
RealetaEfficiency

Modelica definition

function linearEfficiency "Linear efficiency characteristic"
  extends baseEfficiency;
  input Modelica.SIunits.VolumeFlowRate V_flow_nominal[2] 
    "Volume flow rate for two operating points (single fan or pump)";
  input Real eta_nominal[2](min=0, max=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),V_flow_nominal],eta_nominal) 
    "Coefficients of linear total efficiency curve";
algorithm 
  // Efficiency equation: eta = q*c[1] + c[2];
  eta := c[1] + V_flow*c[2];
end linearEfficiency;

Buildings.Fluid.Movers.BaseClasses.Characteristics.quadraticEfficiency Buildings.Fluid.Movers.BaseClasses.Characteristics.quadraticEfficiency

Quadratic efficiency characteristic

Information

Extends from baseEfficiency (Base class for efficiency characteristics).

Inputs

TypeNameDefaultDescription
VolumeFlowRateV_flow Volumetric flow rate [m3/s]
VolumeFlowRateV_flow_nominal[3] Volume flow rate for three operating points (single fan or pump) [m3/s]
Realeta_nominal[3] Nominal efficiency for three operating points

Outputs

TypeNameDescription
RealetaEfficiency

Modelica definition

function quadraticEfficiency "Quadratic efficiency characteristic"
  extends baseEfficiency;
  input Modelica.SIunits.VolumeFlowRate V_flow_nominal[3] 
    "Volume flow rate for three operating points (single fan or pump)";
  input Real eta_nominal[3](min=0, max=1) 
    "Nominal efficiency 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:
  eta_nominal[1] = c[1] + V_flow_nominal[1]*c[2] + V_flow_nominal[1]^2*c[3];
  eta_nominal[2] = c[1] + V_flow_nominal[2]*c[2] + V_flow_nominal[2]^2*c[3];
  eta_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],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] + V_flow*c[2] + V_flow^2*c[3];
end quadraticEfficiency;

Buildings.Fluid.Movers.BaseClasses.Characteristics.polynomialEfficiency Buildings.Fluid.Movers.BaseClasses.Characteristics.polynomialEfficiency

Polynomial efficiency characteristic

Information

Extends from baseEfficiency (Base class for efficiency characteristics).

Inputs

TypeNameDefaultDescription
VolumeFlowRateV_flow Volumetric flow rate [m3/s]
VolumeFlowRateV_flow_nominal[:] Volume flow rate for N operating points (single fan or pump) [m3/s]
Realeta_nominal[:] Nominal efficiency for N operating points

Outputs

TypeNameDescription
RealetaEfficiency

Modelica definition

function polynomialEfficiency "Polynomial efficiency characteristic"
  extends baseEfficiency;
  input Modelica.SIunits.VolumeFlowRate V_flow_nominal[:] 
    "Volume flow rate for N operating points (single fan or pump)";
  input Real eta_nominal[:](min=0, max=1) 
    "Nominal efficiency 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):
  eta_nominal[1] = c[1] + V_flow_nominal[1]*c[2] + V_flow_nominal[1]^2*c[3];
  eta_nominal[2] = c[1] + V_flow_nominal[2]*c[2] + V_flow_nominal[2]^2*c[3];
  eta_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,eta_nominal) 
    "Coefficients of polynomial total pressure curve";
algorithm 
  // Efficiency equation (example N=3): eta  = c[1] + V_flow*c[2] + V_flow^2*c[3];
  // Note: the implementation is numerically efficient only for low values of N
  eta := sum(V_flow^(i-1)*c[i] for i in 1:N);
end polynomialEfficiency;

Buildings.Fluid.Movers.BaseClasses.Characteristics.solve

Wrapper for Modelica.Math.Matrices.solve

Information


Wrapper function for 

Modelica.Math.Matrices.solve. This is currently needed since 

Modelica.Math.Matrices.solve does not specify a 
derivative. 
The implementation is based on the code from Hans Olsson, Dynasim support
request 10872.

Inputs

TypeNameDefaultDescription
RealA[:, size(A, 1)]  
Realx[size(A, 1)]  

Outputs

TypeNameDescription
Realb[size(A, 1)] 

Modelica definition

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;

Buildings.Fluid.Movers.BaseClasses.Characteristics.der_solve

Derivative for function solve

Inputs

TypeNameDefaultDescription
RealA[:, size(A, 1)]  
Realx[size(A, 1)]  
RealAder[:, size(A, 1)]  
Realxder[size(A, 1)]  

Outputs

TypeNameDescription
Realb[size(A, 1)] 

Modelica definition

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;

HTML-documentation generated by Dymola Sat Feb 6 17:36:12 2010.