From 30fee76baf3372e91c8d36d4704ae95cba64915a Mon Sep 17 00:00:00 2001 From: Martin Stiller Date: Thu, 29 Aug 2019 19:18:49 +0200 Subject: [PATCH] * deleted first Controlled Geo Model "SimpleModelGeo", added and restructured HeatPump Models including TEASER Model, #55 --- pyDMPC/ControlFramework/Init.py | 2 +- pyDMPC/ControlFramework/Init_complex.py | 88 +- pyDMPC/ControlFramework/Subsystem.py | 38 +- pyDMPC/ControlFramework/Subsystem_complex.py | 106 +- .../BaseClasses/GeothermalHeatPumpBase.mo | 384 + .../GeothermalHeatPumpControlledBase.mo | 131 + .../ModelicaModels/BaseClasses/package.order | 2 + .../ControlledSystems/GeothermalField2.mo | 27 - .../GeothermalHeatPumpSystem.mo | 122 + .../ControlledSystems/SimpleModelGeo.mo | 285 - .../ControlledSystems/package.order | 3 +- .../DetailedModels/Geo/ERC_DataBase.mo | 502 - .../DetailedModels/Geo/GeothermalHeatPump.mo | 24 +- .../Geo/HeatPumpCommunicationBaseClass.mo | 37 - .../DetailedModels/Geo/package.order | 2 - .../Geo/BaseClasses/GeothermalHeatPumpBase.mo | 19 +- .../GeothermalHeatPumpControlledBase.mo | 11 +- .../TEASER_BuildingSets/AHU_ERC.mat | Bin 0 -> 1024 bytes ...W_Mannheim_107290_TRY2010_12_Jahr_BBSR.mos | 8800 +++++++++++++++++ .../TEASER_BuildingSets/InternalGains_ERC.mat | Bin 0 -> 3830 bytes .../TEASER_BuildingSets/Tset_ERC.mat | Bin 0 -> 2825 bytes .../TEASER_BuildingSets/package.mo | 4 + .../TEASER_BuildingSets/package.order | 0 .../TEASER_DataBase/TEASER_Floor.mo | 83 + .../BaseClasses/TEASER_DataBase/TEASER_ICT.mo | 83 + .../TEASER_DataBase/TEASER_Meeting.mo | 83 + .../TEASER_DataBase/TEASER_Office.mo | 83 + .../TEASER_DataBase/TEASER_Restroom.mo | 83 + .../TEASER_DataBase/TEASER_Storage.mo | 83 + .../package.mo | 4 +- .../BaseClasses/TEASER_DataBase/package.order | 6 + .../Subsystems/Geo/BaseClasses/package.order | 3 +- 32 files changed, 10116 insertions(+), 982 deletions(-) create mode 100644 pyDMPC/ModelicaModels/ModelicaModels/BaseClasses/GeothermalHeatPumpBase.mo create mode 100644 pyDMPC/ModelicaModels/ModelicaModels/BaseClasses/GeothermalHeatPumpControlledBase.mo delete mode 100644 pyDMPC/ModelicaModels/ModelicaModels/ControlledSystems/GeothermalField2.mo create mode 100644 pyDMPC/ModelicaModels/ModelicaModels/ControlledSystems/GeothermalHeatPumpSystem.mo delete mode 100644 pyDMPC/ModelicaModels/ModelicaModels/ControlledSystems/SimpleModelGeo.mo delete mode 100644 pyDMPC/ModelicaModels/ModelicaModels/SubsystemModels/DetailedModels/Geo/ERC_DataBase.mo delete mode 100644 pyDMPC/ModelicaModels/ModelicaModels/SubsystemModels/DetailedModels/Geo/HeatPumpCommunicationBaseClass.mo create mode 100644 pyDMPC/ModelicaModels/ModelicaModels/Subsystems/Geo/BaseClasses/TEASER_BuildingSets/AHU_ERC.mat create mode 100644 pyDMPC/ModelicaModels/ModelicaModels/Subsystems/Geo/BaseClasses/TEASER_BuildingSets/DEU_BW_Mannheim_107290_TRY2010_12_Jahr_BBSR.mos create mode 100644 pyDMPC/ModelicaModels/ModelicaModels/Subsystems/Geo/BaseClasses/TEASER_BuildingSets/InternalGains_ERC.mat create mode 100644 pyDMPC/ModelicaModels/ModelicaModels/Subsystems/Geo/BaseClasses/TEASER_BuildingSets/Tset_ERC.mat create mode 100644 pyDMPC/ModelicaModels/ModelicaModels/Subsystems/Geo/BaseClasses/TEASER_BuildingSets/package.mo create mode 100644 pyDMPC/ModelicaModels/ModelicaModels/Subsystems/Geo/BaseClasses/TEASER_BuildingSets/package.order create mode 100644 pyDMPC/ModelicaModels/ModelicaModels/Subsystems/Geo/BaseClasses/TEASER_DataBase/TEASER_Floor.mo create mode 100644 pyDMPC/ModelicaModels/ModelicaModels/Subsystems/Geo/BaseClasses/TEASER_DataBase/TEASER_ICT.mo create mode 100644 pyDMPC/ModelicaModels/ModelicaModels/Subsystems/Geo/BaseClasses/TEASER_DataBase/TEASER_Meeting.mo create mode 100644 pyDMPC/ModelicaModels/ModelicaModels/Subsystems/Geo/BaseClasses/TEASER_DataBase/TEASER_Office.mo create mode 100644 pyDMPC/ModelicaModels/ModelicaModels/Subsystems/Geo/BaseClasses/TEASER_DataBase/TEASER_Restroom.mo create mode 100644 pyDMPC/ModelicaModels/ModelicaModels/Subsystems/Geo/BaseClasses/TEASER_DataBase/TEASER_Storage.mo rename pyDMPC/ModelicaModels/ModelicaModels/Subsystems/Geo/BaseClasses/{ERC_DataBase => TEASER_DataBase}/package.mo (66%) create mode 100644 pyDMPC/ModelicaModels/ModelicaModels/Subsystems/Geo/BaseClasses/TEASER_DataBase/package.order diff --git a/pyDMPC/ControlFramework/Init.py b/pyDMPC/ControlFramework/Init.py index 9c55af4..1a8a369 100644 --- a/pyDMPC/ControlFramework/Init.py +++ b/pyDMPC/ControlFramework/Init.py @@ -89,7 +89,7 @@ commands.append(range(0,105,5)) traj_points.append([]) traj_var.append([]) -cost_fac.append([-1.0, 0.0, 55.0, -55.0, 0.0, 0.0, 0.0, 0.0]) +cost_fac.append([-1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3000.0, -3000.0]) factors.append([1, -60./4.18/8./100.]) sys_id.append(1) diff --git a/pyDMPC/ControlFramework/Init_complex.py b/pyDMPC/ControlFramework/Init_complex.py index f20c58b..fa5e133 100644 --- a/pyDMPC/ControlFramework/Init_complex.py +++ b/pyDMPC/ControlFramework/Init_complex.py @@ -1,9 +1,9 @@ # Global paths -glob_lib_paths = [r'N:\Forschung\EBC0377_BMWi-GeoBase_GA\Students\mba-mst\05-Python\pyDMPC\pyDMPC\ModelicaModels\ModelicaModels', - r'N:\Forschung\EBC0377_BMWi-GeoBase_GA\Students\mba-mst\02-Models\modelica-buildings\Buildings', - r'N:\Forschung\EBC0377_BMWi-GeoBase_GA\Students\mba-mst\02-Models\AixLib\AixLib'] -glob_res_path = r'C:\TEMP\Dymola' -glob_dym_path = r'C:\Program Files\Dymola 2019\Modelica\Library\python_interface\dymola.egg' +glob_lib_paths = [r'C:\mst\pyDMPC\pyDMPC\ModelicaModels\ModelicaModels', + r'C:\mst\modelica-buildings\Buildings', + r'C:\mst\AixLib\AixLib'] +glob_res_path = r'C:\mst\dymola' +glob_dym_path = r'C:\Program Files (x86)\Dymola 2018\Modelica\Library\python_interface\dymola.egg' # Working directory import time @@ -48,6 +48,7 @@ # Modifiers cost_fac = [] +factors = [] # Variation min_var = [] @@ -63,46 +64,17 @@ # Subsystems sys_id.append(0) -name.append("Field") -model_type.append("Modelica") +name.append("Building") +model_type.append("Linear") ups_neigh.append(None) downs_neigh.append(1) -input_names.append(["returnTemperature.T"]) -input_variables.append(["external"]) -inputs.append([]) -output_names.append(["movMea.y"]) -set_points.append([285.65]) -state_var_names.append(["supplyTemperature.T"]) -model_state_var_names.append(["vol1.T_start"]) -start.append(0.) -stop.append(3600.0*24*365.25*3) -incr.append(3600.) -opt_time.append(86400) -samp_time.append(10) -lib_paths.append(glob_lib_paths) -res_path.append(glob_res_path + "\\" + name_wkdir) -dym_path.append(glob_dym_path) -mod_path.append(r'ModelicaModels.SubsystemModels.DetailedModels.Geo.Field2') -command_names.append(["traj"]) -command_variables.append(["decisionVariables.table[1,2]"]) -commands.append(range(0,100,1)) -traj_points.append(range(283,291,1)) -traj_var.append(["fromKelvin.Celsius"]) -cost_fac.append([0.0, 0.0, 0.0, 0.0, 3.0, 0.0, 0.0, 0.0, 0.0]) -#cost factors: ([0: reale Kosten Feld, 1: reale Kosten sek. Erzeuger, 2: reale Kosten WP, 3: downstream neigh, 4: Abweichung setpoint, 5: I-Anteil Bestrafung, 6: I-Anteil Belohnung, 7: D-Anteil Bestrafung, 8: D-Anteil Vergütung]) - -sys_id.append(1) -name.append("Building") -model_type.append("Modelica") -ups_neigh.append(0) -downs_neigh.append(None) input_names.append(["supplyTemperature.T"]) input_variables.append([r"variation.table[1,2]"]) -inputs.append(range(280.15,290.15,0.05)) +inputs.append(range(280,290,5)) output_names.append(["returnTemperature"]) set_points.append([287]) -state_var_names.append(["sine.y"]) -model_state_var_names.append(["const.k"]) +state_var_names.append(["const.y"]) +model_state_var_names.append(["const.k"]) #"const.k" start.append(0.) stop.append(7200.) incr.append(10.) @@ -113,9 +85,39 @@ dym_path.append(glob_dym_path) mod_path.append(r'ModelicaModels.SubsystemModels.DetailedModels.Geo.GeothermalHeatPump') command_names.append(["heatShare"]) -command_variables.append(["TStorageSet"]) -commands.append(range(0,100,5)) +command_variables.append(["decisionVariables.table[1,2]"]) +commands.append(range(35,45,5)) traj_points.append([]) traj_var.append([]) -cost_fac.append([-0.5, 0.0, 0.0, 0.0, 3.0, 0.0, 0.0, 0.0, 0.0]) -#cost factors: ([0: reale Kosten Feld, 1: reale Kosten sek. Erzeuger, 2: reale Kosten WP, 3: downstream neigh, 4: Abweichung setpoint, 5: I-Anteil Bestrafung, 6: I-Anteil Belohnung, 7: D-Anteil Bestrafung, 8: D-Anteil Vergütung]) \ No newline at end of file +cost_fac.append([-1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3000.0, -3000.0]) +factors.append([1, -60./4.18/8./100.]) + +sys_id.append(1) +name.append("Field") +model_type.append("Modelica") +ups_neigh.append(0) +downs_neigh.append(None) +input_names.append(["returnTemperature.T"]) +input_variables.append(["external"]) +inputs.append([]) +output_names.append(["movMea.y"]) +set_points.append([285.65]) +state_var_names.append(["supplyTemperature.T"]) +model_state_var_names.append(["vol.T_start"]) +start.append(0.) +stop.append(3600.0*24*365.25*3) +incr.append(3600.) +opt_time.append(86400) +samp_time.append(10) +lib_paths.append(glob_lib_paths) +res_path.append(glob_res_path + "\\" + name_wkdir) +dym_path.append(glob_dym_path) +mod_path.append(r'ModelicaModels.SubsystemModels.DetailedModels.Geo.Field') +command_names.append(["traj"]) +command_variables.append(["decisionVariables.table[1,2]"]) +commands.append(range(0,105,5)) +traj_points.append(range(280,290,1)) +traj_var.append(["supplyTemperature.T"]) +cost_fac.append([-1.0, 0.0, 10.0, -10.0, 0.0, 0.0, 0.0, 0.0 ]) +factors.append([0,0]) +#Legend: cost_fac.append([real_cost, cost_downstr_neigh, cost_dev_setpoint_penalty, cost_dev_setpoint_reward, cost_integ_penalty, cost_integ_reward, cost_diff_penalty, cost_diff_reward]) \ No newline at end of file diff --git a/pyDMPC/ControlFramework/Subsystem.py b/pyDMPC/ControlFramework/Subsystem.py index 1cd5fcd..68a7382 100644 --- a/pyDMPC/ControlFramework/Subsystem.py +++ b/pyDMPC/ControlFramework/Subsystem.py @@ -288,33 +288,33 @@ def calc_cost(self, command, outputs): #Integralteil self.err_integ += outputs - setpoint - if self.cost_rec != []: + #if self.cost_rec != []: #if self.phase > 0: #if field cools off - if self.err_integ < 0: - cost += self.cost_fac[4] * (-(self.err_integ)) #Integral penalty - else: - cost += self.cost_fac[5] * self.err_integ #Integral reward -# #else: + if self.err_integ < 0: + cost += self.cost_fac[4] * (-(self.err_integ)) #Integral penalty + else: + cost += self.cost_fac[5] * self.err_integ #Integral reward +# else: # if self.err_integ > 0: # cost += self.cost_fac[4] * self.err_integ #Integral penalization # else: # cost += self.cost_fac[5] * (-(self.err_integ)) #Integral reward #Differentialteil - self.err_prev = self.err_curr - self.err_curr = outputs - setpoint #same as proportional error - self.err_diff = self.err_curr - self.err_prev #differentieller Fehler + self.err_prev = self.err_curr + self.err_curr = outputs - setpoint #same as proportional error + self.err_diff = self.err_curr - self.err_prev #differentieller Fehler - #if self.phase > 0:#field cools off (heating demand building) - if self.err_prop < 0: - if self.err_diff > 0: - cost += self.cost_fac[6] * self.err_diff #Differential penalization - else: - cost += self.cost_fac[7] * (-(self.err_diff)) #Differential reward + #if self.phase > 0:#field cools off (heating demand building) + if self.err_prop < 0: + if self.err_diff > 0: + cost += self.cost_fac[6] * self.err_diff #Differential penalization else: - if self.err_diff > 0: - cost += self.cost_fac[7] * self.err_diff - else: - cost += self.cost_fac[6] * (-(self.err_diff)) + cost += self.cost_fac[7] * (-(self.err_diff)) #Differential reward + else: + if self.err_diff > 0: + cost += self.cost_fac[7] * self.err_diff + else: + cost += self.cost_fac[6] * (-(self.err_diff)) #else:#field heats up (cooling demand building) # if self.err_prop > 0: # if self.err_diff > 0: diff --git a/pyDMPC/ControlFramework/Subsystem_complex.py b/pyDMPC/ControlFramework/Subsystem_complex.py index 4ae7ba3..68a7382 100644 --- a/pyDMPC/ControlFramework/Subsystem_complex.py +++ b/pyDMPC/ControlFramework/Subsystem_complex.py @@ -2,6 +2,7 @@ import Modeling import System import Time +import numpy as np class Subsystem: @@ -80,8 +81,10 @@ def __init__(self, sys_id): self.cost_rec = [] self.setpoint_rec = [] self.setpoint_send = [] + self.setpoint_prev = [] self.command_send = [] self.command_rec = [] + self.err_prop = 0 self.err_integ = 0 self.err_prev = 0 self.err_curr = 0 @@ -95,7 +98,7 @@ def __init__(self, sys_id): self.fin_command = 0 self.traj_var = Init.traj_var[sys_id] self.traj_points = Init.traj_points[sys_id] - self.counter = 0 + self.phase = 0 def prepare_model(self): """Prepares the model of a subsystem according to the subsystem's model @@ -118,6 +121,8 @@ def prepare_model(self): model.load_mod() elif self.model_type == "Linear": model = Modeling.LinMod(self.sys_id) + elif self.model_type == "const": + model = Modeling.ConstMod(self.sys_id) else: model = Modeling.FuzMod(self.sys_id) return model @@ -197,8 +202,9 @@ def interp_minimize(self, interp): opt_command.append(self.commands[min_ind]) if self.traj_var != []: - traj_costs = [] + #traj_costs = [] traj = self.model.get_results(self.traj_var[0]) + self.setpoint_prev = self.setpoint_send self.setpoint_send = traj[10] else: @@ -232,48 +238,94 @@ def interp_minimize(self, interp): else: self.coup_vars_send = opt_outputs[0] - def calc_cost(self, command, outputs): import scipy.interpolate cost = self.cost_fac[0] * command + #if self.cost_rec != []: + #energy_heater = self.model.get_results("chemicalEnergy[-1]") + #cost += self.cost_fac[1] * energy_heater #Realkosten Chiller/Heater + #energy_heatpump = self.model.get_results("heatPumpEnergy[-1]") + #cost += self.cost_fac[2] * energy_heatpump #Realkosten Strom Wärmepumpe + if self.cost_rec != []: - cost += self.cost_fac[1] * self.model.get_results("chemicalEnergy[-1]") #Realkosten Chiller/Heater - cost += self.cost_fac[2] * self.model.get_results("heatPumpEnergy[-1]") #Realkosten Electricity HP - if type(self.cost_rec) is scipy.interpolate.interpolate.interp1d: - cost += self.cost_fac[3] * self.cost_rec(outputs) + cost += self.cost_fac[1] * self.cost_rec(outputs) elif type(self.cost_rec) is list: - cost += self.cost_fac[3] * self.cost_rec[0] + cost += self.cost_fac[1] * self.cost_rec[0] else: - cost += self.cost_fac[3] * self.cost_rec + cost += self.cost_fac[1] * self.cost_rec if self.setpoint_rec != []: setpoint = self.setpoint_rec else: setpoint = self.model.states.set_points[0] - - if self.model.states.set_points != []: - cost += (self.cost_fac[4] * (outputs - setpoint)**2) + # +# if self.setpoint_rec != []: +# self. - if self.cost_rec != []: - self.err_integ += (outputs - setpoint) - if self.err_integ > 0: - cost += self.cost_fac[5] * self.err_integ - else: - cost += self.cost_fac[6] * self.err_integ + #self.phase = self.setpoint_prev - self.setpoint_rec + # + #if > 0: field for heating the building, if < 0: field for cooling the building + + + #Regelung in Anlehnung an PID Regelverhalten + #Proportionalanteil + self.err_prop = outputs - setpoint #Deviation from setpoint (proportional & integral) + + #if self.phase > 0:#if field cools off + if self.err_prop < 0: + cost += self.cost_fac[2]*(setpoint - outputs) #Penalty Deviation (proportional) + else: + cost += self.cost_fac[3]*(setpoint - outputs) #Reward Deviation (proportional) + #else:#if field heats up +# if self.err_prop > 0: +# cost += self.cost_fac[2]*self.err_prop #Penalty Deviation (proportional) +# else: +# cost += self.cost_fac[3]*(setpoint - outputs) #Reward Deviation (proportional) - self.counter += 1 - self.err_prev = self.err_curr - self.err_curr = outputs - setpoint + #Integralteil + self.err_integ += outputs - setpoint + + #if self.cost_rec != []: + #if self.phase > 0: #if field cools off + if self.err_integ < 0: + cost += self.cost_fac[4] * (-(self.err_integ)) #Integral penalty + else: + cost += self.cost_fac[5] * self.err_integ #Integral reward +# else: +# if self.err_integ > 0: +# cost += self.cost_fac[4] * self.err_integ #Integral penalization +# else: +# cost += self.cost_fac[5] * (-(self.err_integ)) #Integral reward + #Differentialteil + self.err_prev = self.err_curr + self.err_curr = outputs - setpoint #same as proportional error + self.err_diff = self.err_curr - self.err_prev #differentieller Fehler - if self.counter > 1: - self.err_diff = self.err_curr - self.err_prev - if self.err_diff > 0: - cost += self.cost_fac[7] * self.err_diff - else: - cost += self.cost_fac[8] * self.err_diff + #if self.phase > 0:#field cools off (heating demand building) + if self.err_prop < 0: + if self.err_diff > 0: + cost += self.cost_fac[6] * self.err_diff #Differential penalization + else: + cost += self.cost_fac[7] * (-(self.err_diff)) #Differential reward + else: + if self.err_diff > 0: + cost += self.cost_fac[7] * self.err_diff + else: + cost += self.cost_fac[6] * (-(self.err_diff)) + #else:#field heats up (cooling demand building) +# if self.err_prop > 0: +# if self.err_diff > 0: +# cost += self.cost_fac[6] * self.err_diff +# else: +# cost += self.cost_fac[7] * (-(self.err_diff)) +# else: +# if self.err_diff > 0: +# cost += self.cost_fac[7] * self.err_diff +# else: +# cost += self.cost_fac[6] * (-(self.err_diff)) return cost diff --git a/pyDMPC/ModelicaModels/ModelicaModels/BaseClasses/GeothermalHeatPumpBase.mo b/pyDMPC/ModelicaModels/ModelicaModels/BaseClasses/GeothermalHeatPumpBase.mo new file mode 100644 index 0000000..3f571d2 --- /dev/null +++ b/pyDMPC/ModelicaModels/ModelicaModels/BaseClasses/GeothermalHeatPumpBase.mo @@ -0,0 +1,384 @@ +within ModelicaModels.BaseClasses; +partial model GeothermalHeatPumpBase + "Base class of the geothermal heat pump system" + + replaceable package Water = AixLib.Media.Water + "Medium model used for hydronic components"; + + parameter Modelica.SIunits.Temperature T_start_cold[5] = 300*ones(5) + "Initial temperature of cold components"; + + parameter Modelica.SIunits.Temperature T_start_warm[5] = 300*ones(5) + "Initial temperature of warm components"; + + parameter Modelica.SIunits.Temperature T_start_hot = 300 + "Initial temperature of high temperature components"; + + AixLib.Fluid.HeatPumps.HeatPumpSimple heatPumpTab( + volumeEvaporator(T_start=T_start_cold[1]), + volumeCondenser(T_start=T_start_warm[5]), + 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], + tableHeatFlowCondenser=[0,266.16,275.15,280.15,283.15,293.15; 308.15, + 9700,11600,13000,14800,16300; 323.15,10000,11200,12900,16700,17500]) + "Base load energy conversion unit" + annotation (Placement(transformation(extent={{-40,-14},{-4,20}}))); + + replaceable AixLib.Fluid.Interfaces.PartialTwoPortTransport PeakLoadDevice( + redeclare package Medium = Water) constrainedby + AixLib.Fluid.Interfaces.PartialTwoPort + annotation (Placement(transformation(extent={{86,-56},{98,-44}}))); + + AixLib.Fluid.Storage.Storage coldStorage( + layer_HE(T_start=T_start_cold), + layer(T_start=T_start_cold), + redeclare package Medium = Water, + n=5, + lambda_ins=0.075, + s_ins=0.2, + alpha_in=100, + alpha_out=10, + k_HE=300, + h=1.5, + V_HE=0.02, + A_HE=7, + d=1) "Storage tank for buffering cold demand" + annotation (Placement(transformation(extent={{52,-8},{24,20}}))); + AixLib.Fluid.FixedResistances.PressureDrop resistanceColdStorage( + redeclare package Medium = Water, + m_flow_nominal=0.5, + dp_nominal=15000) "Resistance in evaporator circuit" annotation ( + Placement(transformation( + extent={{-6,-7},{6,7}}, + rotation=180, + origin={-34,38}))); + AixLib.Fluid.FixedResistances.PressureDrop resistanceGeothermalSource( + redeclare package Medium = Water, + m_flow_nominal=0.5, + dp_nominal=15000) "Resistance in geothermal field circuit" annotation ( + Placement(transformation( + extent={{-6,-7},{6,7}}, + rotation=0, + origin={-70,-54}))); + AixLib.Fluid.FixedResistances.PressureDrop resistanceColdConsumerFlow( + redeclare package Medium = Water, + m_flow_nominal=0.2, + dp_nominal=10000) "Resistance in cold consumer flow line" annotation ( + Placement(transformation( + extent={{-7,-7},{7,7}}, + rotation=0, + origin={73,-20}))); + AixLib.Fluid.Actuators.Valves.TwoWayQuickOpening valveHeatSink( + redeclare package Medium = Water, + m_flow_nominal=0.5, + dpValve_nominal=5000) + "Valve connecting geothermal field to the condenser of the heat pump" + annotation (Placement(transformation(extent={{-36,-61},{-24,-47}}))); + AixLib.Fluid.Actuators.Valves.TwoWayQuickOpening valveHeatSource( + redeclare package Medium = Water, + m_flow_nominal=0.5, + dpValve_nominal=5000) + "Valve connecting geothermal field to the evaporator of the heat pump" + annotation (Placement(transformation( + extent={{-6,-7},{6,7}}, + rotation=90, + origin={-60,1}))); + AixLib.Fluid.Storage.Storage heatStorage( + layer_HE(T_start=T_start_warm), + layer(T_start=T_start_warm), + redeclare package Medium = Water, + n=5, + lambda_ins=0.075, + s_ins=0.2, + alpha_in=100, + alpha_out=10, + k_HE=300, + A_HE=3, + h=1, + V_HE=0.01, + d=1) "Storage tank for buffering heat demand" + annotation (Placement(transformation(extent={{52,-90},{24,-62}}))); + AixLib.Fluid.FixedResistances.PressureDrop resistanceHeatStorage( + redeclare package Medium = Water, + m_flow_nominal=0.5, + dp_nominal=15000) "Resistance in condenser circuit" annotation ( + Placement(transformation( + extent={{-6,-7},{6,7}}, + rotation=90, + origin={-18,-78}))); + AixLib.Fluid.Sources.Boundary_pT geothField_sink1(redeclare package Medium = + Water, nPorts=3) "One of two sinks representing geothermal field" + annotation (Placement(transformation(extent={{-6,-6},{6,6}}, + rotation=-90, + origin={-150,30}))); + AixLib.Fluid.FixedResistances.PressureDrop resistanceHeatConsumerFlow( + redeclare package Medium = Water, + m_flow_nominal=0.2, + dp_nominal=10000) "Resistance in heat consumer flow line" annotation ( + Placement(transformation( + extent={{-7,-7},{7,7}}, + rotation=0, + origin={73,-50}))); + AixLib.Fluid.Actuators.Valves.TwoWayQuickOpening valveColdStorage( + redeclare package Medium = Water, + m_flow_nominal=0.5, + dpValve_nominal=5000) + "Valve connecting cold storage to the evaporator of the heat pump" + annotation (Placement(transformation( + extent={{-6,7},{6,-7}}, + rotation=180, + origin={-52,38}))); + AixLib.Fluid.Actuators.Valves.TwoWayQuickOpening valveHeatStorage( + redeclare package Medium = Water, + m_flow_nominal=0.5, + dpValve_nominal=5000) + "Valve connecting heat storage to the condenser of the heat pump" + annotation (Placement(transformation( + extent={{-6,-7},{6,7}}, + rotation=90, + origin={-18,-63}))); + + AixLib.Fluid.Movers.FlowControlled_dp pumpColdConsumer( + m_flow_nominal=0.05, + redeclare package Medium = Water, + addPowerToMedium=false, + T_start=T_start_cold[1]) + "Pump moving fluid from storage tank to cold consumers" + annotation (Placement(transformation(extent={{48,-27},{62,-13}}))); + AixLib.Fluid.Movers.FlowControlled_dp pumpHeatConsumer( + m_flow_nominal=0.05, + redeclare package Medium = Water, + addPowerToMedium=false, + T_start=T_start_warm[5]) + "Pump moving fluid from storage tank to heat consumers" + annotation (Placement(transformation(extent={{48,-57},{62,-43}}))); + AixLib.Fluid.FixedResistances.PressureDrop resistanceColdConsumerReturn( + redeclare package Medium = Water, + m_flow_nominal=0.2, + dp_nominal=10000) "Resistance in cold consumer return line" annotation ( + Placement(transformation( + extent={{-7,-7},{7,7}}, + rotation=180, + origin={73,32}))); + AixLib.Fluid.FixedResistances.PressureDrop resistanceHeatConsumerReturn( + redeclare package Medium = Water, + m_flow_nominal=0.2, + dp_nominal=10000) "Resistance in heat consumer return line" annotation ( + Placement(transformation( + extent={{-7,-7},{7,7}}, + rotation=180, + origin={93,-106}))); + AixLib.Fluid.Movers.FlowControlled_dp pumpCondenser( + m_flow_nominal=0.05, + redeclare package Medium = Water, + addPowerToMedium=false, + T_start=T_start_cold[1]) + "Pump moving fluid from storage tank to condenser of heat pump" + annotation (Placement(transformation( + extent={{-7,7},{7,-7}}, + rotation=180, + origin={-1,-98}))); + AixLib.Fluid.Movers.FlowControlled_dp pumpEvaporator( + m_flow_nominal=0.05, + redeclare package Medium = Water, + addPowerToMedium=false, + T_start=T_start_cold[1]) + "Pump moving fluid from storage tank to evaporator of heat pump" + annotation (Placement(transformation( + extent={{-7,7},{7,-7}}, + rotation=180, + origin={7,36}))); + AixLib.Fluid.Movers.FlowControlled_dp pumpGeothermalSource( + m_flow_nominal=0.05, + redeclare package Medium = Water, + addPowerToMedium=false, + T_start=T_start_cold[1]) + "Pump moving fluid from geothermal source into system" annotation ( + Placement(transformation( + extent={{-7,-7},{7,7}}, + rotation=0, + origin={-89,-54}))); + AixLib.Controls.Interfaces.HeatPumpControlBus heatPumpControlBus + annotation (Placement(transformation(extent={{-21,60},{20,98}}))); + AixLib.Fluid.Sensors.TemperatureTwoPort returnTemSensor(redeclare package + Medium = Water, m_flow_nominal=16) annotation (Placement( + transformation( + extent={{7,8},{-7,-8}}, + rotation=0, + origin={-107,18}))); + AixLib.Fluid.MixingVolumes.MixingVolume vol1( + redeclare package Medium = Water, + energyDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial, + m_flow_small=50, + p_start=100000, + m_flow_nominal=16, + V=2, + nPorts=2) annotation ( + Placement(transformation( + extent={{-10,10},{10,-10}}, + rotation=90, + origin={96,30}))); + AixLib.Fluid.MixingVolumes.MixingVolume vol2( + redeclare package Medium = Water, + energyDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial, + m_flow_small=50, + p_start=100000, + m_flow_nominal=16, + V=2, + nPorts=2) annotation ( + Placement(transformation( + extent={{10,10},{-10,-10}}, + rotation=90, + origin={116,-54}))); + AixLib.Fluid.Geothermal.Borefields.TwoUTubes + borFie(redeclare package Medium = Water, + tLoaAgg=21600, + borFieDat( + filDat( + kFil=2, + cFil=800, + dFil=1600), + conDat( + borCon=AixLib.Fluid.Geothermal.Borefields.Types.BoreholeConfiguration.DoubleUTubeParallel, + mBor_flow_nominal=0.4, + mBorFie_flow_nominal=16, + dp_nominal=50000, + hBor=100, + rBor=0.076, + dBor=100, + cooBor=[6.02,49.93; 15.08,51.43; 24.14,49.93; 33.2,49.93; 42.26, + 49.93; 51.25,49.93; 60.32,49.93; 22.98,41.07; 10.65,35.27; + 22.91,32; 6.08,27.5; 15.15,27.5; 22.98,14; 35.58,6.77; 44.65, + 6.77; 53.64,6.77; 62.63,6.77; 71.69,6.77; 80.75,6.77; 89.75, + 6.77; 98.81,6.77; 107.8,6.77; 115.5,11.48; 106.58,16.32; 91.04, + 16.32; 98.81,20.82; 114.41,20.82; 106.64,25.32; 91.04,25.39; + 98.81,29.96; 114.41,29.82; 106.64,34.45; 98.81,38.95; 114.41, + 38.89; 91.04,43.52; 106.58,43.52; 98.81,48.02; 114.41,47.95; + 78.3,49.93; 69.31,49.93], + rTub=0.016, + kTub=0.38, + eTub=0.0029, + xC=0.048), + soiDat( + dSoi=2700, + kSoi=3.85, + cSoi=18)), + TExt0_start=285.65) + annotation (Placement(transformation(extent={{-10,-10},{10,10}}, + rotation=-90, + origin={-150,-6}))); +equation + + connect(resistanceGeothermalSource.port_b, valveHeatSink.port_a) annotation ( + Line( + points={{-64,-54},{-36,-54}}, + color={0,127,255}, + smooth=Smooth.None)); + connect(valveHeatSource.port_a, valveHeatSink.port_a) annotation (Line( + points={{-60,-5},{-60,-54},{-36,-54}}, + color={0,127,255}, + smooth=Smooth.None)); + + connect(resistanceColdStorage.port_b, valveColdStorage.port_a) annotation ( + Line( + points={{-40,38},{-46,38}}, + color={0,127,255}, + smooth=Smooth.None)); + connect(resistanceHeatStorage.port_b, valveHeatStorage.port_a) annotation ( + Line( + points={{-18,-72},{-18,-69}}, + color={0,127,255}, + smooth=Smooth.None)); + + connect(coldStorage.port_a_consumer, pumpColdConsumer.port_a) annotation ( + Line(points={{38,-8},{38,-20},{48,-20}}, color={0,127,255})); + connect(pumpColdConsumer.port_b, resistanceColdConsumerFlow.port_a) + annotation (Line(points={{62,-20},{66,-20}}, color={0,127,255})); + connect(pumpHeatConsumer.port_b, resistanceHeatConsumerFlow.port_a) + annotation (Line(points={{62,-50},{66,-50}}, color={0,127,255})); + connect(valveHeatSource.port_b, heatPumpTab.port_a_source) annotation (Line( + points={{-60,7},{-60,14.9},{-38.2,14.9}}, color={0,127,255})); + connect(valveColdStorage.port_b, heatPumpTab.port_a_source) annotation (Line( + points={{-58,38},{-62,38},{-62,14.9},{-38.2,14.9}}, color={0,127,255})); + connect(valveHeatSink.port_b, heatPumpTab.port_a_sink) annotation (Line( + points={{-24,-54},{-16,-54},{-5.8,-54},{-5.8,-8.9}}, color={0,127,255})); + connect(valveHeatStorage.port_b, heatPumpTab.port_a_sink) annotation (Line( + points={{-18,-57},{-18,-54},{-5.8,-54},{-5.8,-8.9}}, color={0,127,255})); + connect(heatPumpTab.port_b_sink, geothField_sink1.ports[1]) annotation (Line( + points={{-5.8,14.9},{2,14.9},{2,24},{-148.4,24}}, + color={0,127,255})); + connect(heatStorage.port_a_heatGenerator, heatPumpTab.port_b_sink) + annotation (Line(points={{26.24,-63.68},{10,-63.68},{10,14.9},{-5.8, + 14.9}}, + color={0,127,255})); + connect(heatStorage.port_b_consumer, pumpHeatConsumer.port_a) annotation ( + Line(points={{38,-62},{38,-50},{48,-50}}, color={0,127,255})); + connect(resistanceColdConsumerReturn.port_b, coldStorage.port_b_consumer) + annotation (Line(points={{66,32},{38,32},{38,20}}, color={0,127,255})); + connect(resistanceHeatConsumerReturn.port_b, heatStorage.port_a_consumer) + annotation (Line(points={{86,-106},{38,-106},{38,-90}}, color={0,127, + 255})); + connect(heatPumpTab.port_b_source, coldStorage.port_b_heatGenerator) + annotation (Line(points={{-38.2,-8.9},{-38.2,-24},{18,-24},{18,-5.2},{ + 26.24,-5.2}}, + color={0,127,255})); + connect(pumpEvaporator.port_b, resistanceColdStorage.port_a) annotation (Line( + points={{-8.88178e-016,36},{-8.88178e-016,38},{-28,38}}, color={0,127,255})); + connect(coldStorage.port_a_heatGenerator, pumpEvaporator.port_a) annotation ( + Line(points={{26.24,18.32},{20,18.32},{20,36},{14,36}}, color={0,127,255})); + connect(heatStorage.port_b_heatGenerator, pumpCondenser.port_a) annotation ( + Line(points={{26.24,-87.2},{16,-87.2},{16,-98},{6,-98}}, color={0,127,255})); + connect(pumpCondenser.port_b, resistanceHeatStorage.port_a) annotation (Line( + points={{-8,-98},{-18,-98},{-18,-84}}, color={0,127,255})); + connect(pumpGeothermalSource.port_b, resistanceGeothermalSource.port_a) + annotation (Line(points={{-82,-54},{-79,-54},{-76,-54}}, color={0,127,255})); + connect(heatPumpTab.OnOff, heatPumpControlBus.onOff) annotation (Line(points={ + {-22,16.6},{-22,16.6},{-22,60},{-0.3975,60},{-0.3975,79.095}}, color={ + 255,0,255}), Text( + string="%second", + index=1, + extent={{6,3},{6,3}})); + connect(resistanceHeatConsumerFlow.port_b, PeakLoadDevice.port_a) annotation ( + Line(points={{80,-50},{86,-50}}, color={0,127,255})); + connect(geothField_sink1.ports[2], returnTemSensor.port_b) annotation ( + Line(points={{-150,24},{-138,24},{-138,18},{-114,18}}, color={0, + 127,255})); + connect(returnTemSensor.port_a, heatPumpTab.port_b_source) annotation ( + Line(points={{-100,18},{-76,18},{-76,-8.9},{-38.2,-8.9}}, color={0, + 127,255})); + connect(resistanceColdConsumerFlow.port_b, vol1.ports[1]) + annotation (Line(points={{80,-20},{86,-20},{86,28}}, color={0,127,255})); + connect(vol1.ports[2], resistanceColdConsumerReturn.port_a) + annotation (Line(points={{86,32},{80,32}}, color={0,127,255})); + connect(PeakLoadDevice.port_b, vol2.ports[1]) annotation (Line(points={{98, + -50},{106,-50},{106,-52}}, color={0,127,255})); + connect(resistanceHeatConsumerReturn.port_a, vol2.ports[2]) annotation (Line( + points={{100,-106},{106,-106},{106,-56}}, color={0,127,255})); + connect(borFie.port_b, pumpGeothermalSource.port_a) annotation (Line(points={{ + -150,-16},{-150,-16},{-150,-52},{-150,-52},{-150,-54},{-96,-54}}, + color={0,127,255})); + connect(geothField_sink1.ports[3], borFie.port_a) annotation (Line(points={{-151.6, + 24},{-150,24},{-150,4}}, color={0,127,255})); + annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-160, + -120},{160,80}})), Icon(coordinateSystem( + preserveAspectRatio=false, extent={{-160,-120},{160,80}})), + experiment(StopTime=3600, Interval=10), + __Dymola_experimentSetupOutput( + states=false, + derivatives=false, + inputs=false, + auxiliaries=false), + Documentation(info=" +

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.

