Name | Description |
---|---|
UsersGuide | User's Guide |
FlowMachine_y | Fan or pump with ideally controlled normalized speed y as input signal |
FlowMachine_Nrpm | Fan or pump with ideally controlled speed Nrpm as input signal |
FlowMachine_dp | Fan or pump with ideally controlled head dp as input signal |
FlowMachine_m_flow | Fan or pump with ideally controlled mass flow rate as input signal |
FlowMachinePolynomial | Fan or pump with head and efficiency declared by a non-dimensional polynomial |
Examples | Collection of models that illustrate model use and test models |
BaseClasses | Base classes used in the Machines package (only of interest to build new component models) |
This model describes a fan or pump with prescribed normalized speed. The input connector provides the normalized rotational speed (between 0 and 1). The head is computed based on the performance curve that take as an argument the actual volume flow rate divided by the maximum flow rate and the relative speed of the fan. The efficiency of the device is computed based on the efficiency curves that take as an argument the actual volume flow rate divided by the maximum possible volume flow rate, or based on the motor performance curves.
See the User's Guide for more information.
Extends from Buildings.Fluid.Movers.BaseClasses.PrescribedFlowMachine (Partial model for fan or pump with speed (y or Nrpm) as input signal).
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Boolean | addHeatToMedium | true | Set to false to avoid any heat being added to medium (may give simpler equations) |
Nominal condition | |||
MassFlowRate | m_flow_nominal | Nominal mass flow rate [kg/s] | |
Initialization | |||
MassFlowRate | m_flow.start | 0 | Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction) [kg/s] |
Pressure | dp.start | 0 | Pressure difference between port_a and port_b [Pa] |
Real | r_V.start | 1 | Ratio V_flow/V_flow_max = V_flow/V_flow(dp=0, N=N_nominal) |
Real | r_N.start | 1 | Ratio N/N_nominal |
Characteristics | |||
Boolean | use_powerCharacteristic | false | Use powerCharacteristic (vs. efficiencyCharacteristic) |
Boolean | motorCooledByFluid | true | If true, then motor heat is added to fluid stream |
replaceable function motorEfficiency | Characteristics.constantEffi... | Efficiency vs. normalized volume flow rate | |
replaceable function hydraulicEfficiency | Characteristics.constantEffi... | Efficiency vs. normalized volume flow rate | |
replaceable function flowCharacteristic | Buildings.Fluid.Movers.BaseC... | Total pressure vs. V_flow characteristic at nominal speed | |
AngularVelocity_rpm | N_nominal | 1500 | Nominal rotational speed for flow characteristic [1/min] |
replaceable function powerCharacteristic | Characteristics.quadraticPow... | Power consumption vs. V_flow at nominal speed and density | |
Assumptions | |||
Boolean | allowFlowReversal | system.allowFlowReversal | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
Dynamics | |||
Boolean | dynamicBalance | false | Set to true to use a dynamic balance, which often leads to smaller systems of equations |
Time | tau | 10 | Time constant of fluid volume for nominal flow, used if dynamicBalance=true [s] |
Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Formulation of energy balance (used if dynamicBalance=true) |
Dynamics | massDynamics | energyDynamics | Formulation of mass balance (used if dynamicBalance=true) |
Advanced | |||
MassFlowRate | m_flow_small | 1E-4*m_flow_nominal | Small mass flow rate for regularization of zero flow [kg/s] |
Diagnostics | |||
Boolean | show_T | true | = true, if actual temperature at port is computed (may lead to events) |
Initialization | |||
Boolean | use_T_start | true | = true, use T_start, otherwise h_start |
Temperature | T_start | if use_T_start then system.T... | Start value of temperature [K] |
SpecificEnthalpy | h_start | if use_T_start then Medium.s... | Start value of inlet specific enthalpy [J/kg] |
MassFraction | X_start[Medium.nX] | Medium.X_default | Start value of mass fractions m_i/m [kg/kg] |
ExtraProperty | C_start[Medium.nC] | fill(0, Medium.nC) | Start value of trace substances |
Pressure | p_start | Medium.p_default | Start value of inlet pressure [Pa] |
Type | Name | Description |
---|---|---|
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
HeatPort_a | heatPort | |
input RealInput | y | Constant normalized rotational speed |
Characteristics | ||
replaceable function flowCharacteristic | Total pressure vs. V_flow characteristic at nominal speed |
model FlowMachine_y "Fan or pump with ideally controlled normalized speed y as input signal" extends Buildings.Fluid.Movers.BaseClasses.PrescribedFlowMachine( final N_nominal=1500 "fix N_nominal as it is used only for scaling", redeclare replaceable function flowCharacteristic = Buildings.Fluid.Movers.BaseClasses.Characteristics.baseFlow);Modelica.Blocks.Interfaces.RealInput y(min=0, max=1) "Constant normalized rotational speed"; equation N = y*N_nominal;end FlowMachine_y;
See the User's Guide for more information.
Extends from Buildings.Fluid.Movers.BaseClasses.PrescribedFlowMachine (Partial model for fan or pump with speed (y or Nrpm) as input signal).
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Boolean | addHeatToMedium | true | Set to false to avoid any heat being added to medium (may give simpler equations) |
Nominal condition | |||
MassFlowRate | m_flow_nominal | Nominal mass flow rate [kg/s] | |
Initialization | |||
MassFlowRate | m_flow.start | 0 | Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction) [kg/s] |
Pressure | dp.start | 0 | Pressure difference between port_a and port_b [Pa] |
Real | r_V.start | 1 | Ratio V_flow/V_flow_max = V_flow/V_flow(dp=0, N=N_nominal) |
Real | r_N.start | 1 | Ratio N/N_nominal |
Characteristics | |||
Boolean | use_powerCharacteristic | false | Use powerCharacteristic (vs. efficiencyCharacteristic) |
Boolean | motorCooledByFluid | true | If true, then motor heat is added to fluid stream |
replaceable function motorEfficiency | Characteristics.constantEffi... | Efficiency vs. normalized volume flow rate | |
replaceable function hydraulicEfficiency | Characteristics.constantEffi... | Efficiency vs. normalized volume flow rate | |
replaceable function flowCharacteristic | Characteristics.baseFlow | Total pressure vs. V_flow characteristic at nominal speed | |
AngularVelocity_rpm | N_nominal | 1500 | Nominal rotational speed for flow characteristic [1/min] |
replaceable function powerCharacteristic | Characteristics.quadraticPow... | Power consumption vs. V_flow at nominal speed and density | |
Assumptions | |||
Boolean | allowFlowReversal | system.allowFlowReversal | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
Dynamics | |||
Boolean | dynamicBalance | false | Set to true to use a dynamic balance, which often leads to smaller systems of equations |
Time | tau | 10 | Time constant of fluid volume for nominal flow, used if dynamicBalance=true [s] |
Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Formulation of energy balance (used if dynamicBalance=true) |
Dynamics | massDynamics | energyDynamics | Formulation of mass balance (used if dynamicBalance=true) |
Advanced | |||
MassFlowRate | m_flow_small | 1E-4*m_flow_nominal | Small mass flow rate for regularization of zero flow [kg/s] |
Diagnostics | |||
Boolean | show_T | true | = true, if actual temperature at port is computed (may lead to events) |
Initialization | |||
Boolean | use_T_start | true | = true, use T_start, otherwise h_start |
Temperature | T_start | if use_T_start then system.T... | Start value of temperature [K] |
SpecificEnthalpy | h_start | if use_T_start then Medium.s... | Start value of inlet specific enthalpy [J/kg] |
MassFraction | X_start[Medium.nX] | Medium.X_default | Start value of mass fractions m_i/m [kg/kg] |
ExtraProperty | C_start[Medium.nC] | fill(0, Medium.nC) | Start value of trace substances |
Pressure | p_start | Medium.p_default | Start value of inlet pressure [Pa] |
Type | Name | Description |
---|---|---|
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
HeatPort_a | heatPort | |
input RealInput | Nrpm | Prescribed rotational speed [1/min] |
model FlowMachine_Nrpm "Fan or pump with ideally controlled speed Nrpm as input signal" extends Buildings.Fluid.Movers.BaseClasses.PrescribedFlowMachine;Modelica.Blocks.Interfaces.RealInput Nrpm(unit="1/min") "Prescribed rotational speed"; equation N = Nrpm;end FlowMachine_Nrpm;
This model describes a fan or pump with prescribed head. The input connector provides the difference between outlet minus inlet pressure. The efficiency of the device is computed based on the efficiency curves that take as an argument the actual volume flow rate divided by the maximum possible volume flow rate.
See the User's Guide for more information.
Extends from Buildings.Fluid.Movers.BaseClasses.ControlledFlowMachine (Partial model for fan or pump with ideally controlled mass flow rate or head as input signal).
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Boolean | addHeatToMedium | true | Set to false to avoid any heat being added to medium (may give simpler equations) |
MassFlowRate | m_flow_max | m_flow_nominal | Maximum mass flow rate (at zero head) [kg/s] |
Boolean | control_m_flow | false | = false to control head instead of m_flow |
Nominal condition | |||
MassFlowRate | m_flow_nominal | Nominal mass flow rate [kg/s] | |
Initialization | |||
MassFlowRate | m_flow.start | 0 | Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction) [kg/s] |
Pressure | dp.start | 0 | Pressure difference between port_a and port_b [Pa] |
Real | r_V.start | 1 | Ratio V_flow/V_flow_max = V_flow/V_flow(dp=0, N=N_nominal) |
Characteristics | |||
Boolean | motorCooledByFluid | true | If true, then motor heat is added to fluid stream |
replaceable function motorEfficiency | Characteristics.constantEffi... | Efficiency vs. normalized volume flow rate | |
replaceable function hydraulicEfficiency | Characteristics.constantEffi... | Efficiency vs. normalized volume flow rate | |
Assumptions | |||
Boolean | allowFlowReversal | system.allowFlowReversal | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
Dynamics | |||
Boolean | dynamicBalance | false | Set to true to use a dynamic balance, which often leads to smaller systems of equations |
Time | tau | 10 | Time constant of fluid volume for nominal flow, used if dynamicBalance=true [s] |
Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Formulation of energy balance (used if dynamicBalance=true) |
Dynamics | massDynamics | energyDynamics | Formulation of mass balance (used if dynamicBalance=true) |
Advanced | |||
MassFlowRate | m_flow_small | 1E-4*m_flow_nominal | Small mass flow rate for regularization of zero flow [kg/s] |
Diagnostics | |||
Boolean | show_T | true | = true, if actual temperature at port is computed (may lead to events) |
Initialization | |||
Boolean | use_T_start | true | = true, use T_start, otherwise h_start |
Temperature | T_start | if use_T_start then system.T... | Start value of temperature [K] |
SpecificEnthalpy | h_start | if use_T_start then Medium.s... | Start value of inlet specific enthalpy [J/kg] |
MassFraction | X_start[Medium.nX] | Medium.X_default | Start value of mass fractions m_i/m [kg/kg] |
ExtraProperty | C_start[Medium.nC] | fill(0, Medium.nC) | Start value of trace substances |
Pressure | p_start | Medium.p_default | Start value of inlet pressure [Pa] |
Type | Name | Description |
---|---|---|
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
HeatPort_a | heatPort | |
input RealInput | m_flow_in | Prescribed mass flow rate |
input RealInput | dp_in | Prescribed outlet pressure |
model FlowMachine_dp "Fan or pump with ideally controlled head dp as input signal" extends Buildings.Fluid.Movers.BaseClasses.ControlledFlowMachine( final control_m_flow = false); equation assert(dp_in >= 0, "dp_in cannot be negative. Obtained dp_in = " + realString(dp_in));end FlowMachine_dp;
This model describes a fan or pump with prescribed mass flow rate. The efficiency of the device is computed based on the efficiency curves that take as an argument the actual volume flow rate divided by the maximum possible volume flow rate.
See the User's Guide for more information.
Extends from Buildings.Fluid.Movers.BaseClasses.ControlledFlowMachine (Partial model for fan or pump with ideally controlled mass flow rate or head as input signal).
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Boolean | addHeatToMedium | true | Set to false to avoid any heat being added to medium (may give simpler equations) |
MassFlowRate | m_flow_max | m_flow_nominal | Maximum mass flow rate (at zero head) [kg/s] |
Boolean | control_m_flow | true | = false to control head instead of m_flow |
Nominal condition | |||
MassFlowRate | m_flow_nominal | Nominal mass flow rate [kg/s] | |
Initialization | |||
MassFlowRate | m_flow.start | 0 | Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction) [kg/s] |
Pressure | dp.start | 0 | Pressure difference between port_a and port_b [Pa] |
Real | r_V.start | 1 | Ratio V_flow/V_flow_max = V_flow/V_flow(dp=0, N=N_nominal) |
Characteristics | |||
Boolean | motorCooledByFluid | true | If true, then motor heat is added to fluid stream |
replaceable function motorEfficiency | Characteristics.constantEffi... | Efficiency vs. normalized volume flow rate | |
replaceable function hydraulicEfficiency | Characteristics.constantEffi... | Efficiency vs. normalized volume flow rate | |
Assumptions | |||
Boolean | allowFlowReversal | system.allowFlowReversal | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
Dynamics | |||
Boolean | dynamicBalance | false | Set to true to use a dynamic balance, which often leads to smaller systems of equations |
Time | tau | 10 | Time constant of fluid volume for nominal flow, used if dynamicBalance=true [s] |
Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Formulation of energy balance (used if dynamicBalance=true) |
Dynamics | massDynamics | energyDynamics | Formulation of mass balance (used if dynamicBalance=true) |
Advanced | |||
MassFlowRate | m_flow_small | 1E-4*m_flow_nominal | Small mass flow rate for regularization of zero flow [kg/s] |
Diagnostics | |||
Boolean | show_T | true | = true, if actual temperature at port is computed (may lead to events) |
Initialization | |||
Boolean | use_T_start | true | = true, use T_start, otherwise h_start |
Temperature | T_start | if use_T_start then system.T... | Start value of temperature [K] |
SpecificEnthalpy | h_start | if use_T_start then Medium.s... | Start value of inlet specific enthalpy [J/kg] |
MassFraction | X_start[Medium.nX] | Medium.X_default | Start value of mass fractions m_i/m [kg/kg] |
ExtraProperty | C_start[Medium.nC] | fill(0, Medium.nC) | Start value of trace substances |
Pressure | p_start | Medium.p_default | Start value of inlet pressure [Pa] |
Type | Name | Description |
---|---|---|
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
HeatPort_a | heatPort | |
input RealInput | m_flow_in | Prescribed mass flow rate |
input RealInput | dp_in | Prescribed outlet pressure |
model FlowMachine_m_flow "Fan or pump with ideally controlled mass flow rate as input signal" extends Buildings.Fluid.Movers.BaseClasses.ControlledFlowMachine( final control_m_flow=true);end FlowMachine_m_flow;
This is a model of a flow machine (pump or fan).
The normalized pressure difference is computed using a function of the normalized mass flow rate. The function is a polynomial for which a user needs to supply the coefficients and two values that determine for what flow rate the polynomial is linearly extended.
Note: This model is here for compatibility with older versions of this library. For new models, use instead Buildings.Fluid.Movers.FlowMachine_y.
Extends from Buildings.Fluid.Interfaces.PartialStaticTwoPortInterface (Partial model transporting fluid between two ports without storing mass or energy).
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Length | D | Diameter [m] | |
Real | a[:] | Polynomial coefficients for pressure=p(mNor_flow) | |
Real | b[:] | Polynomial coefficients for etaSha=p(mNor_flow) | |
Real | mNorMin_flow | Lowest valid normalized mass flow rate | |
Real | mNorMax_flow | Highest valid normalized mass flow rate | |
Real | scaM_flow | 1 | Factor used to scale the mass flow rate of the fan (used for quickly adjusting fan size) |
Real | scaDp | 1 | Factor used to scale the pressure increase of the fan (used for quickly adjusting fan size) |
Nominal condition | |||
MassFlowRate | m_flow_nominal | Nominal mass flow rate [kg/s] | |
Initialization | |||
MassFlowRate | m_flow.start | 0 | Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction) [kg/s] |
Pressure | dp.start | 0 | Pressure difference between port_a and port_b [Pa] |
Assumptions | |||
Boolean | allowFlowReversal | system.allowFlowReversal | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
Advanced | |||
MassFlowRate | m_flow_small | 1E-4*m_flow_nominal | Small mass flow rate for regularization of zero flow [kg/s] |
Diagnostics | |||
Boolean | show_V_flow | false | = true, if volume flow rate at inflowing port is computed |
Boolean | show_T | false | = true, if actual temperature at port is computed (may lead to events) |
Type | Name | Description |
---|---|---|
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
input RealInput | N_in | Prescribed rotational speed |
model FlowMachinePolynomial "Fan or pump with head and efficiency declared by a non-dimensional polynomial" extends Buildings.Fluid.Interfaces.PartialStaticTwoPortInterface;Modelica.Blocks.Interfaces.RealInput N_in "Prescribed rotational speed"; parameter Modelica.SIunits.Length D "Diameter"; parameter Real[:] a "Polynomial coefficients for pressure=p(mNor_flow)"; parameter Real[:] b "Polynomial coefficients for etaSha=p(mNor_flow)"; parameter Real mNorMin_flow "Lowest valid normalized mass flow rate"; parameter Real mNorMax_flow "Highest valid normalized mass flow rate"; parameter Real scaM_flow = 1 "Factor used to scale the mass flow rate of the fan (used for quickly adjusting fan size)"; parameter Real scaDp = 1 "Factor used to scale the pressure increase of the fan (used for quickly adjusting fan size)"; Real pNor(min=0) "Normalized pressure"; Real mNor_flow(start=mNorMax_flow) "Normalized mass flow rate"; Real etaSha(min=0, max=1) "Efficiency, flow work divided by shaft power"; Modelica.SIunits.Power PSha "Power input at shaft"; Medium.Density rho "Medium density"; protected parameter Real pNorMin1(fixed=false) "Normalized pressure, used to test slope of polynomial outside [xMin, xMax]"; parameter Real pNorMin2(fixed=false) "Normalized pressure, used to test slope of polynomial outside [xMin, xMax]"; parameter Real pNorMax1(fixed=false) "Normalized pressure, used to test slope of polynomial outside [xMin, xMax]"; parameter Real pNorMax2(fixed=false) "Normalized pressure, used to test slope of polynomial outside [xMin, xMax]"; initial equation // check slope of polynomial outside the domain [mNorMin_flow, mNorMax_flow] pNorMin1 = Buildings.Fluid.Utilities.extendedPolynomial( c=a, x=mNorMin_flow/2, xMin=mNorMin_flow, xMax=mNorMax_flow); pNorMin2 = Buildings.Fluid.Utilities.extendedPolynomial( c=a, x=mNorMin_flow, xMin=mNorMin_flow, xMax=mNorMax_flow); pNorMax1 = Buildings.Fluid.Utilities.extendedPolynomial( c=a, x=mNorMax_flow, xMin=mNorMin_flow, xMax=mNorMax_flow); pNorMax2 = Buildings.Fluid.Utilities.extendedPolynomial( c=a, x=mNorMax_flow*2, xMin=mNorMin_flow, xMax=mNorMax_flow); assert(pNorMin1>pNorMin2, "Slope of pump pressure polynomial is non-negative for mNor_flow < mNorMin_flow. Check parameter a."); assert(pNorMax1>pNorMax2, "Slope of pump pressure polynomial is non-negative for mNorMax_flow < mNor_flow. Check parameter a."); equation // For computing the density, we assume that the fan operates in the design flow direction. rho = Medium.density( Medium.setState_phX(port_a.p, inStream(port_a.h_outflow), inStream(port_a.Xi_outflow))); -dp = scaDp * pNor * rho * D*D * N_in * N_in; m_flow = scaM_flow * mNor_flow * rho * D*D*D * N_in; pNor = Buildings.Fluid.Utilities.extendedPolynomial( c=a, x=mNor_flow, xMin=mNorMin_flow, xMax=mNorMax_flow); etaSha = max(0.1, Buildings.Fluid.Utilities.polynomial( c=b, x=mNor_flow)); etaSha * PSha = -dp * m_flow / rho; // dp<0 and m_flow>0 for normal operation // Energy balance (no storage, no heat loss/gain) PSha = -m_flow*(port_a.h_outflow-inStream(port_b.h_outflow)); PSha = m_flow*(port_b.h_outflow-inStream(port_a.h_outflow)); // Mass balance (no storage) port_a.m_flow + port_b.m_flow = 0; // Transport of substances port_a.Xi_outflow = inStream(port_b.Xi_outflow); port_b.Xi_outflow = inStream(port_a.Xi_outflow); port_a.C_outflow = inStream(port_b.C_outflow); port_b.C_outflow = inStream(port_a.C_outflow);end FlowMachinePolynomial;