Name | Description |
---|---|
Characteristics | Functions for fan or pump characteristics |
ControlledFlowMachine | Partial model for fan or pump with ideally controlled mass flow rate or head as input signal |
PrescribedFlowMachine | Partial model for fan or pump with speed (y or Nrpm) as input signal |
PartialFlowMachine | Partial model to interface fan or pump models with the medium |
FlowMachineInterface | Partial model with performance curves for fans or pumps |
IdealSource | Base class for pressure and mass flow source with heat input |
PowerInterface | Partial model to compute power draw and heat dissipation of fans and pumps |
This model describes a fan or pump that takes as an input the head or the mass flow rate.
Extends from Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine (Partial model to interface fan or pump models with the medium), Buildings.Fluid.Movers.BaseClasses.PowerInterface (Partial model to compute power draw and heat dissipation of fans and pumps).
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Density | rho_nominal | Medium.density(sta_nominal) | Nominal fluid density [kg/m3] |
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 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 | 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 | |
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_V_flow | true | = true, if volume flow rate at inflowing port is computed |
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 ControlledFlowMachine "Partial model for fan or pump with ideally controlled mass flow rate or head as input signal" extends Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine( final show_V_flow = true, souSta(final control_m_flow=control_m_flow, final addHeatToMedium= addHeatToMedium), souDyn(final control_m_flow=control_m_flow)); extends Buildings.Fluid.Movers.BaseClasses.PowerInterface( final use_powerCharacteristic = false, final rho_nominal = Medium.density(sta_nominal)); parameter Medium.MassFlowRate m_flow_nominal "Nominal mass flow rate, used as flow rate if control_m_flow"; parameter Modelica.SIunits.MassFlowRate m_flow_max = m_flow_nominal "Maximum mass flow rate (at zero head)"; // what to control constant Boolean control_m_flow "= false to control head instead of m_flow";Modelica.Blocks.Interfaces.RealInput m_flow_in if control_m_flow "Prescribed mass flow rate"; Modelica.Blocks.Interfaces.RealInput dp_in if not control_m_flow "Prescribed outlet pressure"; protected final parameter Medium.AbsolutePressure p_a_nominal(displayUnit="Pa") = Medium.p_default "Nominal inlet pressure for predefined fan or pump characteristics"; parameter Medium.ThermodynamicState sta_nominal = Medium.setState_pTX(T=T_start, p=p_a_nominal, X=X_start[1:Medium.nXi]);public Modelica.Blocks.Sources.RealExpression QToMedium_flow(y=Q_flow) "Heat input into medium"; protected Modelica.Blocks.Math.Gain gain(final k=-1) if not control_m_flow; initial equation V_flow_max=m_flow_nominal/rho_nominal; equation etaHyd = hydraulicEfficiency(r_V=r_V); etaMot = motorEfficiency(r_V=r_V); dpMachine = -dp; VMachine_flow = V_flow;connect(QToMedium_flow.y, preHea.Q_flow); connect(QToMedium_flow.y, souSta.Q_flow_in); connect(m_flow_in, souDyn.m_flow_in); connect(m_flow_in, souSta.m_flow_in); connect(gain.u, dp_in); connect(gain.y, souDyn.dp_in); connect(gain.y, souSta.dp_in); end ControlledFlowMachine;
This is the base model for fans and pumps that take as
input a control signal in the form of the pump speed Nrpm
or the normalized pump speed y=Nrpm/N_nominal
.
Extends from Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine (Partial model to interface fan or pump models with the medium), Buildings.Fluid.Movers.BaseClasses.FlowMachineInterface (Partial model with performance curves for fans or pumps).
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Density | rho_nominal | Medium.density_pTX(Medium.p_... | Nominal fluid density [kg/m3] |
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_V_flow | false | = true, if volume flow rate at inflowing port is computed |
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 |
partial model PrescribedFlowMachine "Partial model for fan or pump with speed (y or Nrpm) as input signal" import Modelica.Constants; extends Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine( final show_V_flow = false, souDyn(final control_m_flow=false), souSta(final control_m_flow=false, final addHeatToMedium=addHeatToMedium)); extends Buildings.Fluid.Movers.BaseClasses.FlowMachineInterface( V_flow_max(start=m_flow_nominal/rho_nominal), final rho_nominal = Medium.density_pTX(Medium.p_default, Medium.T_default, Medium.X_default)); // Modelsprotected Modelica.Blocks.Sources.RealExpression dpMac(y=-dpMachine) "Pressure drop of the pump or fan"; Modelica.Blocks.Sources.RealExpression QMac_flow(y=Q_flow) "Heat input into the medium from the fan or pump (not including flow work)"; equation VMachine_flow = V_in_flow; rho = rho_in;connect(QMac_flow.y, preHea.Q_flow); connect(dpMac.y, souSta.dp_in); connect(dpMac.y, souDyn.dp_in); connect(QMac_flow.y, souSta.Q_flow_in); end PrescribedFlowMachine;
This is the base model for fans and pumps. It provides an interface between the equations that compute head and power consumption, and the implementation of the energy and pressure balance of the fluid.
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 | |
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) |
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_V_flow | false | = true, if volume flow rate at inflowing port is computed |
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 |
---|---|---|
HeatPort_a | heatPort |
partial model PartialFlowMachine "Partial model to interface fan or pump models with the medium" import Modelica.Constants; extends Buildings.Fluid.Interfaces.PartialStaticTwoPortInterface(show_T=true, port_a( h_outflow(start=h_start), final m_flow(min = if allowFlowReversal then -Constants.inf else 0)), port_b( h_outflow(start=h_start), p(start=p_start), final m_flow(max = if allowFlowReversal then +Constants.inf else 0)));Delays.DelayFirstOrder vol( redeclare package Medium = Medium, tau=tau, energyDynamics=energyDynamics, massDynamics=massDynamics, use_T_start=use_T_start, T_start=T_start, h_start=h_start, X_start=X_start, C_start=C_start, m_flow_nominal=m_flow_nominal, use_HeatTransfer=true, redeclare model HeatTransfer = Modelica.Fluid.Vessels.BaseClasses.HeatTransfer.IdealHeatTransfer, nPorts=2, p_start=p_start) if dynamicBalance "Fluid volume for dynamic model"; parameter Boolean dynamicBalance = false "Set to true to use a dynamic balance, which often leads to smaller systems of equations"; parameter Modelica.SIunits.Time tau=10 "Time constant of fluid volume for nominal flow, used if dynamicBalance=true"; parameter Modelica.Fluid.Types.Dynamics energyDynamics= Modelica.Fluid.Types.Dynamics.SteadyStateInitial "Formulation of energy balance (used if dynamicBalance=true)"; parameter Modelica.Fluid.Types.Dynamics massDynamics=energyDynamics "Formulation of mass balance (used if dynamicBalance=true)"; // Parameters for initialization // Initialization parameter Boolean use_T_start=true "= true, use T_start, otherwise h_start"; parameter Modelica.Media.Interfaces.PartialMedium.Temperature T_start=if use_T_start then system.T_start else Medium.temperature_phX( p_start, h_start, X_start) "Start value of temperature"; parameter Modelica.Media.Interfaces.PartialMedium.SpecificEnthalpy h_start= if use_T_start then Medium.specificEnthalpy_pTX( p_start, T_start, X_start) else Medium.h_default "Start value of inlet specific enthalpy"; parameter Modelica.Media.Interfaces.PartialMedium.MassFraction X_start[Medium.nX]= Medium.X_default "Start value of mass fractions m_i/m"; parameter Modelica.Media.Interfaces.PartialMedium.ExtraProperty C_start[ Medium.nC]=fill(0, Medium.nC) "Start value of trace substances"; parameter Modelica.SIunits.Pressure p_start = Medium.p_default "Start value of inlet pressure"; Modelica.SIunits.Density rho_in "Density of inflowing fluid"; Modelica.SIunits.VolumeFlowRate V_in_flow "Volume flow rate that flows into the device"; // ModelsModelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heatPort if dynamicBalance; protected IdealSource souDyn(redeclare package Medium = Medium, final addHeatToMedium=false) if dynamicBalance "Pressure source for dynamic model, this changes the pressure in the medium"; Buildings.Fluid.Movers.BaseClasses.IdealSource souSta( redeclare package Medium = Medium) if not dynamicBalance "Source for static model, this changes the pressure in the medium and adds heat"; Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow preHea if dynamicBalance "Prescribed heat flow for dynamic model"; equation // For computing the density, we assume that the fan operates in the design flow direction. rho_in = Medium.density( Medium.setState_phX(port_a.p, inStream(port_a.h_outflow), inStream(port_a.Xi_outflow))); V_in_flow = m_flow/rho_in;connect(preHea.port, vol.heatPort); connect(souSta.port_b, port_b); connect(vol.heatPort, heatPort); connect(port_a, vol.ports[1]); connect(souDyn.port_b, port_b); connect(souSta.port_a, port_a); connect(vol.ports[2], souDyn.port_a); end PartialFlowMachine;
This is an interface that implements the functions to compute the head, power draw and efficiency of fans and pumps. It is used by the model PrescribedFlowMachine.
The nominal hydraulic characteristic (total pressure vs. volume flow rate) is given by the the replaceable functionflowCharacteristic
.
The fan or pump energy balance can be specified in two alternative ways:
use_powerCharacteristic = false
, the replaceable function
efficiencyCharacteristic
(efficiency vs. normalized volume flow rate) is used to determine the efficiency,
and then the power consumption. The default is a constant efficiency of 0.8.
use_powerCharacteristic = true
, the replaceable function
powerCharacteristic
(power consumption vs. normalized volume flow rate
at nominal conditions)
is used to determine the power consumption, and then the efficiency.
Use
powerCharacteristic
to specify a non-zero power consumption for zero flow rate.
Extends from Buildings.Fluid.Movers.BaseClasses.PowerInterface (Partial model to compute power draw and heat dissipation of fans and pumps).
Type | Name | Default | Description |
---|---|---|---|
Density | rho_nominal | Nominal fluid density [kg/m3] | |
Boolean | addHeatToMedium | true | Set to false to avoid any heat being added to medium (may give simpler equations) |
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 | |
AngularVelocity_rpm | N_nominal | 1500 | Nominal rotational speed for flow characteristic [1/min] |
Initialization | |||
Real | r_V.start | 1 | Ratio V_flow/V_flow_max = V_flow/V_flow(dp=0, N=N_nominal) |
partial model FlowMachineInterface "Partial model with performance curves for fans or pumps" extends Buildings.Fluid.Movers.BaseClasses.PowerInterface; import Modelica.Constants; // Characteristics replaceable function flowCharacteristic = Characteristics.baseFlow "Total pressure vs. V_flow characteristic at nominal speed"; parameter Modelica.SIunits.Conversions.NonSIunits.AngularVelocity_rpm N_nominal = 1500 "Nominal rotational speed for flow characteristic"; replaceable function powerCharacteristic = Characteristics.quadraticPower ( V_flow_nominal={0,0,0},P_nominal={0,0,0}) "Power consumption vs. V_flow at nominal speed and density"; // Variables Modelica.SIunits.Density rho "Medium density"; Modelica.SIunits.Conversions.NonSIunits.AngularVelocity_rpm N(min=0, start = N_nominal) "Shaft rotational speed"; Real r_N(min=0, start=1) "Ratio N/N_nominal"; initial equation // Equation to compute V_flow_max 0 = flowCharacteristic(V_flow=V_flow_max, r_N=1); equation r_N = N/N_nominal; dpMachine = flowCharacteristic(V_flow=VMachine_flow, r_N=r_N); // Power consumption if use_powerCharacteristic then PEle = (rho/rho_nominal)*powerCharacteristic(V_flow=VMachine_flow, r_N=r_N); // In this configuration, we only now the total power consumption. // Hence, we assign the efficiency in equal parts to the motor and the hydraulic losses etaMot = sqrt(eta); else etaHyd = hydraulicEfficiency(r_V=r_V); etaMot = motorEfficiency(r_V=r_V); end if;end FlowMachineInterface;
Model of a fictious pipe that is used as a base class for a pressure source or to prescribe a mass flow rate. Optionally, heat can be added to the medium.
Extends from Modelica.Fluid.Interfaces.PartialTwoPortTransport (Partial element transporting fluid between two ports without storage of mass or energy).
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) |
Boolean | control_m_flow | = false to control dp instead of m_flow | |
Assumptions | |||
Boolean | allowFlowReversal | system.allowFlowReversal | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
Advanced | |||
AbsolutePressure | dp_start | 0.01*system.p_start | Guess value of dp = port_a.p - port_b.p [Pa] |
MassFlowRate | m_flow_start | system.m_flow_start | Guess value of m_flow = port_a.m_flow [kg/s] |
MassFlowRate | m_flow_small | system.m_flow_small | Small mass flow rate for regularization of zero flow [kg/s] |
Diagnostics | |||
Boolean | show_T | true | = true, if temperatures at port_a and port_b are computed |
Boolean | show_V_flow | true | = true, if volume flow rate at inflowing port is computed |
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 | Q_flow_in | Heat flow added to the medium |
input RealInput | m_flow_in | Prescribed mass flow rate |
input RealInput | dp_in | Prescribed outlet pressure |
model IdealSource "Base class for pressure and mass flow source with heat input" extends Modelica.Fluid.Interfaces.PartialTwoPortTransport;Modelica.Blocks.Interfaces.RealInput Q_flow_in if addHeatToMedium "Heat flow added to the medium"; parameter Boolean addHeatToMedium=true "Set to false to avoid any heat being added to medium (may give simpler equations)"; // what to control parameter Boolean control_m_flow "= false to control dp instead of m_flow";Modelica.Blocks.Interfaces.RealInput m_flow_in if control_m_flow "Prescribed mass flow rate"; Modelica.Blocks.Interfaces.RealInput dp_in if not control_m_flow "Prescribed outlet pressure"; protected Modelica.Blocks.Interfaces.RealInput m_flow_internal "Needed to connect to conditional connector"; Modelica.Blocks.Interfaces.RealInput dp_internal "Needed to connect to conditional connector"; Modelica.Blocks.Interfaces.RealInput Q_flow_internal "Needed to connect to conditional connector"; equation // Ideal control if control_m_flow then m_flow = m_flow_internal; dp_internal = 0; else dp = dp_internal; m_flow_internal = 0; end if; if not addHeatToMedium then Q_flow_internal = 0; end if; connect(dp_internal, dp_in); connect(m_flow_internal, m_flow_in); connect(Q_flow_internal, Q_flow_in); // Energy balance (no storage) if addHeatToMedium then port_a.m_flow*port_a.h_outflow + port_b.m_flow*inStream(port_b.h_outflow) = -Q_flow_internal; port_a.m_flow*port_b.h_outflow + port_b.m_flow*inStream(port_a.h_outflow) = Q_flow_internal; else port_a.h_outflow = inStream(port_b.h_outflow); port_b.h_outflow = inStream(port_a.h_outflow); end if;end IdealSource;
This is an interface that implements the functions to compute the power draw and the heat dissipation of fans and pumps. It is used by the model Buildings.Fluid.Movers.BaseClasses.FlowMachineInterface.
If addHeatToMedium = false
, then no heat will be added to the medium.
This can lead to simpler equations.
Type | Name | Default | Description |
---|---|---|---|
Density | rho_nominal | Nominal fluid density [kg/m3] | |
Boolean | addHeatToMedium | true | Set to false to avoid any heat being added to medium (may give simpler equations) |
Characteristics | |||
Boolean | use_powerCharacteristic | false | Use powerCharacteristic (vs. efficiencyCharacteristic) |
Boolean | motorCooledByFluid | true | If true, then motor heat is added to fluid stream |
partial model PowerInterface "Partial model to compute power draw and heat dissipation of fans and pumps" import Modelica.Constants; parameter Boolean use_powerCharacteristic = false "Use powerCharacteristic (vs. efficiencyCharacteristic)"; parameter Boolean motorCooledByFluid = true "If true, then motor heat is added to fluid stream"; replaceable function motorEfficiency = Characteristics.constantEfficiency(eta_nominal = 0.9) constrainedby Characteristics.baseEfficiency "Efficiency vs. normalized volume flow rate"; replaceable function hydraulicEfficiency = Characteristics.constantEfficiency(eta_nominal = 0.9) constrainedby Characteristics.baseEfficiency "Efficiency vs. normalized volume flow rate"; parameter Modelica.SIunits.Density rho_nominal "Nominal fluid density"; Modelica.SIunits.Power PEle "Electrical power input"; Modelica.SIunits.Power WHyd "Hydraulic power input (converted to flow work and heat)"; Modelica.SIunits.Power WFlo "Flow flow work"; Modelica.SIunits.HeatFlowRate Q_flow "Heat input from fan or pump to medium"; Real eta(min=0, max=1) "Global efficiency"; Real etaHyd(min=0, max=1) "Hydraulic efficiency"; Real etaMot(min=0, max=1) "Motor efficiency"; Real r_V(start=1) "Ratio V_flow/V_flow_max = V_flow/V_flow(dp=0, N=N_nominal)"; Modelica.SIunits.Pressure dpMachine(displayUnit="Pa") "Pressure increase"; Modelica.SIunits.VolumeFlowRate VMachine_flow "Volume flow rate"; parameter Boolean addHeatToMedium=true "Set to false to avoid any heat being added to medium (may give simpler equations)"; protected parameter Modelica.SIunits.VolumeFlowRate V_flow_max(fixed=false) "Maximum volume flow rate"; Modelica.SIunits.HeatFlowRate QThe_flow "Heat input into the medium"; parameter Modelica.SIunits.VolumeFlowRate delta_V_flow = 1E-3*V_flow_max "Factor used for setting heat input into medium to zero at very small flows"; equation r_V = VMachine_flow/V_flow_max; eta = etaHyd * etaMot; WFlo = eta * PEle; // Flow work WFlo = dpMachine*VMachine_flow; // Hydraulic power (transmitted by shaft), etaHyd = WFlo/WHyd etaHyd * WHyd = WFlo; // Heat input into medium QThe_flow + WFlo = if motorCooledByFluid then PEle else WHyd; // At m_flow = 0, the solver may still obtain positive values for QThe_flow. // The next statement sets the heat input into the medium to zero for very small flow rates. Q_flow = if addHeatToMedium then Buildings.Utilities.Math.Functions.spliceFunction(pos=QThe_flow, neg=0, x=abs(VMachine_flow)-2*delta_V_flow, deltax=delta_V_flow) else 0;end PowerInterface;