+", revisions=" + +")); +end GeothermalHeatPumpBase; diff --git a/pyDMPC/ModelicaModels/ModelicaModels/BaseClasses/GeothermalHeatPumpControlledBase.mo b/pyDMPC/ModelicaModels/ModelicaModels/BaseClasses/GeothermalHeatPumpControlledBase.mo new file mode 100644 index 0000000..e535931 --- /dev/null +++ b/pyDMPC/ModelicaModels/ModelicaModels/BaseClasses/GeothermalHeatPumpControlledBase.mo @@ -0,0 +1,131 @@ +within ModelicaModels.BaseClasses; +partial model GeothermalHeatPumpControlledBase + "Example of a geothermal heat pump system with controllers" + extends ModelicaModels.BaseClasses.GeothermalHeatPumpBase; + Modelica.Blocks.Sources.RealExpression getTStorageUpper(y=heatStorage.layer[ + heatStorage.n].T) "Gets the temperature of upper heat storage layer" + annotation (Placement(transformation(extent={{-160,64},{-140,84}}))); + Modelica.Blocks.Sources.RealExpression getTStorageLower(y=coldStorage.layer[1].T) + "Gets the temperature of lower cold storage layer" + annotation (Placement(transformation(extent={{-160,48},{-140,68}}))); + Modelica.Blocks.Interfaces.RealOutput coldStorageTemperature( + final quantity="ThermodynamicTemperature", + final unit="K", + displayUnit="degC", + min=0, + start=T_start_cold[1]) "Temperature in the cold storage" annotation ( + Placement(transformation( + origin={78,80}, + extent={{-10,-10},{10,10}}, + rotation=90), iconTransformation( + extent={{10,-10},{-10,10}}, + rotation=90, + origin={-100,-110}))); + Modelica.Blocks.Interfaces.RealOutput heatStorageTemperature( + final quantity="ThermodynamicTemperature", + final unit="K", + displayUnit="degC", + min=0, + start=T_start_warm[heatStorage.n]) "Temperature in the heat storage" + annotation (Placement(transformation( + origin={60,80}, + extent={{-10,-10},{10,10}}, + rotation=90), iconTransformation( + extent={{10,-10},{-10,10}}, + rotation=90, + origin={-140,-110}))); + Modelica.Blocks.Interfaces.RealOutput chemicalEnergy(final unit="W") + "Flow of primary (chemical) energy into boiler " annotation (Placement( + transformation( + extent={{-10,10},{10,-10}}, + rotation=270, + origin={-61.5,-119.5}), iconTransformation( + extent={{10,-10},{-10,10}}, + rotation=90, + origin={-20.5,-109}))); + Modelica.Blocks.Interfaces.RealOutput heatPumpEnergy(final unit="W") + "Electrical power of the heat pump" annotation (Placement(transformation( + extent={{-10,10},{10,-10}}, + rotation=270, + origin={-39.5,-119.5}), iconTransformation( + extent={{10,-10},{-10,10}}, + rotation=90, + origin={-60.5,-109}))); + inner Modelica.Fluid.System system + annotation (Placement(transformation(extent={{120,60},{140,80}}))); + Modelica.Blocks.Interfaces.RealOutput returnTemperature( + final quantity="ThermodynamicTemperature", + final unit="K", + displayUnit="degC", + min=0, + start=T_start_cold[1]) "Temperature in the cold storage" annotation ( + Placement(transformation( + origin={-144,-120}, + extent={{10,-10},{-10,10}}, + rotation=90), iconTransformation( + extent={{10,-10},{-10,10}}, + rotation=90, + origin={-100,-110}))); + Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow prescribedHeatFlow + annotation (Placement(transformation(extent={{-6,-6},{6,6}}, + rotation=-90, + origin={116,-34}))); + Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow prescribedHeatFlow1 + annotation (Placement(transformation(extent={{6,-6},{-6,6}}, + rotation=-90, + origin={96,8}))); + + Modelica.Blocks.Continuous.Integrator integrator annotation (Placement( + transformation( + extent={{-6,-6},{6,6}}, + rotation=-90, + origin={-62,-94}))); + Modelica.Blocks.Continuous.Integrator integrator1 annotation (Placement( + transformation( + extent={{-6,-6},{6,6}}, + rotation=-90, + origin={-40,-94}))); + Modelica.Blocks.Sources.Constant const(k=10000) annotation (Placement( + transformation( + extent={{-6,-6},{6,6}}, + rotation=180, + origin={128,-2}))); + Modelica.Blocks.Math.Gain negate1(k=-1) annotation (Placement(transformation( + extent={{-4,-4},{4,4}}, + rotation=-90, + origin={116,-16}))); +equation + connect(getTStorageLower.y, coldStorageTemperature) annotation (Line(points={{-139,58}, + {78,58},{78,80}}, color={0,0,127})); + connect(getTStorageUpper.y, heatStorageTemperature) annotation (Line(points={{-139,74}, + {-122,74},{-122,60},{60,60},{60,80}}, + color={0,0,127})); + connect(returnTemSensor.T, returnTemperature) annotation (Line(points={{ + -107,9.2},{-107,-94},{-144,-94},{-144,-120}}, color={0,0,127})); + connect(prescribedHeatFlow.port, vol2.heatPort) + annotation (Line(points={{116,-40},{116,-44}}, color={191,0,0})); + connect(vol1.heatPort, prescribedHeatFlow1.port) + annotation (Line(points={{96,20},{96,14}}, color={191,0,0})); + connect(chemicalEnergy, integrator.y) annotation (Line(points={{-61.5,-119.5}, + {-62,-119.5},{-62,-100.6}}, color={0,0,127})); + connect(integrator1.y, heatPumpEnergy) annotation (Line(points={{-40,-100.6}, + {-40,-119.5},{-39.5,-119.5}}, color={0,0,127})); + connect(integrator1.u, heatPumpTab.Power) annotation (Line(points={{-40,-86.8}, + {-40,-30},{-22,-30},{-22,-12.3}}, color={0,0,127})); + connect(prescribedHeatFlow.Q_flow, negate1.y) + annotation (Line(points={{116,-28},{116,-20.4}}, color={0,0,127})); + connect(const.y, negate1.u) annotation (Line(points={{121.4,-2},{116,-2},{116, + -11.2}}, color={0,0,127})); + annotation (experiment(StopTime=86400, Interval=10), Documentation(info=" +

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.

