Buildings.DHC.Networks.Controls.Examples
District controller example models
Information
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Package Content
| Name | Description | 
|---|---|
|  AgentPump1PipeExample | |
|  MainPump1PipeExample | 
 Buildings.DHC.Networks.Controls.Examples.AgentPump1PipeExample
Buildings.DHC.Networks.Controls.Examples.AgentPump1PipeExample
 
Information
This model is used to test the controller Buildings.DHC.Networks.Controls.AgentPump. For a practical application of the model check Buildings.DHC.Examples.Combined.SeriesVariableFlowUpdate.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
| Type | Name | Default | Description | 
|---|---|---|---|
| Real | TSou | 283.15 | Agent source temperature [K] | 
Modelica definition
model AgentPump1PipeExample
  extends Modelica.Icons.Example;
  parameter Real TSou(
    displayUnit="degC",
    unit="K") = 283.15
    "Agent source temperature";
  Buildings.Controls.OBC.CDL.Reals.Sources.TimeTable TSouIn(
    table=[0,TSou; 900,TSou + 3; 2700, TSou - 3; 3600,TSou],
    extrapolation=Buildings.Controls.OBC.CDL.Types.Extrapolation.Periodic)
    "Source inlet temperature";
  Buildings.DHC.Networks.Controls.AgentPump1Pipe agePumCon(
    yPumMin=0,
    dToff=0.5,
    k=1,
    Ti=600) "Agent pump controller";
  Buildings.Controls.OBC.CDL.Reals.Sources.Constant  con2(k=TSou)
    "Average source temperature";
  Buildings.Controls.OBC.CDL.Reals.Sources.TimeTable TSouOut(
    table=[0,TSou; 900,TSou + 1; 2700, TSou - 1; 3600,TSou],
    extrapolation=Buildings.Controls.OBC.CDL.Types.Extrapolation.Periodic)
    "Supply temperature";
  Buildings.Controls.OBC.CDL.Reals.Sources.Constant TPlaSup(k=TSou)
    "Plant supply temperature";
  Buildings.Controls.OBC.CDL.Reals.Sources.TimeTable TDisRet(
    table=[0,TSou; 1800,TSou + 1; 1800,TSou - 1; 3600,TSou],
    smoothness=Buildings.Controls.OBC.CDL.Types.Smoothness.ConstantSegments,
    extrapolation=Buildings.Controls.OBC.CDL.Types.Extrapolation.Periodic)
    "District return temperature";
equation 
  connect(con2.y,agePumCon. TSou);
  connect(TSouOut.y[1],agePumCon. TSouOut);
  connect(TDisRet.y[1],agePumCon.TRetDis);
  connect(TSouIn.y[1], agePumCon.TSouIn);
  connect(TPlaSup.y, agePumCon.TSupDis);
end AgentPump1PipeExample;
 Buildings.DHC.Networks.Controls.Examples.MainPump1PipeExample
Buildings.DHC.Networks.Controls.Examples.MainPump1PipeExample
 
Information
This model is used to test the controller Buildings.DHC.Networks.Controls.MainPump1Pipe. For a practical application of the model check Buildings.DHC.Examples.Combined.SeriesVariableFlow.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
| Type | Name | Default | Description | 
|---|---|---|---|
| Real | TSou | 284.65 | Agent source temperature [K] | 
Modelica definition
model MainPump1PipeExample
  extends Modelica.Icons.Example;
  parameter Real TSou(
    displayUnit="degC",
    unit="K") = 284.65
    "Agent source temperature";
  Buildings.Controls.OBC.CDL.Reals.Sources.TimeTable TMixandTSouIn(
    table=[0,TSou; 900,TSou + 6.5; 2700,TSou - 6.5; 3600,TSou],
    extrapolation=Buildings.Controls.OBC.CDL.Types.Extrapolation.Periodic);
  Buildings.Controls.OBC.CDL.Reals.Sources.TimeTable TSouOut(
    table=[0,TSou; 900,TSou + 4; 2700,TSou - 4; 3600,TSou],
    extrapolation=Buildings.Controls.OBC.CDL.Types.Extrapolation.Periodic);
  Buildings.DHC.Networks.Controls.MainPump1Pipe conPum(
    nMix=1,
    nSou=1,
    nBui=1,
    TMax=289.15);
  Buildings.Controls.OBC.CDL.Reals.Sources.TimeTable QCoo_flow(
    table=[0,-500; 1800,-500; 1800,0; 3600,0],
    smoothness=Buildings.Controls.OBC.CDL.Types.Smoothness.ConstantSegments,
    extrapolation=Buildings.Controls.OBC.CDL.Types.Extrapolation.Periodic);
equation 
  connect(TSouOut.y, conPum.TSouOut);
  connect(TMixandTSouIn.y, conPum.TSouIn);
  connect(QCoo_flow.y, conPum.QCoo_flow);
  connect(TMixandTSouIn.y, conPum.TMix);
end MainPump1PipeExample;
