Skip to content

Commit

Permalink
* there was a wrong value of gain in Heat Pump, changed Controller of…
Browse files Browse the repository at this point in the history
… Cold Storage, #55
  • Loading branch information
MStillerEBC committed Oct 2, 2019
1 parent 39298c1 commit 0af83e9
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 41 deletions.
2 changes: 1 addition & 1 deletion pyDMPC/ControlFramework/Init.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
commands.append(range(308,313,5))
traj_points.append([])
traj_var.append([])
cost_fac.append([-1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 100.0, 0.0])
cost_fac.append([0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 10000.0, 0.0])
factors.append([1, -10./4.18/8./100.])

sys_id.append(1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ partial model GeothermalHeatPumpBase
AixLib.Fluid.HeatPumps.HeatPumpSimple heatPumpTab(
volumeEvaporator(T_start=T_start_cold[1]),
volumeCondenser(T_start=T_start_warm[5]),
gain(k = -1),
redeclare package Medium = Water,
tablePower=[0,266.15,275.15,280.15,283.15,293.15; 308.15,3300,3400,3500,
3700,3800; 323.15,4500,4400,4600,5000,5100],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ model GeothermalHeatPumpSystem
Subsystems.Geo.BaseClasses.TEASER_DataBase.TEASER_Office()),
negate1(k=-1),
negate(k=-1),
heatPumpTab(tablePower=[0,266.15,275.15,280.15,283.15,293.15; 308.15,1650,1700,
1750,1850,1900; 323.15,2250,2200,2300,2500,2550],
tableHeatFlowCondenser=[0,266.16,275.15,280.15,283.15,293.15; 308.15,4850,
5800,6500,7400,8150; 323.15,5000,5600,6450,8350,8750]),
heatPumpTab(tablePower=[0,266.15,275.15,280.15,283.15,293.15; 308.15,4125,
4250,4375,4625,4750; 323.15,5625,5500,5750,6250,6375],
tableHeatFlowCondenser=[0,266.16,275.15,280.15,283.15,293.15; 308.15,
12125,14500,16250,18500,20375; 323.15,12500,14000,16125,20875,21875]),
movMea(delta=7200));


Expand All @@ -51,12 +51,12 @@ model GeothermalHeatPumpSystem
extent={{-6,-6},{6,6}},
rotation=180,
origin={72,6})));
Subsystems.Geo.BaseClasses.geothermalFieldController geothermalFieldControllerCold(bandwidth=
275.15)
AixLib.Fluid.Examples.GeothermalHeatPump.Control.geothermalFieldController geothermalFieldControllerCold(
temperature_low=273.15 + 6, temperature_high=273.15 + 8)
"Controls the heat exchange with the geothermal field and the cold storage"
annotation (Placement(transformation(extent={{-104,40},{-88,56}})));
Subsystems.Geo.BaseClasses.geothermalFieldController geothermalFieldControllerHeat(bandwidth=
275.15)
277.15)
"Controls the heat exchange with the geothermal field and the heat storage"
annotation (Placement(transformation(extent={{-100,-34},{-84,-18}})));
Modelica.Blocks.Interfaces.RealInput traj "Connector of Real input signal 2"
Expand All @@ -68,7 +68,7 @@ model GeothermalHeatPumpSystem
annotation (Placement(transformation(extent={{-78,62},{-58,82}})));
Modelica.Blocks.Interfaces.RealInput T_set_HeatStorage
"Setpoint of the Heat Storage"
annotation (Placement(transformation(extent={{-166,8},{-154,20}}),
annotation (Placement(transformation(extent={{-170,34},{-150,54}}),
iconTransformation(extent={{-160,20},{-120,60}})));
Modelica.Blocks.Sources.Constant const2(k=4)
"Infiltration rate"
Expand All @@ -77,11 +77,6 @@ model GeothermalHeatPumpSystem
origin={-153,29})));
Buildings.Controls.OBC.CDL.Continuous.Add add1
annotation (Placement(transformation(extent={{-134,16},{-124,26}})));
Modelica.Blocks.Sources.Constant T_set_ColdStorage(k=279.15)
"Infiltration rate" annotation (Placement(transformation(
extent={{5,-5},{-5,5}},
rotation=180,
origin={-153,45})));
equation
connect(pressureDifference.y, pumpColdConsumer.dp_in) annotation (Line(points={{65.4,6},
{55,6},{55,-11.6}}, color={0,0,127}));
Expand All @@ -96,9 +91,6 @@ equation
connect(pumpGeothermalSource.dp_in,pressureDifference. y) annotation (Line(
points={{-89,-45.6},{-89,-36},{62,-36},{62,6},{65.4,6}}, color={0,
0,127}));
connect(getTStorageLower.y,geothermalFieldControllerCold. temperature)
annotation (Line(points={{-139,58},{-108,58},{-108,48},{-104,48}},
color={0,0,127}));
connect(geothermalFieldControllerCold.valveOpening2, valveHeatSource.y)
annotation (Line(points={{-87.04,43.2},{-86,43.2},{-86,1},{-68.4,1}}, color=
{0,0,127}));
Expand Down Expand Up @@ -140,13 +132,15 @@ equation
24}}, color={0,0,127}));
connect(add1.y, geothermalFieldControllerHeat.Setpoint) annotation (Line(
points={{-123.5,21},{-120,21},{-120,-20.4},{-100,-20.4}}, color={0,0,127}));
connect(T_set_HeatStorage, hPControllerOnOff.T_set)
annotation (Line(points={{-160,14},{-160,68},{-78,68}}, color={0,0,127}));
connect(T_set_HeatStorage, add1.u2) annotation (Line(points={{-160,14},{-150,
14},{-150,18},{-135,18}}, color={0,0,127}));
connect(T_set_ColdStorage.y, geothermalFieldControllerCold.Setpoint)
annotation (Line(points={{-147.5,45},{-128,45},{-128,53.6},{-104,53.6}},
color={0,0,127}));
connect(getTStorageLower.y, coldStorageTemperature)
annotation (Line(points={{-139,58},{78,58},{78,80}}, color={0,0,127}));
connect(getTStorageLower.y, geothermalFieldControllerCold.temperature)
annotation (Line(points={{-139,58},{-110,58},{-110,48},{-104,48}}, color={0,
0,127}));
connect(T_set_HeatStorage, hPControllerOnOff.T_set) annotation (Line(points={
{-160,44},{-132,44},{-132,68},{-78,68}}, color={0,0,127}));
connect(T_set_HeatStorage, add1.u2) annotation (Line(points={{-160,44},{-144,
44},{-144,18},{-135,18}}, color={0,0,127}));
annotation (experiment(StopTime=86400, Interval=10), Documentation(revisions="<html>
<ul>
<li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ model GeothermalHeatPump "Example of a geothermal heat pump systemreplaceable pa
geothField_sink1(T=T_start_cold[1]),
pumpCondenser(m_flow_nominal=8),
pumpHeatConsumer(m_flow_nominal=8),
heatPumpTab(tablePower=[0,266.15,275.15,280.15,283.15,293.15; 308.15,1650,
1700,1750,1850,1900; 323.15,2250,2200,2300,2500,2550],
heatPumpTab(
tableHeatFlowCondenser=[0,266.16,275.15,280.15,283.15,293.15; 308.15,
4850,5800,6500,7400,8150; 323.15,5000,5600,6450,8350,8750]));
4850,5800,6500,7400,8150; 323.15,5000,5600,6450,8350,8750],
tablePower=[0,266.15,275.15,280.15,283.15,293.15; 308.15,4125,4250,4375,
4625,4750; 323.15,5625,5500,5750,6250,6375]));