+", revisions=" + +"), + Diagram(coordinateSystem(extent={{-160,-120},{140,80}})), + Icon(coordinateSystem(extent={{-160,-120},{140,80}}))); +end GeothermalHeatPumpControlledBase; diff --git a/pyDMPC/ModelicaModels/ModelicaModels/BaseClasses/package.order b/pyDMPC/ModelicaModels/ModelicaModels/BaseClasses/package.order index 056bf2a..d9fd786 100644 --- a/pyDMPC/ModelicaModels/ModelicaModels/BaseClasses/package.order +++ b/pyDMPC/ModelicaModels/ModelicaModels/BaseClasses/package.order @@ -1,3 +1,5 @@ ControlledSystemBaseClass HRCController ThermalConductor +GeothermalHeatPumpBase +GeothermalHeatPumpControlledBase diff --git a/pyDMPC/ModelicaModels/ModelicaModels/ControlledSystems/GeothermalField2.mo b/pyDMPC/ModelicaModels/ModelicaModels/ControlledSystems/GeothermalField2.mo deleted file mode 100644 index e161ebd..0000000 --- a/pyDMPC/ModelicaModels/ModelicaModels/ControlledSystems/GeothermalField2.mo +++ /dev/null @@ -1,27 +0,0 @@ -within ModelicaModels.ControlledSystems; -model GeothermalField2 - - extends ModelicaModels.Subsystems.Geo.BaseClasses.FieldBaseClass2; - Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow prescribedHeatFlow - annotation (Placement(transformation(extent={{-12,-12},{12,12}}, - rotation=0, - origin={-6,42}))); - Modelica.Blocks.Sources.Sine sine(amplitude=10000, freqHz=1/86400) - annotation (Placement(transformation(extent={{-100,38},{-80,60}}))); - Modelica.Blocks.Math.Product product - annotation (Placement(transformation(extent={{-62,32},{-42,52}}))); - Modelica.Blocks.Interfaces.RealInput heatShare - "Connector of Real input signal 2" - annotation (Placement(transformation(extent={{-120,-18},{-80,22}}))); -equation - connect(prescribedHeatFlow.port, vol1.heatPort) - annotation (Line(points={{6,42},{20,42}}, color={191,0,0})); - connect(sine.y, product.u1) annotation (Line(points={{-79,49},{-74,49},{-74, - 48},{-64,48}}, color={0,0,127})); - connect(product.y, prescribedHeatFlow.Q_flow) - annotation (Line(points={{-41,42},{-41,42},{-18,42}}, color={0,0,127})); - connect(product.u2, heatShare) annotation (Line(points={{-64,36},{-76,36},{ - -76,2},{-100,2}}, color={0,0,127})); - annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( - coordinateSystem(preserveAspectRatio=false))); -end GeothermalField2; diff --git a/pyDMPC/ModelicaModels/ModelicaModels/ControlledSystems/GeothermalHeatPumpSystem.mo b/pyDMPC/ModelicaModels/ModelicaModels/ControlledSystems/GeothermalHeatPumpSystem.mo new file mode 100644 index 0000000..9d8b507 --- /dev/null +++ b/pyDMPC/ModelicaModels/ModelicaModels/ControlledSystems/GeothermalHeatPumpSystem.mo @@ -0,0 +1,122 @@ +within ModelicaModels.ControlledSystems; +model GeothermalHeatPumpSystem + "Example of a geothermal heat pump systemreplaceable package Water = AixLib.Media.Water;" + extends Modelica.Icons.Example; + extends ModelicaModels.BaseClasses.GeothermalHeatPumpControlledBase( + redeclare + AixLib.Fluid.Examples.GeothermalHeatPump.Components.BoilerStandAlone + PeakLoadDevice(redeclare package Medium = Water), + vol1(V=0.5), + vol2(V=0.5), + resistanceGeothermalSource(m_flow_nominal=16), + pumpGeothermalSource(m_flow_nominal=16)); + + AixLib.Fluid.Sources.Boundary_pT coldConsumerFlow(redeclare package Medium = + Water, nPorts=1) annotation (Placement(transformation( + extent={{-6,-6},{6,6}}, + rotation=180, + origin={94,-20}))); + AixLib.Fluid.Sources.Boundary_pT heatConsumerReturn( + redeclare package Medium = Water, + nPorts=1, + T=303.15) "Source representing heat consumer" annotation (Placement( + transformation( + extent={{-6,-6},{6,6}}, + rotation=180, + origin={112,-106}))); + Modelica.Blocks.Sources.Constant pressureDifference(k=20000) + "Pressure difference used for all pumps" annotation ( + Placement(transformation( + extent={{-6,-6},{6,6}}, + rotation=180, + origin={72,6}))); + 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}}))); + 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={{-100,28},{-84,44}}))); + AixLib.Fluid.Examples.GeothermalHeatPump.Control.geothermalFieldController geothermalFieldControllerHeat + "Controls the heat exchange with the geothermal field and the heat storage" + annotation (Placement(transformation(extent={{-100,-34},{-84,-18}}))); + Modelica.Blocks.Math.Gain negate(k=-1) + annotation (Placement(transformation(extent={{112,-2},{104,6}}))); +equation + connect(resistanceColdConsumerFlow.port_b,coldConsumerFlow. ports[1]) + annotation (Line(points={{80,-20},{88,-20}}, color={0,127,255})); + connect(pressureDifference.y, pumpColdConsumer.dp_in) annotation (Line(points={{65.4,6}, + {55,6},{55,-11.6}}, color={0,0,127})); + connect(pressureDifference.y, pumpHeatConsumer.dp_in) annotation (Line(points={{65.4,6}, + {62,6},{62,-36},{55,-36},{55,-41.6}}, color={0, + 0,127})); + connect(resistanceHeatConsumerReturn.port_a,heatConsumerReturn. ports[1]) + annotation (Line(points={{100,-106},{106,-106}}, color={0,127,255})); + connect(pressureDifference.y, pumpEvaporator.dp_in) annotation (Line(points={{65.4,6}, + {56,6},{56,54},{7,54},{7,44.4}}, color={0,0, + 127})); + connect(pressureDifference.y, pumpCondenser.dp_in) annotation (Line(points={{65.4,6}, + {62,6},{62,-36},{-1,-36},{-1,-89.6}}, color={0,0,127})); + 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(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(getTStorageLower.y,geothermalFieldControllerCold. temperature) + annotation (Line(points={{-139,58},{-122,58},{-108,58},{-108,36},{-100,36}}, + color={0,0,127})); + connect(geothermalFieldControllerCold.valveOpening1, valveColdStorage.y) + annotation (Line(points={{-83.04,40.8},{-82,40.8},{-82,40},{-82,52},{-82,54}, + {-52,54},{-52,46.4}}, color={0,0,127})); + connect(geothermalFieldControllerCold.valveOpening2, valveHeatSource.y) + annotation (Line(points={{-83.04,31.2},{-82,31.2},{-82,1},{-68.4,1}}, color= + {0,0,127})); + connect(getTStorageUpper.y,geothermalFieldControllerHeat. temperature) + annotation (Line(points={{-139,74},{-122,74},{-122,-26},{-100,-26}}, color= + {0,0,127})); + connect(valveHeatSink.y, geothermalFieldControllerHeat.valveOpening1) + annotation (Line(points={{-30,-45.6},{-30,-45.6},{-30,-32},{-30,-21.2},{-83.04, + -21.2}}, color={0,0,127})); + connect(geothermalFieldControllerHeat.valveOpening2, valveHeatStorage.y) + annotation (Line(points={{-83.04,-30.8},{-56,-30.8},{-56,-63},{-26.4,-63}}, + color={0,0,127})); + connect(getTStorageUpper.y, hPControllerOnOff.T_meas) annotation (Line(points= + {{-139,74},{-108,74},{-108,76},{-78,76}}, color={0,0,127})); + connect(prescribedHeatFlow1.Q_flow, negate.y) + annotation (Line(points={{96,2},{103.6,2}}, color={0,0,127})); + connect(integrator.u, PeakLoadDevice.chemicalEnergyFlowRate) annotation (Line( + points={{-62,-86.8},{-62,-78},{-26,-78},{-26,-116},{74,-116},{74,-76},{ + 90.77,-76},{90.77,-56.54}}, color={0,0,127})); + annotation (experiment(StopTime=86400, Interval=10), Documentation(revisions=" + +", info=" +

