Collection of models that illustrate model use and test models
Information
This package contains examples for the use of models that can be found in
Buildings.Fluid.Movers.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Package Content
Name |
Description |
ClosedLoop_y
|
Flow machine with feedback control |
MoverContinuous
|
Example model of movers using a real input for setting the stage |
MoverParameter
|
Example model of movers using a parameter for setting the stage |
MoverStages
|
Example model of movers using an integer input for setting the stage |
PumpsParallel
|
Two flow machines in parallel |
PumpsSeries
|
Two flow machines in series |
SpeedControlled_y_pumpCurves
|
Pumps that illustrates the use of the pump curves |
StaticReset
|
Comparing different computation paths with a static pressure reset |
Data
|
Package containing data for examples |
Flow machine with feedback control
Information
This example demonstrates the use of a fan with closed loop control.
The fan is controlled to track a required mass flow rate.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Modelica definition
model ClosedLoop_y
extends Modelica.Icons.Example;
package Medium =
Buildings.Media.Air;
parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=0.1
;
parameter Modelica.Units.SI.PressureDifference dp_nominal=500
;
Modelica.Blocks.Sources.Pulse y(
offset=0.25,
startTime=0,
amplitude=0.5,
period=15*60) ;
Buildings.Fluid.Sources.Boundary_pT sou(
redeclare package Medium = Medium,
use_p_in=false,
p=101325,
T=293.15,
nPorts=2);
Buildings.Fluid.FixedResistances.PressureDrop dp1(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
dp_nominal=dp_nominal/2) ;
Buildings.Fluid.FixedResistances.PressureDrop dp2(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
dp_nominal=dp_nominal/2) ;
Buildings.Fluid.Movers.SpeedControlled_y fan(
redeclare package Medium = Medium,
per(pressure(V_flow={0,m_flow_nominal,2*m_flow_nominal}/1.2,
dp={2*dp_nominal,dp_nominal,0})),
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) ;
Buildings.Fluid.Sensors.MassFlowRate senMasFlo(
redeclare package Medium =
Medium);
Buildings.Controls.Continuous.LimPID conPID(
Td=1,
k=0.5,
Ti=15);
Modelica.Blocks.Math.Gain gain1(k=1/m_flow_nominal);
equation
connect(sou.ports[1], senMasFlo.port_a);
connect(senMasFlo.port_b, dp1.port_a);
connect(dp1.port_b, fan.port_a);
connect(fan.port_b, dp2.port_a);
connect(dp2.port_b, sou.ports[2]);
connect(senMasFlo.m_flow, gain1.u);
connect(gain1.y, conPID.u_m);
connect(y.y, conPID.u_s);
connect(conPID.y, fan.y);
end ClosedLoop_y;
Example model of movers using a real input for setting the stage
Information
This example demonstrates the use of a RealInput
connector for a mover model.
Extends from MoverParameter (Example model of movers using a parameter for setting the stage).
Parameters
Modelica definition
model MoverContinuous
extends MoverParameter(
pump_m_flow(inputType=Buildings.Fluid.Types.InputType.Continuous),
pump_y(inputType=Buildings.Fluid.Types.InputType.Continuous),
pump_dp(inputType=Buildings.Fluid.Types.InputType.Continuous));
Modelica.Blocks.Sources.Ramp ramp(duration=1) ;
Modelica.Blocks.Math.Gain gai_m_flow(k=m_flow_nominal)
;
Modelica.Blocks.Math.Gain gai_dp(k=dp_nominal) ;
equation
connect(gai_dp.y, pump_dp.dp_in);
connect(gai_m_flow.y, pump_m_flow.m_flow_in);
connect(gai_m_flow.u, ramp.y);
connect(gai_dp.u, ramp.y);
connect(pump_y.y, ramp.y);
end MoverContinuous;
Example model of movers using a parameter for setting the stage
Information
This example demonstrates the use of a Parameter
set point for a mover model.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Modelica definition
model MoverParameter
extends Modelica.Icons.Example;
package Medium =
Buildings.Media.Water;
parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=2
;
Buildings.Fluid.Movers.FlowControlled_m_flow pump_m_flow(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
use_inputFilter=false,
massFlowRates={0,0.5,1}*m_flow_nominal,
inputType=Buildings.Fluid.Types.InputType.Constant,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState)
;
Buildings.Fluid.Sources.Boundary_pT sou(
redeclare package Medium = Medium,
nPorts=3) ;
Buildings.Fluid.Sources.Boundary_pT sin(
redeclare package Medium = Medium,
nPorts=3) ;
Buildings.Fluid.Movers.SpeedControlled_y pump_y(
redeclare package Medium = Medium,
redeclare Buildings.Fluid.Movers.Data.Pumps.Wilo.Stratos25slash1to4 per(
speeds={0,0.5,1}, constantSpeed=1),
use_inputFilter=false,
inputType=Buildings.Fluid.Types.InputType.Constant,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState)
;
Buildings.Fluid.Movers.FlowControlled_dp pump_dp(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
redeclare Buildings.Fluid.Movers.Data.Pumps.Wilo.Stratos25slash1to4 per,
use_inputFilter=false,
heads={0,0.5,1}*dp_nominal,
inputType=Buildings.Fluid.Types.InputType.Constant,
dp_nominal=dp_nominal,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState)
;
Buildings.Fluid.FixedResistances.PressureDrop res(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
dp_nominal=dp_nominal)
;
parameter Modelica.Units.SI.PressureDifference dp_nominal=10000
;
equation
connect(sou.ports[1], pump_m_flow.port_a);
connect(pump_m_flow.port_b, sin.ports[1]);
connect(res.port_a, pump_dp.port_b);
connect(pump_y.port_b, sin.ports[2]);
connect(res.port_b, sin.ports[3]);
connect(pump_dp.port_a, sou.ports[2]);
connect(pump_y.port_a, sou.ports[3]);
end MoverParameter;
Example model of movers using an integer input for setting the stage
Information
This example demonstrates the use of the Integer
stage connector for a mover model.
Note that integer input 1 refers to the first stage, whereas
input 0 switches the mover off.
Extends from Buildings.Fluid.Movers.Examples.MoverParameter (Example model of movers using a parameter for setting the stage).
Parameters
Modelica definition
Two flow machines in parallel
Information
This example tests the configuration of two flow machines that are installed in parallel.
Both flow machines start with full speed.
At
t=150 second, the speed of the flow machine on the top is reduced to zero.
As its speed is reduced, the mass flow rate changes its direction in such a way that the flow machine
at the top has reverse flow.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
MassFlowRate | m_flow_nominal | 1 | Nominal mass flow rate [kg/s] |
Density | rho_nominal | 1000 | Density, used to compute fluid mass [kg/m3] |
Modelica definition
model PumpsParallel
extends Modelica.Icons.Example;
package Medium =
Buildings.Media.Water ;
parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=1
;
parameter Modelica.Units.SI.Density rho_nominal=1000
;
Buildings.Fluid.FixedResistances.PressureDrop dpIn1(
redeclare package Medium = Medium,
dp_nominal=1000,
m_flow_nominal=0.5*m_flow_nominal) ;
Buildings.Fluid.Movers.SpeedControlled_y floMac1(
redeclare package Medium = Medium,
per(pressure(V_flow={0, m_flow_nominal/rho_nominal}, dp={2*4*1000, 0})),
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)
;
Buildings.Fluid.FixedResistances.PressureDrop dpOut1(
redeclare package Medium = Medium,
dp_nominal=1000,
m_flow_nominal=0.5*m_flow_nominal) ;
Buildings.Fluid.Sources.Boundary_pT sou(
redeclare package Medium = Medium,
use_p_in=false,
nPorts=2,
T=293.15);
Buildings.Fluid.FixedResistances.PressureDrop dpIn(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
dp_nominal=1000) ;
Buildings.Fluid.FixedResistances.PressureDrop dpOut3(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
dp_nominal=1000) ;
Buildings.Fluid.FixedResistances.PressureDrop dpIn2(
redeclare package Medium = Medium,
dp_nominal=1000,
m_flow_nominal=0.5*m_flow_nominal) ;
Buildings.Fluid.Movers.SpeedControlled_y floMac2(
redeclare package Medium = Medium,
per(pressure(V_flow={0, m_flow_nominal/rho_nominal}, dp={2*4*1000, 0})),
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
inputType=Buildings.Fluid.Types.InputType.Constant) ;
Buildings.Fluid.FixedResistances.PressureDrop dpOut2(
redeclare package Medium = Medium,
dp_nominal=1000,
m_flow_nominal=0.5*m_flow_nominal) ;
Modelica.Blocks.Sources.Step const1(
height=-1,
offset=1,
startTime=150);
equation
connect(dpIn1.port_b, floMac1.port_a);
connect(floMac1.port_b, dpOut1.port_a);
connect(sou.ports[1], dpIn.port_a);
connect(dpIn.port_b, dpIn1.port_a);
connect(dpOut1.port_b, dpOut3.port_a);
connect(dpOut3.port_b, sou.ports[2]);
connect(dpIn2.port_b,floMac2. port_a);
connect(floMac2.port_b,dpOut2. port_a);
connect(dpIn.port_b, dpIn2.port_a);
connect(dpOut2.port_b, dpOut3.port_a);
connect(const1.y, floMac1.y);
end PumpsParallel;
Two flow machines in series
Information
This example tests the configuration of two flow machines that are installed in series.
Both flow machines start with full speed.
At
t=150 seconds, the speed of the flow machine on the left is reduced to zero.
As its speed is reduced, the mass flow rate is reduced. Note that even at zero input, the mass flow rate is non-zero,
but the pressure drop of the pump
floMac1.dp
is positive, which means that this pump has a flow resistance.
However,
flowMac2.dp
is always negative, as this pump has a constant control input of 1.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
MassFlowRate | m_flow_nominal | 1 | Nominal mass flow rate [kg/s] |
ThermodynamicState | state_start | Medium.setState_pTX(T=Medium... | Start state |
Density | rho_nominal | Medium.density(state_start) | Density, used to compute fluid mass [kg/m3] |
Modelica definition
model PumpsSeries
extends Modelica.Icons.Example;
package Medium =
Buildings.Media.Water;
parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=1
;
Buildings.Fluid.Movers.SpeedControlled_y floMac1(
redeclare package Medium = Medium,
per(pressure(V_flow={0, m_flow_nominal/1000}, dp={2*4*1000, 0})),
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState)
;
Buildings.Fluid.Sources.Boundary_pT sou(
redeclare package Medium = Medium,
use_p_in=false,
p(displayUnit="Pa") = 300000,
T=293.15,
nPorts=1);
parameter Medium.ThermodynamicState state_start =
Medium.setState_pTX(
T=Medium.T_default,
p=Medium.p_default,
X=Medium.X_default) ;
parameter Modelica.Units.SI.Density rho_nominal=
Medium.density(state_start)
;
Buildings.Fluid.Movers.SpeedControlled_y floMac2(
redeclare package Medium = Medium,
per(pressure(V_flow={0, m_flow_nominal/1000}, dp={2*4*1000, 0})),
inputType=Buildings.Fluid.Types.InputType.Constant,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState)
;
Modelica.Blocks.Sources.Step const1(
height=-1,
offset=1,
startTime=150);
Buildings.Fluid.Sources.Boundary_pT sou1(
redeclare package Medium = Medium,
use_p_in=false,
p(displayUnit="Pa") = 300000 + 4000,
T=293.15,
nPorts=1);
equation
connect(const1.y, floMac1.y);
connect(floMac1.port_b, floMac2.port_a);
connect(sou.ports[1], floMac1.port_a);
connect(floMac2.port_b, sou1.ports[1]);
end PumpsSeries;
Pumps that illustrates the use of the pump curves
Information
This example demonstrates how the pump curves changes for different (constant) input
signal y
.
If y ≥ delta = 0.05
, the pump curves are polynomials.
For y < delta = 0.05
, the pump curves convert to linear functions to
avoid a singularity at the origin.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
model SpeedControlled_y_pumpCurves
extends Modelica.Icons.Example;
package Medium =
Buildings.Media.Water ;
constant Modelica.Units.SI.MassFlowRate m_flow_nominal=0.5
;
constant Modelica.Units.SI.PressureDifference dp_nominal=10000
;
model pumpModel =
Buildings.Fluid.Movers.SpeedControlled_y (
redeclare package Medium = Medium,
use_inputFilter=
false,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
per(
pressure(V_flow=2/1000*m_flow_nominal*{0.2, 0.4, 0.6, 0.8},
dp=dp_nominal*{0.9, 0.85, 0.6, 0.2})))
;
pumpModel pum(
inputType=Buildings.Fluid.Types.InputType.Constant,
per(constantSpeed=1)) ;
pumpModel pum1(
inputType=Buildings.Fluid.Types.InputType.Constant,
per(constantSpeed=0.5)) ;
pumpModel pum2(
inputType=Buildings.Fluid.Types.InputType.Constant,
per(constantSpeed=0.05)) ;
pumpModel pum3(
inputType=Buildings.Fluid.Types.InputType.Constant,
per(constantSpeed=0.01)) ;
Modelica.Blocks.Sources.Ramp y(
offset=1,
duration=0.5,
startTime=0.25,
height=-0.999)
;
Buildings.Fluid.Sources.Boundary_pT sou(
redeclare package Medium = Medium,
use_p_in=false,
p=300000,
T=293.15,
nPorts=4);
Buildings.Fluid.Sources.Boundary_pT sou1(
redeclare package Medium = Medium,
use_p_in=false,
nPorts=4,
p(displayUnit="Pa") = 300000,
T=293.15);
Buildings.Fluid.Actuators.Valves.TwoWayLinear dp1(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
dpValve_nominal=0.01*dp_nominal,
use_inputFilter=false) ;
Buildings.Fluid.Actuators.Valves.TwoWayLinear dp2(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
dpValve_nominal=0.01*dp_nominal,
use_inputFilter=false) ;
Buildings.Fluid.Actuators.Valves.TwoWayLinear dp3(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
dpValve_nominal=0.01*dp_nominal,
use_inputFilter=false) ;
Buildings.Fluid.Actuators.Valves.TwoWayLinear dp4(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
dpValve_nominal=0.01*dp_nominal,
use_inputFilter=false) ;
equation
connect(dp1.port_b, pum.port_a);
connect(dp1.port_a, sou.ports[1]);
connect(y.y, dp1.y);
connect(dp2.port_b, pum1.port_a);
connect(y.y,dp2. y);
connect(sou.ports[2], dp2.port_a);
connect(dp3.port_b, pum2.port_a);
connect(y.y,dp3. y);
connect(dp3.port_a, sou.ports[3]);
connect(dp4.port_b, pum3.port_a);
connect(y.y,dp4. y);
connect(dp4.port_a, sou.ports[4]);
connect(pum3.port_b, sou1.ports[1]);
connect(pum2.port_b, sou1.ports[2]);
connect(pum1.port_b, sou1.ports[3]);
connect(pum.port_b, sou1.ports[4]);
end SpeedControlled_y_pumpCurves;
Comparing different computation paths with a static pressure reset
Information
This example model compares the three power computation methods in a scenario
where the fan performance (P vs. V̇) is examined
to verify savings of a static pressure reset. The fan speed is controlled
to track the duct static pressure at a point downstream while the damper
(representing a VAV box) moves from fully closed to fully open.
The system was described in Englander and Norford (1992).
The fan data are implemented in
Buildings.Fluid.Movers.Examples.Data.EnglanderNorford1992.
-
The first fan uses the fan curve to estimate the shaft power at reduced speed.
-
The second fan uses the Euler number and its correlation to estimate
the hydraulic efficiency.
-
The third fan assumes a constant hydraulic efficiency.
In the results, P computed from the Euler number and from the power curve
agree on the trend of P vs. V̇. Both of them are also able
to prevent P from incorrectly going to zero as V̇ approaches
zero, which the method with constant efficiency failed.
References
Englander, S. L., and L. K. Norford.
"Saving fan energy in VAV systems- part 1: analysis of a variable-speed-drive retrofit."
ASHRAE Winter Meeting, Anaheim, CA, USA, 01/25-29/92. 1992.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
VolumeFlowRate | V_flow_nominal | 21.8 | Nominal volumetric flow rate of the system [m3/s] |
MassFlowRate | m_flow_nominal | V_flow_nominal/1.2 | Nominal mass flow rate of the system [kg/s] |
PressureDifference | dp_nominal | 1244.2 | Nominal pressure rise of the system [Pa] |
Modelica definition
model StaticReset
extends Modelica.Icons.Example;
package Medium =
Buildings.Media.Air;
Buildings.Fluid.Movers.SpeedControlled_y fan1(
redeclare package Medium = Medium,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
redeclare Buildings.Fluid.Movers.Examples.Data.EnglanderNorford1992 per(
etaHydMet=Buildings.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.Power_VolumeFlowRate,
etaMotMet=Buildings.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.NotProvided))
;
Buildings.Fluid.Movers.SpeedControlled_y fan2(
redeclare package Medium = Medium,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
per(
powerOrEfficiencyIsHydraulic=fan1.per.powerOrEfficiencyIsHydraulic,
pressure=fan1.per.pressure,
etaHydMet=Buildings.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.EulerNumber,
etaMotMet=Buildings.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.NotProvided,
peak(
V_flow=23.022856,
dp=1211.1604,
eta=0.74030644)))
;
Buildings.Fluid.Movers.SpeedControlled_y fan3(
redeclare package Medium = Medium,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
per(
powerOrEfficiencyIsHydraulic=fan1.per.powerOrEfficiencyIsHydraulic,
pressure=fan1.per.pressure,
etaHydMet=Buildings.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.Efficiency_VolumeFlowRate,
etaMotMet=Buildings.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.NotProvided,
efficiency(eta={0.7}))) ;
parameter Modelica.Units.SI.VolumeFlowRate V_flow_nominal=21.8
;
parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=V_flow_nominal/1.2
;
parameter Modelica.Units.SI.PressureDifference dp_nominal=1244.2
;
Buildings.Fluid.Sources.Boundary_pT sou(
redeclare package Medium = Medium,
use_p_in=false,
p=101325,
T=293.15,
nPorts=6) ;
Buildings.Fluid.Sources.Boundary_pT sin(
redeclare package Medium = Medium,
use_p_in=false,
p=101325,
T=293.15,
nPorts=3) ;
Buildings.Fluid.FixedResistances.PressureDrop dp11(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
dp_nominal=dp_nominal/3)
;
Buildings.Fluid.FixedResistances.PressureDrop dp12(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
dp_nominal=dp_nominal/3)
;
Buildings.Fluid.FixedResistances.PressureDrop dp21(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
dp_nominal=dp_nominal/3)
;
Buildings.Fluid.FixedResistances.PressureDrop dp22(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
dp_nominal=dp_nominal/3)
;
Buildings.Fluid.FixedResistances.PressureDrop dp31(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
dp_nominal=dp_nominal/3)
;
Buildings.Fluid.FixedResistances.PressureDrop dp32(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
dp_nominal=dp_nominal/3)
;
Buildings.Fluid.Sensors.RelativePressure pDucSta1(
redeclare package Medium = Medium)
;
Buildings.Fluid.Sensors.RelativePressure pDucSta2(
redeclare package Medium = Medium)
;
Buildings.Fluid.Sensors.RelativePressure pDucSta3(
redeclare package Medium = Medium)
;
Buildings.Controls.Continuous.LimPID conPID1(
Td=1,
k=0.5,
Ti=15) ;
Buildings.Controls.Continuous.LimPID conPID2(
Td=1,
k=0.5,
Ti=15) ;
Buildings.Controls.Continuous.LimPID conPID3(
Td=1,
k=0.5,
Ti=15) ;
Modelica.Blocks.Math.Gain gai1(k=2/dp_nominal) ;
Modelica.Blocks.Math.Gain gai2(k=2/dp_nominal) ;
Modelica.Blocks.Math.Gain gai3(k=2/dp_nominal) ;
Modelica.Blocks.Sources.Constant y(k=1)
;
Actuators.Dampers.Exponential damExp1(
redeclare final package Medium = Medium,
m_flow_nominal=m_flow_nominal,
dpDamper_nominal=dp_nominal/3,
y_start=0) ;
Actuators.Dampers.Exponential damExp2(
redeclare final package Medium = Medium,
m_flow_nominal=m_flow_nominal,
dpDamper_nominal=dp_nominal/3,
y_start=0) ;
Actuators.Dampers.Exponential damExp3(
redeclare final package Medium = Medium,
m_flow_nominal=m_flow_nominal,
dpDamper_nominal=dp_nominal/3,
y_start=0) ;
Modelica.Blocks.Sources.Ramp yDam(
height=1,
duration=3600,
offset=0) ;
equation
connect(y.y, conPID3.u_s);
connect(pDucSta3.p_rel, gai3.u);
connect(gai3.y, conPID3.u_m);
connect(conPID3.y, fan3.y);
connect(fan3.port_b, dp31.port_a);
connect(dp31.port_b, dp32.port_a);
connect(fan2.port_b, dp21.port_a);
connect(dp21.port_b, dp22.port_a);
connect(pDucSta2.p_rel, gai2.u);
connect(gai2.y, conPID2.u_m);
connect(pDucSta2.port_a, dp22.port_a);
connect(y.y, conPID2.u_s);
connect(conPID2.y, fan2.y);
connect(fan1.port_b, dp11.port_a);
connect(dp11.port_b, dp12.port_a);
connect(pDucSta1.p_rel,gai1. u);
connect(gai1.y,conPID1. u_m);
connect(y.y, conPID1.u_s);
connect(pDucSta1.port_a, dp12.port_a);
connect(conPID1.y, fan1.y);
connect(pDucSta3.port_a, dp32.port_a);
connect(fan3.port_a, sou.ports[1]);
connect(fan2.port_a, sou.ports[2]);
connect(fan1.port_a, sou.ports[3]);
connect(pDucSta3.port_b, sou.ports[4]);
connect(pDucSta2.port_b, sou.ports[5]);
connect(pDucSta1.port_b, sou.ports[6]);
connect(dp12.port_b, damExp1.port_a);
connect(damExp1.port_b, sin.ports[1]);
connect(yDam.y, damExp1.y);
connect(dp22.port_b,damExp2. port_a);
connect(damExp2.port_b, sin.ports[2]);
connect(dp32.port_b,damExp3. port_a);
connect(damExp3.port_b, sin.ports[3]);
connect(yDam.y, damExp2.y);
connect(yDam.y, damExp3.y);
end StaticReset;
Declaration of pump model
Parameters
Type | Name | Default | Description |
replaceable package Medium | PartialMedium | Medium in the component |
Boolean | addPowerToMedium | true | Set to false to avoid any power (=heat and flow work) being added to medium (may give simpler equations) |
Control |
InputType | inputType | Buildings.Fluid.Types.InputT... | Control input type |
Dynamics |
Conservation equations |
Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Type of energy balance: dynamic (3 initialization options) or steady state |
Nominal condition |
Time | tau | 1 | Time constant of fluid volume for nominal flow, used if energy or mass balance is dynamic [s] |
Filtered speed |
Boolean | use_inputFilter | false | = true, if speed is filtered with a 2nd order CriticalDamping filter |
Time | riseTime | 30 | Rise time of the filter (time to reach 99.6 % of the speed) [s] |
Init | init | Modelica.Blocks.Types.Init.I... | Type of initialization (no init/steady state/initial state/initial output) |
Real | y_start | 0 | Initial value of speed [1] |
Initialization |
AbsolutePressure | p_start | Medium.p_default | Start value of pressure [Pa] |
Temperature | T_start | Medium.T_default | Start value of temperature [K] |
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 |
ExtraProperty | C_nominal[Medium.nC] | fill(1E-2, Medium.nC) | Nominal value of trace substances. (Set to typical order of magnitude.) |
Assumptions |
Boolean | allowFlowReversal | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
Advanced |
MassFlowRate | m_flow_small | 1E-4*abs(_m_flow_nominal) | Small mass flow rate for regularization of zero flow [kg/s] |
Diagnostics |
Boolean | show_T | false | = true, if actual temperature at port is computed |
Connectors
Type | Name | Description |
replaceable package Medium | Medium in the component |
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 IntegerInput | stage | Stage input signal for the pressure head |
output RealOutput | y_actual | Actual normalised fan or pump speed that is used for computations [1] |
output RealOutput | P | Electrical power consumed [W] |
HeatPort_a | heatPort | Heat dissipation to environment |
input RealInput | y | Constant normalized rotational speed [1] |
Modelica definition
model pumpModel =
Buildings.Fluid.Movers.SpeedControlled_y (
redeclare package Medium = Medium,
use_inputFilter=
false,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
per(
pressure(V_flow=2/1000*m_flow_nominal*{0.2, 0.4, 0.6, 0.8},
dp=dp_nominal*{0.9, 0.85, 0.6, 0.2})))
;