Skip to content

Commit b93b81d

Browse files
committed
* Change the zone model and create an aggregated class for export, #55
1 parent 8a2b4a9 commit b93b81d

File tree

4 files changed

+214
-116
lines changed

4 files changed

+214
-116
lines changed

pyDMPC/ModelicaModels/ModelicaModels/BaseClasses/GeothermalHeatPumpControlledBase.mo

Lines changed: 184 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -106,97 +106,154 @@ partial model GeothermalHeatPumpControlledBase
106106
extent={{10,-10},{-10,10}},
107107
rotation=90,
108108
origin={-100,-110})));
109-
AixLib.ThermalZones.ReducedOrder.Multizone.MultizoneEquipped multizone(
109+
Modelica.Blocks.Math.Gain negate(k=-1)
110+
annotation (Placement(transformation(extent={{134,-4},{126,4}})));
111+
Modelica.Blocks.Math.Gain negate1(k=-1) annotation (Placement(transformation(
112+
extent={{-4,-4},{4,4}},
113+
rotation=180,
114+
origin={130,-20})));
115+
AixLib.ThermalZones.ReducedOrder.ThermalZone.ThermalZoneEquipped thermalZone(
110116
redeclare package Medium = Modelica.Media.Air.SimpleAir,
111-
buildingID=0,
117+
zoneParam=AixLib.DataBase.ThermalZones.OfficePassiveHouse.OPH_1_Office(),
118+
ROM(extWallRC(thermCapExt(each der_T(fixed=true))), intWallRC(thermCapInt(
119+
each der_T(fixed=true)))),
112120
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
113-
VAir=3500.0,
114-
ABuilding=1000.0,
115-
ASurTot=4961.336840410235,
116-
numZones=6,
117-
heatAHU=true,
118-
coolAHU=true,
119-
dehuAHU=true,
120-
huAHU=true,
121-
BPFDehuAHU=0.2,
122-
HRS=true,
123-
sampleRateAHU=1800,
124-
effFanAHU_sup=0.7,
125-
effFanAHU_eta=0.7,
126-
effHRSAHU_enabled=0.65,
127-
effHRSAHU_disabled=0.2,
128-
zone(ROM(
129-
extWallRC(thermCapExt(each der_T(fixed=true))),
130-
intWallRC(thermCapInt(each der_T(fixed=true))),
131-
floorRC(thermCapExt(each der_T(fixed=true))),
132-
roofRC(thermCapExt(each der_T(fixed=true))))),
133-
redeclare model thermalZone =
134-
AixLib.ThermalZones.ReducedOrder.ThermalZone.ThermalZoneEquipped,
135-
redeclare model corG =
136-
AixLib.ThermalZones.ReducedOrder.SolarGain.CorrectionGDoublePane,
137-
redeclare model AHUMod = AixLib.Airflow.AirHandlingUnit.AHU,
138-
T_start=293.15,
139-
zoneParam={Subsystems.Geo.BaseClasses.TEASER_DataBase.TEASER_Office(),
140-
Subsystems.Geo.BaseClasses.TEASER_DataBase.TEASER_Floor(),
141-
Subsystems.Geo.BaseClasses.TEASER_DataBase.TEASER_Storage(),
142-
Subsystems.Geo.BaseClasses.TEASER_DataBase.TEASER_Meeting(),
143-
Subsystems.Geo.BaseClasses.TEASER_DataBase.TEASER_Restroom(),
144-
Subsystems.Geo.BaseClasses.TEASER_DataBase.TEASER_ICT()},
145-
dpAHU_sup=800,
146-
dpAHU_eta=800) "Multizone"
147-
annotation (Placement(transformation(extent={{164,0},{144,20}})));
121+
T_start=293.15)
122+
"Thermal zone"
123+
annotation (Placement(transformation(extent={{204,4},{184,24}})));
148124
AixLib.BoundaryConditions.WeatherData.ReaderTMY3 weaDat(
149125
calTSky=AixLib.BoundaryConditions.Types.SkyTemperatureCalculation.HorizontalRadiation,
126+
150127
computeWetBulbTemperature=false,
151-
filNam=Modelica.Utilities.Files.loadResource("modelica://ModelicaModels/Subsystems/Geo/BaseClasses/TEASER_BuildingSets/DEU_BW_Mannheim_107290_TRY2010_12_Jahr_BBSR.mos"))
128+
filNam=Modelica.Utilities.Files.loadResource(
129+
"modelica://AixLib/Resources/weatherdata/USA_CA_San.Francisco.Intl.AP.724940_TMY3.mos"))
152130
"Weather data reader"
153-
annotation (Placement(transformation(extent={{200,30},{180,50}})));
154-
Modelica.Blocks.Sources.CombiTimeTable tableAHU(
155-
tableOnFile=true,
156-
extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic,
157-
tableName="AHU",
158-
columns=2:5,
159-
fileName=Modelica.Utilities.Files.loadResource(
160-
"modelica://ModelicaModels/Subsystems/Geo/BaseClasses/TEASER_BuildingSets/AHU_TEASER.mat"))
161-
"Boundary conditions for air handling unit"
162-
annotation (Placement(transformation(extent={{200,0},{180,20}})));
163-
Modelica.Blocks.Sources.CombiTimeTable tableTSet(
164-
tableOnFile=true,
165-
tableName="Tset",
131+
annotation (Placement(transformation(extent={{314,22},{294,42}})));
132+
Modelica.Blocks.Sources.Constant const(k=0.2)
133+
"Infiltration rate"
134+
annotation (Placement(transformation(extent={{256,-36},{236,-16}})));
135+
Modelica.Blocks.Sources.CombiTimeTable internalGains(
166136
extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic,
137+
tableName="UserProfiles",
167138
fileName=Modelica.Utilities.Files.loadResource(
168-
"modelica://ModelicaModels/Subsystems/Geo/BaseClasses/TEASER_BuildingSets/Tset_TEASER.mat"),
169-
columns=2:7)
170-
"Set points for heater"
171-
annotation (Placement(transformation(extent={{200,-60},{180,-40}})));
172-
Modelica.Blocks.Sources.CombiTimeTable tableInternalGains(
173-
tableOnFile=true,
174-
extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic,
175-
tableName="Internals",
176-
fileName=Modelica.Utilities.Files.loadResource(
177-
"modelica://ModelicaModels/Subsystems/Geo/BaseClasses/TEASER_BuildingSets/InternalGains_TEASER.mat"),
178-
columns=2:19)
179-
"Profiles for internal gains"
180-
annotation (Placement(transformation(extent={{200,-90},{180,-70}})));
181-
Modelica.Blocks.Sources.Constant const[6](each k=0)
182-
"Set point for cooler"
183-
annotation (Placement(transformation(extent={{200,-30},{180,-10}})));
184-
Modelica.Blocks.Math.Gain negate(k=-1)
185-
annotation (Placement(transformation(extent={{110,-2},{102,6}})));
186-
Modelica.Blocks.Math.Gain negate1(k=-1) annotation (Placement(transformation(
187-
extent={{-4,-4},{4,4}},
188-
rotation=-90,
189-
origin={116,-18})));
190-
Modelica.Blocks.Math.Sum sum1(nin=2, k={1,1}) annotation (Placement(
191-
transformation(
192-
extent={{-4,-4},{4,4}},
193-
rotation=-90,
194-
origin={132,-12})));
195-
Modelica.Blocks.Math.Sum sum2(nin=2, k={1,1}) annotation (Placement(
196-
transformation(
197-
extent={{-4,-4},{4,4}},
139+
"modelica://AixLib/Resources/LowOrder_ExampleData/UserProfiles_18599_SIA_Besprechung_Sitzung_Seminar.txt"),
140+
141+
columns={2,3,4},
142+
tableOnFile=false,
143+
table=[0,0,0.1,0,0; 3540,0,0.1,0,0; 3600,0,0.1,0,0; 7140,0,0.1,0,0; 7200,0,
144+
0.1,0,0; 10740,0,0.1,0,0; 10800,0,0.1,0,0; 14340,0,0.1,0,0; 14400,0,0.1,
145+
0,0; 17940,0,0.1,0,0; 18000,0,0.1,0,0; 21540,0,0.1,0,0; 21600,0,0.1,0,0;
146+
25140,0,0.1,0,0; 25200,0,0.1,0,0; 28740,0,0.1,0,0; 28800,0,0.1,0,0;
147+
32340,0,0.1,0,0; 32400,0.6,0.6,1,1; 35940,0.6,0.6,1,1; 36000,1,1,1,1;
148+
39540,1,1,1,1; 39600,0.4,0.4,1,1; 43140,0.4,0.4,1,1; 43200,0,0.1,0,0;
149+
46740,0,0.1,0,0; 46800,0,0.1,0,0; 50340,0,0.1,0,0; 50400,0.6,0.6,1,1;
150+
53940,0.6,0.6,1,1; 54000,1,1,1,1; 57540,1,1,1,1; 57600,0.4,0.4,1,1;
151+
61140,0.4,0.4,1,1; 61200,0,0.1,0,0; 64740,0,0.1,0,0; 64800,0,0.1,0,0;
152+
68340,0,0.1,0,0; 68400,0,0.1,0,0; 71940,0,0.1,0,0; 72000,0,0.1,0,0;
153+
75540,0,0.1,0,0; 75600,0,0.1,0,0; 79140,0,0.1,0,0; 79200,0,0.1,0,0;
154+
82740,0,0.1,0,0; 82800,0,0.1,0,0; 86340,0,0.1,0,0; 86400,0,0.1,0,0;
155+
89940,0,0.1,0,0; 90000,0,0.1,0,0; 93540,0,0.1,0,0; 93600,0,0.1,0,0;
156+
97140,0,0.1,0,0; 97200,0,0.1,0,0; 100740,0,0.1,0,0; 100800,0,0.1,0,0;
157+
104340,0,0.1,0,0; 104400,0,0.1,0,0; 107940,0,0.1,0,0; 108000,0,0.1,0,0;
158+
111540,0,0.1,0,0; 111600,0,0.1,0,0; 115140,0,0.1,0,0; 115200,0,0.1,0,0;
159+
118740,0,0.1,0,0; 118800,0.6,0.6,1,1; 122340,0.6,0.6,1,1; 122400,1,1,1,
160+
1; 125940,1,1,1,1; 126000,0.4,0.4,1,1; 129540,0.4,0.4,1,1; 129600,0,0.1,
161+
0,0; 133140,0,0.1,0,0; 133200,0,0.1,0,0; 136740,0,0.1,0,0; 136800,0.6,
162+
0.6,1,1; 140340,0.6,0.6,1,1; 140400,1,1,1,1; 143940,1,1,1,1; 144000,0.4,
163+
0.4,1,1; 147540,0.4,0.4,1,1; 147600,0,0.1,0,0; 151140,0,0.1,0,0; 151200,
164+
0,0.1,0,0; 154740,0,0.1,0,0; 154800,0,0.1,0,0; 158340,0,0.1,0,0; 158400,
165+
0,0.1,0,0; 161940,0,0.1,0,0; 162000,0,0.1,0,0; 165540,0,0.1,0,0; 165600,
166+
0,0.1,0,0; 169140,0,0.1,0,0; 169200,0,0.1,0,0; 172740,0,0.1,0,0; 172800,
167+
0,0.1,0,0; 176340,0,0.1,0,0; 176400,0,0.1,0,0; 179940,0,0.1,0,0; 180000,
168+
0,0.1,0,0; 183540,0,0.1,0,0; 183600,0,0.1,0,0; 187140,0,0.1,0,0; 187200,
169+
0,0.1,0,0; 190740,0,0.1,0,0; 190800,0,0.1,0,0; 194340,0,0.1,0,0; 194400,
170+
0,0.1,0,0; 197940,0,0.1,0,0; 198000,0,0.1,0,0; 201540,0,0.1,0,0; 201600,
171+
0,0.1,0,0; 205140,0,0.1,0,0; 205200,0.6,0.6,1,1; 208740,0.6,0.6,1,1;
172+
208800,1,1,1,1; 212340,1,1,1,1; 212400,0.4,0.4,1,1; 215940,0.4,0.4,1,1;
173+
216000,0,0.1,0,0; 219540,0,0.1,0,0; 219600,0,0.1,0,0; 223140,0,0.1,0,0;
174+
223200,0.6,0.6,1,1; 226740,0.6,0.6,1,1; 226800,1,1,1,1; 230340,1,1,1,1;
175+
230400,0.4,0.4,1,1; 233940,0.4,0.4,1,1; 234000,0,0.1,0,0; 237540,0,0.1,
176+
0,0; 237600,0,0.1,0,0; 241140,0,0.1,0,0; 241200,0,0.1,0,0; 244740,0,0.1,
177+
0,0; 244800,0,0.1,0,0; 248340,0,0.1,0,0; 248400,0,0.1,0,0; 251940,0,0.1,
178+
0,0; 252000,0,0.1,0,0; 255540,0,0.1,0,0; 255600,0,0.1,0,0; 259140,0,0.1,
179+
0,0; 259200,0,0.1,0,0; 262740,0,0.1,0,0; 262800,0,0.1,0,0; 266340,0,0.1,
180+
0,0; 266400,0,0.1,0,0; 269940,0,0.1,0,0; 270000,0,0.1,0,0; 273540,0,0.1,
181+
0,0; 273600,0,0.1,0,0; 277140,0,0.1,0,0; 277200,0,0.1,0,0; 280740,0,0.1,
182+
0,0; 280800,0,0.1,0,0; 284340,0,0.1,0,0; 284400,0,0.1,0,0; 287940,0,0.1,
183+
0,0; 288000,0,0.1,0,0; 291540,0,0.1,0,0; 291600,0.6,0.6,1,1; 295140,0.6,
184+
0.6,1,1; 295200,1,1,1,1; 298740,1,1,1,1; 298800,0.4,0.4,1,1; 302340,0.4,
185+
0.4,1,1; 302400,0,0.1,0,0; 305940,0,0.1,0,0; 306000,0,0.1,0,0; 309540,0,
186+
0.1,0,0; 309600,0.6,0.6,1,1; 313140,0.6,0.6,1,1; 313200,1,1,1,1; 316740,
187+
1,1,1,1; 316800,0.4,0.4,1,1; 320340,0.4,0.4,1,1; 320400,0,0.1,0,0;
188+
323940,0,0.1,0,0; 324000,0,0.1,0,0; 327540,0,0.1,0,0; 327600,0,0.1,0,0;
189+
331140,0,0.1,0,0; 331200,0,0.1,0,0; 334740,0,0.1,0,0; 334800,0,0.1,0,0;
190+
338340,0,0.1,0,0; 338400,0,0.1,0,0; 341940,0,0.1,0,0; 342000,0,0.1,0,0;
191+
345540,0,0.1,0,0; 345600,0,0.1,0,0; 349140,0,0.1,0,0; 349200,0,0.1,0,0;
192+
352740,0,0.1,0,0; 352800,0,0.1,0,0; 356340,0,0.1,0,0; 356400,0,0.1,0,0;
193+
359940,0,0.1,0,0; 360000,0,0.1,0,0; 363540,0,0.1,0,0; 363600,0,0.1,0,0;
194+
367140,0,0.1,0,0; 367200,0,0.1,0,0; 370740,0,0.1,0,0; 370800,0,0.1,0,0;
195+
374340,0,0.1,0,0; 374400,0,0.1,0,0; 377940,0,0.1,0,0; 378000,0.6,0.6,1,
196+
1; 381540,0.6,0.6,1,1; 381600,1,1,1,1; 385140,1,1,1,1; 385200,0.4,0.4,1,
197+
1; 388740,0.4,0.4,1,1; 388800,0,0.1,0,0; 392340,0,0.1,0,0; 392400,0,0.1,
198+
0,0; 395940,0,0.1,0,0; 396000,0.6,0.6,1,1; 399540,0.6,0.6,1,1; 399600,1,
199+
1,1,1; 403140,1,1,1,1; 403200,0.4,0.4,1,1; 406740,0.4,0.4,1,1; 406800,0,
200+
0.1,0,0; 410340,0,0.1,0,0; 410400,0,0.1,0,0; 413940,0,0.1,0,0; 414000,0,
201+
0.1,0,0; 417540,0,0.1,0,0; 417600,0,0.1,0,0; 421140,0,0.1,0,0; 421200,0,
202+
0.1,0,0; 424740,0,0.1,0,0; 424800,0,0.1,0,0; 428340,0,0.1,0,0; 428400,0,
203+
0.1,0,0; 431940,0,0.1,0,0; 432000,0,0,0,0; 435540,0,0,0,0; 435600,0,0,0,
204+
0; 439140,0,0,0,0; 439200,0,0,0,0; 442740,0,0,0,0; 442800,0,0,0,0;
205+
446340,0,0,0,0; 446400,0,0,0,0; 449940,0,0,0,0; 450000,0,0,0,0; 453540,
206+
0,0,0,0; 453600,0,0,0,0; 457140,0,0,0,0; 457200,0,0,0,0; 460740,0,0,0,0;
207+
460800,0,0,0,0; 464340,0,0,0,0; 464400,0,0,0,0; 467940,0,0,0,0; 468000,
208+
0,0,0,0; 471540,0,0,0,0; 471600,0,0,0,0; 475140,0,0,0,0; 475200,0,0,0,0;
209+
478740,0,0,0,0; 478800,0,0,0,0; 482340,0,0,0,0; 482400,0,0,0,0; 485940,
210+
0,0,0,0; 486000,0,0,0,0; 489540,0,0,0,0; 489600,0,0,0,0; 493140,0,0,0,0;
211+
493200,0,0,0,0; 496740,0,0,0,0; 496800,0,0,0,0; 500340,0,0,0,0; 500400,
212+
0,0,0,0; 503940,0,0,0,0; 504000,0,0,0,0; 507540,0,0,0,0; 507600,0,0,0,0;
213+
511140,0,0,0,0; 511200,0,0,0,0; 514740,0,0,0,0; 514800,0,0,0,0; 518340,
214+
0,0,0,0; 518400,0,0,0,0; 521940,0,0,0,0; 522000,0,0,0,0; 525540,0,0,0,0;
215+
525600,0,0,0,0; 529140,0,0,0,0; 529200,0,0,0,0; 532740,0,0,0,0; 532800,
216+
0,0,0,0; 536340,0,0,0,0; 536400,0,0,0,0; 539940,0,0,0,0; 540000,0,0,0,0;
217+
543540,0,0,0,0; 543600,0,0,0,0; 547140,0,0,0,0; 547200,0,0,0,0; 550740,
218+
0,0,0,0; 550800,0,0,0,0; 554340,0,0,0,0; 554400,0,0,0,0; 557940,0,0,0,0;
219+
558000,0,0,0,0; 561540,0,0,0,0; 561600,0,0,0,0; 565140,0,0,0,0; 565200,
220+
0,0,0,0; 568740,0,0,0,0; 568800,0,0,0,0; 572340,0,0,0,0; 572400,0,0,0,0;
221+
575940,0,0,0,0; 576000,0,0,0,0; 579540,0,0,0,0; 579600,0,0,0,0; 583140,
222+
0,0,0,0; 583200,0,0,0,0; 586740,0,0,0,0; 586800,0,0,0,0; 590340,0,0,0,0;
223+
590400,0,0,0,0; 593940,0,0,0,0; 594000,0,0,0,0; 597540,0,0,0,0; 597600,
224+
0,0,0,0; 601140,0,0,0,0; 601200,0,0,0,0; 604740,0,0,0,0])
225+
"Table with profiles for internal gains"
226+
annotation(Placement(transformation(extent={{328,-55},{314,-41}})));
227+
AixLib.BoundaryConditions.WeatherData.Bus weaBus
228+
"Weather data bus"
229+
annotation (Placement(transformation(extent={{284,-16},{250,16}}),
230+
iconTransformation(extent={{-70,-12},{-50,8}})));
231+
Modelica.Thermal.HeatTransfer.Sources.FixedTemperature idealConditioning(T=294.15)
232+
annotation (Placement(transformation(
233+
extent={{-6,-6},{6,6}},
234+
rotation=0,
235+
origin={160,22})));
236+
Modelica.Blocks.Sources.RealExpression getTStorageUpper1(y=idealConditioning.port.Q_flow)
237+
"Gets the temperature of upper heat storage layer"
238+
annotation (Placement(transformation(extent={{-28,-11},{28,11}},
239+
rotation=180,
240+
origin={172,49})));
241+
Modelica.Blocks.Logical.Switch switch1 annotation (Placement(transformation(
242+
extent={{-8,8},{8,-8}},
198243
rotation=180,
199-
origin={116,2})));
244+
origin={150,0})));
245+
Modelica.Blocks.Logical.Switch switch2 annotation (Placement(transformation(
246+
extent={{-8,-8},{8,8}},
247+
rotation=180,
248+
origin={150,-20})));
249+
Modelica.Blocks.Logical.LessEqualThreshold lessEqualThreshold annotation (
250+
Placement(transformation(
251+
extent={{5,-5},{-5,5}},
252+
rotation=0,
253+
origin={123,49})));
254+
Modelica.Blocks.Sources.Constant const1(k=0)
255+
"Infiltration rate"
256+
annotation (Placement(transformation(extent={{200,-80},{180,-60}})));
200257
equation
201258
connect(getTStorageLower.y, coldStorageTemperature) annotation (Line(points={{-139,58},
202259
{78,58},{78,80}}, color={0,0,127}));
@@ -217,34 +274,53 @@ equation
217274
{-40,-30},{-22,-30},{-22,-12.3}}, color={0,0,127}));
218275
connect(supplyTemSensor.T, supplyTemperature) annotation (Line(points={{-115,-62.8},
219276
{-115,-67.4},{-116,-67.4},{-116,-120}}, color={0,0,127}));
220-
connect(weaDat.weaBus,multizone. weaBus) annotation (Line(
221-
points={{180,40},{166,40},{166,14},{162,14}},
222-
color={255,204,51},
223-
thickness=0.5));
224-
connect(tableInternalGains.y,multizone. intGains)
225-
annotation (Line(points={{179,-80},{148,-80},{148,-1}},color={0,0,127}));
226-
connect(tableAHU.y,multizone. AHU)
227-
annotation (Line(points={{179,10},{163,10}}, color={0,0,127}));
228-
connect(tableTSet.y,multizone. TSetHeat) annotation (Line(points={{179,-50},{
229-
159.2,-50},{159.2,-1}},color={0,0,127}));
230-
connect(const.y,multizone. TSetCool) annotation (Line(points={{179,-20},{162,
231-
-20},{162,-2},{161.4,-2},{161.4,-1}}, color={0,0,127}));
232-
connect(negate1.u,sum1. y) annotation (Line(points={{116,-13.2},{124,-13.2},{124,
233-
-16.4},{132,-16.4}}, color={0,0,127}));
234-
connect(negate.u,sum2. y)
235-
annotation (Line(points={{110.8,2},{111.6,2}}, color={0,0,127}));
236-
connect(multizone.PCooler[1],sum2. u[1]) annotation (Line(points={{145,
237-
0.166667},{122,0.166667},{122,2.4},{120.8,2.4}}, color={0,0,127}));
238-
connect(multizone.PHeater[1],sum1. u[1]) annotation (Line(points={{145,2.16667},
239-
{131.6,2.16667},{131.6,-7.2}}, color={0,0,127}));
240-
connect(multizone.PCoolAHU,sum2. u[2]) annotation (Line(points={{145,5},{122,
241-
5},{122,1.6},{120.8,1.6}}, color={0,0,127}));
242-
connect(multizone.PHeatAHU,sum1. u[2]) annotation (Line(points={{145,7},{132.4,
243-
7},{132.4,-7.2}}, color={0,0,127}));
244277
connect(negate.y, prescribedHeatFlow1.Q_flow)
245-
annotation (Line(points={{101.6,2},{96,2}}, color={0,0,127}));
278+
annotation (Line(points={{125.6,0},{100,0},{100,2},{96,2}},
279+
color={0,0,127}));
246280
connect(prescribedHeatFlow.Q_flow, negate1.y)
247-
annotation (Line(points={{116,-28},{116,-22.4}}, color={0,0,127}));
281+
annotation (Line(points={{116,-28},{116,-20},{125.6,-20}},
282+
color={0,0,127}));
283+
connect(weaDat.weaBus,thermalZone. weaBus) annotation (Line(
284+
points={{294,32},{280,32},{280,14},{204,14}},
285+
color={255,204,51},
286+
thickness=0.5));
287+
connect(weaDat.weaBus,weaBus) annotation (Line(
288+
points={{294,32},{267,32},{267,0}},
289+
color={255,204,51},
290+
thickness=0.5), Text(
291+
string="%second",
292+
index=1,
293+
extent={{6,3},{6,3}}));
294+
connect(thermalZone.ventTemp,weaBus. TDryBul) annotation (Line(points={{205.3,
295+
10.1},{291.35,10.1},{291.35,0},{267,0}}, color={0,0,127}), Text(
296+
string="%second",
297+
index=1,
298+
extent={{6,3},{6,3}}));
299+
connect(const.y,thermalZone. ventRate) annotation (Line(points={{235,-26},{
300+
235,5.6},{201,5.6}}, color={0,0,127}));
301+
connect(internalGains.y,thermalZone. intGains)
302+
annotation (Line(points={{313.3,-48},{186,-48},{186,5.6}},
303+
color={0,0,127}));
304+
connect(idealConditioning.port, thermalZone.intGainsRad) annotation (Line(
305+
points={{166,22},{174,22},{174,13},{184,13}}, color={191,0,0}));
306+
connect(negate.u, switch1.y) annotation (Line(points={{134.8,0},{140,0},{140,
307+
1.11022e-15},{141.2,1.11022e-15}}, color={0,0,127}));
308+
connect(switch2.y, negate1.u)
309+
annotation (Line(points={{141.2,-20},{134.8,-20}}, color={0,0,127}));
310+
connect(getTStorageUpper1.y, switch1.u1) annotation (Line(points={{141.2,49},
311+
{132,49},{132,12},{170,12},{170,6.4},{159.6,6.4}}, color={0,0,127}));
312+
connect(getTStorageUpper1.y, switch2.u3) annotation (Line(points={{141.2,49},
313+
{132,49},{132,12},{170,12},{170,-13.6},{159.6,-13.6}}, color={0,0,127}));
314+
connect(getTStorageUpper1.y, lessEqualThreshold.u) annotation (Line(points={{
315+
141.2,49},{134.6,49},{134.6,49},{129,49}}, color={0,0,127}));
316+
connect(lessEqualThreshold.y, switch1.u2) annotation (Line(points={{117.5,49},
317+
{114,49},{114,-10},{164,-10},{164,0},{159.6,0}}, color={255,0,255}));
318+
connect(lessEqualThreshold.y, switch2.u2) annotation (Line(points={{117.5,49},
319+
{114,49},{114,-10},{164,-10},{164,-20},{159.6,-20}}, color={255,0,255}));
320+
connect(const1.y, switch2.u1) annotation (Line(points={{179,-70},{168,-70},{
321+
168,-26.4},{159.6,-26.4}}, color={0,0,127}));
322+
connect(const1.y, switch1.u3) annotation (Line(points={{179,-70},{168,-70},{
323+
168,-6.4},{159.6,-6.4}}, color={0,0,127}));
248324
annotation (experiment(StopTime=86400, Interval=10), Documentation(info="<html>
249325
<p>Base class of an example demonstrating the use of a heat pump connected to two storages and a geothermal source. A replaceable model is connected in the flow line of the heating circuit. A peak load device can be added here. This model also includes basic controllers.</p>
250326
</html>", revisions="<html>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
within ModelicaModels.ControlledSystems;
2+
model GeothermalHeatPumpAggregated
3+
"Class necessary to be able to FMU-export the actual model"
4+
GeothermalHeatPumpSystem geothermalHeatPumpSystem
5+
annotation (Placement(transformation(extent={{-30,-20},{36,16}})));
6+
Modelica.Blocks.Interfaces.RealInput traj "Connector of Real input signal 2"
7+
annotation (Placement(transformation(extent={{-120,-42},{-80,-2}})));
8+
Modelica.Blocks.Interfaces.RealInput T_set_storage
9+
"Connector of Real input signal 2"
10+
annotation (Placement(transformation(extent={{-120,24},{-80,64}})));
11+
equation
12+
connect(geothermalHeatPumpSystem.traj, traj) annotation (Line(points={{-30,
13+
-12.8},{-80,-12.8},{-80,-22},{-100,-22}}, color={0,0,127}));
14+
connect(geothermalHeatPumpSystem.T_set_storage, T_set_storage) annotation (
15+
Line(points={{-18.2667,13.84},{-57.1334,13.84},{-57.1334,44},{-100,44}},
16+
color={0,0,127}));
17+
annotation (
18+
Icon(coordinateSystem(preserveAspectRatio=false)),
19+
Diagram(coordinateSystem(preserveAspectRatio=false)),
20+
experiment(StopTime=86400, Interval=600));
21+
end GeothermalHeatPumpAggregated;

0 commit comments

Comments
 (0)