From 39457d348ea447bbeaa748c77605523cb1da3612 Mon Sep 17 00:00:00 2001
From: Michael Wetter
+Example of one building with one thermal zone
+in which the room air temperature is controlled with a PI controller.
+Heating is provided through a radiator.
+The control output is used to regulate the water flow rate through the radiator.
+The setpoint for the room air temperature changes between day and night.
+
+The zone also has a constant air infiltration flow rate.
+
+Note that for simplicity, the model has no cooling system. Therefore, in summer, the house overheats.
+Also note that the surface temperature of the radiator is not taken into account when computing
+the radiative temperature of the thermal zone.
+adapter
, of EnergyPlus.
revisions="
+Added pre()
operator for inlet mass flow rate and for convective heat gain
+to avoid an algebraic loop on discrete variables.
+This is for
+Buildings, #3659.
+
Refactor synchronization of constructors.
This is for #2360.
diff --git a/Buildings/ThermalZones/EnergyPlus_9_6_0/Examples/SingleFamilyHouse/Radiator.mo b/Buildings/ThermalZones/EnergyPlus_9_6_0/Examples/SingleFamilyHouse/Radiator.mo
new file mode 100644
index 00000000000..b1f12af55e2
--- /dev/null
+++ b/Buildings/ThermalZones/EnergyPlus_9_6_0/Examples/SingleFamilyHouse/Radiator.mo
@@ -0,0 +1,229 @@
+within Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse;
+model Radiator
+ "Example model with an radiator that conditions a thermal zone in EnergyPlus"
+ extends Modelica.Icons.Example;
+ package MediumA=Buildings.Media.Air "Medium model for air";
+ package MediumW=Buildings.Media.Water "Medium model for water";
+
+ inner Building building(
+ idfName=Modelica.Utilities.Files.loadResource(
+ "modelica://Buildings/Resources/Data/ThermalZones/EnergyPlus_9_6_0/Examples/SingleFamilyHouse_TwoSpeed_ZoneAirBalance/SingleFamilyHouse_TwoSpeed_ZoneAirBalance.idf"),
+ weaName=Modelica.Utilities.Files.loadResource(
+ "modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"),
+ epwName=Modelica.Utilities.Files.loadResource(
+ "modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw"),
+ computeWetBulbTemperature=false)
+ "Building model"
+ annotation (Placement(transformation(extent={{-140,-20},{-120,0}})));
+ constant Modelica.Units.SI.Volume VRoo=453.138 "Room volume";
+ constant Modelica.Units.SI.Area AFlo=185.834
+ "Floor area of the whole floor of the building";
+ parameter Modelica.Units.SI.MassFlowRate mOut_flow_nominal=0.3*VRoo*1.2/3600
+ "Outdoor air mass flow rate, assuming constant infiltration air flow rate";
+ parameter Modelica.Units.SI.MassFlowRate mRec_flow_nominal=8*VRoo*1.2/3600
+ "Nominal mass flow rate for recirculated air";
+
+ parameter Modelica.Units.SI.HeatFlowRate QRad_flow_nominal = 15000
+ "Radiator design heat flow rate (at 50/40)";
+ parameter Modelica.Units.SI.Temperature TSup_nominal = 323.15
+ "Water supply temperature";
+ parameter Modelica.Units.SI.Temperature TRet_nominal = 313.15
+ "Water return temperature";
+ parameter Modelica.Units.SI.MassFlowRate mRad_flow_nominal = QRad_flow_nominal/4200/(TSup_nominal-TRet_nominal)
+ "Radiator design water flow rate";
+ parameter Modelica.Units.SI.PressureDifference dpVal_nominal=6000
+ "Pressure difference of valve";
+
+ Buildings.ThermalZones.EnergyPlus_9_6_0.ThermalZone zon(
+ redeclare package Medium=MediumA,
+ zoneName="LIVING ZONE",
+ nPorts=2)
+ "Thermal zone"
+ annotation (Placement(transformation(extent={{0,40},{40,80}})));
+ Controls.OBC.CDL.Reals.Sources.Pulse TSet(
+ shift(
+ displayUnit="h")=21600,
+ amplitude=6,
+ period(
+ displayUnit="d")=86400,
+ offset=273.15+16,
+ y(unit="K",
+ displayUnit="degC"))
+ "Setpoint for room air"
+ annotation (Placement(transformation(extent={{-140,-60},{-120,-40}})));
+ Controls.OBC.CDL.Reals.PID conPID(
+ controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI,
+ k=0.2,
+ Ti(displayUnit="min") = 600,
+ yMax=1,
+ yMin=0,
+ u_s(
+ unit="K",
+ displayUnit="degC"),
+ u_m(
+ unit="K",
+ displayUnit="degC"))
+ "Controller for heater"
+ annotation (Placement(transformation(extent={{-100,-60},{-80,-40}})));
+ Fluid.Sources.Boundary_pT pAtm(
+ redeclare package Medium=MediumA,
+ nPorts=1)
+ "Boundary condition"
+ annotation (Placement(transformation(extent={{-60,10},{-40,30}})));
+ Fluid.FixedResistances.PressureDrop duc(
+ redeclare package Medium=MediumA,
+ allowFlowReversal=false,
+ linearized=true,
+ from_dp=true,
+ dp_nominal=100,
+ m_flow_nominal=mOut_flow_nominal)
+ "Duct resistance (to decouple room and outside pressure)"
+ annotation (Placement(transformation(extent={{-10,10},{-30,30}})));
+ Fluid.Sources.MassFlowSource_WeatherData freshAir(
+ redeclare package Medium=MediumA,
+ m_flow=mOut_flow_nominal,
+ nPorts=1)
+ "Outside air supply"
+ annotation (Placement(transformation(extent={{-60,-20},{-40,0}})));
+
+ Modelica.Blocks.Sources.Constant qIntGai[3](each k=0)
+ "Internal heat gains, set to zero because these are modeled in EnergyPlus"
+ annotation (Placement(transformation(extent={{-60,60},{-40,80}})));
+ Fluid.HeatExchangers.Radiators.RadiatorEN442_2 rad(
+ redeclare package Medium = MediumW,
+ energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
+ Q_flow_nominal=QRad_flow_nominal,
+ T_a_nominal=TSup_nominal,
+ T_b_nominal=TRet_nominal) "Radiator"
+ annotation (Placement(transformation(extent={{60,-90},{80,-70}})));
+ Fluid.Sources.Boundary_pT sin(
+ redeclare package Medium = MediumW,
+ p=200000,
+ T=TRet_nominal,
+ nPorts=1) "Pressure source for sink"
+ annotation (Placement(transformation(extent={{120,-90},{100,-70}})));
+ Fluid.Sources.Boundary_pT sou(
+ redeclare package Medium = MediumW,
+ p(displayUnit="Pa") = 2E5 + dpVal_nominal + 1000,
+ use_T_in=true,
+ nPorts=1) "Pressure source for sink"
+ annotation (Placement(transformation(extent={{-20,-90},{0,-70}})));
+ Fluid.Actuators.Valves.TwoWayEqualPercentage val(
+ redeclare package Medium = MediumW,
+ m_flow_nominal=mRad_flow_nominal,
+ dpValve_nominal(displayUnit="Pa") = dpVal_nominal,
+ dpFixed_nominal=1000,
+ from_dp=true,
+ use_inputFilter=false) "Radiator valve"
+ annotation (Placement(transformation(extent={{20,-90},{40,-70}})));
+ Controls.OBC.Utilities.SetPoints.SupplyReturnTemperatureReset watRes(
+ TSup_nominal=TSup_nominal,
+ TRet_nominal=TRet_nominal,
+ TOut_nominal=253.15)
+ annotation (Placement(transformation(extent={{-60,-92},{-40,-72}})));
+ BoundaryConditions.WeatherData.Bus weaBus "Weather data bus" annotation (
+ Placement(transformation(extent={{-98,-20},{-78,0}}), iconTransformation(
+ extent={{-60,26},{-40,46}})));
+initial equation
+ // Stop simulation if the hard-coded values differ from the ones computed by EnergyPlus.
+ assert(
+ abs(
+ VRoo-zon.V) < 0.01,
+ "Zone volume VRoo differs from volume returned by EnergyPlus.");
+ assert(
+ abs(
+ AFlo-zon.AFlo) < 0.01,
+ "Zone floor area AFlo differs from area returned by EnergyPlus.");
+
+equation
+ connect(TSet.y,conPID.u_s)
+ annotation (Line(points={{-118,-50},{-102,-50}}, color={0,0,127}));
+ connect(conPID.u_m,zon.TAir)
+ annotation (Line(points={{-90,-62},{-90,-100},{128,-100},{128,78},{41,78}}, color={0,0,127}));
+ connect(duc.port_a,zon.ports[1])
+ annotation (Line(points={{-10,20},{19,20},{19,40.9}},
+ color={0,127,255}));
+ connect(freshAir.ports[1],zon.ports[2])
+ annotation (Line(points={{-40,-10},{21,-10},{21,40.9}},
+ color={0,127,255}));
+ connect(duc.port_b,pAtm.ports[1])
+ annotation (Line(points={{-30,20},{-40,20}},color={0,127,255}));
+ connect(zon.qGai_flow, qIntGai.y)
+ annotation (Line(points={{-2,70},{-39,70}}, color={0,0,127}));
+ connect(rad.heatPortCon, zon.heaPorAir) annotation (Line(points={{68,-72.8},{
+ 68,60},{20,60}}, color={191,0,0}));
+ connect(rad.heatPortRad, zon.heaPorRad) annotation (Line(points={{72,-72.8},{
+ 72,54},{20.2,54}}, color={191,0,0}));
+ connect(sou.ports[1], val.port_a)
+ annotation (Line(points={{0,-80},{20,-80}}, color={0,127,255}));
+ connect(val.port_b, rad.port_a)
+ annotation (Line(points={{40,-80},{60,-80}}, color={0,127,255}));
+ connect(conPID.y, val.y)
+ annotation (Line(points={{-78,-50},{30,-50},{30,-68}}, color={0,0,127}));
+ connect(sou.T_in, watRes.TSup)
+ annotation (Line(points={{-22,-76},{-38,-76}}, color={0,0,127}));
+ connect(building.weaBus, weaBus) annotation (Line(
+ points={{-120,-10},{-88,-10}},
+ color={255,204,51},
+ thickness=0.5));
+ connect(freshAir.weaBus, weaBus) annotation (Line(
+ points={{-60,-9.8},{-74,-9.8},{-74,-10},{-88,-10}},
+ color={255,204,51},
+ thickness=0.5), Text(
+ string="%second",
+ index=1,
+ extent={{-6,3},{-6,3}},
+ horizontalAlignment=TextAlignment.Right));
+ connect(weaBus.TDryBul, watRes.TOut) annotation (Line(
+ points={{-88,-10},{-90,-10},{-90,-28},{-150,-28},{-150,-76},{-62,-76}},
+ color={255,204,51},
+ thickness=0.5), Text(
+ string="%first",
+ index=-1,
+ extent={{-6,3},{-6,3}},
+ horizontalAlignment=TextAlignment.Right));
+
+ connect(watRes.TSetZon, TSet.y) annotation (Line(points={{-62,-88},{-110,-88},
+ {-110,-50},{-118,-50}}, color={0,0,127}));
+ connect(sin.ports[1], rad.port_b)
+ annotation (Line(points={{100,-80},{80,-80}}, color={0,127,255}));
+ annotation (
+ Documentation(
+ info="
+
+
+"),
+ __Dymola_Commands(
+ file="modelica://Buildings/Resources/Scripts/Dymola/ThermalZones/EnergyPlus_9_6_0/Examples/SingleFamilyHouse/Radiator.mos" "Simulate and plot"),
+ experiment(
+ StopTime=259200,
+ Tolerance=1e-06),
+ Diagram(
+ coordinateSystem(
+ extent={{-160,-120},{140,100}})),
+ Icon(
+ coordinateSystem(
+ extent={{-100,-100},{100,100}})));
+end Radiator;
diff --git a/Buildings/ThermalZones/EnergyPlus_9_6_0/Examples/SingleFamilyHouse/package.order b/Buildings/ThermalZones/EnergyPlus_9_6_0/Examples/SingleFamilyHouse/package.order
index 7b03aea7897..f3f86389c55 100644
--- a/Buildings/ThermalZones/EnergyPlus_9_6_0/Examples/SingleFamilyHouse/package.order
+++ b/Buildings/ThermalZones/EnergyPlus_9_6_0/Examples/SingleFamilyHouse/package.order
@@ -4,5 +4,6 @@ HeatPumpRadiantHeatingGroundHeatTransfer
LightsControl
RadiantHeatingCooling_TRoom
RadiantHeatingCooling_TSurface
+Radiator
ShadeControl
Unconditioned
diff --git a/Buildings/ThermalZones/EnergyPlus_9_6_0/ThermalZone.mo b/Buildings/ThermalZones/EnergyPlus_9_6_0/ThermalZone.mo
index d4f0caea881..a00aac42663 100644
--- a/Buildings/ThermalZones/EnergyPlus_9_6_0/ThermalZone.mo
+++ b/Buildings/ThermalZones/EnergyPlus_9_6_0/ThermalZone.mo
@@ -1,7 +1,8 @@
within Buildings.ThermalZones.EnergyPlus_9_6_0;
model ThermalZone
"Model to connect to an EnergyPlus thermal zone"
- extends Buildings.ThermalZones.EnergyPlus_9_6_0.BaseClasses.PartialEnergyPlusObject;
+ extends
+ Buildings.ThermalZones.EnergyPlus_9_6_0.BaseClasses.PartialEnergyPlusObject;
parameter String zoneName
"Name of the thermal zone as specified in the EnergyPlus input";
parameter Integer nPorts=0
@@ -55,9 +56,15 @@ model ThermalZone
Modelica.Blocks.Interfaces.RealInput[Medium.nC] C_flow if use_C_flow
"Trace substance mass flow rate added to the medium"
annotation (Placement(transformation(extent={{-240,-140},{-200,-100}}),iconTransformation(extent={{-240,-120},{-200,-80}})));
+
Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heaPorAir
"Heat port to air volume"
annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
+ Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heaPorRad
+ "Heat port to radiative temperature and radiative energy balance"
+ annotation (Placement(transformation(extent={{-10,-50},{10,-30}}),
+ iconTransformation(extent={{-10,-70},{10,-50}})));
+
Modelica.Fluid.Vessels.BaseClasses.VesselFluidPorts_b ports[nPorts](
redeclare each package Medium=Medium)
"Fluid inlets and outlets"
@@ -96,7 +103,7 @@ protected
final fmuName=fmuName,
final logLevel=logLevel)
"FMU zone adapter"
- annotation (Placement(transformation(extent={{82,-60},{102,-40}})));
+ annotation (Placement(transformation(extent={{80,-60},{100,-40}})));
Buildings.Fluid.Interfaces.ConservationEquation vol(
redeclare final package Medium=Medium,
final energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
@@ -112,7 +119,7 @@ protected
final fluidVolume=V,
final nPorts=nPorts)
"Air volume of the thermal zone"
- annotation (Placement(transformation(extent={{-10,-52},{10,-32}})));
+ annotation (Placement(transformation(extent={{-10,-80},{10,-60}})));
Buildings.ThermalZones.Detailed.BaseClasses.HeatGain heaGai(
final AFlo=AFlo)
"Model to convert internal heat gains"
@@ -123,7 +130,7 @@ protected
u(final unit="W"),
y(final unit="kg/s"))
"Water flow rate due to latent heat gain"
- annotation (Placement(transformation(extent={{-82,-64},{-62,-44}})));
+ annotation (Placement(transformation(extent={{-80,-50},{-60,-30}})));
Modelica.Blocks.Math.Add QLat_flow(final k1=1, final k2=1)
"Total latent heat gains of the zone"
annotation (Placement(transformation(extent={{-120,20},{-100,40}})));
@@ -131,7 +138,7 @@ protected
final k1=1,
final k2=1)
"Sensible and latent heat gains of the zone"
- annotation (Placement(transformation(extent={{-80,30},{-60,50}})));
+ annotation (Placement(transformation(extent={{-80,20},{-60,40}})));
Modelica.Blocks.Math.Add QConSen_flow(
final k1=1,
final k2=1)
@@ -139,7 +146,7 @@ protected
annotation (Placement(transformation(extent={{-120,52},{-100,72}})));
Buildings.HeatTransfer.Sources.PrescribedHeatFlow conQCon_flow
"Converter for convective heat flow rate"
- annotation (Placement(transformation(extent={{-40,30},{-20,50}})));
+ annotation (Placement(transformation(extent={{-40,20},{-20,40}})));
final parameter String substanceName="CO2"
"Name of trace substance";
final parameter Modelica.Units.SI.MolarMass MM=Modelica.Media.IdealGases.Common.SingleGasesData.CO2.MM
@@ -167,7 +174,7 @@ protected
redeclare each final package Medium=Medium,
each final allowFlowReversal=true)
"Mass flow rate sensor"
- annotation (Placement(transformation(extent={{-10,10},{10,-10}},rotation=90,origin={0,-100})));
+ annotation (Placement(transformation(extent={{-10,10},{10,-10}},rotation=90,origin={0,-110})));
Modelica.Blocks.Sources.RealExpression TAirIn[nPorts](
y=Medium.temperature(
state=Medium.setState_phX(
@@ -178,28 +185,42 @@ protected
annotation (Placement(transformation(extent={{40,-80},{60,-60}})));
Modelica.Thermal.HeatTransfer.Sensors.HeatFlowSensor heaFloSen
"Heat flow sensor"
- annotation (Placement(transformation(extent={{-20,-20},{-40,0}})));
+ annotation (Placement(transformation(extent={{-20,-10},{-40,10}})));
Buildings.HeatTransfer.Sources.PrescribedTemperature preTem
"Port temperature"
- annotation (Placement(transformation(extent={{-80,-20},{-60,0}})));
+ annotation (Placement(transformation(extent={{-80,-10},{-60,10}})));
Modelica.Blocks.Sources.RealExpression TFlu(
y=Medium.temperature_phX(
p=vol.medium.p,
h=vol.hOut,
X=cat(1,vol.XiOut,{1-sum(vol.XiOut)})))
"Air temperature of control volume"
- annotation (Placement(transformation(extent={{20,-10},{40,10}})));
+ annotation (Placement(transformation(extent={{40,-10},{60,10}})));
Modelica.Blocks.Sources.RealExpression pFlu(
y=vol.medium.p)
"Air pressure"
annotation (Placement(transformation(extent={{122,2},{142,22}})));
Utilities.Psychrometrics.Phi_pTX relHum
"Relative humidity"
- annotation (Placement(transformation(extent={{156,12},{176,32}})));
+ annotation (Placement(transformation(extent={{160,12},{180,32}})));
Controls.OBC.CDL.Reals.Divide X_w
"Water vapor mass fraction per kg total air"
annotation (Placement(transformation(extent={{40,-32},{60,-12}})));
+ HeatTransfer.Sources.PrescribedTemperature preRadTem
+ "Prescribed radiative temperature"
+ annotation (Placement(transformation(extent={{-40,50},{-20,70}})));
+ Modelica.Thermal.HeatTransfer.Sensors.HeatFlowSensor radHeaFloSen
+ "Radiative heat flow sensor"
+ annotation (Placement(transformation(extent={{10,50},{-10,70}})));
+ Modelica.Blocks.Math.Add QRad_flow(
+ final k1=1,
+ final k2=1,
+ u1(final unit="W"),
+ u2(final unit="W"),
+ y(final unit="W"))
+ "Total radiant heat gains of the zone"
+ annotation (Placement(transformation(extent={{40,100},{60,120}})));
initial equation
assert(
idfName <> "",
@@ -213,73 +234,87 @@ equation
connect(heaGai.qGai_flow,qGai_flow)
annotation (Line(points={{-182,100},{-220,100}},color={0,0,127}));
connect(fmuZon.TRad,TRad)
- annotation (Line(points={{103,-44},{180,-44},{180,-40},{210,-40}},color={0,0,127}));
- connect(heaGai.QRad_flow,fmuZon.QGaiRad_flow)
- annotation (Line(points={{-158,106},{74,106},{74,-58},{80,-58}},color={0,0,127}));
+ annotation (Line(points={{101,-44},{180,-44},{180,-40},{210,-40}},color={0,0,127}));
connect(QGaiSenLat_flow.u1,QConSen_flow.y)
- annotation (Line(points={{-82,46},{-90,46},{-90,62},{-99,62}},color={0,0,127}));
- connect(QGaiSenLat_flow.u2, QLat_flow.y) annotation (Line(points={{-82,34},{-90,
- 34},{-90,30},{-99,30}}, color={0,0,127}));
+ annotation (Line(points={{-82,36},{-90,36},{-90,62},{-99,62}},color={0,0,127}));
+ connect(QGaiSenLat_flow.u2, QLat_flow.y) annotation (Line(points={{-82,24},{-90,
+ 24},{-90,30},{-99,30}}, color={0,0,127}));
connect(QGaiSenLat_flow.y,conQCon_flow.Q_flow)
- annotation (Line(points={{-59,40},{-40,40}},color={0,0,127}));
+ annotation (Line(points={{-59,30},{-40,30}},color={0,0,127}));
connect(conQCon_flow.port,heaPorAir)
- annotation (Line(points={{-20,40},{0,40},{0,0}},color={191,0,0}));
+ annotation (Line(points={{-20,30},{0,30},{0,0}},color={191,0,0}));
connect(QLat_flow.y, mWat_flow.u) annotation (Line(points={{-99,30},{-96,30},{
- -96,-54},{-84,-54}}, color={0,0,127}));
+ -96,-40},{-82,-40}}, color={0,0,127}));
connect(mWat_flow.y,vol.mWat_flow)
- annotation (Line(points={{-61,-54},{-36,-54},{-36,-40},{-12,-40}},color={0,0,127}));
+ annotation (Line(points={{-59,-40},{-36,-40},{-36,-68},{-12,-68}},color={0,0,127}));
connect(CTot_flow.y,vol.C_flow)
- annotation (Line(points={{-59,-90},{-26,-90},{-26,-46},{-12,-46}},color={0,0,127}));
+ annotation (Line(points={{-59,-90},{-26,-90},{-26,-74},{-12,-74}},color={0,0,127}));
connect(C_flow,CTot_flow.u1)
annotation (Line(points={{-220,-120},{-142,-120},{-142,-84},{-82,-84}},color={0,0,127}));
for i in 1:nPorts loop
connect(ports[i],senMasFlo[i].port_a)
- annotation (Line(points={{0,-150},{0,-110}},color={0,127,255}));
+ annotation (Line(points={{0,-150},{0,-120}},color={0,127,255}));
connect(fmuZon.m_flow[i],senMasFlo[i].m_flow)
- annotation (Line(points={{80,-50},{30,-50},{30,-100},{11,-100}},color={0,0,127}));
+ annotation (Line(points={{78,-50},{30,-50},{30,-110},{11,-110}},color={0,0,127}));
connect(senMasFlo[i].port_b,vol.ports[i])
- annotation (Line(points={{5.55112e-16,-90},{0,-90},{0,-52}},color={0,127,255}));
+ annotation (Line(points={{0,-100},{0,-80}}, color={0,127,255}));
end for;
connect(fmuZon.TInlet,TAirIn.y)
- annotation (Line(points={{80,-54},{64,-54},{64,-70},{61,-70}},color={0,0,127}));
+ annotation (Line(points={{78,-54},{64,-54},{64,-70},{61,-70}},color={0,0,127}));
connect(TFlu.y,preTem.T)
- annotation (Line(points={{41,0},{50,0},{50,18},{-90,18},{-90,-10},{-82,-10}},color={0,0,127}));
+ annotation (Line(points={{61,0},{70,0},{70,16},{-90,16},{-90,0},{-82,0}}, color={0,0,127}));
connect(heaFloSen.port_b,preTem.port)
- annotation (Line(points={{-40,-10},{-60,-10}},color={191,0,0}));
+ annotation (Line(points={{-40,0},{-60,0}}, color={191,0,0}));
connect(heaFloSen.port_a,heaPorAir)
- annotation (Line(points={{-20,-10},{-10,-10},{-10,0},{0,0}},color={191,0,0}));
+ annotation (Line(points={{-20,0},{0,0}}, color={191,0,0}));
connect(TFlu.y,fmuZon.T)
- annotation (Line(points={{41,0},{70,0},{70,-42},{80,-42}},color={0,0,127}));
+ annotation (Line(points={{61,0},{70,0},{70,-42},{78,-42}},color={0,0,127}));
connect(TFlu.y,TAir)
- annotation (Line(points={{41,0},{210,0}},color={0,0,127}));
+ annotation (Line(points={{61,0},{210,0}},color={0,0,127}));
connect(heaFloSen.Q_flow,vol.Q_flow)
- annotation (Line(points={{-30,-21},{-30,-36},{-12,-36}},color={0,0,127}));
+ annotation (Line(points={{-30,-11},{-30,-64},{-12,-64}},color={0,0,127}));
connect(vol.XiOut[1],fmuZon.X_w)
- annotation (Line(points={{0,-31},{0,-24},{30,-24},{30,-46},{80,-46}},color={0,0,127}));
+ annotation (Line(points={{0,-59},{0,-46},{78,-46}}, color={0,0,127}));
connect(X_w.y,relHum.X_w)
- annotation (Line(points={{62,-22},{64,-22},{64,22},{155,22}},color={0,0,127}));
+ annotation (Line(points={{62,-22},{64,-22},{64,22},{159,22}},color={0,0,127}));
connect(vol.mXiOut[1],X_w.u1)
- annotation (Line(points={{11,-44},{20,-44},{20,-16},{38,-16}},color={0,0,127}));
+ annotation (Line(points={{11,-72},{20,-72},{20,-16},{38,-16}},color={0,0,127}));
connect(vol.mOut,X_w.u2)
- annotation (Line(points={{11,-36},{24,-36},{24,-28},{38,-28}},color={0,0,127}));
+ annotation (Line(points={{11,-64},{24,-64},{24,-28},{38,-28}},color={0,0,127}));
connect(TFlu.y,relHum.T)
- annotation (Line(points={{41,0},{120,0},{120,30},{155,30}},color={0,0,127}));
+ annotation (Line(points={{61,0},{120,0},{120,30},{159,30}},color={0,0,127}));
connect(pFlu.y,relHum.p)
- annotation (Line(points={{143,12},{150,12},{150,14},{155,14}},color={0,0,127}));
+ annotation (Line(points={{143,12},{150,12},{150,14},{159,14}},color={0,0,127}));
connect(relHum.phi,phi)
- annotation (Line(points={{177,22},{192,22},{192,-120},{210,-120}},color={0,0,127}));
+ annotation (Line(points={{181,22},{192,22},{192,-120},{210,-120}},color={0,0,127}));
connect(QPeaRep.y,CTot_flow.u2)
annotation (Line(points={{-99,-110},{-90,-110},{-90,-96},{-82,-96}},color={0,0,127}));
connect(QPeaRep.u,fmuZon.QPeo_flow)
- annotation (Line(points={{-122,-110},{-132,-110},{-132,-130},{110,-130},{110,-56},{103,-56}},color={0,0,127}));
+ annotation (Line(points={{-122,-110},{-132,-110},{-132,-130},{110,-130},{110,
+ -56},{101,-56}}, color={0,0,127}));
connect(QConSen_flow.u2,heaGai.QCon_flow)
annotation (Line(points={{-122,56},{-134,56},{-134,100},{-158,100}},color={0,0,127}));
connect(fmuZon.QCon_flow,QConSen_flow.u1)
- annotation (Line(points={{103,-48},{110,-48},{110,80},{-130,80},{-130,68},{-122,68}},color={0,0,127}));
- connect(fmuZon.QLat_flow, QLat_flow.u1) annotation (Line(points={{103,-52},{114,
+ annotation (Line(points={{101,-48},{110,-48},{110,80},{-130,80},{-130,68},{-122,
+ 68}}, color={0,0,127}));
+ connect(fmuZon.QLat_flow, QLat_flow.u1) annotation (Line(points={{101,-52},{114,
-52},{114,84},{-140,84},{-140,36},{-122,36}}, color={0,0,127}));
connect(heaGai.QLat_flow, QLat_flow.u2) annotation (Line(points={{-158,94},{-144,
94},{-144,24},{-122,24}}, color={0,0,127}));
+ connect(radHeaFloSen.port_b, preRadTem.port)
+ annotation (Line(points={{-10,60},{-20,60}},
+ color={191,0,0}));
+ connect(radHeaFloSen.port_a, heaPorRad)
+ annotation (Line(points={{10,60},{10,-40},{0,-40}},
+ color={191,0,0}));
+ connect(fmuZon.TRad, preRadTem.T) annotation (Line(points={{101,-44},{106,-44},
+ {106,76},{-52,76},{-52,60},{-42,60}}, color={0,0,127}));
+ connect(fmuZon.QGaiRad_flow, QRad_flow.y) annotation (Line(points={{78,-58},{74,
+ -58},{74,110},{61,110}}, color={0,0,127}));
+ connect(QRad_flow.u1, heaGai.QRad_flow) annotation (Line(points={{38,116},{-140,
+ 116},{-140,106},{-158,106}}, color={0,0,127}));
+ connect(QRad_flow.u2, radHeaFloSen.Q_flow) annotation (Line(points={{38,104},
+ {26,104},{26,40},{0,40},{0,49}}, color={0,0,127}));
annotation (
defaultComponentName="zon",
Icon(
@@ -358,7 +393,13 @@ equation
fillColor={61,61,61},
fillPattern=FillPattern.Solid,
extent={{132,114},{182,86}},
- textString="phi")}),
+ textString="phi"),
+ Text(
+ fillColor={61,61,61},
+ fillPattern=FillPattern.Solid,
+ extent={{-56,-48},{-20,-68}},
+ textString="rad",
+ textColor={0,0,0})}),
Diagram(
coordinateSystem(
preserveAspectRatio=false,
@@ -405,6 +446,23 @@ The zone uses a volume of air that is fully mixed. The size of this volume,
and its floor area, which is used to scale the heat gains
+First implementation.
+This is for
+Buildings, #3659.
+q_flow
,
are obtained from the EnergyPlus model.
+The zone has a fluid port fluPor
that can be used to connect one or several
+HVAC inlets, flow paths for air infiltration and exfiltration,
+or for interzonal air exchange, using for example models from
+Buildings.Airflow.Multizone.
+
+The model also has a heat port heaPorAir
that connects to the sensible heat balance of the room air,
+and a heat port heaPorRad
that connects to the radiative heat balance of the room inside surfaces.
+If heat is added to heaPorRad.Q_flow
, then this heat is sent to EnergyPlus as if it were
+a radiant heat gain of the zone.
+The heat port temperature heaPorRad.T
is the radiant temperature
+of the room. Hence, these two ports heatPorAir
and heaPorRad
could
+be used to connect a radiator. Note, however, that such a coupling is an approximation
+as the surface temperature of the radiator will not be reflected in the radiative temperature
+of the room.
+
@@ -449,6 +507,12 @@ by people.) revisions="
heaPorRad
.final massDynamics=energyDynamics
.This function returns the value on a cubic hermite spline through the given support points and provided spline derivatives at these points with monotonically increasing values. -The last 2 points in the table are linearly interpolated. +Outside the provided support points, the function returns a linear extrapolation with +the same slope as the cubic spline has at the respective support point.
A similar model is also used in the CONTAM software (Dols and Walton, 2015). @@ -67,6 +60,12 @@ National Institute of Standards and Technology, NIST TN 1887, Sep. 2015. doi: ", revisions="
SwiFlo
valve pressure drop reduced to zero.
+loaSHW
to QReqHotWat_flow
.
This block implements a control logic preventing flow reversal in the @@ -68,6 +77,10 @@ Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.Validation ", revisions="
conVio
.
DHC
package.DHC
package.+This model is an updated version of + +Buildings.Experimental.DHC.Examples.Combined.SeriesVariableFlow. +In particular the following have been updated: +
++Ettore Zanetti, David Blum, Michael Wetter (2023) +Control development and sizing analysis for a 5th generation district heating and cooling network using Modelica, +In Proceedings of the 15th International Modelica Conference. Aachen, Germany, Oct 9-11, 2023. +
+ +"), + Icon(coordinateSystem(extent={{-100,-100},{100,100}}))); +end SeriesVariableFlowAgentControl; diff --git a/Buildings/Experimental/DHC/Examples/Combined/package.order b/Buildings/Experimental/DHC/Examples/Combined/package.order index ec186e0f337..d30c0e7f869 100644 --- a/Buildings/Experimental/DHC/Examples/Combined/package.order +++ b/Buildings/Experimental/DHC/Examples/Combined/package.order @@ -1,3 +1,4 @@ SeriesConstantFlow SeriesVariableFlow +SeriesVariableFlowAgentControl BaseClasses diff --git a/Buildings/Experimental/DHC/Examples/Cooling/ElectricChillersDirectETS.mo b/Buildings/Experimental/DHC/Examples/Cooling/ElectricChillersDirectETS.mo index ad94b35d374..0fe93800d6e 100644 --- a/Buildings/Experimental/DHC/Examples/Cooling/ElectricChillersDirectETS.mo +++ b/Buildings/Experimental/DHC/Examples/Cooling/ElectricChillersDirectETS.mo @@ -101,7 +101,8 @@ model ElectricChillersDirectETS "Example model for district cooling system with mDis_flow_nominal=sum(dis.mCon_flow_nominal), mCon_flow_nominal=mBui_flow_nominal, mEnd_flow_nominal=mBui_flow_nominal[nLoa], - length=fill(30, nLoa)) + lDis=fill(30, nLoa), + lEnd=30) "Distribution network for district cooling system" annotation (Placement(transformation(extent={{100,-20},{140,0}}))); Buildings.Experimental.DHC.Loads.Cooling.BuildingTimeSeriesWithETS buiETS[nLoa]( @@ -124,12 +125,14 @@ model ElectricChillersDirectETS "Example model for district cooling system with Modelica.Blocks.Math.Gain norQFlo(k=1/sum(QCoo_flow_nominal)) "Normalized Q_flow" annotation (Placement(transformation(extent={{-120,-10},{-100,10}}))); - HeatTransfer.Sources.FixedTemperature gnd(T=285.15) "Ground" - annotation (Placement(transformation(extent={{140,-60},{120,-40}}))); + HeatTransfer.Sources.FixedTemperature gnd[nLoa](each T=285.15) "Ground" + annotation (Placement(transformation(extent={{100,-60},{120,-40}}))); Controls.OBC.CDL.Logical.Timer tim(t=3600) annotation (Placement(transformation(extent={{-40,-10},{-20,10}}))); Controls.OBC.CDL.Logical.Not onPla "On signal for the plant" annotation (Placement(transformation(extent={{0,-18},{20,2}}))); + HeatTransfer.Sources.FixedTemperature gnd1[nLoa + 1](each T=285.15) "Ground" + annotation (Placement(transformation(extent={{166,-54},{146,-34}}))); protected parameter Modelica.Units.SI.SpecificHeatCapacity cp=Medium.specificHeatCapacityCp( Medium.setState_pTX( @@ -139,11 +142,11 @@ protected "Default specific heat capacity of medium"; equation connect(weaDat.weaBus, pla.weaBus) annotation (Line( - points={{20,70},{60,70},{60,-1.13333},{60.0333,-1.13333}}, + points={{20,70},{60,70},{60,0},{60,0}}, color={255,204,51}, thickness=0.5)); connect(TCHWSupSet.y, pla.TCHWSupSet) annotation (Line(points={{21,-50},{32, - -50},{32,-4.73333},{49.3333,-4.73333}}, color={0,0,127})); + -50},{32,-4.66667},{49.3333,-4.66667}}, color={0,0,127})); connect(pla.port_aSerCoo, dis.port_bDisRet) annotation (Line(points={{50, -11.3333},{36,-11.3333},{36,-60},{88,-60},{88,-16},{100,-16}},color={ 0,127,255})); @@ -168,15 +171,18 @@ equation color={0,0,127})); connect(norQFlo.y, offCoo.u) annotation (Line(points={{-99,0},{-82,0}}, color={0,0,127})); - connect(gnd.port, dis.heatPort) - annotation (Line(points={{120,-50},{107,-50},{107,-20}}, - color={191,0,0})); connect(offCoo.y, tim.u) annotation (Line(points={{-58,0},{-42,0}}, color={255,0,255})); connect(tim.passed, onPla.u) annotation (Line(points={{-18,-8},{-2,-8}}, color={255,0,255})); - connect(onPla.y, pla.on) annotation (Line(points={{22,-8},{26,-8},{26,-2.6},{ - 49.2667,-2.6}}, color={255,0,255})); + connect(onPla.y, pla.on) annotation (Line(points={{22,-8},{26,-8},{26, + -2.66667},{49.3333,-2.66667}}, + color={255,0,255})); + connect(gnd.port, dis.heatPortsRet) annotation (Line(points={{120,-50},{120, + -30},{112.6,-30},{112.6,-17.6}}, + color={191,0,0})); + connect(gnd1.port, dis.heatPortsDis) annotation (Line(points={{146,-44},{ + 127.8,-44},{127.8,-8.4}}, color={191,0,0})); annotation ( Diagram( coordinateSystem( diff --git a/Buildings/Experimental/DHC/Loads/BaseClasses/Validation/BenchmarkFlowDistribution2.mo b/Buildings/Experimental/DHC/Loads/BaseClasses/Validation/BenchmarkFlowDistribution2.mo index 2c3dc4c6837..598a72c7ded 100644 --- a/Buildings/Experimental/DHC/Loads/BaseClasses/Validation/BenchmarkFlowDistribution2.mo +++ b/Buildings/Experimental/DHC/Loads/BaseClasses/Validation/BenchmarkFlowDistribution2.mo @@ -86,15 +86,15 @@ model BenchmarkFlowDistribution2 nPorts=2) "Heating water supply" annotation (Placement(transformation(extent={{-10,-10},{10,10}},rotation=0,origin={-50,-80}))); - Buildings.Experimental.DHC.Networks.Distribution2Pipe dis( + Buildings.Experimental.DHC.Networks.Distribution2PipeAutoSize dis( redeclare final package Medium=Medium1, nCon=nLoa, allowFlowReversal=false, mDis_flow_nominal=m_flow_nominal, mCon_flow_nominal=mCon_flow_nominal, - dpDis_nominal=fill( - 1500, - nLoa)) + mEnd_flow_nominal=m_flow_nominal, + lDis=fill(6, nLoa), + lEnd=1) annotation (Placement(transformation(extent={{40,-90},{80,-70}}))); Fluid.Movers.FlowControlled_dp pum( redeclare package Medium=Medium1, @@ -147,11 +147,11 @@ equation connect(pum.port_b,dis.port_aDisSup) annotation (Line(points={{30,-80},{40,-80}},color={0,127,255})); connect(dis.port_bDisRet,supHeaWat.ports[1]) - annotation (Line(points={{40,-86},{32,-86},{32,-100},{-40,-100},{-40,-78}},color={0,127,255})); + annotation (Line(points={{40,-86},{32,-86},{32,-100},{-40,-100},{-40,-81}},color={0,127,255})); connect(vol.ports[1],pum.port_a) - annotation (Line(points={{-23,-80},{10,-80}},color={0,127,255})); + annotation (Line(points={{-22,-80},{10,-80}},color={0,127,255})); connect(supHeaWat.ports[2],vol.ports[2]) - annotation (Line(points={{-40,-82},{-40,-80},{-19,-80}},color={0,127,255})); + annotation (Line(points={{-40,-79},{-40,-80},{-20,-80}},color={0,127,255})); connect(THeaWatSup.y,supHeaWat.T_in) annotation (Line(points={{-78,-80},{-70,-80},{-70,-76},{-62,-76}},color={0,0,127})); connect(dpPum.y,pum.dp_in) diff --git a/Buildings/Experimental/DHC/Loads/BaseClasses/Validation/FlowDistributionPumpControl.mo b/Buildings/Experimental/DHC/Loads/BaseClasses/Validation/FlowDistributionPumpControl.mo index 68ca93c79fc..0a223998f49 100644 --- a/Buildings/Experimental/DHC/Loads/BaseClasses/Validation/FlowDistributionPumpControl.mo +++ b/Buildings/Experimental/DHC/Loads/BaseClasses/Validation/FlowDistributionPumpControl.mo @@ -31,13 +31,6 @@ model FlowDistributionPumpControl parameter Modelica.Units.SI.Time tau=120 "Time constant of fluid temperature variation at nominal flow rate" annotation (Dialog(tab="Dynamics", group="Nominal condition")); - parameter Modelica.Units.SI.PressureDifference dpDis_nominal[nLoa]( - each min=0, - each displayUnit="Pa") = 1/2 .* cat( - 1, - {dp_nominal*0.2}, - fill(dp_nominal*0.8/(nLoa - 1), nLoa - 1)) - "Pressure drop between each connected unit at nominal conditions (supply line)"; parameter Modelica.Units.SI.PressureDifference dpSet=max(terUniHea.dpSou_nominal) "Pressure difference set point"; final parameter Modelica.Units.SI.MassFlowRate mCon_flow_nominal[nLoa]= @@ -90,14 +83,16 @@ model FlowDistributionPumpControl nout=nLoa) "Repeat input to output an array" annotation (Placement(transformation(extent={{-128,20},{-108,40}}))); - Buildings.Experimental.DHC.Networks.Distribution2Pipe dis( + Buildings.Experimental.DHC.Networks.Distribution2PipeAutoSize dis( redeclare final package Medium=Medium1, final nCon=nLoa, final allowFlowReversal=false, final iConDpSen=nLoa, final mDis_flow_nominal=m_flow_nominal, final mCon_flow_nominal=mCon_flow_nominal, - final dpDis_nominal=dpDis_nominal) + mEnd_flow_nominal=m_flow_nominal, + lDis=fill(25, nLoa), + lEnd=1) "Distribution network" annotation (Placement(transformation(extent={{40,-180},{80,-160}}))); Buildings.Fluid.Movers.Preconfigured.FlowControlled_dp pumCstDp( @@ -128,7 +123,6 @@ model FlowDistributionPumpControl have_pum=true, typCtr=Buildings.Experimental.DHC.Loads.BaseClasses.Types.PumpControlType.ConstantDp, dp_nominal=dp_nominal, - dpDis_nominal=dpDis_nominal, dpMin=dpSet, mUni_flow_nominal=mCon_flow_nominal, nPorts_a1=nLoa, @@ -192,7 +186,6 @@ model FlowDistributionPumpControl have_pum=true, typCtr=Buildings.Experimental.DHC.Loads.BaseClasses.Types.PumpControlType.ConstantSpeed, dp_nominal=dp_nominal, - dpDis_nominal=dpDis_nominal, dpMin=dpSet, mUni_flow_nominal=mCon_flow_nominal, nPorts_a1=5, @@ -238,11 +231,13 @@ equation connect(pumCstDp.port_b,dis.port_aDisSup) annotation (Line(points={{10,-160},{20,-160},{20,-170},{40,-170}},color={0,127,255})); connect(vol.ports[1],pumCstDp.port_a) - annotation (Line(points={{-51,-160},{-10,-160}},color={0,127,255})); + annotation (Line(points={{-50,-160},{-10,-160}},color={0,127,255})); connect(disCstDp.port_b,sinHeaWat.ports[1]) - annotation (Line(points={{10,-60},{120,-60},{120,2.66667},{140,2.66667}},color={0,127,255})); + annotation (Line(points={{10,-60},{120,-60},{120,-1.33333},{140,-1.33333}}, + color={0,127,255})); connect(supHeaWat1.ports[1],disCstDp.port_a) - annotation (Line(points={{-120,2.66667},{-100,2.66667},{-100,-60},{-10,-60}},color={0,127,255})); + annotation (Line(points={{-120,-1.33333},{-100,-1.33333},{-100,-60},{-10,-60}}, + color={0,127,255})); connect(terUniHea1.port_bHeaWat,disCstDp.ports_a1) annotation (Line(points={{10,-20.3333},{20,-20.3333},{20,-54},{10,-54}},color={0,127,255})); connect(disCstDp.ports_b1,terUniHea1.port_aHeaWat) @@ -264,14 +259,15 @@ equation connect(one1.y,pumCstSpe.y) annotation (Line(points={{-158,200},{-70,200},{-70,192}},color={0,0,127})); connect(supHeaWat1.ports[3],disCstSpe.port_a) - annotation (Line(points={{-120,-2.66667},{-116,-2.66667},{-116,-2},{-100,-2},{-100,80},{-10,80}},color={0,127,255})); + annotation (Line(points={{-120,1.33333},{-116,1.33333},{-116,-2},{-100,-2},{ + -100,80},{-10,80}}, color={0,127,255})); connect(disCstSpe.port_b,sinHeaWat.ports[3]) - annotation (Line(points={{10,80},{120,80},{120,-2.66667},{140,-2.66667}},color={0,127,255})); + annotation (Line(points={{10,80},{120,80},{120,1.33333},{140,1.33333}}, color={0,127,255})); connect(disCstSpe.ports_b1[1:5],terUniHea2.port_aHeaWat) - annotation (Line(points={{-10,89.2},{-20,89.2},{-20,120},{-10,120},{-10, + annotation (Line(points={{-10,87.6},{-20,87.6},{-20,120},{-10,120},{-10, 119.667}}, color={0,127,255})); connect(terUniHea2.port_bHeaWat,disCstSpe.ports_a1[1:5]) - annotation (Line(points={{10,119.667},{20,119.667},{20,89.2},{10,89.2}},color={0,127,255})); + annotation (Line(points={{10,119.667},{20,119.667},{20,87.6},{10,87.6}},color={0,127,255})); connect(terUniHea2.mReqHeaWat_flow,disCstSpe.mReq_flow) annotation (Line(points={{10.8333,124.667},{26,124.667},{26,60},{-20,60},{ -20,76},{-11,76}}, color={0,0,127})); @@ -286,9 +282,10 @@ equation connect(THeaWatSup.y,supHeaWat1.T_in) annotation (Line(points={{-158,0},{-152,0},{-152,4},{-142,4}},color={0,0,127})); connect(dis.port_bDisRet,supHeaWat.ports[1]) - annotation (Line(points={{40,-176},{20,-176},{20,-200},{-120,-200},{-120,-178}},color={0,127,255})); + annotation (Line(points={{40,-176},{20,-176},{20,-200},{-120,-200},{-120,-181}},color={0,127,255})); connect(supHeaWat.ports[2],vol.ports[2]) - annotation (Line(points={{-120,-182},{-120,-174},{-80,-174},{-80,-160},{-47,-160}},color={0,127,255})); + annotation (Line(points={{-120,-179},{-120,-174},{-80,-174},{-80,-160},{-48, + -160}}, color={0,127,255})); connect(THeaWatSup.y,supHeaWat.T_in) annotation (Line(points={{-158,0},{-152,0},{-152,-176},{-142,-176}},color={0,0,127})); connect(minTSet.y,reaRep.u) diff --git a/Buildings/Experimental/DHC/Loads/Combined/BuildingTimeSeriesWithETS.mo b/Buildings/Experimental/DHC/Loads/Combined/BuildingTimeSeriesWithETS.mo index 2130db00757..43a2d93645f 100644 --- a/Buildings/Experimental/DHC/Loads/Combined/BuildingTimeSeriesWithETS.mo +++ b/Buildings/Experimental/DHC/Loads/Combined/BuildingTimeSeriesWithETS.mo @@ -138,6 +138,12 @@ the building and ETS multiplier factorfacMul
.
", revisions="
PPumCoo
bui.facMulHea
and bui.facMulCoo
to be default.-This model represents the supply and return lines to connect an -agent (e.g., an energy transfer station) to a two-pipe main distribution -system. -The instances of the pipe model are autosized based on the pressure -drop per pipe length at nominal flow rate. -
-")); -end ConnectionParallelAutosize; diff --git a/Buildings/Experimental/DHC/Networks/Combined/BaseClasses/ConnectionParallelStandard.mo b/Buildings/Experimental/DHC/Networks/Combined/BaseClasses/ConnectionParallelStandard.mo deleted file mode 100644 index dfcdf7ccbf0..00000000000 --- a/Buildings/Experimental/DHC/Networks/Combined/BaseClasses/ConnectionParallelStandard.mo +++ /dev/null @@ -1,45 +0,0 @@ -within Buildings.Experimental.DHC.Networks.Combined.BaseClasses; -model ConnectionParallelStandard - "Model for connecting an agent to the DHC system" - extends Buildings.Experimental.DHC.Networks.BaseClasses.PartialConnection2Pipe( - tau=5*60, - redeclare replaceable model Model_pipDisSup = PipeStandard ( - roughness=7e-6, - fac=1.5, - final length=lDis, - final dh=dhDis), - redeclare replaceable model Model_pipDisRet = PipeStandard ( - roughness=7e-6, - fac=1.5, - final length=lDis, - final dh=dhDis), - redeclare replaceable model Model_pipCon = PipeStandard ( - roughness=2.5e-5, - fac=2, - final length=2*lCon, - final dh=dhCon)); - parameter Modelica.Units.SI.Length lDis - "Length of the distribution pipe before the connection"; - parameter Modelica.Units.SI.Length lCon - "Length of the connection pipe (supply only, not counting return line)"; - parameter Modelica.Units.SI.Length dhDis - "Hydraulic diameter of the distribution pipe"; - parameter Modelica.Units.SI.Length dhCon - "Hydraulic diameter of the connection pipe"; - annotation (Documentation(revisions=" --This model represents the supply and return lines to connect an -agent (e.g., an energy transfer station) to a two-pipe main distribution -system. -The instances of the pipe model are parameterized with the -hydraulic diameter. -
-")); -end ConnectionParallelStandard; diff --git a/Buildings/Experimental/DHC/Networks/Combined/BaseClasses/ConnectionSeriesAutosize.mo b/Buildings/Experimental/DHC/Networks/Combined/BaseClasses/ConnectionSeriesAutosize.mo deleted file mode 100644 index 6f2428dff5e..00000000000 --- a/Buildings/Experimental/DHC/Networks/Combined/BaseClasses/ConnectionSeriesAutosize.mo +++ /dev/null @@ -1,36 +0,0 @@ -within Buildings.Experimental.DHC.Networks.Combined.BaseClasses; -model ConnectionSeriesAutosize - "Model for connecting an agent to the DHC system" - extends ConnectionSeriesStandard( - tau=5*60, - redeclare replaceable model Model_pipDis = PipeAutosize ( - roughness=7e-6, - fac=1.5, - final length=lDis, - final dh(fixed=true)=dhDis, - final dp_length_nominal=dp_length_nominal), - redeclare replaceable model Model_pipCon = PipeAutosize ( - roughness=2.5e-5, - fac=2, - final length=2*lCon, - final dh(fixed=true)=dhCon, - final dp_length_nominal=dp_length_nominal)); - parameter Real dp_length_nominal(final unit="Pa/m") = 250 - "Pressure drop per pipe length at nominal flow rate"; - annotation (Documentation(revisions=" --This model represents the supply and return lines to connect an -agent (e.g., an energy transfer station) to a one-pipe main distribution -system. -The instances of the pipe model are autosized based on the pressure drop per pipe length -at nominal flow rate. -
-")); -end ConnectionSeriesAutosize; diff --git a/Buildings/Experimental/DHC/Networks/Combined/BaseClasses/ConnectionSeriesStandard.mo b/Buildings/Experimental/DHC/Networks/Combined/BaseClasses/ConnectionSeriesStandard.mo deleted file mode 100644 index 307c73264ec..00000000000 --- a/Buildings/Experimental/DHC/Networks/Combined/BaseClasses/ConnectionSeriesStandard.mo +++ /dev/null @@ -1,40 +0,0 @@ -within Buildings.Experimental.DHC.Networks.Combined.BaseClasses; -model ConnectionSeriesStandard - "Model for connecting an agent to the DHC system" - extends Buildings.Experimental.DHC.Networks.BaseClasses.PartialConnection1Pipe( - tau=5*60, - redeclare replaceable model Model_pipDis = PipeStandard ( - roughness=7e-6, - fac=1.5, - final length=lDis, - final dh=dhDis), - redeclare replaceable model Model_pipCon = PipeStandard ( - roughness=2.5e-5, - fac=2, - final length=2*lCon, - final dh=dhCon)); - parameter Modelica.Units.SI.Length lDis - "Length of the distribution pipe before the connection"; - parameter Modelica.Units.SI.Length lCon - "Length of the connection pipe (supply only, not counting return line)"; - parameter Modelica.Units.SI.Length dhDis - "Hydraulic diameter of the distribution pipe"; - parameter Modelica.Units.SI.Length dhCon - "Hydraulic diameter of the connection pipe"; - annotation (Documentation(revisions=" --This model represents the supply and return lines to connect an -agent (e.g., an energy transfer station) to a one-pipe main distribution -system. -The instances of the pipe model are parameterized with the -hydraulic diameter. -
-")); -end ConnectionSeriesStandard; diff --git a/Buildings/Experimental/DHC/Networks/Combined/BaseClasses/package.mo b/Buildings/Experimental/DHC/Networks/Combined/BaseClasses/package.mo deleted file mode 100644 index 9b103322109..00000000000 --- a/Buildings/Experimental/DHC/Networks/Combined/BaseClasses/package.mo +++ /dev/null @@ -1,12 +0,0 @@ -within Buildings.Experimental.DHC.Networks.Combined; -package BaseClasses "Package with base classes for Buildings.Experimental.DHC.Networks.Combined" - extends Modelica.Icons.BasesPackage; - -annotation (preferredView="info", Documentation(info=" --This package contains base classes that are used to construct the models in - -Buildings.Experimental.DHC.Networks.Combined. -
-")); -end BaseClasses; diff --git a/Buildings/Experimental/DHC/Networks/Combined/BaseClasses/package.order b/Buildings/Experimental/DHC/Networks/Combined/BaseClasses/package.order deleted file mode 100644 index 1342acba5e5..00000000000 --- a/Buildings/Experimental/DHC/Networks/Combined/BaseClasses/package.order +++ /dev/null @@ -1,7 +0,0 @@ -ConnectionParallelAutosize -ConnectionParallelStandard -ConnectionSeriesAutosize -ConnectionSeriesStandard -PipeAutosize -PipeStandard -Validation diff --git a/Buildings/Experimental/DHC/Networks/Combined/UnidirectionalParallel.mo b/Buildings/Experimental/DHC/Networks/Combined/UnidirectionalParallel.mo deleted file mode 100644 index d064a4610a5..00000000000 --- a/Buildings/Experimental/DHC/Networks/Combined/UnidirectionalParallel.mo +++ /dev/null @@ -1,61 +0,0 @@ -within Buildings.Experimental.DHC.Networks.Combined; -model UnidirectionalParallel - "Hydronic network for unidirectional parallel DHC system" - extends Buildings.Experimental.DHC.Networks.BaseClasses.PartialDistribution2Pipe( - tau=5*60, - redeclare Buildings.Experimental.DHC.Networks.Combined.BaseClasses.ConnectionParallelAutosize con[nCon]( - each final dp_length_nominal=dp_length_nominal, - final lDis=lDis, - final lCon=lCon, - final dhDis=dhDis, - final dhDisRet=dhDisRet, - final dhCon=dhCon), - redeclare model Model_pipDis = - Buildings.Experimental.DHC.Networks.Combined.BaseClasses.PipeAutosize - ( - roughness=7e-6, - fac=1.5, - final dp_length_nominal=dp_length_nominal, - final dh(fixed=true)=dhEnd, - final length=2*lEnd)); - parameter Real dp_length_nominal(final unit="Pa/m") = 250 - "Pressure drop per pipe length at nominal flow rate"; - parameter Modelica.Units.SI.Length lDis[nCon] - "Length of the distribution pipe before each connection (supply only, not counting return line)"; - parameter Modelica.Units.SI.Length lCon[nCon] - "Length of each connection pipe (supply only, not counting return line)"; - parameter Modelica.Units.SI.Length lEnd - "Length of the end of the distribution line (supply only, not counting return line)"; - parameter Modelica.Units.SI.Length dhDis[nCon]( - each fixed=false, - each start=0.05, - each min=0.01) - "Hydraulic diameter of the distribution pipe before each connection"; - parameter Modelica.Units.SI.Length dhDisRet[nCon]( - each fixed=false, - each start=0.05, - each min=0.01) - "Hydraulic diameter of the distribution pipe before each connection"; - parameter Modelica.Units.SI.Length dhCon[nCon]( - each fixed=false, - each start=0.05, - each min=0.01) "Hydraulic diameter of each connection pipe"; - parameter Modelica.Units.SI.Length dhEnd( - fixed=false, - start=0.05, - min=0.01) "Hydraulic diameter of the end of the distribution line"; - annotation (Documentation(info=" --This model represents a two-pipe distribution network with built-in computation -of the pipe diameters based on the pressure drop per pipe length -at nominal flow rate. -
-", revisions=" --This model represents a one-pipe distribution network with built-in computation -of the pipe diameter based on the pressure drop per pipe length -at nominal flow rate. -
-
-Note that dhDis
needs to be vectorized, even if the same value
-is computed for each array element in case of a one-pipe network.
-This is because the pipe diameter is computed at initialization by the model
-
-Buildings.Experimental.DHC.Networks.Combined.BaseClasses.ConnectionSeriesAutosize
-which is instantiated for each connection.
-So the initialization system of equations would be overdetermined if using
-a parameter binding with a scalar variable.
-
-This package contains models for heating, cooling or combined distribution -networks. -
-")); -end Combined; diff --git a/Buildings/Experimental/DHC/Networks/Combined/package.order b/Buildings/Experimental/DHC/Networks/Combined/package.order deleted file mode 100644 index d113ac2e9d9..00000000000 --- a/Buildings/Experimental/DHC/Networks/Combined/package.order +++ /dev/null @@ -1,3 +0,0 @@ -UnidirectionalParallel -UnidirectionalSeries -BaseClasses diff --git a/Buildings/Experimental/DHC/Networks/Connection2Pipe.mo b/Buildings/Experimental/DHC/Networks/Connection2Pipe.mo deleted file mode 100644 index 40be9619a59..00000000000 --- a/Buildings/Experimental/DHC/Networks/Connection2Pipe.mo +++ /dev/null @@ -1,36 +0,0 @@ -within Buildings.Experimental.DHC.Networks; -model Connection2Pipe - "Model for connecting an agent to a two-pipe distribution network, using fixed resistance pipe model" - extends Buildings.Experimental.DHC.Networks.BaseClasses.PartialConnection2Pipe( - redeclare model Model_pipDisSup=Fluid.FixedResistances.PressureDrop ( - final dp_nominal=dpDis_nominal), - redeclare model Model_pipDisRet=Fluid.FixedResistances.PressureDrop ( - final dp_nominal=dpDis_nominal), - redeclare model Model_pipCon=Fluid.FixedResistances.LosslessPipe); - parameter Modelica.Units.SI.PressureDifference dpDis_nominal( - displayUnit="Pa") - "Pressure drop in distribution line (supply only, not counting return line)"; - annotation ( - Documentation( - info=" --This is a model of a connection with a two-pipe distribution network using -as pipe model a fixed hydraulic resistance with no heat loss. -The pressure drop of this hydraulic resistance is scaled based on the -mass flow rate. -
-", - revisions=" --This is a model of a connection with a two-pipe distribution network using -a plug flow pipe model that includes pressure drop, heat transfer, and transport -delays. -
--The plug flow pipe model is used in the main distribution line, -but not in the connection to the building, as the latter is typically short. -
-", - revisions=" -+This model represents the supply and return lines to connect an +agent (e.g., an energy transfer station) to a one-pipe main distribution +system. The instances of the pipe model are autosized based on the pressure drop per pipe length +at nominal flow rate based on the model +Buildings.Experimental.DHC.Networks.Pipes.PipeAutosize for the distribution line. The connection to the building as the length is typically relatively short so a losssless pipe is considered. +
+")); +end Connection1PipeAutosize; diff --git a/Buildings/Experimental/DHC/Networks/Connections/Connection1PipePlugFlow.mo b/Buildings/Experimental/DHC/Networks/Connections/Connection1PipePlugFlow.mo new file mode 100644 index 00000000000..690bd66f3a1 --- /dev/null +++ b/Buildings/Experimental/DHC/Networks/Connections/Connection1PipePlugFlow.mo @@ -0,0 +1,61 @@ +within Buildings.Experimental.DHC.Networks.Connections; +model Connection1PipePlugFlow + "Model for connecting an agent to the DHC system" + extends Buildings.Experimental.DHC.Networks.BaseClasses.PartialConnection1Pipe( + tau=5*60, + redeclare replaceable model Model_pipDis = + Buildings.Fluid.FixedResistances.PlugFlowPipe ( + final length=lDis, + final dIns=dIns, + final kIns=kIns, + v_nominal=v_nominal, + roughness=roughness, + cPip=cPip, + rhoPip=rhoPip, + thickness=thickness), + redeclare replaceable model Model_pipCon = + Buildings.Fluid.FixedResistances.LosslessPipe); + + parameter Modelica.Units.SI.Length dIns + "Thickness of pipe insulation, used to compute R" + annotation (Dialog(group="Pipe")); + parameter Modelica.Units.SI.ThermalConductivity kIns + "Heat conductivity of pipe insulation, used to compute R" + annotation (Dialog(group="Pipe")); + parameter Modelica.Units.SI.Length lDis + "Length of the distribution pipe before the connection"; + parameter Modelica.Units.SI.Velocity v_nominal=1.5 + "Velocity at m_flow_nominal (used to compute default value for hydraulic diameter dh)"; + parameter Modelica.Units.SI.Height roughness=2.5e-5 + "Average height of surface asperities (default: smooth steel pipe)"; + parameter Modelica.Units.SI.SpecificHeatCapacity cPip=2300 + "Specific heat of pipe wall material. 2300 for PE, 500 for steel"; + parameter Modelica.Units.SI.Density rhoPip=930 + "Density of pipe wall material. 930 for PE, 8000 for steel"; + parameter Modelica.Units.SI.Length thickness=0.0035 "Pipe wall thickness"; + Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heatPortDis + "Heat transfer to and from the distribution pipe" annotation (Placement( + transformation(extent={{-110,70},{-90,90}}), iconTransformation(extent={{-60,16}, + {-40,36}}))); + +equation + connect(pipDis.heatPort, heatPortDis) + annotation (Line(points={{-70,-30},{-70,80},{-100,80}},color={191,0,0})); + annotation (Documentation(revisions=" ++This model represents the supply and return lines to connect an +agent (e.g. an energy transfer station) to a one-pipe main distribution +system. A plug flow pipe model +Buildings.Fluid.FixedResistances.PlugFlowPipe that includes pressure drop, heat transfer, and transport +delays is used in the main distribution line, +but not in the connection to the building, as the latter is typically short. +
+")); +end Connection1PipePlugFlow; diff --git a/Buildings/Experimental/DHC/Networks/Connections/Connection2PipeAutosize.mo b/Buildings/Experimental/DHC/Networks/Connections/Connection2PipeAutosize.mo new file mode 100644 index 00000000000..38ad1141880 --- /dev/null +++ b/Buildings/Experimental/DHC/Networks/Connections/Connection2PipeAutosize.mo @@ -0,0 +1,47 @@ +within Buildings.Experimental.DHC.Networks.Connections; +model Connection2PipeAutosize "Model for connecting an agent to the DHC system" + extends Buildings.Experimental.DHC.Networks.BaseClasses.PartialConnection2Pipe( + tau=5*60, + redeclare replaceable model Model_pipDisSup = Pipes.PipeAutosize ( + roughness = 7e-6, + dh(fixed=true) = dhDis, + final length = lDis, + final dp_length_nominal = dp_length_nominal), + redeclare replaceable model Model_pipDisRet = Pipes.PipeAutosize ( + roughness=7e-6, + dh(fixed=true) = dhDisRet, + final length=lDis, + final dp_length_nominal=dp_length_nominal), + redeclare model Model_pipCon = Fluid.FixedResistances.LosslessPipe, + pipDisSup(fac=1), + pipDisRet(fac=1)); + parameter Real dp_length_nominal(final unit="Pa/m") = 250 + "Pressure drop per pipe length at nominal flow rate"; + parameter Modelica.Units.SI.Length dhDisRet + "Hydraulic diameter of the return distribution pipe"; + parameter Modelica.Units.SI.Length lDis + "Length of the distribution pipe before the connection"; + parameter Modelica.Units.SI.Length dhDis + "Hydraulic diameter of the distribution pipe"; + annotation (Documentation(revisions=" ++This model represents the supply and return lines to connect an +agent (e.g., an energy transfer station) to a two-pipe main distribution +system. The instances of the pipe model are autosized based on the pressure drop per pipe length +at nominal flow rate based on the model +Buildings.Experimental.DHC.Networks.Pipes.PipeAutosize for the distribution line. The connection to the building as the length is typically relatively short so a losssless pipe is considered. +
+")); +end Connection2PipeAutosize; diff --git a/Buildings/Experimental/DHC/Networks/Connections/Connection2PipePlugFlow.mo b/Buildings/Experimental/DHC/Networks/Connections/Connection2PipePlugFlow.mo new file mode 100644 index 00000000000..ead31430669 --- /dev/null +++ b/Buildings/Experimental/DHC/Networks/Connections/Connection2PipePlugFlow.mo @@ -0,0 +1,78 @@ +within Buildings.Experimental.DHC.Networks.Connections; +model Connection2PipePlugFlow + "Model for connecting an agent to a two-pipe distribution network, using plug flow pipe models in the main line" + extends Buildings.Experimental.DHC.Networks.BaseClasses.PartialConnection2Pipe( + redeclare model Model_pipDisSup = + Buildings.Fluid.FixedResistances.PlugFlowPipe ( + final length = lDis, + final dIns = dIns, + final kIns = kIns, + v_nominal = v_nominal, + roughness = roughness, + cPip = cPip, + rhoPip = rhoPip, + thickness = thickness), + redeclare model Model_pipDisRet = + Buildings.Fluid.FixedResistances.PlugFlowPipe ( + final length = lDis, + final dIns = dIns, + final kIns = kIns, + v_nominal = v_nominal, + roughness = roughness, + cPip = cPip, + rhoPip = rhoPip, + thickness = thickness), + redeclare model Model_pipCon = Fluid.FixedResistances.LosslessPipe); + parameter Modelica.Units.SI.Length lDis + "Length of the distribution pipe before the connection"; + parameter Modelica.Units.SI.Length dIns + "Thickness of pipe insulation, used to compute R"; + parameter Modelica.Units.SI.ThermalConductivity kIns + "Heat conductivity of pipe insulation, used to compute R"; + parameter Modelica.Units.SI.Velocity v_nominal = 1.5 + "Velocity at m_flow_nominal (used to compute default value for hydraulic diameter dh)"; + parameter Modelica.Units.SI.Height roughness = 2.5e-5 + "Average height of surface asperities (default: smooth steel pipe)"; + parameter Modelica.Units.SI.SpecificHeatCapacity cPip = 2300 + "Specific heat of pipe wall material. 2300 for PE, 500 for steel"; + parameter Modelica.Units.SI.Density rhoPip = 930 + "Density of pipe wall material. 930 for PE, 8000 for steel"; + parameter Modelica.Units.SI.Length thickness = 0.0035 "Pipe wall thickness"; + Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heatPortDis + "Heat transfer to or from surroundings for distribution pipe(positive if pipe is colder than surrounding)" + annotation (Placement(transformation(extent={{-110,44},{-90,64}}), + iconTransformation(extent={{-110,44},{-90,64}}))); + Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heatPortRet + "Heat transfer to or from surroundings for return pipe (positive if pipe is colder than surrounding)" + annotation (Placement(transformation(extent={{-110,80},{-90,100}}), + iconTransformation(extent={{-110,80},{-90,100}}))); +equation + connect(pipDisSup.heatPort, heatPortDis) + annotation (Line(points={{-70,-30},{-70,54},{-100,54}}, color={191,0,0})); + connect(pipDisRet.heatPort, heatPortRet) annotation (Line(points={{-70,-70},{-50, + -70},{-50,90},{-100,90}}, color={191,0,0})); + annotation ( + Documentation( + info=" ++This model represents the supply and return lines to connect an +agent (e.g. an energy transfer station) to a two-pipe main distribution +system. A plug flow pipe model +Buildings.Fluid.FixedResistances.PlugFlowPipe that includes pressure drop, heat transfer, and transport +delays is used in the main distribution line, +but not in the connection to the building, as the latter is typically short. +
+", + revisions=" ++Example model of two one-pipe connection models that could be used i.e for building a reservoir network to connect one agent in series. It uses + +Buildings.Experimental.DHC.Networks.Connections.Connection1PipeAutosize and + +Buildings.Experimental.DHC.Networks.Connections.Connection1PipePlugFlow. The agent, in this example just a pump, will draw water from the distribution pipe and release it to the same pipe. +
+", revisions=" ++Example model of two two-pipe connection models that could be used i.e for building a bi-directional network to connect one agent in series. It uses + +Buildings.Experimental.DHC.Networks.Connections.Connection2PipeAutosize and + +Buildings.Experimental.DHC.Networks.Connections.Connection2PipePlugFlow. The agent, in this example just a pump, will draw water from the distribution supply pipe and release it in the return pipe. +
+", revisions=" ++This package contains an example illustrating the use of the model in + +Buildings.Experimental.DHC.Loads.Combined. +
+")); +end Examples; diff --git a/Buildings/Experimental/DHC/Networks/Connections/Examples/package.order b/Buildings/Experimental/DHC/Networks/Connections/Examples/package.order new file mode 100644 index 00000000000..13db7574310 --- /dev/null +++ b/Buildings/Experimental/DHC/Networks/Connections/Examples/package.order @@ -0,0 +1,2 @@ +Connection1PipeExample +Connection2PipeExample diff --git a/Buildings/Experimental/DHC/Networks/Connections/package.mo b/Buildings/Experimental/DHC/Networks/Connections/package.mo new file mode 100644 index 00000000000..20101f47abb --- /dev/null +++ b/Buildings/Experimental/DHC/Networks/Connections/package.mo @@ -0,0 +1,9 @@ +within Buildings.Experimental.DHC.Networks; +package Connections "Package containing various configurations for connecting network participants to a distribution network" + extends Modelica.Icons.VariantsPackage; + annotation (Documentation(info=" ++This package contains hydronic connection models that allow an agent to connect to the distribution network. +
+")); +end Connections; diff --git a/Buildings/Experimental/DHC/Networks/Connections/package.order b/Buildings/Experimental/DHC/Networks/Connections/package.order new file mode 100644 index 00000000000..09e3b4242b8 --- /dev/null +++ b/Buildings/Experimental/DHC/Networks/Connections/package.order @@ -0,0 +1,5 @@ +Connection1PipeAutosize +Connection1PipePlugFlow +Connection2PipeAutosize +Connection2PipePlugFlow +Examples diff --git a/Buildings/Experimental/DHC/Networks/Controls/AgentPump1Pipe.mo b/Buildings/Experimental/DHC/Networks/Controls/AgentPump1Pipe.mo new file mode 100644 index 00000000000..b4a49bb982a --- /dev/null +++ b/Buildings/Experimental/DHC/Networks/Controls/AgentPump1Pipe.mo @@ -0,0 +1,235 @@ +within Buildings.Experimental.DHC.Networks.Controls; +block AgentPump1Pipe + "Ambient network storage and plants agent pump control, developed for reservoir network" + parameter Buildings.Controls.OBC.CDL.Types.SimpleController controllerType = + Buildings.Controls.OBC.CDL.Types.SimpleController.P "Type of controller"; + parameter Real yPumMin(min=0, max=1, final unit="1") = 0.05 + "Minimum pump speed"; + parameter Real yPumMax(min=0, max=1, final unit="1") = 1 "Upper limit of output"; + parameter Real k = 1 "Gain of controller"; + parameter Real Ti = 0.5 "Time constant of integrator block"; + parameter Real Td = 0.1 "Time constant of derivative block"; + parameter Modelica.Units.SI.TemperatureDifference dToff(min=0.1) = 1 + "Temperature offset to account for heat exchanger pinch point"; + parameter Real uLowHea = 1 "if y=true and u+Controller for balacing agents (i.e. reservoirs and plants) pump. +
+
+This controller decides to turn on or off the agent pump depending on the current net demand of the
+district if TRetDis > TSupDis cooling else heating
and the temperature differential
+between the agent source temperature TSou
and the agent inlet temperature TSouIn
+adjusted by the offset dToff
. In particular the pump turns on : if heating and TSou - TSouIn - dToff > 0
+or if cooling and TSouIn - Tsou - dToff > 0
. Then if the pump is turned on a PID controller,
+by default used as P, controls the pump control input by using TSouOut
as measurement and as setpoint
+TSou - dToff
for heating or TSou + dToff
for cooling. dToff
can be considered
+the nominal value of the agent heat exchanger pinch point temperature difference.
+
+Ettore Zanetti, David Blum, Michael Wetter +Control development and sizing analysis for a 5th generation district heating and cooling network using Modelica, 2023 International Modelica conference proceedings. +
+")); +end AgentPump1Pipe; diff --git a/Buildings/Experimental/DHC/Networks/Controls/Examples/AgentPump1PipeExample.mo b/Buildings/Experimental/DHC/Networks/Controls/Examples/AgentPump1PipeExample.mo new file mode 100644 index 00000000000..f6dd1380f1b --- /dev/null +++ b/Buildings/Experimental/DHC/Networks/Controls/Examples/AgentPump1PipeExample.mo @@ -0,0 +1,60 @@ +within Buildings.Experimental.DHC.Networks.Controls.Examples; +model AgentPump1PipeExample + extends Modelica.Icons.Example; + parameter Modelica.Units.SI.Temperature TSou(displayUnit="degC") = 283.15 + "Agent source temperature"; + Modelica.Blocks.Sources.CombiTimeTable TSouIn( + table=[0,TSou; 900,TSou + 3; 2700, TSou - 3; 3600,TSou], + extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic) + annotation (Placement(transformation(extent={{-80,58},{-60,78}}))); + Buildings.Experimental.DHC.Networks.Controls.AgentPump1Pipe AgentPump( + yPumMin=0, + dToff=0.5, + k=1, + Ti=600) annotation (Placement(transformation(extent={{40,-10},{60,10}}))); + Buildings.Controls.OBC.CDL.Reals.Sources.Constant con2(k=TSou) + annotation (Placement(transformation(extent={{-80,30},{-60,50}}))); + Modelica.Blocks.Sources.CombiTimeTable TSouOut( + table=[0,TSou; 900,TSou + 1; 2700, TSou - 1; 3600,TSou], + extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic) + annotation (Placement(transformation(extent={{-80,0},{-60,20}}))); + Buildings.Controls.OBC.CDL.Reals.Sources.Constant TsupDis(k=TSou) + annotation (Placement(transformation(extent={{-80,-60},{-60,-40}}))); + Modelica.Blocks.Sources.CombiTimeTable TretDis( + table=[0,TSou; 1800,TSou + 1; 1800,TSou - 1; 3600,TSou], + smoothness=Modelica.Blocks.Types.Smoothness.ConstantSegments, + extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic) + annotation (Placement(transformation(extent={{-80,-30},{-60,-10}}))); +equation + connect(con2.y, AgentPump.TSou) annotation (Line(points={{-58,40},{32,40},{32, + 3},{38.4615,3}}, color={0,0,127})); + connect(TSouOut.y[1], AgentPump.TSouOut) annotation (Line(points={{-59,10},{ + 28,10},{28,-1},{38.4615,-1}}, color={0,0,127})); + connect(TSouIn.y[1], AgentPump.TSouIn) annotation (Line(points={{-59,68},{ + 38.4615,68},{38.4615,7}}, + color={0,0,127})); + connect(TretDis.y[1],AgentPump.TRetDis) annotation (Line(points={{-59,-20},{ + 32,-20},{32,-5},{38.4615,-5}}, color={0,0,127})); + connect(TsupDis.y,AgentPump.TSupDis) annotation (Line(points={{-58,-50},{ + 38.4615,-50},{38.4615,-8}}, + color={0,0,127})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false)), + __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Experimental/DHC/Networks/Controls/Examples/AgentPump1PipeExample.mos" + "Simulate and plot"), + experiment(StopTime=3600,Tolerance=1e-06), + Documentation(revisions=" ++This model is used to test the controller +Buildings.Experimental.DHC.Networks.Controls.AgentPump. +For a practical application of the model check Buildings.Experimental.DHC.Examples.Combined.SeriesVariableFlowUpdate. +
+")); +end AgentPump1PipeExample; diff --git a/Buildings/Experimental/DHC/Networks/Controls/Examples/MainPump1PipeExample.mo b/Buildings/Experimental/DHC/Networks/Controls/Examples/MainPump1PipeExample.mo new file mode 100644 index 00000000000..ffea4a281c8 --- /dev/null +++ b/Buildings/Experimental/DHC/Networks/Controls/Examples/MainPump1PipeExample.mo @@ -0,0 +1,53 @@ +within Buildings.Experimental.DHC.Networks.Controls.Examples; +model MainPump1PipeExample + extends Modelica.Icons.Example; + parameter Modelica.Units.SI.Temperature TSou(displayUnit="degC") = 284.65 + "Agent source temperature"; + Modelica.Blocks.Sources.CombiTimeTable TMixandTSouIn( + table=[0,TSou; 900,TSou + 6.5; 2700,TSou - 6.5; 3600,TSou], + extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic) + annotation (Placement(transformation(extent={{-80,40},{-60,60}}))); + Modelica.Blocks.Sources.CombiTimeTable TSouOut( + table=[0,TSou; 900,TSou + 4; 2700,TSou - 4; 3600,TSou], + extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic) + annotation (Placement(transformation(extent={{-80,0},{-60,20}}))); + MainPump1Pipe conPum( + nMix=1, + nSou=1, + nBui=1, + TMax=289.15) annotation (Placement(transformation(extent={{40,0},{66,40}}))); + Modelica.Blocks.Sources.CombiTimeTable QCoo_flow( + table=[0,-500; 1800,-500; 1800,0; 3600,0], + smoothness=Modelica.Blocks.Types.Smoothness.ConstantSegments, + extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic) + annotation (Placement(transformation(extent={{-80,-30},{-60,-10}}))); +equation + connect(TSouOut.y, conPum.TSouOut) annotation (Line(points={{-59,10},{-10,10}, + {-10,16},{37.8,16}}, + color={0,0,127})); + connect(TMixandTSouIn.y, conPum.TSouIn) annotation (Line(points={{-59,50},{20, + 50},{20,26},{37.8,26}}, color={0,0,127})); + connect(QCoo_flow.y, conPum.QCoo_flow) annotation (Line(points={{-59,-20},{20, + -20},{20,8},{37.8,8}}, color={0,0,127})); + connect(TMixandTSouIn.y, conPum.TMix) annotation (Line(points={{-59,50},{20, + 50},{20,34},{37.8,34}}, + color={0,0,127})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( + coordinateSystem(preserveAspectRatio=false)), + __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Experimental/DHC/Networks/Controls/Examples/MainPump1PipeExample.mos" + "Simulate and plot"), + experiment(StopTime=3600,Tolerance=1e-06), + Documentation(revisions=" ++This model is used to test the controller +Buildings.Experimental.DHC.Networks.Controls.MainPump1Pipe.For a practical application of the model check Buildings.Experimental.DHC.Examples.Combined.SeriesVariableFlow. +
+")); +end MainPump1PipeExample; diff --git a/Buildings/Experimental/DHC/Networks/Controls/Examples/package.mo b/Buildings/Experimental/DHC/Networks/Controls/Examples/package.mo new file mode 100644 index 00000000000..01be2289a54 --- /dev/null +++ b/Buildings/Experimental/DHC/Networks/Controls/Examples/package.mo @@ -0,0 +1,4 @@ +within Buildings.Experimental.DHC.Networks.Controls; +package Examples "District controller example models" + extends Modelica.Icons.ExamplesPackage; +end Examples; diff --git a/Buildings/Experimental/DHC/Networks/Controls/Examples/package.order b/Buildings/Experimental/DHC/Networks/Controls/Examples/package.order new file mode 100644 index 00000000000..ad0c34e5ce4 --- /dev/null +++ b/Buildings/Experimental/DHC/Networks/Controls/Examples/package.order @@ -0,0 +1,2 @@ +AgentPump1PipeExample +MainPump1PipeExample diff --git a/Buildings/Experimental/DHC/Networks/Controls/MainPump.mo b/Buildings/Experimental/DHC/Networks/Controls/MainPump1Pipe.mo similarity index 60% rename from Buildings/Experimental/DHC/Networks/Controls/MainPump.mo rename to Buildings/Experimental/DHC/Networks/Controls/MainPump1Pipe.mo index fce51de6cf0..10e362806c7 100644 --- a/Buildings/Experimental/DHC/Networks/Controls/MainPump.mo +++ b/Buildings/Experimental/DHC/Networks/Controls/MainPump1Pipe.mo @@ -1,8 +1,9 @@ within Buildings.Experimental.DHC.Networks.Controls; -model MainPump "Main pump controller" - extends Modelica.Blocks.Icons.Block; +model MainPump1Pipe + "Main pump controller for 1 pipe networks, developed for reservoir network main circulation loop" parameter Integer nMix(min=1) "Number of mixing points after the substations"; parameter Integer nSou(min=1) "Number of heat sources (and heat sinks)"; + parameter Integer nBui(min=1) "Number of heat sources (and heat sinks)"; parameter Real yPumMin(min=0.01, max=1, final unit="1") = 0.05 "Minimum pump speed"; parameter Modelica.Units.SI.Temperature TMin(displayUnit="degC") = 281.15 @@ -11,8 +12,12 @@ model MainPump "Main pump controller" "Maximum loop temperature"; parameter Modelica.Units.SI.TemperatureDifference dTSlo(min=1) = 2 "Temperature difference for slope"; - parameter Boolean use_temperatureShift = true + parameter Boolean use_temperatureShift = false "Set to false to disable temperature shift of slopes"; + parameter Boolean use_constantHeaTemShift = true + "Set to false to disable constant temperature shift of TMax when only heating is occurring"; + parameter Modelica.Units.SI.TemperatureDifference offTMax = 2 + "TMax constant temperature shift"; final parameter Modelica.Units.SI.TemperatureDifference delta=if use_temperatureShift then TMax - TMin - 3*dTSlo else 0 "Maximum shift of slopes"; @@ -27,20 +32,28 @@ model MainPump "Main pump controller" each final unit="K", each displayUnit="degC") "Temperatures at the mixing points" - annotation (Placement(transformation(extent={{-140,40},{-100,80}}))); + annotation (Placement(transformation(extent={{-142,100},{-102,140}}), + iconTransformation(extent={{-142,100},{-102,140}}))); Buildings.Controls.OBC.CDL.Interfaces.RealInput TSouIn[nSou]( each final unit="K", - each displayUnit="degC") - "Temperatures at the inlets of the sources" - annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); + each displayUnit="degC") "Temperatures at the inlets of the sources" + annotation (Placement(transformation(extent={{-142,20},{-102,60}}), + iconTransformation(extent={{-142,20},{-102,60}}))); Buildings.Controls.OBC.CDL.Interfaces.RealInput TSouOut[nSou]( each final unit="K", - each displayUnit="degC") - "Temperatures at the outlets of the sources" - annotation (Placement(transformation(extent={{-140,-80},{-100,-40}}))); + each displayUnit="degC") "Temperatures at the outlets of the sources" + annotation (Placement(transformation(extent={{-142,-80},{-102,-40}}), + iconTransformation(extent={{-142,-80},{-102,-40}}))); + Buildings.Controls.OBC.CDL.Interfaces.RealInput QCoo_flow[nBui](each final unit= + "W") "Cooling power required by each building" annotation (Placement( + transformation(extent={{-140,-220},{-100,-180}}), iconTransformation( + extent={{-20,-20},{20,20}}, + rotation=0, + origin={-122,-140}))); Buildings.Controls.OBC.CDL.Interfaces.RealOutput y(min=0, max=1, unit="1") "Pump control signal" - annotation (Placement(transformation(extent={{100,-20},{140,20}}))); + annotation (Placement(transformation(extent={{160,-40},{200,0}}), + iconTransformation(extent={{160,-40},{200,0}}))); Buildings.Controls.OBC.CDL.Reals.MultiMin TMixMin( final nin=nMix, y(final unit="K", @@ -53,12 +66,11 @@ model MainPump "Main pump controller" "Maximum temperature at mixing points" annotation (Placement(transformation(extent={{-70,10},{-50,30}}))); Buildings.Controls.OBC.CDL.Reals.MultiSum mulSum( - nin=nSou, - k=fill(1, nSou)) + k=fill(1, nSou), nin=nSou) annotation (Placement(transformation(extent={{-50,-130},{-30,-110}}))); Buildings.Controls.OBC.CDL.Reals.Subtract dTSou[nSou] "Temperature differences over source" - annotation (Placement(transformation(extent={{-80,-130},{-60,-110}}))); + annotation (Placement(transformation(extent={{-92,-130},{-72,-110}}))); Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter dTSou_nor(k=1/( sum(dTSou_nominal))) "Normalization of temperature difference over source" @@ -80,7 +92,7 @@ model MainPump "Main pump controller" annotation (Placement(transformation(extent={{-70,70},{-50,90}}))); Buildings.Controls.OBC.CDL.Reals.Sources.Constant yMin(k=yPumMin) "Minimum pump speed" - annotation (Placement(transformation(extent={{-70,40},{-50,60}}))); + annotation (Placement(transformation(extent={{-72,40},{-52,60}}))); Buildings.Controls.OBC.CDL.Reals.Sources.Constant TMax_nominal(k=TMax) "Maximum temperature" annotation (Placement(transformation(extent={{-70,150},{-50,170}}))); @@ -113,21 +125,50 @@ model MainPump "Main pump controller" annotation (Placement(transformation(extent={{10,110},{30,130}}))); Buildings.Controls.OBC.CDL.Reals.Max ySetPum "Change in pump signal" annotation (Placement(transformation(extent={{60,-10},{80,10}}))); - Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai( - final k=-delta) + Buildings.Controls.OBC.CDL.Reals.Switch swi2 + "Switch on and off constant offset" + annotation (Placement(transformation(extent={{102,-190},{122,-210}}))); + Modelica.Blocks.Sources.BooleanExpression booleanExpression(y= + use_constantHeaTemShift) "Boolean parameter to activate mode" + annotation (Placement(transformation(extent={{-6,-222},{14,-202}}))); + + Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greThr( + t=PpumCooThr, + h=hysPpumCoo, + pre_y_start=false) + "Check pump consumption higher than zero" + annotation (Placement(transformation(extent={{-36,-210},{-16,-190}}))); + Buildings.Controls.OBC.CDL.Logical.And and2 + annotation (Placement(transformation(extent={{22,-210},{42,-190}}))); + Buildings.Controls.OBC.CDL.Reals.MultiSum mulSum1( k=fill(1, + nBui), nin=nBui) "Sum of all pump consumptions" + annotation (Placement(transformation(extent={{-92,-210},{-72,-190}}))); + Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai(final k=-delta) "Gain factor" - annotation (Placement(transformation(extent={{60,70},{80,90}}))); - Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai1( - final k=-delta) + annotation (Placement(transformation(extent={{100,-70},{120,-50}}))); + Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai2(final k=-delta) "Gain factor" - annotation (Placement(transformation(extent={{60,-110},{80,-90}}))); + annotation (Placement(transformation(extent={{98,-150},{118,-130}}))); + Buildings.Controls.OBC.CDL.Reals.Sources.Constant offTMaxExp(k=offTMax) + "Constant TMax offset" + annotation (Placement(transformation(extent={{60,-180},{80,-160}}))); + Buildings.Controls.OBC.CDL.Reals.Add Add(y(unit="K", displayUnit="degC")) + "If use_heaTemShift and not use_temperatureShift use constant offset, if use_temperatureShift use PI" + annotation (Placement(transformation( + extent={{10,-10},{-10,10}}, + rotation=0, + origin={90,140}))); + parameter Real PpumCooThr=100 + "Threshold for comparison for pump cooling power"; + parameter Real hysPpumCoo=10 "Hysteresis for cooling pump power threshold"; + Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai1(final k=-1) + "Gain factor" + annotation (Placement(transformation(extent={{-64,-210},{-44,-190}}))); equation - connect(TMix, TMixMin.u) annotation (Line(points={{-120,60},{-80,60},{-80,-20}, + connect(TMix, TMixMin.u) annotation (Line(points={{-122,120},{-80,120},{-80,-20}, {-72,-20}}, color={0,0,127})); - connect(TMix, TMixMax.u) annotation (Line(points={{-120,60},{-80,60},{-80,20}, + connect(TMix, TMixMax.u) annotation (Line(points={{-122,120},{-80,120},{-80,20}, {-72,20}}, color={0,0,127})); - connect(mulSum.u, dTSou.y) - annotation (Line(points={{-52,-120},{-58,-120}}, color={0,0,127})); connect(mulSum.y, dTSou_nor.u) annotation (Line(points={{-28,-120},{-22,-120}}, color={0,0,127})); connect(dTSou_nor.y, conShi.u_m) @@ -138,7 +179,7 @@ equation connect(uppCur.u, TMixMax.y) annotation (Line(points={{28,20},{-48,20}}, color={0,0,127})); connect(uppCur.f1, yMin.y) annotation (Line(points={{28,24},{-30,24},{-30,50}, - {-48,50}}, color={0,0,127})); + {-50,50}}, color={0,0,127})); connect(uppCur.f2, one.y) annotation (Line(points={{28,12},{-26,12},{-26,80},{ -48,80}}, color={0,0,127})); connect(TMax_nominal.y, TMax_upper.u1) @@ -177,65 +218,109 @@ equation color={0,0,127})); connect(lowCur.f1, one.y) annotation (Line(points={{28,-16},{-26,-16},{-26,80}, {-48,80}},color={0,0,127})); - connect(lowCur.f2, yMin.y) annotation (Line(points={{28,-28},{-30,-28},{-30,50}, - {-48,50}}, color={0,0,127})); + connect(lowCur.f2, yMin.y) annotation (Line(points={{28,-28},{-30,-28},{-30, + 50},{-50,50}}, + color={0,0,127})); connect(uppCur.y, ySetPum.u1) annotation (Line(points={{52,20},{56,20},{56,6},{58,6}}, color={0,0,127})); connect(lowCur.y, ySetPum.u2) annotation (Line(points={{52,-20},{56,-20},{56,-6}, {58,-6}}, color={0,0,127})); connect(ySetPum.y, y) - annotation (Line(points={{82,0},{120,0}}, color={0,0,127})); - connect(TSouOut, dTSou.u1) annotation (Line(points={{-120,-60},{-94,-60},{-94, - -114},{-82,-114}}, color={0,0,127})); - connect(TSouIn, dTSou.u2) annotation (Line(points={{-120,0},{-88,0},{-88,-126}, - {-82,-126}}, color={0,0,127})); - connect(sNeg.y, gai1.u) annotation (Line(points={{82,-140},{94,-140},{94,-120}, - {54,-120},{54,-100},{58,-100}}, color={0,0,127})); - connect(gai1.y, TMin_lower.u2) annotation (Line(points={{82,-100},{94,-100},{94, - 100},{-40,100},{-40,114},{-32,114}}, color={0,0,127})); - connect(sPos.y, gai.u) annotation (Line(points={{82,-60},{88,-60},{88,60},{54, - 60},{54,80},{58,80}}, color={0,0,127})); - connect(gai.y, TMax_upper.u2) annotation (Line(points={{82,80},{88,80},{88,140}, - {-40,140},{-40,154},{-32,154}}, color={0,0,127})); + annotation (Line(points={{82,0},{132,0},{132,-20},{180,-20}}, + color={0,0,127})); + connect(TSouOut, dTSou.u1) annotation (Line(points={{-122,-60},{-94,-60},{-94, + -104},{-102,-104},{-102,-114},{-94,-114}}, + color={0,0,127})); + connect(TSouIn, dTSou.u2) annotation (Line(points={{-122,40},{-90,40},{-90,-86}, + {-104,-86},{-104,-126},{-94,-126}}, + color={0,0,127})); + connect(booleanExpression.y, and2.u2) annotation (Line(points={{15,-212},{20, + -212},{20,-208}}, color={255,0,255})); + connect(and2.y, swi2.u2) annotation (Line(points={{44,-200},{100,-200}}, + color={255,0,255})); + connect(dTSou.y, mulSum.u) + annotation (Line(points={{-70,-120},{-52,-120}}, color={0,0,127})); + connect(greThr.y, and2.u1) annotation (Line(points={{-14,-200},{20,-200}}, + color={255,0,255})); + connect(QCoo_flow, mulSum1.u) + annotation (Line(points={{-120,-200},{-94,-200}}, color={0,0,127})); + connect(sPos.y, gai.u) + annotation (Line(points={{82,-60},{98,-60}}, color={0,0,127})); + connect(sNeg.y, gai2.u) + annotation (Line(points={{82,-140},{96,-140}}, color={0,0,127})); + connect(gai2.y, TMin_lower.u2) annotation (Line(points={{120,-140},{126,-140}, + {126,100},{-40,100},{-40,114},{-32,114}}, color={0,0,127})); + connect(swi2.y, Add.u1) annotation (Line(points={{124,-200},{150,-200},{150,146}, + {102,146}}, color={0,0,127})); + connect(gai.y, Add.u2) annotation (Line(points={{122,-60},{140,-60},{140,132}, + {102,132},{102,134}}, color={0,0,127})); + connect(Add.y, TMax_upper.u2) annotation (Line(points={{78,140},{-38,140},{-38, + 154},{-32,154}}, color={0,0,127})); + connect(offTMaxExp.y, swi2.u3) annotation (Line(points={{82,-170},{90,-170},{ + 90,-192},{100,-192}}, color={0,0,127})); + connect(zer.y, swi2.u1) annotation (Line(points={{-28,-80},{46,-80},{46,-208}, + {100,-208}}, color={0,0,127})); + connect(mulSum1.y, gai1.u) + annotation (Line(points={{-70,-200},{-66,-200}}, color={0,0,127})); + connect(gai1.y, greThr.u) + annotation (Line(points={{-42,-200},{-38,-200}}, color={0,0,127})); annotation ( defaultComponentName="conPum", - Diagram(coordinateSystem(extent={{-100,-180},{100,180}})), Icon( - coordinateSystem(extent={{-100,-100},{100,100}}), graphics={ + Diagram(coordinateSystem(extent={{-100,-220},{160,180}})), Icon( + coordinateSystem(extent={{-100,-220},{160,180}}), graphics={ Ellipse( extent={{-52,52},{54,-52}}, lineColor={0,0,0}, fillColor={0,0,0}, fillPattern=FillPattern.Solid), + Rectangle( + extent={{-100,-222},{160,180}}, + lineColor={0,0,127}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), Text( - extent={{-94,68},{-76,54}}, + extent={{-96,128},{-78,114}}, textColor={0,0,127}, textString="TMix"), Text( - extent={{-94,12},{-66,-12}}, + extent={{-96,52},{-68,28}}, textColor={0,0,127}, textString="TSouIn"), Text( - extent={{-94,-44},{-62,-78}}, + extent={{-98,-44},{-66,-78}}, textColor={0,0,127}, textString="TSouOut"), Text( - extent={{80,8},{96,-4}}, + extent={{140,-2},{162,-22}}, textColor={0,0,127}, textString="y"), Ellipse( - extent={{-50,50},{52,-50}}, + extent={{-14,48},{88,-52}}, lineColor={0,0,0}, fillColor={255,255,255}, fillPattern=FillPattern.Solid), Polygon( - points={{0,50},{0,-50},{52,0},{0,50}}, + points={{36,48},{36,-52},{88,-2},{36,48}}, lineColor={0,0,0}, lineThickness=1, fillColor={0,0,0}, - fillPattern=FillPattern.Solid)}), + fillPattern=FillPattern.Solid), + Text( + extent={{-100,-122},{-68,-156}}, + textColor={0,0,127}, + textString="PpumCoo"), Text( + extent={{-136,190},{164,150}}, + textString="%name", + textColor={0,0,255})}), Documentation(revisions="use_constantHeaTemShift
use_constantHeaTemShift
is set to true
, then a constant temperature
+offset offTMax
is added when only heating is present, this determination is done
+by checking that the cooling demand for each energy transfer station via
+QCoo
is close to zero. This mode can used by itself or in conjuction with use_temperatureShift
.
For a typical usage of this controller, see @@ -292,4 +381,4 @@ For a typical usage of this controller, see Buildings.Experimental.DHC.Examples.Combined.SeriesVariableFlow.
")); -end MainPump; +end MainPump1Pipe; diff --git a/Buildings/Experimental/DHC/Networks/Controls/package.order b/Buildings/Experimental/DHC/Networks/Controls/package.order index c4da2b4b23c..af6b250a16e 100644 --- a/Buildings/Experimental/DHC/Networks/Controls/package.order +++ b/Buildings/Experimental/DHC/Networks/Controls/package.order @@ -1 +1,3 @@ -MainPump +AgentPump1Pipe +MainPump1Pipe +Examples diff --git a/Buildings/Experimental/DHC/Networks/Distribution1PipeAutoSize.mo b/Buildings/Experimental/DHC/Networks/Distribution1PipeAutoSize.mo new file mode 100644 index 00000000000..b010cefb30c --- /dev/null +++ b/Buildings/Experimental/DHC/Networks/Distribution1PipeAutoSize.mo @@ -0,0 +1,68 @@ +within Buildings.Experimental.DHC.Networks; +model Distribution1PipeAutoSize + "Model of a one-pipe distribution network with auto-size pipes in the main line" + extends + Buildings.Experimental.DHC.Networks.BaseClasses.PartialDistribution1Pipe( + tau=5*60, + redeclare + Buildings.Experimental.DHC.Networks.Connections.Connection1PipeAutosize + con[nCon]( + each final dp_length_nominal=dp_length_nominal, + final lDis=lDis, + final dhDis=dhDis), + redeclare model Model_pipDis = + Buildings.Experimental.DHC.Networks.Pipes.PipeAutosize ( + final dp_length_nominal=dp_length_nominal, + final dh(fixed=true) = dhEnd, + final length=lEnd), + pipEnd(fac=1)); + parameter Real dp_length_nominal(final unit="Pa/m") = 250 + "Pressure drop per pipe length at nominal flow rate"; + parameter Modelica.Units.SI.Length lDis[nCon] + "Length of the distribution pipe before each connection"; + + parameter Modelica.Units.SI.Length lEnd + "Length of the end of the distribution line (after last connection)"; + final parameter Modelica.Units.SI.Length dhDis[nCon]( + each fixed=false, + each start=0.05, + each min=0.01) + "Hydraulic diameter of the distribution pipe before each connection"; + + final parameter Modelica.Units.SI.Length dhEnd( + fixed=false, + start=0.05, + min=0.01) + "Hydraulic diameter of of the end of the distribution line (after last connection)"; + annotation (Documentation(info=" ++This is a model of a one-pipe distribution network using a connection model with an auto-sized pipe in the main line whose hydraulic diameter +is calculated at initialization based on the pressure drop per pipe length at nominal flow rate +Buildings.Experimental.DHC.Networks.Connections.Connection1PipeAutosize. The same pipe model is also used +at the end of the distribution line (after the last connection) only on the supply side. +
+
+Note that dhDis
needs to be vectorized, even if the same value
+is computed for each array element in case of a one-pipe network.
+This is because the pipe diameter is computed at initialization by the model
+
+Buildings.Experimental.DHC.Networks.Pipes.PipeAutosize
+which is instantiated for each connection.
+So the initialization system of equations would be overdetermined if using
+a parameter binding with a scalar variable.
+
+This model represents a one-pipe distribution network using a connection model with a plug flow pipe +model (pressure drop, heat transfer, transport delays) in the main line +Buildings.Experimental.DHC.Networks.Connections.Connection1PipePlugFlow. The same pipe model at the end of +the distribution line (after the last connection). +
+", revisions=" +-This is a model of a two-pipe distribution network using -
-+This is a model of a two-pipe distribution network using a connection model with an auto-sized pipe in the main lines whose hydraulic diameters +are calculated at initialization based on the pressure drop per pipe length at nominal flow rate +Buildings.Experimental.DHC.Networks.Connections.Connection2PipeAutosize. The same pipe model is also used +at the end of the distribution line (after the last connection) only on the supply side. +
+
+Note that dhDis
needs to be vectorized, even if the same value
+is computed for each array element in case of a one-pipe network.
+This is because the pipe diameter is computed at initialization by the model
+
+Buildings.Experimental.DHC.Networks.Pipes.PipeAutosize
+which is instantiated for each connection.
+So the initialization system of equations would be overdetermined if using
+a parameter binding with a scalar variable.
+
-This is a model of a two-pipe distribution network using +This is a model of a two-pipe distribution network using a connection model with a plug flow pipe +model (pressure drop, heat transfer, transport delays) in the main lines +Buildings.Experimental.DHC.Networks.Connections.Connection2PipePlugFlow. The same pipe model is also used +at the end of the distribution line (after the last connection) only on the supply side.
-
+Example model of two one-pipe distribution models that could be used i.e for building a reservoir network to connect several agents in series.
+It showcases
+Buildings.Experimental.DHC.Networks.Distribution1PipeAutoSize and
+Buildings.Experimental.DHC.Networks.Distribution1PipePlugFlow. The distribution models create a vector of nLoa
connection models
+ Buildings.Experimental.DHC.Networks.Connections that are connected to a vector
+of nLoa
agents made up by time series heating loads
+Buildings.Experimental.DHC.Loads.BaseClasses.Validation.BaseClasses.FanCoil2PipeHeatingValve. Each agent will draw water from the distribution pipe and release
+it to the same pipe.
+
+Example model of two two-pipe distribution models that can be used i.e. for building a bi-directional network to connect several agents in series.
+It showcases Buildings.Experimental.DHC.Networks.Distribution2PipeAutoSize
+and Buildings.Experimental.DHC.Networks.Distribution2PipePlugFlow.
+ The distribution models create a vector of nLoa
connection models
+Buildings.Experimental.DHC.Networks.Connections that are connected to a vector of nLoa
agents made up by time series heating loads
+
+Buildings.Experimental.DHC.Loads.BaseClasses.Validation.BaseClasses.FanCoil2PipeHeatingValve. Each agent will draw water from the supply distribution pipe
+and release it in the return pipe.
+
+This package contains an example illustrating the use of the model in + +Buildings.Experimental.DHC.Networks. +
+")); +end Examples; diff --git a/Buildings/Experimental/DHC/Networks/Examples/package.order b/Buildings/Experimental/DHC/Networks/Examples/package.order new file mode 100644 index 00000000000..7193819dbf2 --- /dev/null +++ b/Buildings/Experimental/DHC/Networks/Examples/package.order @@ -0,0 +1,2 @@ +Distribution1PipeExample +Distribution2PipeExample diff --git a/Buildings/Experimental/DHC/Networks/Combined/BaseClasses/PipeAutosize.mo b/Buildings/Experimental/DHC/Networks/Pipes/PipeAutosize.mo similarity index 79% rename from Buildings/Experimental/DHC/Networks/Combined/BaseClasses/PipeAutosize.mo rename to Buildings/Experimental/DHC/Networks/Pipes/PipeAutosize.mo index 39c24690078..5ae886627e5 100644 --- a/Buildings/Experimental/DHC/Networks/Combined/BaseClasses/PipeAutosize.mo +++ b/Buildings/Experimental/DHC/Networks/Pipes/PipeAutosize.mo @@ -1,8 +1,8 @@ -within Buildings.Experimental.DHC.Networks.Combined.BaseClasses; +within Buildings.Experimental.DHC.Networks.Pipes; model PipeAutosize "Pipe model parameterized with pressure drop per pipe length" extends Buildings.Fluid.FixedResistances.PressureDrop( - final deltaM = eta_default*dh/4*Modelica.Constants.pi*ReC/m_flow_nominal_pos, - final dp_nominal=dp_length_nominal*length); + final deltaM = eta_default*dh/4*Modelica.Constants.pi*ReC/m_flow_nominal_pos, + final dp_nominal = dp_length_nominal*length); parameter Modelica.Units.SI.Length dh( fixed=false, @@ -14,14 +14,8 @@ model PipeAutosize "Pipe model parameterized with pressure drop per pipe length" parameter Modelica.Units.SI.Length length "Length of the pipe"; - parameter Real ReC(min=0)=4000 + parameter Real ReC(min=0) = 4000 "Reynolds number where transition to turbulence starts"; - - parameter Modelica.Units.SI.Velocity v_nominal=m_flow_nominal/(rho_default* - ARound) - "Velocity at m_flow_nominal (used to compute default value for hydraulic diameter dh)" - annotation (Dialog(group="Nominal condition")); - parameter Modelica.Units.SI.Length roughness(min=0) = 2.5e-5 "Absolute roughness of pipe, with a default for a smooth steel pipe (PE100: 7E-6)"; @@ -29,8 +23,7 @@ model PipeAutosize "Pipe model parameterized with pressure drop per pipe length" "Factor to take into account resistance of bends etc., fac=dp_nominal/dpStraightPipe_nominal"; final parameter Modelica.Units.SI.PressureDifference dpStraightPipe_nominal( - displayUnit="Pa")= - Modelica.Fluid.Pipes.BaseClasses.WallFriction.Detailed.pressureLoss_m_flow( + displayUnit="Pa")=Modelica.Fluid.Pipes.BaseClasses.WallFriction.Detailed.pressureLoss_m_flow( m_flow=m_flow_nominal, rho_a=rho_default, rho_b=rho_default, @@ -42,15 +35,18 @@ model PipeAutosize "Pipe model parameterized with pressure drop per pipe length" m_flow_small=m_flow_small) "Pressure loss of a straight pipe at m_flow_nominal"; - Modelica.Units.SI.Velocity v=m_flow/(rho_default*ARound) + Modelica.Units.SI.Velocity v = m_flow/(rho_default*ARound) "Flow velocity (assuming a round cross section area)"; protected - parameter Modelica.Units.SI.Area ARound=dh^2*Modelica.Constants.pi/4 + parameter Modelica.Units.SI.Area ARound = dh^2*Modelica.Constants.pi/4 "Cross sectional area (assuming a round cross section area)"; - parameter Medium.ThermodynamicState state_default= - Medium.setState_pTX( + parameter Modelica.Units.SI.Velocity v_nominal = m_flow_nominal/(rho_default* + ARound) + "Velocity at m_flow_nominal (used to compute default value for hydraulic diameter dh)"; + + parameter Medium.ThermodynamicState state_default= Medium.setState_pTX( T=Medium.T_default, p=Medium.p_default, X=Medium.X_default[1:Medium.nXi]) "Default state"; @@ -58,14 +54,13 @@ protected parameter Modelica.Units.SI.Density rho_default=Medium.density(state_default) "Density at nominal condition"; - parameter Modelica.Units.SI.DynamicViscosity mu_default= - Medium.dynamicViscosity(state_default) + parameter Modelica.Units.SI.DynamicViscosity mu_default = Medium.dynamicViscosity(state_default) "Dynamic viscosity at nominal condition"; initial equation dp_nominal = fac*dpStraightPipe_nominal; annotation ( - DefaultComponentName="pipCon", + defaultComponentName="pipCon", Icon(graphics={ Rectangle( extent={{-100,22},{100,-24}}, diff --git a/Buildings/Experimental/DHC/Networks/Combined/BaseClasses/PipeStandard.mo b/Buildings/Experimental/DHC/Networks/Pipes/PipeStandard.mo similarity index 66% rename from Buildings/Experimental/DHC/Networks/Combined/BaseClasses/PipeStandard.mo rename to Buildings/Experimental/DHC/Networks/Pipes/PipeStandard.mo index 85069cae6b6..82a20879bbc 100644 --- a/Buildings/Experimental/DHC/Networks/Combined/BaseClasses/PipeStandard.mo +++ b/Buildings/Experimental/DHC/Networks/Pipes/PipeStandard.mo @@ -1,18 +1,12 @@ -within Buildings.Experimental.DHC.Networks.Combined.BaseClasses; +within Buildings.Experimental.DHC.Networks.Pipes; model PipeStandard "Pipe model parameterized with hydraulic diameter" extends Buildings.Fluid.FixedResistances.HydraulicDiameter( - dp(nominal=1E5), - final linearized=false, - final v_nominal=m_flow_nominal * 4 / (rho_default * dh^2 * Modelica.Constants.pi)); + dp(nominal = 1E5), + final linearized = false, + final v_nominal = m_flow_nominal*4/(rho_default * dh^2 * Modelica.Constants.pi)); annotation ( - DefaultComponentName="pipDis", - Icon(graphics={ - Rectangle( - extent={{-100,22},{100,-24}}, - lineColor={0,0,0}, - fillPattern=FillPattern.HorizontalCylinder, - fillColor={0,140,72})}), + defaultComponentName="pipDis", Documentation(revisions="-Validation model for +Validation model for Buildings.Experimental.DHC.Networks.Combined.BaseClasses.PipeAutosize for range of flow rates and pressure drops per unit length.
", revisions="-This package contains models for elements that form the district network. +This package contains models for elements that form district energy distribution +networks.
")); end Networks; diff --git a/Buildings/Experimental/DHC/Networks/package.order b/Buildings/Experimental/DHC/Networks/package.order index a6cbd2e0592..9f280756b14 100644 --- a/Buildings/Experimental/DHC/Networks/package.order +++ b/Buildings/Experimental/DHC/Networks/package.order @@ -1,8 +1,10 @@ -Connection2Pipe -Connection2PipePlugFlow -Distribution2Pipe +Distribution1PipeAutoSize +Distribution1PipePlugFlow +Distribution2PipeAutoSize Distribution2PipePlugFlow -Combined +Connections Controls +Pipes Steam +Examples BaseClasses diff --git a/Buildings/Experimental/DHC/Plants/Combined/Controls/BaseClasses/StagingPlant.mo b/Buildings/Experimental/DHC/Plants/Combined/Controls/BaseClasses/StagingPlant.mo index c58daa98591..5533523e0c5 100644 --- a/Buildings/Experimental/DHC/Plants/Combined/Controls/BaseClasses/StagingPlant.mo +++ b/Buildings/Experimental/DHC/Plants/Combined/Controls/BaseClasses/StagingPlant.mo @@ -13,7 +13,7 @@ block StagingPlant "Number of units operating at design conditions" annotation (Dialog(group="HW loop and heat recovery chillers"), Evaluate=true); - parameter Real PLRStaTra(unit="1")=0.85 + parameter Real PLRStaTra(unit="1") = 0.85 "Part load ratio triggering stage transition"; parameter Modelica.Units.SI.HeatFlowRate QChiWatCasCoo_flow_nominal "Cooling design heat flow rate of HRC in cascading cooling mode (all units)" @@ -150,186 +150,129 @@ block StagingPlant t={i for i in 1:nChi}) "Compute chiller On/Off command from number of units to be commanded On" annotation (Placement(transformation(extent={{210,110},{230,130}}))); - Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter timCp(final k= - cp_default) "Scale" - annotation (Placement(transformation(extent={{-210,130},{-190,150}}))); - Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter timCp1(final k= - cp_default) "Scale" - annotation (Placement(transformation(extent={{-220,-90},{-200,-70}}))); + Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter timCp(final k = cp_default) + "Scale" annotation (Placement(transformation(extent={{-210,130},{-190,150}}))); + Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter timCp1(final k = cp_default) + "Scale" annotation (Placement(transformation(extent={{-220,-90},{-200,-70}}))); Buildings.Controls.OBC.CDL.Reals.MovingAverage movAve1(delta=300) - "Moving average" - annotation (Placement(transformation(extent={{-150,-130},{-130,-110}}))); - Buildings.Controls.OBC.CDL.Routing.IntegerScalarReplicator rep5(final nout= - nChiHea) - "Replicate" - annotation (Placement(transformation(extent={{180,-110},{200,-90}}))); + "Moving average" annotation (Placement(transformation(extent={{-150,-130},{-130,-110}}))); + Buildings.Controls.OBC.CDL.Routing.IntegerScalarReplicator rep5(final nout = nChiHea) + "Replicate" annotation (Placement(transformation(extent={{180,-110},{200,-90}}))); Buildings.Controls.OBC.CDL.Integers.GreaterEqualThreshold cmdChiHea[nChiHea]( final t={i for i in 1:nChiHea}) - "Compute chiller On/Off command from number of units to be commanded On" - annotation (Placement(transformation(extent={{210,-110},{230,-90}}))); + "Compute chiller On/Off command from number of units to be commanded On" annotation (Placement(transformation(extent={{210,-110},{230,-90}}))); Buildings.Controls.OBC.CDL.Integers.Subtract numChiHeaCoo "Number of HRC required in direct HR mode" annotation (Placement( transformation( extent={{-10,-10},{10,10}}, rotation=0, origin={10,-20}))); - Buildings.Controls.OBC.CDL.Integers.Sources.Constant numChiHea(final k= - nChiHea) "Number of HRC" - annotation (Placement(transformation(extent={{-80,-50},{-60,-30}}))); + Buildings.Controls.OBC.CDL.Integers.Sources.Constant numChiHea(final k = nChiHea) + "Number of HRC" annotation (Placement(transformation(extent={{-80,-50},{-60,-30}}))); Buildings.Controls.OBC.CDL.Integers.Add nChiHeaAndCooUnb - "Number of HRC required to meet heating and cooling load - Unbounded" - annotation (Placement(transformation( + "Number of HRC required to meet heating and cooling load - Unbounded" annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=0, origin={-70,0}))); Buildings.Controls.OBC.CDL.Integers.Subtract numChiCasCoo - "Number of HRC required in cascading cooling" - annotation (Placement(transformation(extent={{40,10},{60,30}}))); + "Number of HRC required in cascading cooling" annotation (Placement(transformation(extent={{40,10},{60,30}}))); ModeHeatRecoveryChiller modHeaCoo(final nChiHea=nChiHea) - "Compute the cascading cooling and direct HR switchover signals" - annotation (Placement(transformation(extent={{180,-10},{200,10}}))); + "Compute the cascading cooling and direct HR switchover signals" annotation (Placement(transformation(extent={{180,-10},{200,10}}))); Buildings.Controls.OBC.CDL.Integers.Min nChiHeaHeaAndCoo - "Number of HRC required to meet heating and cooling load - Bounded by number of HRC" - annotation (Placement(transformation( + "Number of HRC required to meet heating and cooling load - Bounded by number of HRC" annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=0, origin={-30,-40}))); Buildings.Controls.OBC.CDL.Reals.Subtract errTChiWatSup - "Compute tracking error" - annotation (Placement(transformation(extent={{-200,200},{-180,220}}))); + "Compute tracking error" annotation (Placement(transformation(extent={{-200,200},{-180,220}}))); Buildings.Controls.OBC.CDL.Reals.Subtract errDpChiWat - "Compute tracking error" - annotation (Placement(transformation(extent={{-200,250},{-180,270}}))); + "Compute tracking error" annotation (Placement(transformation(extent={{-200,250},{-180,270}}))); Buildings.Controls.OBC.CDL.Reals.LessThreshold cmpErrLim(t=-1, h=1E-4) - "Check tracking error limit" - annotation (Placement(transformation(extent={{-170,200},{-150,220}}))); + "Check tracking error limit" annotation (Placement(transformation(extent={{-170,200},{-150,220}}))); Buildings.Controls.OBC.CDL.Reals.GreaterThreshold cmpErrLim1(t=1.5E4, h=1E-1) - "Check tracking error limit" - annotation (Placement(transformation(extent={{-170,250},{-150,270}}))); + "Check tracking error limit" annotation (Placement(transformation(extent={{-170,250},{-150,270}}))); Buildings.Controls.OBC.CDL.Logical.Timer timErrExcLim(t=15*60) - "Timer for error exceeding error limit" - annotation (Placement(transformation(extent={{-110,200},{-90,220}}))); + "Timer for error exceeding error limit" annotation (Placement(transformation(extent={{-110,200},{-90,220}}))); Buildings.Controls.OBC.CDL.Logical.Timer timErrExcLim1(t=15*60) - "Timer for error exceeding error limit" - annotation (Placement(transformation(extent={{-110,250},{-90,270}}))); - Buildings.Controls.OBC.CDL.Logical.Or or2 "Failsafe condition to stage up" - annotation (Placement(transformation(extent={{-70,220},{-50,240}}))); + "Timer for error exceeding error limit" annotation (Placement(transformation(extent={{-110,250},{-90,270}}))); + Buildings.Controls.OBC.CDL.Logical.Or or2 "Failsafe condition to stage up" annotation (Placement(transformation(extent={{-70,220},{-50,240}}))); Buildings.Controls.OBC.CDL.Logical.And and2 - "Apply failsafe condition only in stage >= 1" - annotation (Placement(transformation(extent={{-140,250},{-120,270}}))); + "Apply failsafe condition only in stage >= 1" annotation (Placement(transformation(extent={{-140,250},{-120,270}}))); Buildings.Controls.OBC.CDL.Logical.And and3 - "Apply failsafe condition only in stage >= 1" - annotation (Placement(transformation(extent={{-140,200},{-120,220}}))); + "Apply failsafe condition only in stage >= 1" annotation (Placement(transformation(extent={{-140,200},{-120,220}}))); StageIndex staCoo(final nSta=nChi + nChiHea, tSta=15*60) - "Compute cooling stage" - annotation (Placement(transformation(extent={{50,144},{70,164}}))); + "Compute cooling stage" annotation (Placement(transformation(extent={{50,144},{70,164}}))); Modelica.Blocks.Sources.RealExpression capCoo(final y=abs(PLRStaTra*(min(nChi, staCoo.preIdxSta)/nChi*QChiWatChi_flow_nominal + max(0, staCoo.preIdxSta - nChi)/nChiHea*QChiWatCasCoo_flow_nominal))) - "Total capacity at current stage (>0) times stage-up PLR limit " - annotation (Placement(transformation(extent={{-120,90},{-100,110}}))); + "Total capacity at current stage (>0) times stage-up PLR limit" annotation (Placement(transformation(extent={{-120,90},{-100,110}}))); Buildings.Controls.OBC.CDL.Reals.Greater cmpOPLRLimUp(h=-1E-4*( QChiWatChi_flow_nominal + QChiWatCasCoo_flow_nominal_approx)/2) - "Check OPLR limit" - annotation (Placement(transformation(extent={{-80,110},{-60,130}}))); + "Check OPLR limit" annotation (Placement(transformation(extent={{-80,110},{-60,130}}))); Buildings.Controls.OBC.CDL.Logical.Timer timOPLRExcLim(t=15*60) - "Timer for OPLR exceeding limit" - annotation (Placement(transformation(extent={{-40,110},{-20,130}}))); + "Timer for OPLR exceeding limit" annotation (Placement(transformation(extent={{-40,110},{-20,130}}))); Buildings.Controls.OBC.CDL.Logical.Or or1 - "Failsafe condition or efficiency condition to stage up" - annotation (Placement(transformation(extent={{0,130},{20,150}}))); + "Failsafe condition or efficiency condition to stage up" annotation (Placement(transformation(extent={{0,130},{20,150}}))); Buildings.Controls.OBC.CDL.Integers.Min numOpeChi - "Number of operating chillers" - annotation (Placement(transformation(extent={{90,110},{110,130}}))); + "Number of operating chillers" annotation (Placement(transformation(extent={{90,110},{110,130}}))); Buildings.Controls.OBC.CDL.Integers.Sources.Constant numChi(final k=nChi) - "Number of chillers" - annotation (Placement(transformation(extent={{50,90},{70,110}}))); + "Number of chillers" annotation (Placement(transformation(extent={{50,90},{70,110}}))); Buildings.Controls.OBC.CDL.Integers.Subtract numOpeCooChiHea - "Number of HRC required for cooling" - annotation (Placement(transformation(extent={{-120,10},{-100,30}}))); + "Number of HRC required for cooling" annotation (Placement(transformation(extent={{-120,10},{-100,30}}))); Modelica.Blocks.Sources.RealExpression capHea(final y=PLRStaTra*staHea.preIdxSta /nChiHea*QHeaWat_flow_nominal) - "Total capacity at current stage times stage-up PLR limit " - annotation (Placement(transformation(extent={{-120,-150},{-100,-130}}))); + "Total capacity at current stage times stage-up PLR limit" annotation (Placement(transformation(extent={{-120,-150},{-100,-130}}))); Buildings.Controls.OBC.CDL.Reals.Greater cmpOPLRLimUp1(h=1E-1) - "Check OPLR limit" - annotation (Placement(transformation(extent={{-80,-130},{-60,-110}}))); + "Check OPLR limit" annotation (Placement(transformation(extent={{-80,-130},{-60,-110}}))); Buildings.Controls.OBC.CDL.Logical.Timer timOPLRExcLim1(t=15*60) - "Timer for OPLR exceeding limit" - annotation (Placement(transformation(extent={{-50,-130},{-30,-110}}))); - StageIndex staHea(final nSta=nChiHea, tSta=15*60) "Compute heating stage" - annotation (Placement(transformation(extent={{50,-130},{70,-110}}))); + "Timer for OPLR exceeding limit" annotation (Placement(transformation(extent={{-50,-130},{-30,-110}}))); + StageIndex staHea(final nSta=nChiHea, tSta=15*60) "Compute heating stage" annotation (Placement(transformation(extent={{50,-130},{70,-110}}))); Modelica.Blocks.Sources.RealExpression capHeaLow(final y=PLRStaTra*max(0, staHea.preIdxSta - 1)/nChiHea*QHeaWat_flow_nominal) - "Total capacity at next lower stage times stage-down PLR limit " - annotation (Placement(transformation(extent={{-120,-178},{-100,-158}}))); + "Total capacity at next lower stage times stage-down PLR limit" annotation (Placement(transformation(extent={{-120,-178},{-100,-158}}))); Buildings.Controls.OBC.CDL.Reals.Less cmpOPLRLimDow(h=1E-1) - "Check OPLR limit" - annotation (Placement(transformation(extent={{-80,-170},{-60,-150}}))); + "Check OPLR limit" annotation (Placement(transformation(extent={{-80,-170},{-60,-150}}))); Buildings.Controls.OBC.CDL.Logical.Timer timOPLRExcLim2(t=15*60) - "Timer for OPLR exceeding limit" - annotation (Placement(transformation(extent={{-50,-170},{-30,-150}}))); + "Timer for OPLR exceeding limit" annotation (Placement(transformation(extent={{-50,-170},{-30,-150}}))); Modelica.Blocks.Sources.RealExpression capCooLow(final y=abs(PLRStaTra*(min( nChi, max(0, staCoo.preIdxSta - 1))/nChi*QChiWatChi_flow_nominal + max( 0, staCoo.preIdxSta - 1 - nChi)/nChiHea*QChiWatCasCoo_flow_nominal))) - "Total capacity at next lower stage (>0) times stage-down PLR limit " - annotation (Placement(transformation(extent={{-120,62},{-100,82}}))); + "Total capacity at next lower stage (>0) times stage-down PLR limit" annotation (Placement(transformation(extent={{-120,62},{-100,82}}))); Buildings.Controls.OBC.CDL.Reals.Less cmpOPLRLimDow1(h=-1E-4*( QChiWatChi_flow_nominal + QChiWatCasCoo_flow_nominal_approx)/2) - "Check OPLR limit" - annotation (Placement(transformation(extent={{-80,70},{-60,90}}))); + "Check OPLR limit" annotation (Placement(transformation(extent={{-80,70},{-60,90}}))); Buildings.Controls.OBC.CDL.Logical.Timer timOPLRExcLim3(t=15*60) - "Timer for OPLR exceeding limit" - annotation (Placement(transformation(extent={{-40,70},{-20,90}}))); + "Timer for OPLR exceeding limit" annotation (Placement(transformation(extent={{-40,70},{-20,90}}))); Buildings.Controls.OBC.CDL.Logical.Not notFail - "Failsafe conditions are not true" - annotation (Placement(transformation(extent={{-40,190},{-20,210}}))); + "Failsafe conditions are not true" annotation (Placement(transformation(extent={{-40,190},{-20,210}}))); Buildings.Controls.OBC.CDL.Logical.And dowAndNotFail - "No stage up failsafe condition and efficiency condition to stage down" - annotation (Placement(transformation(extent={{0,90},{20,110}}))); + "No stage up failsafe condition and efficiency condition to stage down" annotation (Placement(transformation(extent={{0,90},{20,110}}))); Buildings.Controls.OBC.CDL.Reals.Subtract errTChiWatSup1 - "Compute tracking error" - annotation (Placement(transformation(extent={{-200,-230},{-180,-210}}))); + "Compute tracking error" annotation (Placement(transformation(extent={{-200,-230},{-180,-210}}))); Buildings.Controls.OBC.CDL.Reals.Subtract errDpHeaWat - "Compute tracking error" - annotation (Placement(transformation(extent={{-200,-290},{-180,-270}}))); - Buildings.Controls.OBC.CDL.Reals.GreaterThreshold - cmpErrLim2(t=+1, h=1E-4) - "Check tracking error limit" - annotation (Placement(transformation(extent={{-170,-230},{-150,-210}}))); + "Compute tracking error" annotation (Placement(transformation(extent={{-200,-290},{-180,-270}}))); + Buildings.Controls.OBC.CDL.Reals.GreaterThreshold cmpErrLim2(t=+1, h=1E-4) + "Check tracking error limit" annotation (Placement(transformation(extent={{-170,-230},{-150,-210}}))); Buildings.Controls.OBC.CDL.Reals.GreaterThreshold cmpErrLim3(t=1.5E4, h=1E-1) - "Check tracking error limit" - annotation (Placement(transformation(extent={{-170,-290},{-150,-270}}))); + "Check tracking error limit" annotation (Placement(transformation(extent={{-170,-290},{-150,-270}}))); Buildings.Controls.OBC.CDL.Logical.Timer timErrExcLim2(t=15*60) - "Timer for error exceeding error limit" - annotation (Placement(transformation(extent={{-110,-230},{-90,-210}}))); + "Timer for error exceeding error limit" annotation (Placement(transformation(extent={{-110,-230},{-90,-210}}))); Buildings.Controls.OBC.CDL.Logical.Timer timErrExcLim3(t=15*60) - "Timer for error exceeding error limit" - annotation (Placement(transformation(extent={{-110,-290},{-90,-270}}))); - Buildings.Controls.OBC.CDL.Logical.Or or3 "Failsafe condition to stage up" - annotation (Placement(transformation(extent={{-70,-270},{-50,-250}}))); - Buildings.Controls.OBC.CDL.Logical.And and1 - "Apply failsafe condition only in stage >= 1" - annotation (Placement(transformation(extent={{-140,-290},{-120,-270}}))); - Buildings.Controls.OBC.CDL.Logical.And and4 - "Apply failsafe condition only in stage >= 1" - annotation (Placement(transformation(extent={{-140,-230},{-120,-210}}))); + "Timer for error exceeding error limit" annotation (Placement(transformation(extent={{-110,-290},{-90,-270}}))); + Buildings.Controls.OBC.CDL.Logical.Or or3 "Failsafe condition to stage up" annotation (Placement(transformation(extent={{-70,-270},{-50,-250}}))); + Buildings.Controls.OBC.CDL.Logical.And and1 "Apply failsafe condition only in stage >= 1" annotation (Placement(transformation(extent={{-140,-290},{-120,-270}}))); + Buildings.Controls.OBC.CDL.Logical.And and4 "Apply failsafe condition only in stage >= 1" annotation (Placement(transformation(extent={{-140,-230},{-120,-210}}))); Buildings.Controls.OBC.CDL.Logical.Not notFail1 - "Failsafe conditions are not true" - annotation (Placement(transformation(extent={{-30,-230},{-10,-210}}))); - + "Failsafe conditions are not true" annotation (Placement(transformation(extent={{-30,-230},{-10,-210}}))); Buildings.Controls.OBC.CDL.Logical.Or or4 - "Failsafe condition or efficiency condition to stage up" - annotation (Placement(transformation(extent={{10,-130},{30,-110}}))); + "Failsafe condition or efficiency condition to stage up" annotation (Placement(transformation(extent={{10,-130},{30,-110}}))); Buildings.Controls.OBC.CDL.Logical.And dowAndNotFail1 - "No stage up failsafe condition and efficiency condition to stage down" - annotation (Placement(transformation(extent={{10,-170},{30,-150}}))); + "No stage up failsafe condition and efficiency condition to stage down" annotation (Placement(transformation(extent={{10,-170},{30,-150}}))); IntegerArrayHold hol(holdDuration=15*60, nin=4) - "Minimum plant stage runtime (needed because cooling and heating stage runtimes are handled separately)" - annotation (Placement(transformation(extent={{130,-10},{150,10}}))); + "Minimum plant stage runtime (needed because cooling and heating stage runtimes are handled separately)" annotation (Placement(transformation(extent={{130,-10},{150,10}}))); equation connect(dTChiWatPos.y, loaChiWat.u2) annotation (Line(points={{-188,80},{-186, diff --git a/Buildings/Experimental/DHC/Plants/Combined/Examples/AllElectricCWStorage.mo b/Buildings/Experimental/DHC/Plants/Combined/Examples/AllElectricCWStorage.mo index d9d4f8c8556..4efa05fbc46 100644 --- a/Buildings/Experimental/DHC/Plants/Combined/Examples/AllElectricCWStorage.mo +++ b/Buildings/Experimental/DHC/Plants/Combined/Examples/AllElectricCWStorage.mo @@ -37,8 +37,7 @@ model AllElectricCWStorage annotation ( Dialog(group="CHW loop and cooling-only chillers"), Placement(transformation(extent={{140,200},{160,220}}))); - replaceable parameter Fluid.Chillers.Data.ElectricReformulatedEIR.Generic datChiHea= - datChi + replaceable parameter Fluid.Chillers.Data.ElectricReformulatedEIR.Generic datChiHea = datChi constrainedby Buildings.Fluid.Chillers.Data.BaseClasses.Chiller "Chiller parameters (each unit)" annotation ( @@ -90,9 +89,9 @@ model AllElectricCWStorage final datChiHea=datChiHea, final datHeaPum=datHeaPum, nChi=2, - dpChiWatSet_max=sum(disCoo.dpDis_nominal), + dpChiWatSet_max=(sum(disCoo.lDis) + disCoo.lEnd)*disCoo.dp_length_nominal, nChiHea=2, - dpHeaWatSet_max=sum(disCoo.dpDis_nominal), + dpHeaWatSet_max=(sum(disHea.lDis) + disHea.lEnd)*disHea.dp_length_nominal, nHeaPum=2, dInsTan=0.05, nCoo=3, @@ -167,23 +166,27 @@ model AllElectricCWStorage Modelica.Blocks.Math.Gain norQFloCoo(k=1/sum(loaCoo.QCoo_flow_nominal)) "Normalized Q_flow" annotation (Placement(transformation(extent={{-146,-190},{-126,-170}}))); - Networks.Distribution2Pipe disHea( + Buildings.Experimental.DHC.Networks.Distribution2PipeAutoSize disHea( redeclare final package Medium = Medium, nCon=2, allowFlowReversal=false, mDis_flow_nominal=sum(loaHea.mBui_flow_nominal), mCon_flow_nominal={loaHea[1].mBui_flow_nominal,loaHea[2].mBui_flow_nominal}, - dpDis_nominal(each displayUnit="Pa") = {200000,100000}) + mEnd_flow_nominal=sum(loaHea.mBui_flow_nominal), + lDis={800,200}, + lEnd=200) "Distribution network for district heating system" annotation (Placement(transformation(extent={{20,62},{-20,82}}))); - Networks.Distribution2Pipe disCoo( + Buildings.Experimental.DHC.Networks.Distribution2PipeAutoSize disCoo( redeclare final package Medium = Medium, nCon=2, allowFlowReversal=false, mDis_flow_nominal=sum(loaCoo.mBui_flow_nominal), mCon_flow_nominal={loaCoo[1].mBui_flow_nominal,loaCoo[2].mBui_flow_nominal}, - dpDis_nominal(each displayUnit="Pa") = {20e4,10e4}) + mEnd_flow_nominal=sum(loaCoo.mBui_flow_nominal), + lDis={80,20}, + lEnd=20) "Distribution network for district cooling system" annotation (Placement(transformation(extent={{20,-60},{-20,-80}}))); diff --git a/Buildings/Experimental/DHC/Plants/Cooling/BaseClasses/TankBranch.mo b/Buildings/Experimental/DHC/Plants/Cooling/BaseClasses/TankBranch.mo index ac3c611f23a..1c15b643f87 100644 --- a/Buildings/Experimental/DHC/Plants/Cooling/BaseClasses/TankBranch.mo +++ b/Buildings/Experimental/DHC/Plants/Cooling/BaseClasses/TankBranch.mo @@ -5,8 +5,7 @@ model TankBranch "Model of the tank branch of a storage plant" redeclare final package Medium1 = Medium, redeclare final package Medium2 = Medium); - replaceable package Medium = - Modelica.Media.Interfaces.PartialMedium "Medium package"; + replaceable package Medium = Modelica.Media.Interfaces.PartialMedium "Medium package"; parameter Modelica.Units.SI.MassFlowRate m_flow_nominal(min=0) "Nominal mass flow rate" @@ -196,8 +195,8 @@ equation Line(points={{-100,-60},{100,-60}}, color={28,108,200}), Line(points={{-100,60},{100,60}}, color={28,108,200}), Line(points={{-42,-60}}, color={28,108,200}), - Line(points={{-60,-58},{-60,50},{0,50},{0,-52},{60,-52},{60,60}}, color - ={28,108,200}), + Line(points={{-60,-58},{-60,50},{0,50},{0,-52},{60,-52},{60,60}}, color= + {28,108,200}), Rectangle( extent={{-28,40},{32,-40}}, lineColor={0,0,0}, diff --git a/Buildings/Experimental/DHC/Plants/Cooling/Controls/TankStatus.mo b/Buildings/Experimental/DHC/Plants/Cooling/Controls/TankStatus.mo index 9d82969b67a..88337ec556a 100644 --- a/Buildings/Experimental/DHC/Plants/Cooling/Controls/TankStatus.mo +++ b/Buildings/Experimental/DHC/Plants/Cooling/Controls/TankStatus.mo @@ -37,25 +37,24 @@ block TankStatus "Returns the tank status from its temperature sensors" iconTransformation(extent={{100,-10},{120,10}}))); Buildings.Controls.OBC.CDL.Reals.Sources.Constant TTanTopChe( final k(final unit="K", displayUnit="degC") = THig) "Set point for top temperatuer of tank" - annotation( + annotation ( Placement(visible = true, transformation(origin = {-70, -30}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Buildings.Controls.OBC.CDL.Reals.Sources.Constant TTanBotChe( final k(final unit="K", displayUnit="degC") = TLow) "Set point for bottom temperature of tank" - annotation( + annotation ( Placement(visible = true, transformation(origin = {-70, -70}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Buildings.Controls.OBC.CDL.Reals.Greater gre "Test for temperature set points" - annotation( + annotation ( Placement(visible = true, transformation(origin = {-30, -50}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Buildings.Controls.OBC.CDL.Utilities.Assert assMes( message = "THig must be greater than TLow.") "Assertion if temperature set points are not correct" - annotation( + annotation ( Placement(visible = true, transformation(origin = {10, -50}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); equation connect(hysCha.y, not1.u) - annotation (Line(points={{-18,0},{18,0}}, - color={255,0,255})); + annotation (Line(points={{-18,0},{18,0}}, color={255,0,255})); connect(TTan[1],hysCha. u) annotation (Line(points={{-110,-2.5},{-52,-2.5},{-52, 0},{-42,0}}, color={0,0,127})); connect(TTan[2],hysEmp. u) annotation (Line(points={{-110,2.5},{-52,2.5},{-52, @@ -65,11 +64,11 @@ equation 0},{110,-2.5}}, color={255,0,255})); connect(not1.y, y[2]) annotation (Line(points={{42,0},{60,0},{60,2.5},{110, 2.5}}, color={255,0,255})); - connect(TTanTopChe.y, gre.u1) annotation( + connect(TTanTopChe.y, gre.u1) annotation ( Line(points = {{-58, -30}, {-50, -30}, {-50, -50}, {-42, -50}}, color = {0, 0, 127})); - connect(TTanBotChe.y, gre.u2) annotation( + connect(TTanBotChe.y, gre.u2) annotation ( Line(points = {{-58, -70}, {-52, -70}, {-52, -58}, {-42, -58}}, color = {0, 0, 127})); - connect(gre.y, assMes.u) annotation( + connect(gre.y, assMes.u) annotation ( Line(points = {{-18, -50}, {-2, -50}}, color = {255, 0, 255})); annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={ Rectangle( @@ -117,4 +116,4 @@ First implementation. This is forfalse
due to the hysteresis.
"));
-end TankStatus;
\ No newline at end of file
+end TankStatus;
diff --git a/Buildings/Fluid/Geothermal/BuriedPipes/BaseClasses/groundCouplingFactors.mo b/Buildings/Fluid/FixedResistances/BuriedPipes/BaseClasses/groundCouplingFactors.mo
similarity index 96%
rename from Buildings/Fluid/Geothermal/BuriedPipes/BaseClasses/groundCouplingFactors.mo
rename to Buildings/Fluid/FixedResistances/BuriedPipes/BaseClasses/groundCouplingFactors.mo
index b7d2e85c29d..bbf2ad1be58 100644
--- a/Buildings/Fluid/Geothermal/BuriedPipes/BaseClasses/groundCouplingFactors.mo
+++ b/Buildings/Fluid/FixedResistances/BuriedPipes/BaseClasses/groundCouplingFactors.mo
@@ -1,4 +1,4 @@
-within Buildings.Fluid.Geothermal.BuriedPipes.BaseClasses;
+within Buildings.Fluid.FixedResistances.BuriedPipes.BaseClasses;
function groundCouplingFactors
"Geometric factors for buried pipe-ground coupling"
extends Modelica.Icons.Function;
diff --git a/Buildings/Fluid/Geothermal/BuriedPipes/BaseClasses/package.mo b/Buildings/Fluid/FixedResistances/BuriedPipes/BaseClasses/package.mo
similarity index 70%
rename from Buildings/Fluid/Geothermal/BuriedPipes/BaseClasses/package.mo
rename to Buildings/Fluid/FixedResistances/BuriedPipes/BaseClasses/package.mo
index a8569905eda..a5a9d80874b 100644
--- a/Buildings/Fluid/Geothermal/BuriedPipes/BaseClasses/package.mo
+++ b/Buildings/Fluid/FixedResistances/BuriedPipes/BaseClasses/package.mo
@@ -1,11 +1,11 @@
-within Buildings.Fluid.Geothermal.BuriedPipes;
+within Buildings.Fluid.FixedResistances.BuriedPipes;
package BaseClasses "Package with base classes for Buildings.Fluid.Geothermal.BuriedPipes"
extends Modelica.Icons.BasesPackage;
annotation (Documentation(info="
This package contains base classes that are used to construct the models in -Buildings.Fluid.Geothermal.BuriedPipes. +Buildings.Fluid.Geothermal.BuriedPipes.
", revisions="BuriedPipes
package+This example shows how to use model Buildings.Fluid.FixedResistances.BuriedPipes.PipeGroundCoupling +and compares the fluid output temperature with and without ground layer. +
+", revisions=" +This example showcases the ground thermal coupling for a single uninsulated @@ -163,6 +166,12 @@ Both design flow direction and reverse flow direction ", revisions="
BuriedPipes
packageBuriedPipes
packageBuriedPipes
packageThis package contains examples for the use of models that can be found in -Buildings.Fluid.Geothermal.BuriedPipes. +Buildings.Fluid.Geothermal.BuriedPipes.
", revisions="- +
where:
L = pipe length [m]
ks = soil thermal conductivity [W/(m.K)]
Pij = geometric factor (see
-
-Buildings.Fluid.Geothermal.BuriedPipes.BaseClasses.groundCouplingFactors
+
+Buildings.Fluid.FixedResistances.BuriedPipes.BaseClasses.groundCouplingFactors
for more information)
Qi = net heat transfer from pipe i [W]
Ti = temperature at the exterior surface of pipe i [degC]
@@ -281,6 +281,12 @@ and chilled-water distribution systems. National Bureau of Standards.
", revisions="
BuriedPipes
package+This model considers the conduction heat transfer between the buried pipe +wall and the undisturbed ground temperature by adding a dynamic ground layer. +The dynamic ground layer is modeled using the radial heat conduction model +through a hollow cylinder + Buildings.HeatTransfer.Conduction.SingleLayerCylinder. +The undisturbed ground temperature is calculated +by the model +Buildings.BoundaryConditions.GroundTemperature.UndisturbedSoilTemperature. +This model can consider an axial discretization of the pipe. +A figure highlighting the main variables and parameters is shown below: +
++ +
++Ettore Zanetti, David Blum, Michael Wetter (2023) +Control development and sizing analysis for a 5th generation district heating and cooling network using Modelica, +In Proceedings of the 15th International Modelica Conference. Aachen, Germany, Oct 9-11, 2023. +
+")); +end PipeGroundCoupling; diff --git a/Buildings/Fluid/Geothermal/BuriedPipes/Validation/GroundCouplingAIT.mo b/Buildings/Fluid/FixedResistances/BuriedPipes/Validation/GroundCouplingAIT.mo similarity index 97% rename from Buildings/Fluid/Geothermal/BuriedPipes/Validation/GroundCouplingAIT.mo rename to Buildings/Fluid/FixedResistances/BuriedPipes/Validation/GroundCouplingAIT.mo index 803993fd9e6..9e5125dd6d9 100644 --- a/Buildings/Fluid/Geothermal/BuriedPipes/Validation/GroundCouplingAIT.mo +++ b/Buildings/Fluid/FixedResistances/BuriedPipes/Validation/GroundCouplingAIT.mo @@ -1,4 +1,4 @@ -within Buildings.Fluid.Geothermal.BuriedPipes.Validation; +within Buildings.Fluid.FixedResistances.BuriedPipes.Validation; model GroundCouplingAIT "Validation for pipe and ground coupling against data from Austrian Institute of Technology" extends Modelica.Icons.Example; @@ -402,12 +402,12 @@ equation StopTime=603900, Interval=900, Tolerance=1e-006), - __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Fluid/Geothermal/BuriedPipes/Validation/GroundCouplingAIT.mos" + __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Fluid/FixedResistances/BuriedPipes/Validation/GroundCouplingAIT.mos" "Simulate and plot"), Diagram(coordinateSystem(extent={{-120,-160},{160,160}})), Documentation(info="-Validation of +Validation of Buildings.Fluid.Geothermal.BuriedPipes.GroundCoupling using the experimental data collected by the Austrian Institute of Technology.
@@ -418,6 +418,12 @@ Buildings.Fluid.FixedResistances.Validation.PlugFlowPipes.PlugFlowAIT for mo ", revisions="BuriedPipes
packagecliCon
to be parameter.
This is required to avoid a translation error in OpenModelica which
diff --git a/Buildings/Fluid/Geothermal/BuriedPipes/Validation/package.mo b/Buildings/Fluid/FixedResistances/BuriedPipes/Validation/package.mo
similarity index 58%
rename from Buildings/Fluid/Geothermal/BuriedPipes/Validation/package.mo
rename to Buildings/Fluid/FixedResistances/BuriedPipes/Validation/package.mo
index b95914033da..ed7dd0f4812 100644
--- a/Buildings/Fluid/Geothermal/BuriedPipes/Validation/package.mo
+++ b/Buildings/Fluid/FixedResistances/BuriedPipes/Validation/package.mo
@@ -1,11 +1,11 @@
-within Buildings.Fluid.Geothermal.BuriedPipes;
+within Buildings.Fluid.FixedResistances.BuriedPipes;
package Validation "Collection of validation models"
extends Modelica.Icons.ExamplesPackage;
annotation (Documentation(info="
This package contains validation models for the classes in -Buildings.Fluid.Geothermal.BuriedPipes. +Buildings.Fluid.Geothermal.BuriedPipes.
")); end Validation; diff --git a/Buildings/Fluid/Geothermal/BuriedPipes/Validation/package.order b/Buildings/Fluid/FixedResistances/BuriedPipes/Validation/package.order similarity index 100% rename from Buildings/Fluid/Geothermal/BuriedPipes/Validation/package.order rename to Buildings/Fluid/FixedResistances/BuriedPipes/Validation/package.order diff --git a/Buildings/Fluid/Geothermal/BuriedPipes/package.mo b/Buildings/Fluid/FixedResistances/BuriedPipes/package.mo similarity index 91% rename from Buildings/Fluid/Geothermal/BuriedPipes/package.mo rename to Buildings/Fluid/FixedResistances/BuriedPipes/package.mo index ec4fc2fb6c0..d8c9903f89c 100644 --- a/Buildings/Fluid/Geothermal/BuriedPipes/package.mo +++ b/Buildings/Fluid/FixedResistances/BuriedPipes/package.mo @@ -1,4 +1,4 @@ -within Buildings.Fluid.Geothermal; +within Buildings.Fluid.FixedResistances; package BuriedPipes "Package with models for buried pipes" extends Modelica.Icons.VariantsPackage; diff --git a/Buildings/Fluid/Geothermal/BuriedPipes/package.order b/Buildings/Fluid/FixedResistances/BuriedPipes/package.order similarity index 71% rename from Buildings/Fluid/Geothermal/BuriedPipes/package.order rename to Buildings/Fluid/FixedResistances/BuriedPipes/package.order index e2075c89cde..2d450e3e210 100644 --- a/Buildings/Fluid/Geothermal/BuriedPipes/package.order +++ b/Buildings/Fluid/FixedResistances/BuriedPipes/package.order @@ -1,4 +1,5 @@ GroundCoupling +PipeGroundCoupling Examples Validation BaseClasses diff --git a/Buildings/Fluid/FixedResistances/package.order b/Buildings/Fluid/FixedResistances/package.order index 409b9ae7881..1a3288860e6 100644 --- a/Buildings/Fluid/FixedResistances/package.order +++ b/Buildings/Fluid/FixedResistances/package.order @@ -6,6 +6,7 @@ Pipe PlugFlowPipe PlugFlowPipeDiscretized PressureDrop +BuriedPipes Examples Validation BaseClasses diff --git a/Buildings/Fluid/Geothermal/package.order b/Buildings/Fluid/Geothermal/package.order index 525913dbb84..56ed880db57 100644 --- a/Buildings/Fluid/Geothermal/package.order +++ b/Buildings/Fluid/Geothermal/package.order @@ -1,4 +1,3 @@ Aquifer Borefields Boreholes -BuriedPipes diff --git a/Buildings/Fluid/HeatPumps/Data/EquationFitReversible/BaseClasses/HeatingCoolingData.mo b/Buildings/Fluid/HeatPumps/Data/EquationFitReversible/BaseClasses/HeatingCoolingData.mo index 73cfcba7739..7124bfa9ea5 100644 --- a/Buildings/Fluid/HeatPumps/Data/EquationFitReversible/BaseClasses/HeatingCoolingData.mo +++ b/Buildings/Fluid/HeatPumps/Data/EquationFitReversible/BaseClasses/HeatingCoolingData.mo @@ -1,5 +1,4 @@ within Buildings.Fluid.HeatPumps.Data.EquationFitReversible.BaseClasses; - record HeatingCoolingData "Record for performance data that are used for heating and cooling separately" parameter Modelica.Units.SI.HeatFlowRate Q_flow "Nominal capacity" diff --git a/Buildings/Resources/Images/Fluid/Geothermal/BuriedPipes/BaseClasses/groundCouplingFactors.png b/Buildings/Resources/Images/Fluid/FixedResistances/BuriedPipes/BaseClasses/groundCouplingFactors.png similarity index 100% rename from Buildings/Resources/Images/Fluid/Geothermal/BuriedPipes/BaseClasses/groundCouplingFactors.png rename to Buildings/Resources/Images/Fluid/FixedResistances/BuriedPipes/BaseClasses/groundCouplingFactors.png diff --git a/Buildings/Resources/Images/Fluid/Geothermal/BuriedPipes/BaseClasses/groundCouplingFactors.svg b/Buildings/Resources/Images/Fluid/FixedResistances/BuriedPipes/BaseClasses/groundCouplingFactors.svg similarity index 100% rename from Buildings/Resources/Images/Fluid/Geothermal/BuriedPipes/BaseClasses/groundCouplingFactors.svg rename to Buildings/Resources/Images/Fluid/FixedResistances/BuriedPipes/BaseClasses/groundCouplingFactors.svg diff --git a/Buildings/Resources/Images/Fluid/Geothermal/BuriedPipes/GroundCoupling.png b/Buildings/Resources/Images/Fluid/FixedResistances/BuriedPipes/GroundCoupling.png similarity index 100% rename from Buildings/Resources/Images/Fluid/Geothermal/BuriedPipes/GroundCoupling.png rename to Buildings/Resources/Images/Fluid/FixedResistances/BuriedPipes/GroundCoupling.png diff --git a/Buildings/Resources/Images/Fluid/Geothermal/BuriedPipes/GroundCoupling.svg b/Buildings/Resources/Images/Fluid/FixedResistances/BuriedPipes/GroundCoupling.svg similarity index 100% rename from Buildings/Resources/Images/Fluid/Geothermal/BuriedPipes/GroundCoupling.svg rename to Buildings/Resources/Images/Fluid/FixedResistances/BuriedPipes/GroundCoupling.svg diff --git a/Buildings/Resources/Images/Fluid/FixedResistances/BuriedPipes/PipeGroundCoupling.png b/Buildings/Resources/Images/Fluid/FixedResistances/BuriedPipes/PipeGroundCoupling.png new file mode 100644 index 0000000000000000000000000000000000000000..27f899ccd65bd542a62469c82dd0d584bd2c62a6 GIT binary patch literal 54638 zcmeFZXH-*J)HjZZ1;k1MiWEhW5&=Q!B`5;YLQO&q3L;&M^cqn?2?7ctsDvgxK%}=& zM2dh^2~CQC6zRPr5Z=qEqs}m2{$)MyhsU)rH#fJOv-|$-eNKQDO!*)KD+3J;%|VrG zS9NG;_9)QM(4zP61+`5AI6sz`<>8Qs0H}cNv|mOz#nT`&>}+valLj
zks{O#{zruR7p!k604NBlGOFB&Zo@(mqXih15~FjCGCN&6!2+~2kTZ^ducQ4diZeM6
zw3rF{% rG7M!DToRD
zh@Y6YhylT3i$9V(ljh2kQ%ND6Tk=^rGkQhsBGsS)EjJ_0d2AayIJ$Nh1E$0JJj&Yx
zTN#5UH+Qwhdt-7oMX?l+ZNWHe6f>ZTzh&vyuhTY}t_>u--{<1?P21-RTFF|79e4gM
z@m#^>$m^}PMQK0*+9y@Lt?5B(C2+5Y+I4}x;PTk^`s&
z?+fjA-67Q$ 8}BlO^=A90>$S1t2Lb4yv%
z9vy#@B6XH3u5#dDXcC)?xo?^m97M*IV~%}w1Di4rZ_n^4<2}wSMn-PNPl@a%iqM!G
zVWe2%CB_(VTu&@5-u)Gb=Hm%7!}s518s3iz?SEPJkg?V`TdueMkWf=VmltICrnZ4x
zG?F6t`HN%82L&%BsNPy6C+$7~ZRf|Dzo===`2OKpL4u2l# h_uU#f8;sDSa|m3NrY0zRFHM*UWqNo_fILvq0c=
zeI%=cYJ7d>hoXgul*(xFgWDQ19Q%`ed<<{kkFR^ZV&DAo=51PifpC$ZwnmdrN}pRM
z!@Ht|htHgEx_I9N#zrSkuHE|LVErTjztbv2CjYWfaOs-u5SL+Mf@l>?W^lW{Q?O#8
z`mhvPmngk1nxw~}-r2CSC7PbpVYCNl?mj>z0DoFPzMZrS7vqhud!JgkCd*RssJE%R
zLvT5lw%;vd+r#i%fJJWoXx+Cb+Z|E!zL^ S{Xi~$@uuk!l@dXQ197hcY 3`Rs;4&WH}
zoI@y4AJL0kv%;t#5ti`|4V0Tu_kqWD&%us2%YKxgjLVK -*QPcWG+Ob`4``C&BP@Q5b*}uaYI3ee#KR4#?CRHS5o91w6wZt
zb24=a^||BaHAf=_k5t1H!9bUg00$j(8OEwS=$s56J+j}jJO1!DP4;oE#2Ac{-NDYy
zv^VY7GbD$+$fWZ+93P RvROQoYzCw)!`=PG{B%i7KARb*?_n^Pv*8U0DbM|#3o;ef@
z(ecta4SMp3?=fg)&O1}}>qwB&rf|5lxi2IjifhII(3eElx$9Oj#F&|<)#sOev#`%c
ziAhuAi )v;WdP^Br7MetC#R
z(mdIG#Ldr)w}mzxWjg7Gy}`4}TL|{JU;-qhP+XmV_pV|Z9Ya_!_IxB-)=$6Ka^}$(
z==X4%3um#1A;{V
z
AQ~XzpNRmgaxo*>
zQfyP5*Xw-^%dc;k9%YBRAGrBgC)QKg&OLt~pt@Mc_3qp3>s#8Z-2~e_lP}OmY4<$4
zMK=BXvY3;0+}@Nt&9#Kv*R-!EHi-gWIQq)JeKS51^29~(tYOss_&w@&{_|<;N;MJ_
z{uw#%B}|UFql)xI2ZDrU9oO{|tY%y$uUtyrI&{Go<7wP;b$m&)KZE?ZT{&idv@2#J
zgz3Af@GEOo+TC9gscF-zEY<;H-b^qWQVk2;>Mi-u#2f^z!^4mz*rbk4;V?RppZnl#
zTm*y6u>KX3*g&n#0Z7(|ijxCfJ$#rDcP~)v`V?I34T_@)o(?o+e>xKBUq{<8bJ0UG
zJr5!}K8JfpRUJN|ohgtmrWza6Rs1ZW(?F3eb>}PQLe*||jyr=I>*2-~8Pb<84n6`J
zha|pJeD?U-xORAfwjq6Tz&SELhKI{8aYv}2d%uvm%&6R>be~kq8)+q5P_-vPyRdCy
zio15nREy(bd!mU@jbDb}H)=<{5hp<)Z*gMap>VvNvo|3m)9|UCRWA6Y{zTw#k?uh>
zVFmYU($B;>R1E*U9oo{V$7i&7Ct;GZjh>*w&QEKVCuF!zTRQte8-9l!GIm$u))s`I
z`zt|+0n2%+3d+Nb+t_VR5xDn7#|D)MIGV!0P1+x6Kh2&LRIJf)_h
3pgdpiX#z
zlwbU?@n^^b!#17(hz&5sawq-cPhdubwycc0EARtKAOf6UcyN<
+&!sxd8>*VmQh1;pZ
zBJTKii?ZR+6sK8c^Qi#F%Hq8Z&pKCzy?iyiYI*Yjs;%03cb-H}LWC^Yr)vSe#wL}d
z0ljQsU%By{9+UP}E={wMvcTloYC%#8VN3PaQ)IxqD4Cr5doFOZl#yW_Ki5rUc+7nt
z$ADX9yp~|^z8cwE=9TW!tLRg^ZWDE8naClE8u?eFok9+%hI}59y1$MXzz94ozv^EJ
zF2V*7T-|`q@vkGw&W&TMmaXOpV@M@QzH<+FOX8GfQbys|Gb=BWz_kg37gfbnj|->q
zoP7()cAn$b-`g;lE6*0Rd1I&s%1j(2gcZQz?Il2Iq5nEIg+z#tYg5EU+-9;FaXZh<
ztnemO(($idt1a-Dm&Wt2phqxp43B8ntkZ>s(IO(^96X}4MV;RmOMxt=pLQFFm8Z{$
z6CrMcKj>X?`ua7Ts(=!+x-9_KHhy0UMZCfO9B)O@YQbW{N`JP_<^U3_=%M54pl-WW
zG4nr*I1wL~Y?kozg``-yzX28ti(LVm2K-kByaebwJ6>+A^dJBK-}%6R5+ODx`;Yg0
zs
JfnCQ2(FnLmP3gz&Gw%z6D@(cqW%_D@Vv|U4%@gI$VGBtbT7may
z<<%)#z38&&+^Fs!PJ)}K$*;2C)5InW;w_N*98>v