Skip to content

Commit

Permalink
Merge branch 'master' into issue1575_addPVModel
Browse files Browse the repository at this point in the history
  • Loading branch information
LauraMaier committed Dec 12, 2023
2 parents 9829b07 + 3fad3f6 commit 96d7d2f
Show file tree
Hide file tree
Showing 49 changed files with 1,147 additions and 22 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ services:

env:
global:
- DOCKER_REPONAME=lbnlblum
- [email protected]
- OMC_VERSION=ubuntu-2204-omc:1.22.0_dev-41-g8a5b18f-1
- DYMOLA_VERSION=travis_ubuntu-2004_dymola:2023x-x86_64_rev-1
Expand All @@ -44,11 +45,11 @@ env:
before_install:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- if [[ "$TEST_ARG" == *test-dymola* || "$TEST_ARG" == *test-bestest* ]]; then
docker pull "$DOCKER_USERNAME"/${DYMOLA_VERSION};
docker pull "$DOCKER_REPONAME"/${DYMOLA_VERSION};
cp IBPSA/Resources/Scripts/travis/dymola/dymola $HOME/bin/;
fi;
- if [[ "$TEST_ARG" == *test-openmodelica* ]]; then
docker pull "$DOCKER_USERNAME"/${OMC_VERSION};
docker pull "$DOCKER_REPONAME"/${OMC_VERSION};
cp IBPSA/Resources/Scripts/travis/omc/omc $HOME/bin/omc;
fi;

