This package contains validation models.
model Controller
Buildings.Templates.Plants.Controls.MinimumFlow.Controller ctlFloMinPum(
have_valInlIso=false,
have_valOutIso=false,
V_flow_nominal={0.02, 0.05},
V_flow_min={0.01, 0.03},
nEna=2,
nEqu=2)
;
Buildings.Templates.Plants.Controls.MinimumFlow.Controller ctlFloMinVal(
have_valInlIso=true,
have_valOutIso=false,
V_flow_nominal={0.02, 0.05},
V_flow_min={0.01, 0.03},
nEna=2,
nEqu=2)
;
Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable u1EquValPum(
table=[
0, 0, 0;
1, 1, 0;
2, 1, 1;
3, 0, 1;
4, 0, 0],
timeScale=200,
period=900)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Sin dVPri_flow(
amplitude=
sum(ctlFloMinVal.V_flow_min) / 2,
freqHz=3 / 1000)
;
Buildings.Controls.OBC.CDL.Reals.Add VPri_flow1
;
Buildings.Controls.OBC.CDL.Reals.Add VPri_flow
;
equation
connect(u1EquValPum.y[1:2], ctlFloMinVal.u1ValInlIso[1:2]);
connect(u1EquValPum.y[1:2], ctlFloMinPum.u1PumPri_actual[1:2]);
connect(u1EquValPum.y[1:2], ctlFloMinVal.u1Equ[1:2]);
connect(u1EquValPum.y[1:2], ctlFloMinPum.u1Equ[1:2]);
connect(dVPri_flow.y, VPri_flow1.u2);
connect(VPri_flow1.y, ctlFloMinPum.VPri_flow);
connect(ctlFloMinPum.VPriSet_flow, VPri_flow1.u1);
connect(ctlFloMinVal.VPriSet_flow, VPri_flow.u1);
connect(dVPri_flow.y, VPri_flow.u2);
connect(VPri_flow.y, ctlFloMinVal.VPri_flow);
end Controller;
model ControllerDualMode
Buildings.Templates.Plants.Controls.MinimumFlow.ControllerDualMode ctlFloMinPumCoo(
have_heaWat=false,
have_chiWat=true,
have_valInlIso=false,
have_valOutIso=false,
VChiWat_flow_nominal={0.02, 0.05},
VChiWat_flow_min={0.01, 0.03},
nEqu=2,
nEnaChiWat=2)
;
Buildings.Templates.Plants.Controls.MinimumFlow.ControllerDualMode ctlFloMinValCoo(
have_heaWat=false,
have_chiWat=true,
have_valInlIso=true,
have_valOutIso=false,
VChiWat_flow_nominal={0.02, 0.05},
VChiWat_flow_min={0.01, 0.03},
nEqu=2,
nEnaChiWat=2)
;
Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable u1EquValPum(
table=[
0, 0, 0;
1, 1, 0;
2, 1, 1;
3, 0, 1;
4, 0, 0],
timeScale=200,
period=900)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Sin dVPri_flow(
amplitude=
sum(ctlFloMinValCoo.VChiWat_flow_min) / 2,
freqHz=3 / 1000)
;
Buildings.Controls.OBC.CDL.Reals.Add VPriCoo_flow1
;
Buildings.Controls.OBC.CDL.Reals.Add VPriCoo_flow
;
Buildings.Templates.Plants.Controls.MinimumFlow.ControllerDualMode ctlFloMinPumHea(
have_heaWat=true,
have_chiWat=false,
have_valInlIso=false,
have_valOutIso=false,
VHeaWat_flow_nominal={0.02, 0.05},
VHeaWat_flow_min={0.01, 0.03},
nEqu=2,
nEnaChiWat=2,
nEnaHeaWat=2)
;
Buildings.Templates.Plants.Controls.MinimumFlow.ControllerDualMode ctlFloMinValHea(
have_heaWat=true,
have_chiWat=false,
have_valInlIso=true,
have_valOutIso=false,
VHeaWat_flow_nominal={0.02, 0.05},
VHeaWat_flow_min={0.01, 0.03},
nEqu=2,
nEnaChiWat=2,
nEnaHeaWat=2)
;
Buildings.Controls.OBC.CDL.Reals.Add VPriHea_flow1
;
Buildings.Controls.OBC.CDL.Reals.Add VPriHea_flow
;
Buildings.Templates.Plants.Controls.MinimumFlow.ControllerDualMode ctlFloMinPumHeaCoo(
have_heaWat=true,
have_chiWat=true,
have_pumChiWatPri=false,
have_valInlIso=false,
have_valOutIso=false,
VHeaWat_flow_nominal={0.02, 0.05},
VHeaWat_flow_min={0.01, 0.03},
VChiWat_flow_nominal={0.02, 0.05},
VChiWat_flow_min={0.01, 0.03},
nEqu=2,
nEnaChiWat=2,
nEnaHeaWat=2)
;
Buildings.Templates.Plants.Controls.MinimumFlow.ControllerDualMode ctlFloMinValHeaCoo(
have_heaWat=true,
have_chiWat=true,
have_pumChiWatPri=false,
have_valInlIso=true,
have_valOutIso=false,
VHeaWat_flow_nominal={0.02, 0.05},
VHeaWat_flow_min={0.01, 0.03},
VChiWat_flow_nominal={0.02, 0.05},
VChiWat_flow_min={0.01, 0.03},
nEqu=2,
nEnaChiWat=2,
nEnaHeaWat=2)
;
Buildings.Controls.OBC.CDL.Reals.Add VPriHeaCoo_flow1
;
Buildings.Controls.OBC.CDL.Reals.Add VPriHeaCoo_flow
;
Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable u1HeaEqu(
table=[
0, 0, 0;
1.5, 1, 0;
2.5, 0, 1],
timeScale=200,
period=900)
;
Buildings.Controls.OBC.CDL.Logical.And u1ValChiWat[2]
;
Buildings.Controls.OBC.CDL.Logical.And u1ValHeaWat[2]
;
Buildings.Controls.OBC.CDL.Logical.Not u1CooEqu[2]
;
equation
connect(u1EquValPum.y[1:2], ctlFloMinValCoo.u1Equ[1:2]);
connect(u1EquValPum.y[1:2], ctlFloMinPumCoo.u1Equ[1:2]);
connect(dVPri_flow.y, VPriCoo_flow1.u2);
connect(dVPri_flow.y, VPriCoo_flow.u2);
connect(ctlFloMinPumCoo.VChiWatPriSet_flow, VPriCoo_flow1.u1);
connect(ctlFloMinValCoo.VChiWatPriSet_flow, VPriCoo_flow.u1);
connect(VPriCoo_flow.y, ctlFloMinValCoo.VChiWatPri_flow);
connect(VPriCoo_flow1.y, ctlFloMinPumCoo.VChiWatPri_flow);
connect(u1EquValPum.y[1:2], ctlFloMinValCoo.u1ValChiWatInlIso[1:2]);
connect(u1EquValPum.y[1:2], ctlFloMinPumCoo.u1PumChiWatPri_actual[1:2]);
connect(u1EquValPum.y[1:2], ctlFloMinValHea.u1Equ[1:2]);
connect(u1EquValPum.y[1:2], ctlFloMinPumHea.u1Equ[1:2]);
connect(dVPri_flow.y, VPriHea_flow.u2);
connect(dVPri_flow.y, VPriHea_flow1.u2);
connect(ctlFloMinPumHea.VHeaWatPriSet_flow, VPriHea_flow1.u1);
connect(ctlFloMinValHea.VHeaWatPriSet_flow, VPriHea_flow.u1);
connect(VPriHea_flow1.y, ctlFloMinPumHea.VHeaWatPri_flow);
connect(VPriHea_flow.y, ctlFloMinValHea.VHeaWatPri_flow);
connect(u1EquValPum.y[1:2], ctlFloMinValHea.u1ValHeaWatInlIso[1:2]);
connect(u1EquValPum.y[1:2], ctlFloMinPumHea.u1PumHeaWatPri_actual[1:2]);
connect(u1EquValPum.y[1:2], ctlFloMinPumHeaCoo.u1Equ[1:2]);
connect(ctlFloMinPumHeaCoo.VHeaWatPriSet_flow, VPriHeaCoo_flow1.u1);
connect(ctlFloMinValHeaCoo.VHeaWatPriSet_flow, VPriHeaCoo_flow.u1);
connect(VPriHeaCoo_flow1.y, ctlFloMinPumHeaCoo.VHeaWatPri_flow);
connect(VPriHeaCoo_flow.y, ctlFloMinValHeaCoo.VHeaWatPri_flow);
connect(u1EquValPum.y[1:2], ctlFloMinValHeaCoo.u1Equ);
connect(u1EquValPum.y[1:2], ctlFloMinPumHeaCoo.u1PumHeaWatPri_actual[1:2]);
connect(dVPri_flow.y, VPriHeaCoo_flow.u2);
connect(dVPri_flow.y, VPriHeaCoo_flow1.u2);
connect(VPriHeaCoo_flow.y, ctlFloMinValHeaCoo.VChiWatPri_flow);
connect(VPriHeaCoo_flow1.y, ctlFloMinPumHeaCoo.VChiWatPri_flow);
connect(u1HeaEqu.y[1:2], ctlFloMinValHeaCoo.u1HeaEqu[1:2]);
connect(u1HeaEqu.y[1:2], ctlFloMinPumHeaCoo.u1HeaEqu[1:2]);
connect(u1EquValPum.y[1:2], u1ValChiWat[1:2].u1);
connect(u1EquValPum.y[1:2], u1ValHeaWat[1:2].u1);
connect(u1HeaEqu.y[1:2], u1ValHeaWat[1:2].u2);
connect(u1HeaEqu.y[1:2], u1CooEqu.u);
connect(u1CooEqu.y, u1ValChiWat.u2);
connect(u1ValChiWat.y, ctlFloMinValHeaCoo.u1ValChiWatInlIso);
connect(u1ValHeaWat.y, ctlFloMinValHeaCoo.u1ValHeaWatInlIso);
end ControllerDualMode;