Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.

Commit c7e8e73

Browse files
committed
* added one more valve due to simulation abortion with pyDMPC, #55
1 parent 3b7d713 commit c7e8e73

File tree

2 files changed

+28
-12
lines changed

2 files changed

+28
-12
lines changed

pyDMPC/ModelicaModels/ModelicaModels/BaseClasses/GeothermalHeatPumpBase.mo

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,20 @@ partial model GeothermalHeatPumpBase
287287
annotation (Placement(transformation(
288288
extent={{-6,7},{6,-7}},
289289
rotation=180,
290-
origin={-72,22})));
290+
origin={-78,32})));
291291
equation
292292

293+
public
294+
AixLib.Fluid.Actuators.Valves.TwoWayQuickOpening valve2(
295+
redeclare package Medium = Water,
296+
m_flow_nominal=0.5,
297+
dpValve_nominal=5000)
298+
"Valve connecting cold storage to the evaporator of the heat pump"
299+
annotation (Placement(transformation(
300+
extent={{-6,-7},{6,7}},
301+
rotation=180,
302+
origin={-78,10})));
303+
equation
293304
connect(resistanceGeothermalSource.port_b, valveHeatSink.port_a) annotation (
294305
Line(
295306
points={{-64,-54},{-36,-54}},
@@ -383,10 +394,14 @@ equation
383394
18},{-100,-12},{-92,-12}}, color={0,127,255}));
384395
connect(valve.port_b, heatPumpTab.port_b_source) annotation (Line(points={{
385396
-80,-12},{-58,-12},{-58,-8.9},{-38.2,-8.9}}, color={0,127,255}));
397+
connect(valve1.port_b, returnTemSensor.port_a) annotation (Line(points={{-84,
398+
32},{-100,32},{-100,18}}, color={0,127,255}));
386399
connect(heatPumpTab.port_b_sink, valve1.port_a) annotation (Line(points={{
387-
-5.8,14.9},{-6,14.9},{-6,22},{-66,22}}, color={0,127,255}));
388-
connect(valve1.port_b, returnTemSensor.port_a) annotation (Line(points={{-78,
389-
22},{-100,22},{-100,18}}, color={0,127,255}));
400+
-5.8,14.9},{-5.8,24},{-68,24},{-68,32},{-72,32}}, color={0,127,255}));
401+
connect(valve2.port_a, valve1.port_a) annotation (Line(points={{-72,10},{-68,
402+
10},{-68,32},{-72,32}}, color={0,127,255}));
403+
connect(valve2.port_b, returnTemSensor.port_a) annotation (Line(points={{-84,
404+
10},{-100,10},{-100,18}}, color={0,127,255}));
390405
annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-160,
391406
-120},{160,80}})), Icon(coordinateSystem(
392407
preserveAspectRatio=false, extent={{-160,-120},{160,80}})),

pyDMPC/ModelicaModels/ModelicaModels/ControlledSystems/GeothermalHeatPumpSystem.mo

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ model GeothermalHeatPumpSystem
5252
AixLib.Fluid.Examples.GeothermalHeatPump.Control.geothermalFieldController geothermalFieldControllerCold(
5353
temperature_low=273.15 + 6, temperature_high=273.15 + 8)
5454
"Controls the heat exchange with the geothermal field and the cold storage"
55-
annotation (Placement(transformation(extent={{-100,28},{-84,44}})));
55+
annotation (Placement(transformation(extent={{-104,40},{-88,56}})));
5656
AixLib.Fluid.Examples.GeothermalHeatPump.Control.geothermalFieldController geothermalFieldControllerHeat
5757
"Controls the heat exchange with the geothermal field and the heat storage"
5858
annotation (Placement(transformation(extent={{-100,-34},{-84,-18}})));
@@ -81,13 +81,13 @@ equation
8181
points={{-89,-45.6},{-89,-36},{62,-36},{62,6},{65.4,6}}, color={0,
8282
0,127}));
8383
connect(getTStorageLower.y,geothermalFieldControllerCold. temperature)
84-
annotation (Line(points={{-139,58},{-122,58},{-108,58},{-108,36},{-100,36}},
84+
annotation (Line(points={{-139,58},{-108,58},{-108,48},{-104,48}},
8585
color={0,0,127}));
8686
connect(geothermalFieldControllerCold.valveOpening1, valveColdStorage.y)
87-
annotation (Line(points={{-83.04,40.8},{-82,40.8},{-82,40},{-82,52},{-82,54},
88-
{-52,54},{-52,46.4}}, color={0,0,127}));
87+
annotation (Line(points={{-87.04,52.8},{-82,52.8},{-82,54},{-52,54},{-52,
88+
46.4}}, color={0,0,127}));
8989
connect(geothermalFieldControllerCold.valveOpening2, valveHeatSource.y)
90-
annotation (Line(points={{-83.04,31.2},{-82,31.2},{-82,1},{-68.4,1}}, color=
90+
annotation (Line(points={{-87.04,43.2},{-86,43.2},{-86,1},{-68.4,1}}, color=
9191
{0,0,127}));
9292
connect(getTStorageUpper.y,geothermalFieldControllerHeat. temperature)
9393
annotation (Line(points={{-139,74},{-122,74},{-122,-26},{-100,-26}}, color=
@@ -120,11 +120,12 @@ equation
120120
connect(heatConsumerReturn.ports[1], vol2.ports[3]) annotation (Line(points={
121121
{112,-106},{110,-106},{110,-54},{106,-54}}, color={0,127,255}));
122122
connect(geothermalFieldControllerCold.valveOpening2, valve.y) annotation (
123-
Line(points={{-83.04,31.2},{-82,31.2},{-82,2},{-86,2},{-86,-3.6}}, color=
124-
{0,0,127}));
123+
Line(points={{-87.04,43.2},{-86,43.2},{-86,-3.6}}, color={0,0,127}));
125124
connect(geothermalFieldControllerCold.valveOpening1, valve1.y) annotation (
126-
Line(points={{-83.04,40.8},{-70,40.8},{-70,30.4},{-72,30.4}}, color={0,0,
125+
Line(points={{-87.04,52.8},{-70,52.8},{-70,40.4},{-78,40.4}}, color={0,0,
127126
127}));
127+
connect(geothermalFieldControllerHeat.valveOpening1, valve2.y) annotation (
128+
Line(points={{-83.04,-21.2},{-78,-21.2},{-78,1.6}}, color={0,0,127}));
128129
annotation (experiment(StopTime=86400, Interval=10), Documentation(revisions="<html>
129130
<ul>
130131
<li>

0 commit comments

Comments
 (0)