LBL logo

Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples

Test of components

Information

This package contains examples for the use of models that can be found in Buildings.Examples.ChillerPlant.BaseClasses.Controls.

Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).

Package Content

Name Description
Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.ChillerSwitch ChillerSwitch Test model for ChillerSwitch
Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.ChillerSetPointControl ChillerSetPointControl Test model for chiller setpoint control using TrimAndResponse and LinearPieceWiseTwo
Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.KMinusU KMinusU Test model for KMinusU
Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.LinearPiecewiseTwo LinearPiecewiseTwo Test model for LinearPiecewiseTwo
Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.RequestCounter RequestCounter Test model for RequestCounter
Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.TrimAndRespond TrimAndRespond Test model for TrimAndRespond
Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.WSEControl WSEControl Test model for WSEControl

Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.ChillerSwitch Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.ChillerSwitch

Test model for ChillerSwitch

Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.ChillerSwitch

Information

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica definition

model ChillerSwitch "Test model for ChillerSwitch" extends Modelica.Icons.Example; Modelica.Blocks.Sources.Sine TSet( freqHz=0.0002, offset=12, amplitude=8); Modelica.Blocks.Sources.Sine CHWST( freqHz=0.0001, amplitude=5, offset=15); Buildings.Examples.ChillerPlant.BaseClasses.Controls.ChillerSwitch chiSwi( deaBan(displayUnit="K") = 3); equation connect(TSet.y, chiSwi.TSet); connect(CHWST.y, chiSwi.chiCHWST); end ChillerSwitch;

Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.ChillerSetPointControl Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.ChillerSetPointControl

Test model for chiller setpoint control using TrimAndResponse and LinearPieceWiseTwo

Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.ChillerSetPointControl

Information

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
MassFlowRatemAir_flow_nominal61.6*2Nominal mass flow rate at fan [kg/s]
RealCOPc_nominal3Chiller COP
MassFlowRatemCHW_flow_nominal15.2Nominal mass flow rate at chilled water [kg/s]
MassFlowRatemCW_flow_nominalmCHW_flow_nominal/COPc_nomin...Nominal mass flow rate at condenser water [kg/s]
RealQRoo100 

Modelica definition

model ChillerSetPointControl "Test model for chiller setpoint control using TrimAndResponse and LinearPieceWiseTwo" extends Modelica.Icons.Example; package Medium1 = Buildings.Media.ConstantPropertyLiquidWater; package Medium2 = Buildings.Media.ConstantPropertyLiquidWater; package MediumAir = Buildings.Media.GasesPTDecoupled.SimpleAir "Medium model"; parameter Modelica.SIunits.MassFlowRate mAir_flow_nominal=61.6*2 "Nominal mass flow rate at fan"; parameter Real COPc_nominal=3 "Chiller COP"; parameter Modelica.SIunits.MassFlowRate mCHW_flow_nominal=15.2 "Nominal mass flow rate at chilled water"; parameter Modelica.SIunits.MassFlowRate mCW_flow_nominal=mCHW_flow_nominal/ COPc_nominal*(COPc_nominal + 1) "Nominal mass flow rate at condenser water"; parameter Real QRoo=100; Buildings.Examples.ChillerPlant.BaseClasses.Controls.TrimAndRespond triAndRes( yEqu0=0.1, uTri=0.8, yDec=-0.03, yInc=0.03, samplePeriod=120); Buildings.Examples.ChillerPlant.BaseClasses.Controls.LinearPiecewiseTwo linPieTwo( x0=0, x2=1, y20=273.15 + 12.78, y21=273.15 + 7.22, x1=0.5, y10=0.1, y11=1); Buildings.Fluid.Chillers.ElectricEIR chi( dp1_nominal=6000, redeclare package Medium1 = Medium1, redeclare package Medium2 = Medium2, m1_flow_nominal=mCW_flow_nominal, m2_flow_nominal=mCHW_flow_nominal, dp2_nominal=3000, per=Buildings.Fluid.Chillers.Data.ElectricEIR.ElectricEIRChiller_York_YK_1881kW_6_53COP_Vanes(), m1_flow(fixed=true, start=mCW_flow_nominal), m2_flow(fixed=true, start=mCHW_flow_nominal), energyDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial, massDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial); Buildings.Fluid.HeatExchangers.ConstantEffectiveness coi( redeclare package Medium1 = Medium2, m1_flow_nominal=mCHW_flow_nominal, dp1_nominal=3000, dp2_nominal=3000, redeclare package Medium2 = MediumAir, m2_flow_nominal=mAir_flow_nominal, eps=1.0); Buildings.Fluid.Sources.FixedBoundary sin1(redeclare package Medium = Medium1, nPorts=1); Buildings.Fluid.Sources.MassFlowSource_T sou1( redeclare package Medium = Medium1, nPorts=1, use_T_in=false, m_flow=mCW_flow_nominal, T=283.15); inner Modelica.Fluid.System system; Modelica.Blocks.Sources.Constant const(k=273.15 + 20); Buildings.Controls.Continuous.LimPID limPID( reverseAction=true, y_start=1, yMin=0, k=10, Ti=0.01, Td=10); Buildings.Fluid.Sensors.TemperatureTwoPort TRet(redeclare package Medium = MediumAir, m_flow_nominal=999); Buildings.Fluid.Movers.FlowMachine_m_flow pum( m_flow_nominal=1.2*mCHW_flow_nominal, dp(start=40474), redeclare package Medium = Medium2, init=Modelica.Blocks.Types.Init.NoInit) "Chilled water pump"; Buildings.Fluid.Storage.ExpansionVessel expVesChi( V_start=1, redeclare package Medium = Medium2); Modelica.Blocks.Sources.BooleanConstant booleanConstant1(k=true); Modelica.Blocks.Math.Gain gain(k=mCHW_flow_nominal); Buildings.Fluid.Sources.MassFlowSource_T sou2( use_T_in=true, redeclare package Medium = MediumAir, m_flow=mAir_flow_nominal, T=291.15, nPorts=1); Buildings.Fluid.Sources.FixedBoundary sin2(redeclare package Medium = MediumAir, nPorts=1); Modelica.Blocks.Sources.Sine sine( amplitude=5, offset=273.15 + 25, freqHz=1/20000); Modelica.Blocks.Continuous.FirstOrder firstOrder1(y_start=273.15 + 10, T=chi.tau1 /2); Buildings.Fluid.Sensors.TemperatureTwoPort TSup(redeclare package Medium = MediumAir, m_flow_nominal=999); equation connect(sou1.ports[1], chi.port_a1); connect(coi.port_a1, chi.port_b2); connect(TRet.T, limPID.u_m); connect(chi.port_a2, pum.port_b); connect(pum.port_a, coi.port_b1); connect(chi.port_a2, expVesChi.port_a); connect(booleanConstant1.y, chi.on); connect(gain.y, pum.m_flow_in); connect(sou2.T_in, sine.y); connect(chi.port_b1, sin1.ports[1]); connect(const.y, limPID.u_s); connect(TRet.port_b, coi.port_b2); connect(TRet.port_a, sin2.ports[1]); connect(linPieTwo.y[2], firstOrder1.u); connect(firstOrder1.y, chi.TSet); connect(coi.port_a2, TSup.port_a); connect(TSup.port_b, sou2.ports[1]); connect(linPieTwo.y[1], gain.u); connect(limPID.y, triAndRes.u); connect(triAndRes.y, linPieTwo.u); end ChillerSetPointControl;

Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.KMinusU Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.KMinusU

