Skip to content

Commit

Permalink
Merge branch 'development' into 1407-add-swimming-pool-model
Browse files Browse the repository at this point in the history
  • Loading branch information
larissakuehn authored Jul 17, 2023
2 parents 9bf7564 + 1669119 commit 03770a7
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ partial model GeothermalHeatPumpBase
parameter Modelica.Units.SI.Temperature T_start_hot=300
"Initial temperature of warm components";

replaceable AixLib.Fluid.Interfaces.PartialTwoPortTransport PeakLoadDevice(
redeclare package Medium = Medium) constrainedby
AixLib.Fluid.Interfaces.PartialTwoPort
replaceable model PeakLoadDeviceModel =
AixLib.Fluid.Interfaces.PartialTwoPortTransport constrainedby
AixLib.Fluid.Interfaces.PartialTwoPortTransport(redeclare package Medium=Medium)
annotation(choicesAllMatching=true);

PeakLoadDeviceModel peaLoaDev
annotation (Placement(transformation(extent={{108,-56},{120,-44}})));

Storage.BufferStorage
Expand All @@ -38,7 +41,8 @@ partial model GeothermalHeatPumpBase
n=5,
hConIn=100,
hConOut=10,
hConHC1=500)
hConHC1=500,
upToDownHC1=false)
"Storage tank for buffering cold demand" annotation (Placement(transformation(extent={{24,-14},
{52,20}})));
FixedResistances.PressureDrop resistanceColdStorage(
Expand Down Expand Up @@ -256,7 +260,7 @@ equation
annotation (Line(points={{-82,-54},{-79,-54},{-76,-54}}, color={0,127,255}));
connect(pumpGeothermalSource.port_a, geothFieldSource.ports[1])
annotation (Line(points={{-96,-54},{-146,-54}}, color={0,127,255}));
connect(resistanceHeatConsumerFlow.port_b, PeakLoadDevice.port_a) annotation (
connect(resistanceHeatConsumerFlow.port_b, peaLoaDev.port_a) annotation (
Line(points={{94,-50},{102,-50},{108,-50}}, color={0,127,255}));
connect(heatPump.port_b1, geothField_sink1.ports[1]) annotation (Line(points={{-16.5,
20},{-16,20},{-16,28},{-146,28},{-146,27.2}}, color={0,127,255}));
Expand All @@ -283,11 +287,6 @@ equation
Line(points={{33.275,-14.34},{33.275,-20},{58,-20}}, color={0,127,255}));
connect(coldStorage.fluidportTop1, resistanceColdConsumerReturn.port_b)
annotation (Line(points={{33.1,20.17},{33.1,32},{80,32}}, color={0,127,255}));
connect(heatPump.port_b2, coldStorage.portHC1Out) annotation (Line(points={{
-33.5,-8.00002},{-33.5,-22},{16,-22},{16,7.42},{23.825,7.42}}, color=
{0,127,255}));
connect(pumpEvaporator.port_a, coldStorage.portHC1In) annotation (Line(points=
{{14,36},{18,36},{18,12.69},{23.65,12.69}}, color={0,127,255}));
connect(pumpCondenser.port_a, heatStorage.portHC1Out) annotation (Line(points=
{{6,-98},{16,-98},{16,-74.58},{23.825,-74.58}}, color={0,127,255}));
connect(heatPump.port_b1, heatStorage.portHC1In) annotation (Line(points={{
Expand All @@ -297,6 +296,11 @@ equation
connect(resistanceHeatConsumerReturn.port_b, heatStorage.fluidportBottom2)
annotation (Line(points={{80,-106},{42.025,-106},{42.025,-96.17}}, color={0,
127,255}));
connect(pumpEvaporator.port_a, coldStorage.portHC1Out) annotation (Line(
points={{14,36},{16,36},{16,7.42},{23.825,7.42}}, color={0,127,255}));
connect(heatPump.port_b2, coldStorage.portHC1In) annotation (Line(points={{
-33.5,-8.00002},{-33.5,-16},{14,-16},{14,12.69},{23.65,12.69}}, 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
14 changes: 8 additions & 6 deletions AixLib/Fluid/Examples/GeothermalHeatPump/GeothermalHeatPump.mo
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
within AixLib.Fluid.Examples.GeothermalHeatPump;
within AixLib.Fluid.Examples.GeothermalHeatPump;
model GeothermalHeatPump "Example of a geothermal heat pump system"

extends Modelica.Icons.Example;

extends AixLib.Fluid.Examples.GeothermalHeatPump.BaseClasses.GeothermalHeatPumpControlledBase(
redeclare AixLib.Fluid.Examples.GeothermalHeatPump.Components.BoilerStandAlone PeakLoadDevice(redeclare
package Medium =
redeclare model PeakLoadDeviceModel=
AixLib.Fluid.Examples.GeothermalHeatPump.Components.BoilerStandAlone ( redeclare
package Medium =
Medium, energyDynamics=energyDynamics),
heatPump(
redeclare package Medium_con = Medium,
Expand Down Expand Up @@ -36,6 +37,7 @@ model GeothermalHeatPump "Example of a geothermal heat pump system"
AixLib.DataBase.HeatPump.EN255.Vitocal350BWH110()),
redeclare model PerDataRevHP =
DataBase.Chiller.PerformanceData.LookUpTable2D),
heatPumpControlBus.iceFacMea = 1,
heatStorage(energyDynamics=energyDynamics),
coldStorage(energyDynamics=energyDynamics),
pumpCondenser(energyDynamics=energyDynamics),
Expand Down Expand Up @@ -113,7 +115,7 @@ equation
connect(pumpGeothermalSource.dp_in,pressureDifference. y) annotation (Line(
points={{-89,-45.6},{-89,-36},{56,-36},{56,6},{147.4,6}}, color={0,
0,127}));
connect(PeakLoadDevice.port_b,heatConsumerFlow. ports[1]) annotation (Line(
connect(peaLoaDev.port_b,heatConsumerFlow. ports[1]) annotation (Line(
points={{120,-50},{120,-50},{148,-50}}, color={0,127,255}));
connect(hPControllerOnOff.heatPumpControlBus, heatPumpControlBus) annotation (
Line(
Expand All @@ -123,7 +125,7 @@ equation
string="%second",
index=1,
extent={{6,3},{6,3}}));
connect(PeakLoadDevice.chemicalEnergyFlowRate, chemicalEnergyFlowRate)
connect(peaLoaDev.chemicalEnergyFlowRate, chemicalEnergyFlowRate)
annotation (Line(points={{112.77,-56.54},{112.77,-118},{-26,-118},{-26,-100},
{-71.5,-100},{-71.5,-119.5}}, color={0,0,127}));
connect(getTStorageLower.y,geothermalFieldControllerCold. temperature)
Expand Down Expand Up @@ -151,7 +153,7 @@ equation
-147.4,6},{-130,6},{-130,76},{-78,76}}, color={0,0,127}));
connect(getTStorageUpper.y, hPControllerOnOff.TMea)
annotation (Line(points={{-139,68},{-78,68}}, color={0,0,127}));
annotation (experiment(Tolerance=1e-6, StartTime=0, StopTime=86400), __Dymola_Commands(file="modelica://AixLib/Resources/Scripts/Dymola/Fluid/Examples/GeothermalHeatPump.mos"
annotation (experiment(Tolerance=1e-6, StartTime=0, Interval=500, StopTime=86400, __Dymola_Algorithm="Dassl"), __Dymola_Commands(file="modelica://AixLib/Resources/Scripts/Dymola/Fluid/Examples/GeothermalHeatPump.mos"
"Simulate and plot"), Documentation(revisions="<html><ul>
<li>
<i>May 5, 2021</i> by Fabian Wüllhorst:<br/>
Expand Down
Loading

0 comments on commit 03770a7

Please sign in to comment.