Simple stand-alone model of a combined heat and cold supply system. +The geothermal heat pump can either transport heat

+ +

In the flow line of the heating circuit a boiler is connected as a peak load device. +Consumers are modeled as sinks are sources with a constant temperature.

+"), + Diagram(coordinateSystem(extent={{-160,-120},{140,80}})), + Icon(coordinateSystem(extent={{-160,-120},{140,80}}))); +end GeothermalHeatPumpSystem; diff --git a/pyDMPC/ModelicaModels/ModelicaModels/ControlledSystems/SimpleModelGeo.mo b/pyDMPC/ModelicaModels/ModelicaModels/ControlledSystems/SimpleModelGeo.mo deleted file mode 100644 index bd8c7ef..0000000 --- a/pyDMPC/ModelicaModels/ModelicaModels/ControlledSystems/SimpleModelGeo.mo +++ /dev/null @@ -1,285 +0,0 @@ -within ModelicaModels.ControlledSystems; -model SimpleModelGeo "extends Modelica.Icons.Example;extends ModelicaModels.BaseClasses.Geo.ControlledSystemBaseClass( - volumeFlow( - tableOnFile=false, table=[0,0.31,0.29]));" - replaceable package Water = AixLib.Media.Water; - AixLib.Fluid.Sources.FixedBoundary bou( redeclare package Medium = - Water, - p=100000, - T=285.15, - nPorts=1) annotation (Placement( - transformation( - extent={{10,-10},{-10,10}}, - rotation=-90, - origin={64,-50}))); - AixLib.Fluid.MixingVolumes.MixingVolume vol1(redeclare package Medium = - Water, - energyDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial, - m_flow_small=50, - nPorts=3, - p_start=100000, - m_flow_nominal=16, - V=2) annotation ( - Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=-90, - origin={54,-6}))); - AixLib.Fluid.FixedResistances.HydraulicResistance hydraulicResistance( - redeclare package Medium = Water, - m_flow_nominal=100, - diameter=0.5, - m_flow_start=0, - zeta=0.3) - annotation (Placement(transformation(extent={{-22,-8},{-2,12}}))); - Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow prescribedHeatFlow - annotation (Placement(transformation(extent={{-6,-6},{6,6}}, - rotation=-90, - origin={54,20}))); - AixLib.Fluid.Movers.FlowControlled_m_flow fan(redeclare package Medium = - Water, - m_flow_small=1, - m_flow_start=50, - m_flow_nominal=16, - addPowerToMedium=false) - annotation (Placement(transformation(extent={{8,-44},{-12,-24}}))); - Modelica.Blocks.Sources.Pulse Q_flow_need_heat( - width=50, - period=86400, - amplitude=2200) - annotation (Placement(transformation(extent={{-96,88},{-88,96}}))); - Modelica.Blocks.Sources.Pulse pulse1( - width=50, - period=86400, - startTime=43200, - amplitude=2200) - annotation (Placement(transformation(extent={{-96,72},{-88,80}}))); - Modelica.Blocks.Math.Product Q_flow_need_cold - annotation (Placement(transformation(extent={{-62,66},{-54,74}}))); - Modelica.Blocks.Sources.Constant const(k=-1) - annotation (Placement(transformation(extent={{-96,56},{-88,64}}))); - Modelica.Blocks.Math.Sum Q_flow_need(nin=2) - annotation (Placement(transformation(extent={{-36,60},{-28,68}}))); - Modelica.Blocks.Interfaces.RealOutput buildingNeed annotation (Placement( - transformation( - extent={{-4,-4},{4,4}}, - rotation=90, - origin={-24,100}))); - Modelica.Blocks.Interfaces.RealOutput fieldTemperature annotation (Placement( - transformation( - extent={{-4,-4},{4,4}}, - rotation=-90, - origin={-58,-100}))); - Modelica.Blocks.Interfaces.RealOutput buildingTemperature annotation ( - Placement(transformation( - extent={{-4,-4},{4,4}}, - rotation=-90, - origin={84,-100}))); - AixLib.Fluid.Sensors.MassFlowRate senMasFlo(redeclare package Medium = - Water) - annotation (Placement(transformation(extent={{-50,8},{-38,-4}}))); - Modelica.Blocks.Interfaces.RealOutput fieldMassflow_out annotation (Placement( - transformation( - extent={{-4,-4},{4,4}}, - rotation=-90, - origin={-44,-100}))); - AixLib.Fluid.Sensors.MassFlowRate senMasFlo1(redeclare package Medium = - Water) - annotation (Placement(transformation(extent={{36,-28},{24,-40}}))); - Modelica.Blocks.Interfaces.RealOutput buildingMassflow_out annotation ( - Placement(transformation( - extent={{-4,-4},{4,4}}, - rotation=-90, - origin={30,-100}))); - AixLib.Fluid.Sensors.Temperature senTem(redeclare package Medium = - Water) - annotation (Placement(transformation(extent={{-68,-72},{-58,-64}}))); - AixLib.Fluid.Sensors.Temperature senTem1(redeclare package Medium = - Water) - annotation (Placement(transformation(extent={{70,-26},{80,-16}}))); - Modelica.Blocks.Math.Product product - annotation (Placement(transformation(extent={{-12,62},{-2,72}}))); - Modelica.Blocks.Interfaces.RealInput valveQflow "scaling the buildings need" - annotation (Placement(transformation( - extent={{-4,-4},{4,4}}, - rotation=-90, - origin={-14,100}))); - AixLib.Fluid.Sensors.Temperature senTem2(redeclare package Medium = - Water) - annotation (Placement(transformation(extent={{-20,-70},{-10,-62}}))); - AixLib.Fluid.Sensors.Temperature senTem3(redeclare package Medium = - Water) - annotation (Placement(transformation(extent={{2,24},{12,34}}))); - AixLib.Fluid.Sensors.MassFlowRate senMasFlo2(redeclare package Medium = - Water) - annotation (Placement(transformation(extent={{22,-4},{34,8}}))); - AixLib.Fluid.Sensors.MassFlowRate senMasFlo3(redeclare package Medium = - Water) - annotation (Placement(transformation(extent={{-26,-28},{-38,-40}}))); - Modelica.Blocks.Interfaces.RealOutput fieldTemperature_in annotation ( - Placement(transformation( - extent={{-4,-4},{4,4}}, - rotation=-90, - origin={-10,-100}))); - Modelica.Blocks.Interfaces.RealOutput buildingTemperature_in annotation ( - Placement(transformation( - extent={{-4,-4},{4,4}}, - rotation=90, - origin={12,100}), iconTransformation( - extent={{-4,-4},{4,4}}, - rotation=90, - origin={0,16}))); - Modelica.Blocks.Interfaces.RealOutput fieldMassflow_in annotation (Placement( - transformation( - extent={{-4,-4},{4,4}}, - rotation=-90, - origin={-32,-100}))); - Modelica.Blocks.Interfaces.RealOutput buildingMassflow_in annotation ( - Placement(transformation( - extent={{-4,-4},{4,4}}, - rotation=90, - origin={28,100}))); - Modelica.Blocks.Logical.GreaterEqual greaterEqual annotation (Placement( - transformation( - extent={{-5,-5},{5,5}}, - rotation=-90, - origin={-23,43}))); - Modelica.Blocks.Sources.Constant const1(k=0) - annotation (Placement(transformation(extent={{-68,42},{-58,52}}))); - Modelica.Thermal.HeatTransfer.Celsius.FromKelvin hRCTemperatureC - annotation (Placement(transformation(extent={{-4,-4},{4,4}}, - rotation=90, - origin={12,82}))); - Modelica.Thermal.HeatTransfer.Celsius.FromKelvin hRCTemperatureC1 - annotation (Placement(transformation(extent={{-4,-4},{4,4}}, - rotation=270, - origin={84,-62}))); - Modelica.Thermal.HeatTransfer.Celsius.FromKelvin hRCTemperatureC2 - annotation (Placement(transformation(extent={{-4,-4},{4,4}}, - rotation=270, - origin={-10,-80}))); - Modelica.Thermal.HeatTransfer.Celsius.FromKelvin hRCTemperatureC3 - annotation (Placement(transformation(extent={{-4,-4},{4,4}}, - rotation=270, - origin={-58,-82}))); - Modelica.Blocks.Sources.Constant m_flow(k=16) - annotation (Placement(transformation(extent={{-68,20},{-58,30}}))); - AixLib.Fluid.MixingVolumes.MixingVolume vol( - redeclare package Medium = Water, - m_flow_small=50, - V=9000, - p_start=150000, - T_start=285.15, - m_flow_nominal=16, - nPorts=3) annotation ( - Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=90, - origin={-88,-14}))); - Modelica.Thermal.HeatTransfer.Sources.FixedTemperature fixedTemperature(T=285.15) - annotation (Placement(transformation( - extent={{-6,-6},{6,6}}, - rotation=90, - origin={-88,-76}))); - Modelica.Thermal.HeatTransfer.Components.ThermalConductor thermalConductor(G=50) - annotation (Placement(transformation( - extent={{-6,-6},{6,6}}, - rotation=90, - origin={-88,-48}))); - Modelica.Blocks.Math.Gain maxHeatFlowRate(k=0.01) "Convert from percent" - annotation (Placement(transformation( - extent={{-6,-6},{6,6}}, - rotation=270, - origin={-14,84}))); - Modelica.Blocks.Sources.Constant const2(k=-10000) - annotation (Placement(transformation(extent={{-5,-5},{5,5}}, - rotation=180, - origin={1,49}))); -equation - connect(pulse1.y, Q_flow_need_cold.u1) annotation (Line(points={{-87.6,76},{ - -66,76},{-66,72.4},{-62.8,72.4}}, color={0,0,127})); - connect(const.y, Q_flow_need_cold.u2) annotation (Line(points={{-87.6,60},{ - -76,60},{-76,66},{-62.8,66},{-62.8,67.6}}, color={0,0,127})); - connect(Q_flow_need_heat.y, Q_flow_need.u[1]) annotation (Line(points={{-87.6, - 92},{-46,92},{-46,63.6},{-36.8,63.6}}, - color={0,0,127})); - connect(prescribedHeatFlow.port, vol1.heatPort) - annotation (Line(points={{54,14},{54,4}}, color={191,0,0})); - connect(senMasFlo.m_flow, fieldMassflow_out) annotation (Line(points={{-44, - -4.6},{-44,-100}}, color={0,0,127})); - connect(senMasFlo1.m_flow, buildingMassflow_out) annotation (Line(points={{30, - -40.6},{30,-100}}, color={0,0,127})); - connect(senMasFlo.port_b, hydraulicResistance.port_a) annotation (Line(points={{-38,2}, - {-22,2}}, color={0,127,255})); - connect(fan.port_a, senMasFlo1.port_b) - annotation (Line(points={{8,-34},{24,-34}}, color={0,127,255})); - connect(product.y, prescribedHeatFlow.Q_flow) annotation (Line(points={{-1.5,67}, - {16,67},{16,52},{54,52},{54,26}}, color={0,0,127})); - connect(buildingNeed, Q_flow_need.y) annotation (Line(points={{-24,100},{-24, - 64},{-27.6,64}}, color={0,0,127})); - connect(hydraulicResistance.port_b, senMasFlo2.port_a) - annotation (Line(points={{-2,2},{22,2}}, color={0,127,255})); - connect(senMasFlo2.port_b, vol1.ports[1]) - annotation (Line(points={{34,2},{44,2},{44,-3.33333}}, - color={0,127,255})); - connect(senMasFlo1.port_a, vol1.ports[2]) annotation (Line(points={{36,-34},{ - 44,-34},{44,-6}}, color={0,127,255})); - connect(bou.ports[1], vol1.ports[2]) annotation (Line(points={{64,-40},{64, - -34},{44,-34},{44,-6}}, color={0,127,255})); - connect(senTem1.port, vol1.ports[3]) annotation (Line(points={{75,-26},{66, - -26},{66,-18},{44,-18},{44,-8.66667}}, - color={0,127,255})); - connect(senMasFlo3.port_a, fan.port_b) - annotation (Line(points={{-26,-34},{-12,-34}}, color={0,127,255})); - connect(senTem2.port, fan.port_b) annotation (Line(points={{-15,-70},{-20,-70}, - {-20,-34},{-12,-34}}, color={0,127,255})); - connect(senMasFlo3.m_flow, fieldMassflow_in) - annotation (Line(points={{-32,-40.6},{-32,-100}}, color={0,0,127})); - connect(senMasFlo2.m_flow, buildingMassflow_in) - annotation (Line(points={{28,8.6},{28,100}}, color={0,0,127})); - connect(senTem3.port, senMasFlo2.port_a) - annotation (Line(points={{7,24},{7,2},{22,2}}, color={0,127,255})); - connect(Q_flow_need_cold.y, Q_flow_need.u[2]) annotation (Line(points={{-53.6, - 70},{-48,70},{-48,56},{-36.8,56},{-36.8,64.4}}, color={0,0,127})); - connect(const1.y, greaterEqual.u2) annotation (Line(points={{-57.5,47},{ - -42.75,47},{-42.75,49},{-27,49}}, color={0,0,127})); - connect(senTem3.T, hRCTemperatureC.Kelvin) - annotation (Line(points={{10.5,29},{12,29},{12,77.2}}, color={0,0,127})); - connect(hRCTemperatureC.Celsius, buildingTemperature_in) - annotation (Line(points={{12,86.4},{12,100}}, color={0,0,127})); - connect(senTem1.T, hRCTemperatureC1.Kelvin) annotation (Line(points={{78.5, - -21},{84,-21},{84,-57.2}}, color={0,0,127})); - connect(hRCTemperatureC1.Celsius, buildingTemperature) - annotation (Line(points={{84,-66.4},{84,-100}}, color={0,0,127})); - connect(senTem2.T, hRCTemperatureC2.Kelvin) annotation (Line(points={{-11.5, - -66},{-10,-66},{-10,-75.2}}, color={0,0,127})); - connect(hRCTemperatureC2.Celsius, fieldTemperature_in) - annotation (Line(points={{-10,-84.4},{-10,-100}}, color={0,0,127})); - connect(senTem.T, hRCTemperatureC3.Kelvin) annotation (Line(points={{-59.5, - -68},{-58,-68},{-58,-77.2}}, color={0,0,127})); - connect(hRCTemperatureC3.Celsius, fieldTemperature) - annotation (Line(points={{-58,-86.4},{-58,-100}}, color={0,0,127})); - connect(m_flow.y, fan.m_flow_in) annotation (Line(points={{-57.5,25},{-30,25}, - {-30,-14},{-2,-14},{-2,-22}}, color={0,0,127})); - connect(thermalConductor.port_b, vol.heatPort) - annotation (Line(points={{-88,-42},{-88,-24}}, color={191,0,0})); - connect(senMasFlo3.port_b, vol.ports[1]) annotation (Line(points={{-38,-34},{ - -78,-34},{-78,-16.6667}}, color={0,127,255})); - connect(vol.ports[2], senMasFlo.port_a) - annotation (Line(points={{-78,-14},{-78,2},{-50,2}}, color={0,127,255})); - connect(fixedTemperature.port, thermalConductor.port_a) - annotation (Line(points={{-88,-70},{-88,-54}}, color={191,0,0})); - connect(vol.ports[3], senTem.port) annotation (Line(points={{-78,-11.3333},{ - -70,-11.3333},{-70,-76},{-63,-76},{-63,-72}}, color={0,127,255})); - connect(valveQflow, maxHeatFlowRate.u) - annotation (Line(points={{-14,100},{-14,91.2}}, color={0,0,127})); - connect(maxHeatFlowRate.y, product.u1) annotation (Line(points={{-14,77.4},{ - -14,74},{-14,70},{-13,70}}, color={0,0,127})); - connect(Q_flow_need.y, greaterEqual.u1) - annotation (Line(points={{-27.6,64},{-23,64},{-23,49}}, color={0,0,127})); - connect(const2.y, product.u2) annotation (Line(points={{-4.5,49},{-16,49},{ - -16,64},{-13,64}}, color={0,0,127})); - annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{120,100}})), Diagram( - coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100, - 100}}))); -end SimpleModelGeo; diff --git a/pyDMPC/ModelicaModels/ModelicaModels/ControlledSystems/package.order b/pyDMPC/ModelicaModels/ModelicaModels/ControlledSystems/package.order index 4b83bc1..47d7e71 100644 --- a/pyDMPC/ModelicaModels/ModelicaModels/ControlledSystems/package.order +++ b/pyDMPC/ModelicaModels/ModelicaModels/ControlledSystems/package.order @@ -1,6 +1,5 @@ ControlledSystemBoundaries -SimpleModelGeo TestHall GeothermalField GenericControlledSystem -GeothermalField2 +GeothermalHeatPumpSystem diff --git a/pyDMPC/ModelicaModels/ModelicaModels/SubsystemModels/DetailedModels/Geo/ERC_DataBase.mo b/pyDMPC/ModelicaModels/ModelicaModels/SubsystemModels/DetailedModels/Geo/ERC_DataBase.mo deleted file mode 100644 index cd5c2d4..0000000 --- a/pyDMPC/ModelicaModels/ModelicaModels/SubsystemModels/DetailedModels/Geo/ERC_DataBase.mo +++ /dev/null @@ -1,502 +0,0 @@ -within ModelicaModels.SubsystemModels.DetailedModels.Geo; -package ERC_DataBase - extends Modelica.Icons.Package; - - record ERC_Office "ERC_Office" - extends AixLib.DataBase.ThermalZones.ZoneBaseRecord( - T_start = 293.15, - withAirCap = true, - VAir = 1575.0, - AZone = 450.0, - alphaRad = 5.0, - lat = 0.88645272708792, - nOrientations = 6, - AWin = {19.792875555172753, 0.0, 19.792875555172753, 12.92752065246066, 0.0, 12.92752065246066}, - ATransparent = {19.792875555172753, 0.0, 19.792875555172753, 12.92752065246066, 0.0, 12.92752065246066}, - alphaWin = 2.7, - RWin = 0.005473786945469707, - gWin = 0.67, - UWin= 1.8936557576825384, - ratioWinConRad = 0.029999999999999992, - AExt = {59.37862666551825, 129.375, 59.37862666551825, 38.78256195738198, 129.375, 38.78256195738198}, - alphaExt = 2.131409127563372, - nExt = 1, - RExt = {7.001315361801091e-05}, - RExtRem = 0.003868547080640062, - CExt = {140071439.69284478}, - AInt = 1462.5, - alphaInt = 2.2384615384615385, - nInt = 1, - RInt = {3.853872661470092e-05}, - CInt = {202904595.40007505}, - AFloor = 0.0, - alphaFloor = 0.0, - nFloor = 1, - RFloor = {0.00001}, - RFloorRem = 0.00001, - CFloor = {0.00001}, - ARoof = 0.0, - alphaRoof = 0.0, - nRoof = 1, - RRoof = {0.00001}, - RRoofRem = 0.00001, - CRoof = {0.00001}, - nOrientationsRoof = 1, - tiltRoof = {0.0}, - aziRoof = {0.0}, - wfRoof = {0.0}, - aRoof = 0.0, - aExt = 0.5, - TSoil = 286.15, - alphaWallOut = 20.0, - alphaRadWall = 5.0, - alphaWinOut = 20.0, - alphaRoofOut = 0.0, - alphaRadRoof = 0.0, - tiltExtWalls = {1.5707963267948966, 0.0, 1.5707963267948966, 1.5707963267948966, 0.0, 1.5707963267948966}, - aziExtWalls = {0.0, 0.0, 3.141592653589793, -1.5707963267948966, 0.0, 1.5707963267948966}, - wfWall = {0.12770320628717272, 0.26000688929233473, 0.12770320628717272, 0.08340808449287807, 0.0, 0.08340808449287807}, - wfWin = {0.3024547048509643, 0.0, 0.3024547048509643, 0.19754529514903565, 0.0, 0.19754529514903565}, - wfGro = 0.3177705291475636, - nrPeople = 22.5, - ratioConvectiveHeatPeople = 0.5, - nrPeopleMachines = 31.5, - ratioConvectiveHeatMachines = 0.75, - lightingPower = 12.5, - ratioConvectiveHeatLighting = 0.9, - useConstantACHrate = false, - baseACH = 0.2, - maxUserACH = 1.0, - maxOverheatingACH = {3.0, 2.0}, - maxSummerACH = {1.0, 283.15, 290.15}, - winterReduction = {0.2, 273.15, 283.15}, - withAHU = false, - minAHU = 0.0, - maxAHU = 2.6, - hHeat = 13056.213013876744, - lHeat = 0, - KRHeat = 10000, - TNHeat = 1, - HeaterOn = true, - hCool = 0, - lCool = 0.0, - KRCool = 10000, - TNCool = 1, - CoolerOn = false); - end ERC_Office; - - record ERC_Floor "ERC_Floor" - extends AixLib.DataBase.ThermalZones.ZoneBaseRecord( - T_start = 293.15, - withAirCap = true, - VAir = 787.5, - AZone = 225.0, - alphaRad = 5.0, - lat = 0.88645272708792, - nOrientations = 6, - AWin = {9.896437777586376, 0.0, 9.896437777586376, 6.46376032623033, 0.0, 6.46376032623033}, - ATransparent = {9.896437777586376, 0.0, 9.896437777586376, 6.46376032623033, 0.0, 6.46376032623033}, - alphaWin = 2.7, - RWin = 0.010947573890939415, - gWin = 0.67, - UWin= 1.8936557576825384, - ratioWinConRad = 0.029999999999999992, - AExt = {29.689313332759124, 64.6875, 29.689313332759124, 19.39128097869099, 64.6875, 19.39128097869099}, - alphaExt = 2.131409127563372, - nExt = 1, - RExt = {0.00014002630723602182}, - RExtRem = 0.007737094161280124, - CExt = {70035719.84642239}, - AInt = 1190.625, - alphaInt = 2.4165354330708664, - nInt = 1, - RInt = {5.9993852398404444e-05}, - CInt = {127978748.77111508}, - AFloor = 0.0, - alphaFloor = 0.0, - nFloor = 1, - RFloor = {0.00001}, - RFloorRem = 0.00001, - CFloor = {0.00001}, - ARoof = 0.0, - alphaRoof = 0.0, - nRoof = 1, - RRoof = {0.00001}, - RRoofRem = 0.00001, - CRoof = {0.00001}, - nOrientationsRoof = 1, - tiltRoof = {0.0}, - aziRoof = {0.0}, - wfRoof = {0.0}, - aRoof = 0.0, - aExt = 0.5, - TSoil = 286.15, - alphaWallOut = 20.0, - alphaRadWall = 5.0, - alphaWinOut = 20.0, - alphaRoofOut = 0.0, - alphaRadRoof = 0.0, - tiltExtWalls = {1.5707963267948966, 0.0, 1.5707963267948966, 1.5707963267948966, 0.0, 1.5707963267948966}, - aziExtWalls = {0.0, 0.0, 3.141592653589793, -1.5707963267948966, 0.0, 1.5707963267948966}, - wfWall = {0.12770320628717272, 0.26000688929233473, 0.12770320628717272, 0.08340808449287807, 0.0, 0.08340808449287807}, - wfWin = {0.3024547048509643, 0.0, 0.3024547048509643, 0.19754529514903565, 0.0, 0.19754529514903565}, - wfGro = 0.3177705291475636, - nrPeople = 0.0, - ratioConvectiveHeatPeople = 0.5, - nrPeopleMachines = 0.0, - ratioConvectiveHeatMachines = 0.75, - lightingPower = 7.0, - ratioConvectiveHeatLighting = 0.9, - useConstantACHrate = false, - baseACH = 0.2, - maxUserACH = 1.0, - maxOverheatingACH = {3.0, 2.0}, - maxSummerACH = {1.0, 283.15, 290.15}, - winterReduction = {0.2, 273.15, 283.15}, - withAHU = false, - minAHU = 0.0, - maxAHU = 2.0, - hHeat = 6528.106506938372, - lHeat = 0, - KRHeat = 10000, - TNHeat = 1, - HeaterOn = true, - hCool = 0, - lCool = 0.0, - KRCool = 10000, - TNCool = 1, - CoolerOn = false); - end ERC_Floor; - - record ERC_Storage "ERC_Storage" - extends AixLib.DataBase.ThermalZones.ZoneBaseRecord( - T_start = 293.15, - withAirCap = true, - VAir = 472.5, - AZone = 135.0, - alphaRad = 5.0, - lat = 0.88645272708792, - nOrientations = 6, - AWin = {5.937862666551826, 0.0, 5.937862666551826, 3.878256195738198, 0.0, 3.878256195738198}, - ATransparent = {5.937862666551826, 0.0, 5.937862666551826, 3.878256195738198, 0.0, 3.878256195738198}, - alphaWin = 2.7000000000000006, - RWin = 0.01824595648489902, - gWin = 0.67, - UWin= 1.8936557576825384, - ratioWinConRad = 0.030000000000000002, - AExt = {17.813587999655475, 38.8125, 17.813587999655475, 11.634768587214595, 38.8125, 11.634768587214595}, - alphaExt = 2.131409127563372, - nExt = 1, - RExt = {0.00023337717872670306}, - RExtRem = 0.012895156935466874, - CExt = {42021431.90785344}, - AInt = 438.75, - alphaInt = 2.2384615384615385, - nInt = 1, - RInt = {0.0001284624220490031}, - CInt = {60871378.62002252}, - AFloor = 0.0, - alphaFloor = 0.0, - nFloor = 1, - RFloor = {0.00001}, - RFloorRem = 0.00001, - CFloor = {0.00001}, - ARoof = 0.0, - alphaRoof = 0.0, - nRoof = 1, - RRoof = {0.00001}, - RRoofRem = 0.00001, - CRoof = {0.00001}, - nOrientationsRoof = 1, - tiltRoof = {0.0}, - aziRoof = {0.0}, - wfRoof = {0.0}, - aRoof = 0.0, - aExt = 0.5, - TSoil = 286.15, - alphaWallOut = 20.0, - alphaRadWall = 5.0, - alphaWinOut = 20.000000000000004, - alphaRoofOut = 0.0, - alphaRadRoof = 0.0, - tiltExtWalls = {1.5707963267948966, 0.0, 1.5707963267948966, 1.5707963267948966, 0.0, 1.5707963267948966}, - aziExtWalls = {0.0, 0.0, 3.141592653589793, -1.5707963267948966, 0.0, 1.5707963267948966}, - wfWall = {0.12770320628717274, 0.26000688929233473, 0.12770320628717274, 0.08340808449287807, 0.0, 0.08340808449287807}, - wfWin = {0.3024547048509643, 0.0, 0.3024547048509643, 0.19754529514903565, 0.0, 0.19754529514903565}, - wfGro = 0.31777052914756365, - nrPeople = 0.0, - ratioConvectiveHeatPeople = 0.5, - nrPeopleMachines = 0.0, - ratioConvectiveHeatMachines = 0.75, - lightingPower = 11.3, - ratioConvectiveHeatLighting = 0.9, - useConstantACHrate = false, - baseACH = 0.2, - maxUserACH = 1.0, - maxOverheatingACH = {3.0, 2.0}, - maxSummerACH = {1.0, 283.15, 290.15}, - winterReduction = {0.2, 273.15, 283.15}, - withAHU = false, - minAHU = 0.0, - maxAHU = 0.5, - hHeat = 3916.8639041630227, - lHeat = 0, - KRHeat = 10000, - TNHeat = 1, - HeaterOn = true, - hCool = 0, - lCool = 0.0, - KRCool = 10000, - TNCool = 1, - CoolerOn = false); - end ERC_Storage; - - record ERC_Meeting "ERC_Meeting" - extends AixLib.DataBase.ThermalZones.ZoneBaseRecord( - T_start = 293.15, - withAirCap = true, - VAir = 126.0, - AZone = 36.0, - alphaRad = 5.0, - lat = 0.88645272708792, - nOrientations = 6, - AWin = {1.5834300444138203, 0.0, 1.5834300444138203, 1.0342016521968527, 0.0, 1.0342016521968527}, - ATransparent = {1.5834300444138203, 0.0, 1.5834300444138203, 1.0342016521968527, 0.0, 1.0342016521968527}, - alphaWin = 2.6999999999999997, - RWin = 0.06842233681837134, - gWin = 0.67, - UWin= 1.8936557576825381, - ratioWinConRad = 0.03, - AExt = {4.75029013324146, 10.35, 4.75029013324146, 3.1026049565905587, 10.35, 3.1026049565905587}, - alphaExt = 2.131409127563372, - nExt = 1, - RExt = {0.0008751644202251357}, - RExtRem = 0.04835683850800078, - CExt = {11205715.175427586}, - AInt = 117.0, - alphaInt = 2.238461538461539, - nInt = 1, - RInt = {0.00048173408268376163}, - CInt = {16232367.632006003}, - AFloor = 0.0, - alphaFloor = 0.0, - nFloor = 1, - RFloor = {0.00001}, - RFloorRem = 0.00001, - CFloor = {0.00001}, - ARoof = 0.0, - alphaRoof = 0.0, - nRoof = 1, - RRoof = {0.00001}, - RRoofRem = 0.00001, - CRoof = {0.00001}, - nOrientationsRoof = 1, - tiltRoof = {0.0}, - aziRoof = {0.0}, - wfRoof = {0.0}, - aRoof = 0.0, - aExt = 0.5, - TSoil = 286.15, - alphaWallOut = 20.000000000000004, - alphaRadWall = 5.0, - alphaWinOut = 20.0, - alphaRoofOut = 0.0, - alphaRadRoof = 0.0, - tiltExtWalls = {1.5707963267948966, 0.0, 1.5707963267948966, 1.5707963267948966, 0.0, 1.5707963267948966}, - aziExtWalls = {0.0, 0.0, 3.141592653589793, -1.5707963267948966, 0.0, 1.5707963267948966}, - wfWall = {0.12770320628717274, 0.2600068892923347, 0.12770320628717274, 0.08340808449287808, 0.0, 0.08340808449287808}, - wfWin = {0.3024547048509644, 0.0, 0.3024547048509644, 0.19754529514903565, 0.0, 0.19754529514903565}, - wfGro = 0.3177705291475636, - nrPeople = 8.64, - ratioConvectiveHeatPeople = 0.5, - nrPeopleMachines = 0.72, - ratioConvectiveHeatMachines = 0.75, - lightingPower = 15.9, - ratioConvectiveHeatLighting = 0.9, - useConstantACHrate = false, - baseACH = 0.2, - maxUserACH = 1.0, - maxOverheatingACH = {3.0, 2.0}, - maxSummerACH = {1.0, 283.15, 290.15}, - winterReduction = {0.2, 273.15, 283.15}, - withAHU = false, - minAHU = 0.0, - maxAHU = 12.0, - hHeat = 1044.4970411101394, - lHeat = 0, - KRHeat = 10000, - TNHeat = 1, - HeaterOn = true, - hCool = 0, - lCool = 0.0, - KRCool = 10000, - TNCool = 1, - CoolerOn = false); - end ERC_Meeting; - - record ERC_Restroom "ERC_Restroom" - extends AixLib.DataBase.ThermalZones.ZoneBaseRecord( - T_start = 293.15, - withAirCap = true, - VAir = 126.0, - AZone = 36.0, - alphaRad = 5.0, - lat = 0.88645272708792, - nOrientations = 6, - AWin = {1.5834300444138203, 0.0, 1.5834300444138203, 1.0342016521968527, 0.0, 1.0342016521968527}, - ATransparent = {1.5834300444138203, 0.0, 1.5834300444138203, 1.0342016521968527, 0.0, 1.0342016521968527}, - alphaWin = 2.6999999999999997, - RWin = 0.06842233681837134, - gWin = 0.67, - UWin= 1.8936557576825381, - ratioWinConRad = 0.03, - AExt = {4.75029013324146, 10.35, 4.75029013324146, 3.1026049565905587, 10.35, 3.1026049565905587}, - alphaExt = 2.131409127563372, - nExt = 1, - RExt = {0.0008751644202251357}, - RExtRem = 0.04835683850800078, - CExt = {11205715.175427586}, - AInt = 159.0, - alphaInt = 2.3603773584905663, - nInt = 1, - RInt = {0.0004143493584035729}, - CInt = {18657624.848936398}, - AFloor = 0.0, - alphaFloor = 0.0, - nFloor = 1, - RFloor = {0.00001}, - RFloorRem = 0.00001, - CFloor = {0.00001}, - ARoof = 0.0, - alphaRoof = 0.0, - nRoof = 1, - RRoof = {0.00001}, - RRoofRem = 0.00001, - CRoof = {0.00001}, - nOrientationsRoof = 1, - tiltRoof = {0.0}, - aziRoof = {0.0}, - wfRoof = {0.0}, - aRoof = 0.0, - aExt = 0.5, - TSoil = 286.15, - alphaWallOut = 20.000000000000004, - alphaRadWall = 5.0, - alphaWinOut = 20.0, - alphaRoofOut = 0.0, - alphaRadRoof = 0.0, - tiltExtWalls = {1.5707963267948966, 0.0, 1.5707963267948966, 1.5707963267948966, 0.0, 1.5707963267948966}, - aziExtWalls = {0.0, 0.0, 3.141592653589793, -1.5707963267948966, 0.0, 1.5707963267948966}, - wfWall = {0.12770320628717274, 0.2600068892923347, 0.12770320628717274, 0.08340808449287808, 0.0, 0.08340808449287808}, - wfWin = {0.3024547048509644, 0.0, 0.3024547048509644, 0.19754529514903565, 0.0, 0.19754529514903565}, - wfGro = 0.3177705291475636, - nrPeople = 0.0, - ratioConvectiveHeatPeople = 0.5, - nrPeopleMachines = 0.0, - ratioConvectiveHeatMachines = 0.75, - lightingPower = 11.1, - ratioConvectiveHeatLighting = 0.9, - useConstantACHrate = false, - baseACH = 0.2, - maxUserACH = 1.0, - maxOverheatingACH = {3.0, 2.0}, - maxSummerACH = {1.0, 283.15, 290.15}, - winterReduction = {0.2, 273.15, 283.15}, - withAHU = false, - minAHU = 0.0, - maxAHU = 8.0, - hHeat = 1044.4970411101394, - lHeat = 0, - KRHeat = 10000, - TNHeat = 1, - HeaterOn = true, - hCool = 0, - lCool = 0.0, - KRCool = 10000, - TNCool = 1, - CoolerOn = false); - end ERC_Restroom; - - record ERC_ICT "ERC_ICT" - extends AixLib.DataBase.ThermalZones.ZoneBaseRecord( - T_start = 293.15, - withAirCap = true, - VAir = 63.0, - AZone = 18.0, - alphaRad = 5.0, - lat = 0.88645272708792, - nOrientations = 6, - AWin = {0.7917150222069101, 0.0, 0.7917150222069101, 0.5171008260984263, 0.0, 0.5171008260984263}, - ATransparent = {0.7917150222069101, 0.0, 0.7917150222069101, 0.5171008260984263, 0.0, 0.5171008260984263}, - alphaWin = 2.6999999999999997, - RWin = 0.1368446736367427, - gWin = 0.67, - UWin= 1.8936557576825381, - ratioWinConRad = 0.03, - AExt = {2.37514506662073, 5.175, 2.37514506662073, 1.5513024782952793, 5.175, 1.5513024782952793}, - alphaExt = 2.131409127563372, - nExt = 1, - RExt = {0.0017503288404502714}, - RExtRem = 0.09671367701600156, - CExt = {5602857.587713793}, - AInt = 58.5, - alphaInt = 2.238461538461539, - nInt = 1, - RInt = {0.0009634681653675233}, - CInt = {8116183.816003001}, - AFloor = 0.0, - alphaFloor = 0.0, - nFloor = 1, - RFloor = {0.00001}, - RFloorRem = 0.00001, - CFloor = {0.00001}, - ARoof = 0.0, - alphaRoof = 0.0, - nRoof = 1, - RRoof = {0.00001}, - RRoofRem = 0.00001, - CRoof = {0.00001}, - nOrientationsRoof = 1, - tiltRoof = {0.0}, - aziRoof = {0.0}, - wfRoof = {0.0}, - aRoof = 0.0, - aExt = 0.5, - TSoil = 286.15, - alphaWallOut = 20.000000000000004, - alphaRadWall = 5.0, - alphaWinOut = 20.0, - alphaRoofOut = 0.0, - alphaRadRoof = 0.0, - tiltExtWalls = {1.5707963267948966, 0.0, 1.5707963267948966, 1.5707963267948966, 0.0, 1.5707963267948966}, - aziExtWalls = {0.0, 0.0, 3.141592653589793, -1.5707963267948966, 0.0, 1.5707963267948966}, - wfWall = {0.12770320628717274, 0.2600068892923347, 0.12770320628717274, 0.08340808449287808, 0.0, 0.08340808449287808}, - wfWin = {0.3024547048509644, 0.0, 0.3024547048509644, 0.19754529514903565, 0.0, 0.19754529514903565}, - wfGro = 0.3177705291475636, - nrPeople = 0.54, - ratioConvectiveHeatPeople = 0.5, - nrPeopleMachines = 27.0, - ratioConvectiveHeatMachines = 0.75, - lightingPower = 7.1, - ratioConvectiveHeatLighting = 0.9, - useConstantACHrate = false, - baseACH = 0.2, - maxUserACH = 1.0, - maxOverheatingACH = {3.0, 2.0}, - maxSummerACH = {1.0, 283.15, 290.15}, - winterReduction = {0.2, 273.15, 283.15}, - withAHU = false, - minAHU = 0.0, - maxAHU = 130.0, - hHeat = 522.2485205550697, - lHeat = 0, - KRHeat = 10000, - TNHeat = 1, - HeaterOn = true, - hCool = 0, - lCool = 0.0, - KRCool = 10000, - TNCool = 1, - CoolerOn = false); - end ERC_ICT; -end ERC_DataBase; diff --git a/pyDMPC/ModelicaModels/ModelicaModels/SubsystemModels/DetailedModels/Geo/GeothermalHeatPump.mo b/pyDMPC/ModelicaModels/ModelicaModels/SubsystemModels/DetailedModels/Geo/GeothermalHeatPump.mo index 0e905f0..244ff62 100644 --- a/pyDMPC/ModelicaModels/ModelicaModels/SubsystemModels/DetailedModels/Geo/GeothermalHeatPump.mo +++ b/pyDMPC/ModelicaModels/ModelicaModels/SubsystemModels/DetailedModels/Geo/GeothermalHeatPump.mo @@ -10,17 +10,18 @@ model GeothermalHeatPump "Example of a geothermal heat pump systemreplaceable pa vol2(V=0.5), resistanceGeothermalSource(m_flow_nominal=16), pumpGeothermalSource(m_flow_nominal=16), - boundary(m_flow=16), + boundary, tableInternalGains(fileName= - "N:/Forschung/EBC0377_BMWi-GeoBase_GA/Students/mba-mst/02-Models/teaserweb_AixLib/ERC/InternalGains_ERC.mat"), + "C:/mst/pyDMPC/pyDMPC/ModelicaModels/ModelicaModels/Subsystems/Geo/BaseClasses/TEASER_BuildingSets/InternalGains_ERC.mat"), tableTSet(fileName= - "N:/Forschung/EBC0377_BMWi-GeoBase_GA/Students/mba-mst/02-Models/teaserweb_AixLib/ERC/Tset_ERC.mat"), + "C:/mst/pyDMPC/pyDMPC/ModelicaModels/ModelicaModels/Subsystems/Geo/BaseClasses/TEASER_BuildingSets/Tset_ERC.mat"), tableAHU(fileName= - "N:/Forschung/EBC0377_BMWi-GeoBase_GA/Students/mba-mst/02-Models/teaserweb_AixLib/ERC/AHU_ERC.mat"), + "C:/mst/pyDMPC/pyDMPC/ModelicaModels/ModelicaModels/Subsystems/Geo/BaseClasses/TEASER_BuildingSets/AHU_ERC.mat"), weaDat(filNam= - "N:/Forschung/EBC0377_BMWi-GeoBase_GA/Students/mba-mst/02-Models/teaserweb_AixLib/ERC/DEU_BW_Mannheim_107290_TRY2010_12_Jahr_BBSR.mos"), + "C:/mst/pyDMPC/pyDMPC/ModelicaModels/ModelicaModels/Subsystems/Geo/BaseClasses/TEASER_BuildingSets/DEU_BW_Mannheim_107290_TRY2010_12_Jahr_BBSR.mos"), variation(table=[0,285]), - const(k=293.15)); + const(k=293.15), + decisionVariables(table=[0.0,273.15 + 35])); AixLib.Fluid.Sources.Boundary_pT coldConsumerFlow(redeclare package Medium = Water, nPorts=1) annotation (Placement(transformation( @@ -44,9 +45,6 @@ model GeothermalHeatPump "Example of a geothermal heat pump systemreplaceable pa 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.Sources.Constant TStorageSet(k=273.15 + 35) - "Set point of upper heat storage temperature" - annotation (Placement(transformation(extent={{-160,4},{-148,16}}))); 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" @@ -116,8 +114,6 @@ equation color={0,0,127})); connect(getTStorageUpper.y, hPControllerOnOff.T_meas) annotation (Line(points= {{-139,74},{-108,74},{-108,76},{-78,76}}, color={0,0,127})); - connect(TStorageSet.y, hPControllerOnOff.T_set) annotation (Line(points={{ - -147.4,10},{-126,10},{-126,68},{-78,68}}, color={0,0,127})); connect(prescribedHeatFlow1.Q_flow, negate.y) annotation (Line(points={{96,2},{101.6,2}}, color={0,0,127})); connect(prescribedHeatFlow.Q_flow, negate1.y) @@ -135,8 +131,10 @@ equation 2.16667},{131.6,2.16667},{131.6,-7.2}}, color={0,0,127})); connect(multizone.PCoolAHU, sum2.u[2]) annotation (Line(points={{145,5},{122, 5},{122,1.6},{120.8,1.6}}, color={0,0,127})); - connect(multizone.PHeatAHU, sum1.u[2]) annotation (Line(points={{145,7},{ - 132.4,7},{132.4,-7.2}}, color={0,0,127})); + connect(multizone.PHeatAHU, sum1.u[2]) annotation (Line(points={{145,7},{132.4, + 7},{132.4,-7.2}}, color={0,0,127})); + connect(decisionVariables.y[1], hPControllerOnOff.T_set) annotation (Line( + points={{-145.3,7},{-126,7},{-126,68},{-78,68}}, color={0,0,127})); annotation (experiment(StopTime=86400, Interval=10), Documentation(revisions="