Test model for KMinusU

Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.KMinusU

Information

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica definition

model KMinusU "Test model for KMinusU" extends Modelica.Icons.Example; Modelica.Blocks.Sources.Sine pulse( freqHz=0.001, amplitude=0.5, offset=0.5, phase=-1.5707963267949); Buildings.Examples.ChillerPlant.BaseClasses.Controls.KMinusU kMinU(k=1); equation connect(pulse.y, kMinU.u); end KMinusU;

Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.LinearPiecewiseTwo Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.LinearPiecewiseTwo

Test model for LinearPiecewiseTwo

Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.LinearPiecewiseTwo

Information

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica definition

model LinearPiecewiseTwo "Test model for LinearPiecewiseTwo" extends Modelica.Icons.Example; Modelica.Blocks.Sources.Sine pulse( freqHz=0.001, amplitude=0.5, offset=0.5, phase=-1.5707963267949); Buildings.Examples.ChillerPlant.BaseClasses.Controls.LinearPiecewiseTwo linPieTwo( x0=0, x1=0.5, x2=1, y10=5, y11=15, y20=55, y21=42); equation connect(pulse.y, linPieTwo.u); end LinearPiecewiseTwo;

Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.RequestCounter Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.RequestCounter

Test model for RequestCounter

Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.RequestCounter

Information

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica definition

model RequestCounter "Test model for RequestCounter" extends Modelica.Icons.Example; Buildings.Examples.ChillerPlant.BaseClasses.Controls.RequestCounter reqCou( nAct=3, uTri=0.8); Modelica.Blocks.Sources.Constant act3(k=0.95); Modelica.Blocks.Sources.Pulse act1(period=10); Modelica.Blocks.Sources.Sine act2(freqHz=0.3, offset=1); equation connect(act1.y, reqCou.uAct[1]); connect(act2.y, reqCou.uAct[2]); connect(act3.y, reqCou.uAct[3]); end RequestCounter;

Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.TrimAndRespond Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.TrimAndRespond

Test model for TrimAndRespond

Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.TrimAndRespond

Information

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica definition

model TrimAndRespond "Test model for TrimAndRespond" extends Modelica.Icons.Example; Modelica.Blocks.Sources.Sine act3(freqHz=0.002, offset=0.2); Modelica.Blocks.Sources.Pulse act1(period=500); Modelica.Blocks.Sources.Sine act2(freqHz=0.001, offset=0.3); Buildings.Examples.ChillerPlant.BaseClasses.Controls.TrimAndRespond triAndRes[3]( each uTri=0.9, each yEqu0=0.1, each yDec=-0.01, each yInc=0.02, each samplePeriod=20); equation connect(act1.y, triAndRes[1].u); connect(act2.y, triAndRes[2].u); connect(act3.y, triAndRes[3].u); end TrimAndRespond;

Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.WSEControl Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.WSEControl

Test model for WSEControl

Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.WSEControl

Information

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica definition

model WSEControl "Test model for WSEControl" extends Modelica.Icons.Example; Modelica.Blocks.Sources.Pulse wseCHWST( period=300, amplitude=15, offset=273.15 + 5) "WSE chilled water supply temperature"; Modelica.Blocks.Sources.Constant wseCWST(k=273.15 + 10) "WSE condenser water supply temperature"; Buildings.Examples.ChillerPlant.BaseClasses.Controls.WSEControl wseCon "Controller for the water-side economizer"; Modelica.Blocks.Sources.Constant TWetBub(k=273.15 + 5) "Wet bulb temperature"; Modelica.Blocks.Sources.Constant TTowApp(k=5) "Cooling tower approach"; equation connect(TWetBub.y, wseCon.TWetBul); connect(TTowApp.y, wseCon.towTApp); connect(wseCHWST.y, wseCon.wseCHWST); connect(wseCWST.y, wseCon.wseCWST); end WSEControl;

Automatically generated Thu Jun 19 11:02:00 2014.