Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue1171 storage spring cleaning #1226

Open
wants to merge 44 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
a2149d0
Add conversion script for renaming #1171 [skip ci]
LauraMaier Jan 27, 2022
4bdc81f
Change version number in AixLib #1171 [skip ci]
LauraMaier Jan 27, 2022
612b155
Rename storage models #1171 [skip ci]
LauraMaier Jan 27, 2022
2fbb2af
Adapt package order #1171 [skip ci]
LauraMaier Jan 27, 2022
fce547e
Automatic path change in example models #1171 [skip ci]
LauraMaier Jan 27, 2022
c8aebd7
Adapt documentation to increase comprehensibility #1171 [skip ci]
LauraMaier Jan 27, 2022
080200b
Add temperature sensors in simple storage #1171
LauraMaier Jan 27, 2022
5d38fd0
ci_correct_html
ebc-aixlib-bot Jan 27, 2022
f2d1b77
Merge pull request #1225 from RWTH-EBC/Correct_HTML_issue1171_Storage…
LauraMaier Jan 28, 2022
4027ea0
Change used class in geothermal example #1171
LauraMaier Jan 28, 2022
6378d97
Adapt name of data base due to renaming of bufferStorage [skip ci] #1171
LauraMaier Jan 28, 2022
03d3e4d
Adapt conversion script for new data base record #1171
LauraMaier Jan 28, 2022
7f709c7
Replace HC1 to old position and change path to data base #1171
LauraMaier Jan 28, 2022
fbe8d82
Merge branch 'development' into issue1171_StorageSpringCleaning
LauraMaier Mar 23, 2022
7508612
Adapt baseData in partialHeatTransfer #1171
LauraMaier Mar 23, 2022
1066f23
Adapt conversion script and rename example #1171
LauraMaier Mar 23, 2022
81249b4
Adapt simulate and plot script to new name #1171 [skip-ci]
LauraMaier Mar 23, 2022
74ec10e
Add simulate and plot script #1171
LauraMaier Mar 23, 2022
9810289
Add simulate and plot scripts for storage related examples #1171
LauraMaier Mar 23, 2022
823eba6
Automatic push of CI with new regression reference files.Please pull …
ebc-aixlib-bot Mar 23, 2022
61b730c
Replace obsolete pump and valve models in example model #1171 "ci_upd…
LauraMaier Mar 23, 2022
ec7f364
Replace obsolete pump model in StorageBoiler example #1171 "ci_update…
LauraMaier Mar 23, 2022
0d61e63
Automatic push of CI with updated or new regression reference files.P…
ebc-aixlib-bot Mar 23, 2022
6fc9854
Merge branch 'IBPSA_Merge' into issue1171_StorageSpringCleaning
LauraMaier Jul 14, 2022
9a26a02
Merge branch 'IBPSA_Merge' into issue1171_StorageSpringCleaning #1171
LauraMaier Jul 14, 2022
2000641
Refactor SI units path in storage models #1171
LauraMaier Jul 14, 2022
643f429
Add conversion script and update version #1171
LauraMaier Jul 14, 2022
7c033a6
Add conversion script #1171
LauraMaier Jul 14, 2022
6b22338
Adapt conversion script #1171
LauraMaier Jul 14, 2022
4fea999
Delete Medium model due to double declaration #1171
LauraMaier Jul 14, 2022
8bda225
Adapt white list for CI #1171
LauraMaier Jul 14, 2022
ad99c48
Replace Storage in exergy meter example with correct path #1171
LauraMaier Jul 14, 2022
b5e83bf
Merge branch 'development' into issue1171_StorageSpringCleaning
LauraMaier Oct 12, 2022
92c7431
Add conversion script and update AL version #1171
LauraMaier Oct 12, 2022
dabb343
Merge branch 'development' into issue1171_StorageSpringCleaning
LauraMaier Oct 13, 2022
3829755
Add Storage example on update list "ci_update_ref" #1171
LauraMaier Oct 13, 2022
48488da
Automatic push of CI with updated or new regression reference files.P…
ebc-aixlib-bot Oct 13, 2022
b1e05ae
Merge branch 'development' into issue1171_StorageSpringCleaning
LauraMaier Oct 13, 2022
812ab0f
Adapt storage examples to avoid warnings and "ci_update_ref" #1171
LauraMaier Oct 14, 2022
d862f12
Automatic push of CI with updated or new regression reference files.P…
ebc-aixlib-bot Oct 14, 2022
1f23ab7
Delete import SI and change to full paths #1171
LauraMaier Oct 28, 2022
e148bd7
Merge branch 'development' into issue1171_StorageSpringCleaning
LauraMaier Oct 28, 2022
f00bda7
Merge branch 'development' into issue1171_StorageSpringCleaning
LauraMaier Nov 1, 2022
5c46e4b
Merge branch 'development' into issue1171_StorageSpringCleaning
LauraMaier Nov 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion AixLib/DataBase/Storage/Generic_New_2000l.mo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
within AixLib.DataBase.Storage;
record Generic_New_2000l "Pseudo storage with 2000 l (standing)"
extends BufferStorageBaseDataDefinition(
extends StorageDetailedBaseDataDefinition(
hTank=2.145,
hLowerPortDemand=0.1,
hUpperPortDemand=2.1,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
within AixLib.DataBase.Storage;
record BufferStorageBaseDataDefinition
record StorageDetailedBaseDataDefinition
"Base data definition for Buffer storage records"
extends Modelica.Icons.Record;
///////////input parameters////////////
Expand All @@ -17,9 +17,9 @@ record BufferStorageBaseDataDefinition
parameter SI.Diameter dTank "Inner diameter of storage";
parameter SI.Length sWall "Thickness of storage Wall";
parameter SI.Length sIns "Thickness of storage insulation";
parameter Modelica.Units.SI.ThermalConductivity lambdaWall
parameter SI.ThermalConductivity lambdaWall
"thermal conductivity of storage wall";
parameter Modelica.Units.SI.ThermalConductivity lambdaIns
parameter SI.ThermalConductivity lambdaIns
"thermal conductivity of storage insulation";
//parameter SI.CoefficientOfHeatTransfer alpha
//"Coefficient of heat transfer air <-> insulation of tank";
Expand All @@ -38,8 +38,8 @@ record BufferStorageBaseDataDefinition
parameter DataBase.Pipes.PipeBaseDataDefinition pipeHC2
"Type of Pipe for HR2";

parameter Modelica.Units.SI.Length lengthHC1 "Length of Pipe for HR1";
parameter Modelica.Units.SI.Length lengthHC2 "Length of Pipe for HR2";
parameter SI.Length lengthHC1 "Length of Pipe for HR1";
parameter SI.Length lengthHC2 "Length of Pipe for HR2";

annotation (Icon(graphics), Documentation(info="<html><h4>
<span style=\"color:#008000\">Overview</span>
Expand Down Expand Up @@ -72,4 +72,4 @@ record BufferStorageBaseDataDefinition
</li>
</ul>
</html>"));
end BufferStorageBaseDataDefinition;
end StorageDetailedBaseDataDefinition;
2 changes: 1 addition & 1 deletion AixLib/DataBase/Storage/package.order
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
BufferStorageBaseDataDefinition
StorageDetailedBaseDataDefinition
Generic_New_2000l
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ partial model GeothermalHeatPumpBase
AixLib.Fluid.Interfaces.PartialTwoPort
annotation (Placement(transformation(extent={{108,-56},{120,-44}})));

Storage.BufferStorage
Storage.StorageDetailed
coldStorage(
redeclare package Medium = Medium,
redeclare package MediumHC1 = Medium,
Expand Down Expand Up @@ -86,7 +86,7 @@ partial model GeothermalHeatPumpBase
extent={{-6,-7},{6,7}},
rotation=90,
origin={-60,1})));
Storage.BufferStorage
Storage.StorageDetailed
heatStorage(
redeclare package Medium = Medium,
redeclare package MediumHC1 = Medium,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ partial model PartialHeatTransferLayers "Partial for storage heat transfer model
Modelica.Media.Interfaces.PartialMedium "Medium model" annotation(choicesAllMatching);

replaceable parameter
AixLib.DataBase.Storage.BufferStorageBaseDataDefinition data=
AixLib.DataBase.Storage.StorageDetailedBaseDataDefinition data=
AixLib.DataBase.Storage.Generic_New_2000l()
"Storage data record"
annotation (choicesAllMatching);
Expand Down
112 changes: 64 additions & 48 deletions AixLib/Fluid/Storage/Examples/StorageBoiler.mo
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ model StorageBoiler
Modelica.Media.Water.ConstantPropertyLiquidWater
constrainedby Modelica.Media.Interfaces.PartialMedium;

AixLib.Fluid.Storage.BufferStorage
bufferStorage(
AixLib.Fluid.Storage.StorageDetailed bufferStorage(
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
redeclare package MediumHC1 = Medium,
redeclare package MediumHC2 = Medium,
m1_flow_nominal=pipe1.m_flow_nominal,
m2_flow_nominal=pipe1.m_flow_nominal,
mHC1_flow_nominal=pipe1.m_flow_nominal,
useHeatingCoil2=false,
useHeatingRod=false,
TStart=343.15,
redeclare AixLib.DataBase.Storage.Generic_New_2000l data(
hTank=2,
hUpperPortDemand=1.95,
Expand All @@ -27,82 +28,97 @@ model StorageBoiler
hConIn=1500,
hConOut=15,
redeclare package Medium = Medium,
hConHC1=300) annotation (Placement(transformation(extent={{6,8},{
-18,38}})));
Modelica.Thermal.HeatTransfer.Sources.FixedTemperature fixedTemperature(T = 283.15) annotation(Placement(transformation(extent={{-56,12},
{-36,32}})));
AixLib.Obsolete.Year2021.Fluid.Movers.Pump pump(redeclare package Medium = Medium, m_flow_small=1e-4) annotation (Placement(transformation(
extent={{-10,-10},{10,10}},
rotation=270,
origin={6,60})));
hConHC1=300) annotation (Placement(transformation(extent={{6,-14},
{-18,16}})));
Modelica.Thermal.HeatTransfer.Sources.FixedTemperature fixedTemperature(T = 283.15) annotation(Placement(transformation(extent={{-56,-10},
{-36,10}})));
AixLib.Fluid.Sources.Boundary_pT
boundary_p(nPorts=1, redeclare package Medium = Medium)
annotation(Placement(transformation(extent={{-48,68},
{-28,88}})));
Modelica.Blocks.Sources.BooleanExpression booleanExpression annotation(Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 180, origin={46,48})));
Modelica.Blocks.Sources.Constant const(k = 273.15 + 80) annotation(Placement(transformation(extent = {{-3, -3}, {3, 3}}, rotation = 180, origin={61,67})));
boundary_p( redeclare package Medium = Medium,
nPorts=1) annotation(Placement(transformation(extent={{-48,46},
{-28,66}})));
Modelica.Blocks.Sources.Constant SetTemp(k=273.15 + 80) annotation (Placement(
transformation(
extent={{-7,-7},{7,7}},
rotation=180,
origin={65,69})));
AixLib.Fluid.FixedResistances.PressureDrop pipe(
redeclare package Medium = Medium,
m_flow_nominal=0.5,
dp_nominal=200)
annotation (Placement(transformation(extent={{12,-12},{32,8}})));
annotation (Placement(transformation(extent={{18,-34},{38,-14}})));
AixLib.Fluid.FixedResistances.HydraulicResistance
hydraulicResistance(zeta = 1000,
redeclare package Medium = Medium,
diameter=0.05,
m_flow_nominal=0.001) annotation(Placement(transformation(extent={{46,-12},
{66,8}})));
m_flow_nominal=0.001) annotation(Placement(transformation(extent={{46,-34},
{66,-14}})));
AixLib.Fluid.Sources.Boundary_ph
boundary_ph1(use_p_in = true, h = 0.8e5,
nPorts=1,
redeclare package Medium = Medium) annotation(Placement(transformation(extent={{-66,-22},
{-46,-2}})));
redeclare package Medium = Medium) annotation(Placement(transformation(extent={{-66,-44},
{-46,-24}})));
Modelica.Blocks.Sources.Ramp ramp(duration = 1000, height = 0.00001e5,
offset=101325) annotation(Placement(transformation(extent={{-96,-14},
{-76,6}})));
offset=101325) annotation(Placement(transformation(extent={{-96,-36},
{-76,-16}})));
AixLib.Fluid.Sources.Boundary_pT
boundary_ph2(nPorts=1, redeclare package Medium = Medium)
annotation(Placement(transformation(extent = {{10, -10}, {-10, 10}}, rotation = 180, origin={-38,56})));
annotation(Placement(transformation(extent = {{10, -10}, {-10, 10}}, rotation = 180, origin={-38,34})));
AixLib.Fluid.FixedResistances.PressureDrop pipe1(
redeclare package Medium = Medium,
m_flow_nominal=0.5,
dp_nominal=200)
annotation (Placement(transformation(extent={{-36,-22},{-16,-2}})));
annotation (Placement(transformation(extent={{-36,-44},{-16,-24}})));
AixLib.Fluid.HeatExchangers.Heater_T hea(
redeclare package Medium = Medium,
m_flow_nominal=0.01,
dp_nominal=0)
annotation (Placement(transformation(extent={{42,68},{22,88}})));
annotation (Placement(transformation(extent={{42,46},{22,66}})));
AixLib.Fluid.Movers.FlowControlled_dp pump(redeclare package Medium = Medium,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
T_start=298.15,
m_flow_nominal=pipe1.m_flow_nominal,
per(pressure(V_flow={0,pipe.m_flow_nominal/1000,pipe.m_flow_nominal/(1000*
0.8)}, dp={dpSet.k/0.8,dpSet.k,0}), motorCooledByFluid=false))
annotation (Placement(transformation(
extent={{10,10},{-10,-10}},
rotation=90,
origin={2,42})));
Modelica.Blocks.Sources.Constant dpSet(k=40000)
"Constant set pressure difference for pump" annotation (Placement(
transformation(
extent={{-7,-7},{7,7}},
rotation=180,
origin={37,27})));
equation
connect(booleanExpression.y, pump.IsNight) annotation(Line(points={{35,48},{
24,48},{24,60},{16.2,60}}, color = {255, 0, 255}));
connect(pipe.port_b, hydraulicResistance.port_a) annotation(Line(points={{32,-2},
{46,-2}}, color = {0, 127, 255}));
connect(ramp.y, boundary_ph1.p_in) annotation(Line(points={{-75,-4},{-68,-4}}, color = {0, 0, 127}));
connect(pipe.port_b, hydraulicResistance.port_a) annotation(Line(points={{38,-24},
{46,-24}}, color = {0, 127, 255}));
connect(ramp.y, boundary_ph1.p_in) annotation(Line(points={{-75,-26},{-68,-26}}, color = {0, 0, 127}));
connect(boundary_ph1.ports[1], pipe1.port_a) annotation (Line(
points={{-46,-12},{-36,-12}},
points={{-46,-34},{-36,-34}},
color={0,127,255}));
connect(boundary_p.ports[1], pump.port_a) annotation (Line(
points={{-28,78},{6,78},{6,70}},
color={0,127,255}));
connect(pump.port_a, hea.port_b) annotation (Line(points={{6,70},{6,70},{6,78},
{6,78},{22,78}}, color={0,127,255}));
connect(hydraulicResistance.port_b, hea.port_a) annotation (Line(points={{66,
-2},{80,-2},{80,78},{42,78}}, color={0,127,255}));
connect(const.y, hea.TSet) annotation (Line(points={{57.7,67},{52,67},{52,86},
{44,86}}, color={0,0,127}));
connect(hydraulicResistance.port_b, hea.port_a) annotation (Line(points={{66,-24},
{80,-24},{80,56},{42,56}}, color={0,127,255}));
connect(SetTemp.y, hea.TSet) annotation (Line(points={{57.3,69},{52,69},{52,
64},{44,64}}, color={0,0,127}));
connect(boundary_ph2.ports[1], bufferStorage.fluidportTop2) annotation (Line(
points={{-28,56},{-9.75,56},{-9.75,38.15}}, color={0,127,255}));
connect(bufferStorage.fluidportBottom2, pipe1.port_b) annotation (Line(points=
{{-9.45,7.85},{-9.45,-2},{-10,-2},{-10,-12},{-16,-12}}, color={0,127,
points={{-28,34},{-9.75,34},{-9.75,16.15}}, color={0,127,255}));
connect(bufferStorage.fluidportBottom2, pipe1.port_b) annotation (Line(points={{-9.45,
-14.15},{-9.45,-24},{-10,-24},{-10,-34},{-16,-34}}, color={0,127,
255}));
connect(pipe.port_a, bufferStorage.portHC1Out) annotation (Line(points={{12,
-2},{14,-2},{14,26.9},{6.15,26.9}}, color={0,127,255}));
connect(pump.port_b, bufferStorage.portHC1In) annotation (Line(points={{6,50},
{6,44},{12,44},{12,31.55},{6.3,31.55}}, color={0,127,255}));
connect(pipe.port_a, bufferStorage.portHC1Out) annotation (Line(points={{18,-24},
{18,4.9},{6.15,4.9}}, color={0,127,255}));
connect(fixedTemperature.port, bufferStorage.heatportOutside) annotation (
Line(points={{-36,22},{-28,22},{-28,23.9},{-17.7,23.9}}, color={191,0,0}));
Line(points={{-36,0},{-28,0},{-28,1.9},{-17.7,1.9}}, color={191,0,0}));
connect(pump.port_b, bufferStorage.portHC1In) annotation (Line(points={{2,32},
{2,26},{14,26},{14,9.55},{6.3,9.55}}, color={0,127,255}));
connect(pump.port_a, hea.port_b)
annotation (Line(points={{2,52},{2,56},{22,56}}, color={0,127,255}));
connect(boundary_p.ports[1], pump.port_a) annotation (Line(points={{-28,56},{
-18,56},{-18,58},{0,58},{0,52},{2,52}}, color={0,127,255}));
connect(dpSet.y, pump.dp_in) annotation (Line(points={{29.3,27},{30,27},{30,
28},{24,28},{24,42},{14,42}}, color={0,0,127}));
annotation (experiment(Tolerance=1e-6, StopTime=86400, Interval=60),
__Dymola_Commands(file="modelica://AixLib/Resources/Scripts/Dymola/Fluid/Storage/Examples/StorageBoiler.mos" "Simulate and plot"),
Documentation(info = "<html><h4>
<span style=\"color:#008000\">Overview</span>
</h4>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
within AixLib.Fluid.Storage.Examples;
model BufferStorage
model StorageDetailedExample "Simple usage example for StorageDetailed"

extends Modelica.Icons.Example;
import AixLib;
replaceable package Medium =
Modelica.Media.Water.ConstantPropertyLiquidWater
constrainedby Modelica.Media.Interfaces.PartialMedium;
AixLib.Fluid.Storage.BufferStorage bufferStorage(
AixLib.Fluid.Storage.StorageDetailed bufferStorage(
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
massDynamics=Modelica.Fluid.Types.Dynamics.SteadyStateInitial,
m1_flow_nominal=const.k,
Expand Down Expand Up @@ -74,7 +74,8 @@ model BufferStorage
equation
connect(boundary.m_flow_in, const.y)
annotation (Line(points={{34,38},{34,38},{51,38}}, color={0,0,127}));
connect(boundary1.ports[1], bufferStorage.fluidportTop2) annotation (Line(points={{-34,46},{-14,46},{-14,24.12},{-13.125,24.12}}, color={0,127,255}));
connect(boundary1.ports[1], bufferStorage.fluidportTop2) annotation (Line(points={{-34,46},
{-14,46},{-14,24.12},{-13.125,24.12}}, color={0,127,255}));
connect(bufferStorage.fluidportTop1, boundary.ports[1]) annotation (Line(points={{-6.5,24.12},{-6.5,45.06},{12,45.06},{12,46}}, color={0,127,255}));
connect(bufferStorage.fluidportBottom1, boundary_ph5.ports[1]) annotation (Line(points={{-6.625,-0.24},{-6.625,-20.12},{2,-20.12},{2,-20}}, color={0,127,255}));
connect(boundary2.ports[1], bufferStorage.fluidportBottom2) annotation (Line(points={{-36,-20},{-14,-20},{-14,-0.12},{-12.875,-0.12}}, color={0,127,255}));
Expand All @@ -85,7 +86,7 @@ equation
Icon(coordinateSystem(preserveAspectRatio=false)),
Diagram(coordinateSystem(preserveAspectRatio=false)),
experiment(Tolerance=1e-6, StopTime=86400, Interval=60),
__Dymola_Commands(file="modelica://AixLib/Resources/Scripts/Dymola/Fluid/Storage/Examples/BufferStorage.mos" "Simulate and plot"),
__Dymola_Commands(file="modelica://AixLib/Resources/Scripts/Dymola/Fluid/Storage/Examples/StorageDetailedExample.mos" "Simulate and plot"),
Documentation(info="<html><p>
<b><span style=\"color: #008000;\">Overview</span></b>
</p>
Expand All @@ -104,4 +105,4 @@ equation
</li>
</ul>
</html>"));
end BufferStorage;
end StorageDetailedExample;