Skip to content

Commit

Permalink
* HeatPump controlled system: corrected error, #55
Browse files Browse the repository at this point in the history
  • Loading branch information
MStillerEBC committed Sep 3, 2019
1 parent 911b559 commit dbe8250
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyDMPC/ControlFramework/Init.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
# Subsystems
sys_id.append(0)
name.append("Building")
model_type.append("Linear")
model_type.append("Modelica")
ups_neigh.append(None)
downs_neigh.append(1)
input_names.append(["supplyTemperature"])
Expand All @@ -84,7 +84,7 @@
res_path.append(glob_res_path + "\\" + name_wkdir)
dym_path.append(glob_dym_path)
mod_path.append(r'ModelicaModels.SubsystemModels.DetailedModels.Geo.GeothermalHeatPump')
command_names.append(["heatStorage.layer[1].T"])
command_names.append(["T_set_storage"])
command_variables.append(["decisionVariables.table[1,2]"])
commands.append(range(35,45,5))
traj_points.append([])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ model GeothermalHeatPumpSystem
annotation (Placement(transformation(extent={{-170,-90},{-150,-70}})));
Modelica.Thermal.HeatTransfer.Celsius.FromKelvin fromKelvin
annotation (Placement(transformation(extent={{-144,-86},{-132,-74}})));
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}})));
Modelica.Blocks.Interfaces.RealInput T_set_storage
"Connector of Real input signal 2"
annotation (Placement(transformation(extent={{-108,58},{-88,78}})));
equation
connect(resistanceColdConsumerFlow.port_b,coldConsumerFlow. ports[1])
annotation (Line(points={{80,-20},{88,-20}}, color={0,127,255}));
Expand Down Expand Up @@ -102,6 +108,18 @@ equation
2},{112.8,2}}, color={0,0,127}));
connect(traj, fromKelvin.Kelvin)
annotation (Line(points={{-160,-80},{-145.2,-80}}, color={0,0,127}));
connect(hPControllerOnOff.heatPumpControlBus, heatPumpControlBus) annotation (
Line(
points={{-58.05,72.05},{-44,72.05},{-44,79},{-0.5,79}},
color={255,204,51},
thickness=0.5), Text(
string="%second",
index=1,
extent={{6,3},{6,3}}));
connect(getTStorageUpper.y, hPControllerOnOff.T_meas) annotation (Line(points
={{-139,74},{-108.5,74},{-108.5,76},{-78,76}}, color={0,0,127}));
connect(T_set_storage, hPControllerOnOff.T_set)
annotation (Line(points={{-98,68},{-78,68}}, color={0,0,127}));
annotation (experiment(StopTime=86400, Interval=10), Documentation(revisions="<html>
<ul>
<li>
Expand Down

0 comments on commit dbe8250

Please sign in to comment.