Expand Down
17 changes: 14 additions & 3 deletions IBPSA/Examples/package.mo
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,20 @@ package Examples "Collection of models that illustrate model use and test models
extends Modelica.Icons.ExamplesPackage;
annotation (preferredView="info", Documentation(info="<html>
<p>
This package contains examples for the use of models that can be found in
<a href=\"modelica://IBPSA\">
IBPSA</a>.
This package contains examples and tutorials with step-by-step instructions
for how to build system models.
</p>
<p>
The examples illustrate
the scope of the library. Smaller examples that typically only
use models from a few packages can be found in the individual packages.
For example, see
<a href=\"modelica://Buildings.Airflow.Multizone.Examples\">
Buildings.Airflow.Multizone.Examples</a> for examples of
multizone airflow and contaminant transport models, or
<a href=\"modelica://IBPSA.Fluid.HeatExchangers.Examples\">
IBPSA.Fluid.HeatExchangers.Examples</a> for
examples of heat exchanger models.
</p>
</html>"));
end Examples;
26 changes: 26 additions & 0 deletions IBPSA/Fluid/Geothermal/Aquifer/Data/Rock.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
within IBPSA.Fluid.Geothermal.Aquifer.Data;
record Rock "Soil data record of rock heat transfer properties"
extends IBPSA.Fluid.Geothermal.Aquifer.Data.Template(
kSoi=2.8,
dSoi=2680,
cSoi=833,
phi=0.2,
K=1E-5);
annotation (
defaultComponentPrefixes="parameter",
defaultComponentName="aquDat",
Documentation(
info="<html>
<p>
This data record contains the heat transfer properties of rock.
</p>
</html>",
revisions="<html>
<ul>
<li>
May 2023, Alessandro Maccarini:<br/>
First implementation.
</li>
</ul>
</html>"));
end Rock;
35 changes: 35 additions & 0 deletions IBPSA/Fluid/Geothermal/Aquifer/Data/Template.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
within IBPSA.Fluid.Geothermal.Aquifer.Data;
record Template
"Template for soil data records"
extends Modelica.Icons.Record;
parameter Modelica.Units.SI.ThermalConductivity kSoi
"Thermal conductivity of the soil material";
parameter Modelica.Units.SI.SpecificHeatCapacity cSoi
"Specific heat capacity of the soil material";
parameter Modelica.Units.SI.Density dSoi(displayUnit="kg/m3")
"Density of the soil material";
parameter Real phi(final unit="1")
"Reservoir porosity";
parameter Modelica.Units.SI.Velocity K
"Hydraulic conductivity";
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
coordinateSystem(preserveAspectRatio=false)),
defaultComponentPrefixes="parameter",
defaultComponentName="aquDat",
Documentation(
info="<html>
<p>
This record is a template for the records in
<a href=\"modelica://IBPSA.Fluid.Geothermal.Aquifer.SingleWell\">
IBPSA.Fluid.Geothermal.Aquifer.SingleWell</a>.
</p>
</html>",
revisions="<html>
<ul>
<li>
May 2023, by Alessandro Maccarini:<br/>
First implementation.
</li>
</ul>
</html>"));
end Template;
12 changes: 12 additions & 0 deletions IBPSA/Fluid/Geothermal/Aquifer/Data/package.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
within IBPSA.Fluid.Geothermal.Aquifer;
package Data "Collection of data records for aquifer thermal energy storage"
extends Modelica.Icons.MaterialPropertiesPackage;

annotation (preferredView="info", Documentation(info="<html>
<p>
This package contains data records for heat properties of aquifers
<a href=\"modelica://IBPSA.Fluid.Geothermal.Aquifer\">
IBPSA.Fluid.Geothermal.Aquifer</a>.
</p>
</html>"));
end Data;
2 changes: 2 additions & 0 deletions IBPSA/Fluid/Geothermal/Aquifer/Data/package.order
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Rock
Template
77 changes: 77 additions & 0 deletions IBPSA/Fluid/Geothermal/Aquifer/Examples/CoolingOffice.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
within IBPSA.Fluid.Geothermal.Aquifer.Examples;
model CoolingOffice
extends Modelica.Icons.Example;
package Medium = IBPSA.Media.Water "Medium model";

parameter Modelica.Units.SI.HeatFlowRate QCoo_flow_nominal=30000
"Cooling power";
parameter Modelica.Units.SI.TemperatureDifference deltaT=4 "Temperature difference at heat exchanger";
parameter Modelica.Units.SI.SpecificHeatCapacity cpWat=4186 "Heat capacity of water";
parameter Modelica.Units.SI.MassFlowRate mWat_flow_nominal=
QCoo_flow_nominal/(deltaT*cpWat) "Nominal water mass flow rate";

HeatExchangers.HeaterCooler_u hea(
redeclare package Medium = Medium,
m_flow_nominal=mWat_flow_nominal,
dp_nominal=100,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
Q_flow_nominal=QCoo_flow_nominal) "Heat exchanger"
annotation (Placement(transformation(extent={{-10,54},{10,74}})));
Modelica.Blocks.Sources.Constant uPum(k=1) "Pump control signal"
annotation (Placement(transformation(extent={{-60,-20},{-40,0}})));
Modelica.Blocks.Sources.Constant uHea(k=1) "Heat load control signal"
annotation (Placement(transformation(extent={{-60,60},{-40,80}})));
MultiWell aquWel(
redeclare package Medium = Medium,
nVol=80,
h=20,
d=1000,
length=40,
TCol_start=285.15,
THot_start=285.15,
aquDat=IBPSA.Fluid.Geothermal.Aquifer.Data.Rock(),
m_flow_nominal=mWat_flow_nominal,
dpExt_nominal=5000)
"Acquifer well"
annotation (Placement(transformation(extent={{-10,-20},{10,0}})));
Sources.Boundary_pT bou(
redeclare package Medium = Medium,
nPorts=1) "Pressure boundary condition" annotation (Placement(transformation(extent={{-80,20},{-60,40}})));
equation
connect(uHea.y, hea.u)
annotation (Line(points={{-39,70},{-12,70}}, color={0,0,127}));
connect(aquWel.port_Hot, hea.port_b) annotation (Line(points={{6,0},{6,30},{20,
30},{20,64},{10,64}}, color={0,127,255}));
connect(aquWel.port_Col, hea.port_a) annotation (Line(points={{-6,0},{-6,0},{-6,
30},{-20,30},{-20,64},{-10,64}}, color={0,127,255}));
connect(bou.ports[1], hea.port_a) annotation (Line(points={{-60,30},{-20,30},
{-20,64},{-10,64}}, color={0,127,255}));
connect(uPum.y, aquWel.u)
annotation (Line(points={{-39,-10},{-26,-10},{-26,-10},{-12,-10}},
color={0,0,127}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
coordinateSystem(preserveAspectRatio=false)),
experiment(StopTime=7776000,Tolerance=1e-6),
__Dymola_Commands(file=
"modelica://IBPSA/Resources/Scripts/Dymola/Fluid/Geothermal/Aquifer/Examples/CoolingOffice.mos"
"Simulate and plot"),
Documentation(info="<html>
<p>
This example shows the application of the model
<a href=\"modelica://IBPSA.Fluid.Geothermal.Aquifer.SingleWell\">IBPSA.Fluid.Geothermal.Aquifer.SingleWell</a>.
</p>
<p>
The system consists of two wells, a warm well and a cold well. Water is extracted from the cold well at 12C and
after passing through a heat exchanger it is injected in the warm well at 16C. This may represent the operation of an
aquifer thermal energy storage system that cools an office building with a constant load of 30 kW.
</p>
</html>", revisions="<html>
<ul>
<li>
May 2023, by Alessandro Maccarini:<br/>
First Implementation.
</li>
</ul>
</html>"));
end CoolingOffice;
12 changes: 12 additions & 0 deletions IBPSA/Fluid/Geothermal/Aquifer/Examples/package.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
within IBPSA.Fluid.Geothermal.Aquifer;
package Examples "Example models for IBPSA.Fluid.Geothermal.Aquifer"
extends Modelica.Icons.ExamplesPackage;

annotation (preferredView="info", Documentation(info="<html>
<p>
This package contains example models for the classes in
<a href=\"modelica://IBPSA.Fluid.Geothermal.Aquifer\">
IBPSA.Fluid.Geothermal.Aquifer</a>.
</p>
</html>"));
end Examples;
1 change: 1 addition & 0 deletions IBPSA/Fluid/Geothermal/Aquifer/Examples/package.order
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CoolingOffice
Loading

0 comments on commit 96d7d2f

Please sign in to comment.