AixLib.Fluid.Sources.Boundary_pT coldConsumerFlow(redeclare package Medium =
Water, nPorts=1) annotation (Placement(transformation(
Expand Down Expand Up @@ -65,22 +66,17 @@ model GeothermalHeatPump "Example of a geothermal heat pump systemreplaceable pa
annotation (Placement(transformation(extent={{5,-5},{-5,5}},
rotation=180,
origin={-153,29})));
Modelica.Blocks.Sources.Constant T_set_ColdStorage(k=279.15)
"Infiltration rate" annotation (Placement(transformation(
extent={{5,-5},{-5,5}},
rotation=180,
origin={-153,45})));
Buildings.Controls.OBC.CDL.Continuous.Add add1
annotation (Placement(transformation(extent={{-140,16},{-130,26}})));
Subsystems.Geo.BaseClasses.geothermalFieldController geothermalFieldControllerCold(bandwidth=
275.15)
AixLib.Fluid.Examples.GeothermalHeatPump.Control.geothermalFieldController geothermalFieldControllerCold(
temperature_low=273.15 + 6, temperature_high=273.15 + 8)
"Controls the heat exchange with the geothermal field and the cold storage"
annotation (Placement(transformation(extent={{-104,38},{-88,54}})));
AixLib.Controls.HeatPump.HPControllerOnOff hPControllerOnOff(bandwidth=5)
"Controls the temperature in the heat storage by switching the heat pump on or off"
annotation (Placement(transformation(extent={{-78,62},{-58,82}})));
Subsystems.Geo.BaseClasses.geothermalFieldController geothermalFieldControllerHeat(bandwidth=
275.15)
Subsystems.Geo.BaseClasses.geothermalFieldController geothermalFieldControllerHeat(bandwidth
=277.15)
"Controls the heat exchange with the geothermal field and the heat storage"
annotation (Placement(transformation(extent={{-96,-34},{-80,-18}})));
Modelica.Thermal.HeatTransfer.Sources.FixedTemperature cellarTemperature(T=284.15)
Expand Down Expand Up @@ -117,9 +113,6 @@ equation
annotation (Line(points={{96,2},{111.6,2}}, color={0,0,127}));
connect(negate2.u, const1.y)
annotation (Line(points={{120.8,2},{127.4,2}}, color={0,0,127}));
connect(T_set_ColdStorage.y, geothermalFieldControllerCold.Setpoint)
annotation (Line(points={{-147.5,45},{-128,45},{-128,51.6},{-104,51.6}},
color={0,0,127}));
connect(const2.y,add1. u1) annotation (Line(points={{-147.5,29},{-141,29},{
-141,24}},
color={0,0,127}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ partial model GeothermalHeatPumpBase
AixLib.Fluid.HeatPumps.HeatPumpSimple heatPumpTab(
volumeEvaporator(T_start=T_start_cold[1]),
volumeCondenser(T_start=T_start_warm[5]),
gain(
k = -1000000),
gain(k = -1),
redeclare package Medium = Water,
tableHeatFlowCondenser=[0,266.16,275.15,280.15,283.15,293.15; 308.15,97000,116000,
130000,148000,163000; 323.15,100000,112000,129000,167000,175000],
Expand Down

0 comments on commit 0af83e9

Please sign in to comment.