Skip to content

Commit

Permalink
* correction in GeothermalHeatPumpSystem.mo, #55
Browse files Browse the repository at this point in the history
  • Loading branch information
MStillerEBC committed Sep 3, 2019
1 parent 7d58ff4 commit da62c86
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
6 changes: 3 additions & 3 deletions pyDMPC/ControlFramework/Init.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@
res_path.append(glob_res_path + "\\" + name_wkdir)
dym_path.append(glob_dym_path)
mod_path.append(r'ModelicaModels.SubsystemModels.DetailedModels.Geo.GeothermalHeatPump')
command_names.append(["heatShare"])
command_names.append(["heatStorage.layer[1].T"])
command_variables.append(["decisionVariables.table[1,2]"])
commands.append(range(35,45,5))
traj_points.append([])
traj_var.append([])
cost_fac.append([-1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3000.0, -3000.0, 10.0, 2.0])
factors.append([1, -60./4.18/8./100.])
factors.append([1, -10./4.18/8./100.])

sys_id.append(1)
name.append("Field")
Expand All @@ -102,7 +102,7 @@
inputs.append([])
output_names.append(["movMea.y"])
set_points.append([285.65])
state_var_names.append(["supplyTemperature.T"])
state_var_names.append(["supplyTemperature"])
model_state_var_names.append(["vol.T_start"])
start.append(0.)
stop.append(3600.0*24*365.25*3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,8 @@ partial model GeothermalHeatPumpBase
annotation (Placement(transformation(extent={{-10,-10},{10,10}},
rotation=-90,
origin={-150,-6})));
AixLib.Fluid.Sensors.TemperatureTwoPort returnTemSensor1(
redeclare package
Medium = Water, m_flow_nominal=16) annotation (Placement(
transformation(
AixLib.Fluid.Sensors.TemperatureTwoPort supplyTemSensor(redeclare package
Medium = Water, m_flow_nominal=16) annotation (Placement(transformation(
extent={{-7,8},{7,-8}},
rotation=0,
origin={-115,-54})));
Expand Down Expand Up @@ -364,10 +362,10 @@ equation
points={{100,-106},{106,-106},{106,-56}}, 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}));
connect(returnTemSensor1.port_b, pumpGeothermalSource.port_a)
connect(supplyTemSensor.port_b, pumpGeothermalSource.port_a)
annotation (Line(points={{-108,-54},{-96,-54}}, color={0,127,255}));
connect(borFie.port_b, returnTemSensor1.port_a) annotation (Line(points={{
-150,-16},{-150,-54},{-122,-54}}, color={0,127,255}));
connect(borFie.port_b, supplyTemSensor.port_a) annotation (Line(points={{-150,
-16},{-150,-54},{-122,-54}}, color={0,127,255}));
annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-160,
-120},{160,80}})), Icon(coordinateSystem(
preserveAspectRatio=false, extent={{-160,-120},{160,80}})),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ equation
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}));
connect(returnTemSensor1.T, supplyTemperature) annotation (Line(points={{-115,
connect(supplyTemSensor.T, supplyTemperature) annotation (Line(points={{-115,
-62.8},{-115,-67.4},{-116,-67.4},{-116,-120}}, color={0,0,127}));
annotation (experiment(StopTime=86400, Interval=10), Documentation(info="<html>
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ model GeothermalHeatPumpSystem
extent={{-6,-6},{6,6}},
rotation=180,
origin={128,20})));
Modelica.Blocks.Interfaces.RealInput traj "Connector of Real input signal 2"
annotation (Placement(transformation(extent={{-170,-90},{-150,-70}})));
Modelica.Thermal.HeatTransfer.Celsius.FromKelvin fromKelvin
annotation (Placement(transformation(extent={{-144,-86},{-132,-74}})));
equation
connect(resistanceColdConsumerFlow.port_b,coldConsumerFlow. ports[1])
annotation (Line(points={{80,-20},{88,-20}}, color={0,127,255}));
Expand Down Expand Up @@ -96,6 +100,8 @@ equation
90.77,-76},{90.77,-56.54}}, color={0,0,127}));
connect(const1.y, negate.u) annotation (Line(points={{121.4,20},{118,20},{118,
2},{112.8,2}}, color={0,0,127}));
connect(traj, fromKelvin.Kelvin)
annotation (Line(points={{-160,-80},{-145.2,-80}}, color={0,0,127}));
annotation (experiment(StopTime=86400, Interval=10), Documentation(revisions="<html>
<ul>
<li>
Expand Down

0 comments on commit da62c86

Please sign in to comment.