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 |
BatteryControl
|
Test model for battery control |
ChillerSetPointControl
|
Test model for chiller setpoint control using TrimAndResponse and LinearPieceWiseTwo |
ChillerSwitch
|
Test model for ChillerSwitch |
KMinusU
|
Test model for KMinusU |
LinearPiecewiseTwo
|
Test model for LinearPiecewiseTwo |
RequestCounter
|
Test model for RequestCounter |
TrimAndRespond
|
Test model for TrimAndRespond |
WSEControl
|
Test model for WSEControl |
Test model for battery control
Information
This model simulates a battery block controller.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
Test model for chiller setpoint control using TrimAndResponse and LinearPieceWiseTwo
Information
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
MassFlowRate | mAir_flow_nominal | 61.6*2 | Nominal mass flow rate at fan [kg/s] |
Real | COPc_nominal | 3 | Chiller COP |
MassFlowRate | mCHW_flow_nominal | 15.2 | Nominal mass flow rate at chilled water [kg/s] |
MassFlowRate | mCW_flow_nominal | mCHW_flow_nominal/COPc_nomin... | Nominal mass flow rate at condenser water [kg/s] |
Real | QRoo | 100 | |
Modelica definition
model ChillerSetPointControl
extends Modelica.Icons.Example;
package Medium1 =
Buildings.Media.Water;
package Medium2 =
Buildings.Media.Water;
package MediumAir =
Buildings.Media.Air ;
parameter Modelica.SIunits.MassFlowRate mAir_flow_nominal=61.6*2
;
parameter Real COPc_nominal=3 ;
parameter Modelica.SIunits.MassFlowRate mCHW_flow_nominal=15.2
;
parameter Modelica.SIunits.MassFlowRate mCW_flow_nominal=mCHW_flow_nominal/
COPc_nominal*(COPc_nominal + 1)
;
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(
redeclare package Medium1 = Medium1,
redeclare package Medium2 = Medium2,
m1_flow_nominal=mCW_flow_nominal,
m2_flow_nominal=mCHW_flow_nominal,
dp1_nominal=6000,
dp2_nominal=3000,
per=
Buildings.Fluid.Chillers.Data.ElectricEIR.ElectricEIRChiller_York_YK_1881kW_6_53COP_Vanes(),
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) ;
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.Boundary_pT 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);
Modelica.Blocks.Sources.Constant const(k=273.15 + 20);
Buildings.Controls.Continuous.LimPID limPID(
reverseActing=false,
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.FlowControlled_m_flow pum(
m_flow_nominal=1.2*mCHW_flow_nominal,
dp(start=40474),
redeclare package Medium = Medium2,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
init=Modelica.Blocks.Types.Init.InitialState) ;
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.Boundary_pT 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,
initType=Modelica.Blocks.Types.Init.InitialState);
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(limPID.y, triAndRes.u);
connect(triAndRes.y, linPieTwo.u);
connect(gain.u, linPieTwo.y[1]);
end ChillerSetPointControl;
Test model for ChillerSwitch
Information
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
Test model for KMinusU
Information
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
Test model for LinearPiecewiseTwo
Information
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
model 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;
Test model for RequestCounter
Information
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
Test model for TrimAndRespond
Information
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
Test model for WSEControl
Information
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition