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

DHC Buried Pipes #2409

Merged
merged 71 commits into from
Aug 18, 2021
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
feef6db
adding ground temperature model
bravache Mar 14, 2021
7accff9
introduce ground coupling model
bravache Mar 17, 2021
3bd53f1
refactor variable names
bravache Mar 17, 2021
18e3b3d
add documentation
bravache Mar 18, 2021
0844d72
setup unittests
bravache Mar 18, 2021
b7f0075
Merge branch 'master' into dhc_buried_pipes
bravache Mar 18, 2021
6d28c9d
expand climatic constants
bravache Mar 18, 2021
7634ba4
cleaning out extra changes
bravache Mar 18, 2021
b37d042
format errors
bravache Mar 18, 2021
4a1ea2b
reorder packages
bravache Mar 18, 2021
afa8e9e
reorder packages 2
bravache Mar 18, 2021
958a99c
unprotect GroundCoupling.soi
bravache Mar 18, 2021
d692c5d
Add case with reverse flow
AntoineGautier Apr 6, 2021
cf85307
Update script
AntoineGautier Apr 6, 2021
23035c6
Minor edits
AntoineGautier Apr 6, 2021
3e0f790
Add missing <p> tags (out of issue scope)
AntoineGautier Apr 6, 2021
24f776d
Minor (graphics)
AntoineGautier Apr 6, 2021
0ca0472
Merge branch 'master' of github.com:lbl-srg/modelica-buildings into d…
AntoineGautier Apr 6, 2021
5a65171
fixing errors
bravache Apr 15, 2021
9bbe342
Merge branch 'master' into dhc_buried_pipes
bravache Apr 27, 2021
2073f32
Merge branch 'master' into dhc_buried_pipes
bravache Apr 27, 2021
9681c38
clean branch
bravache Apr 27, 2021
0af746c
clean 2
bravache Apr 27, 2021
ff7f8c8
remove BOM
bravache Apr 27, 2021
45fcaa8
experimenting with segmented pipes
bravache May 14, 2021
2aeabf0
aggregate segment resistances
bravache May 17, 2021
62f77b4
put pipRev source on inlet side
bravache May 19, 2021
e45668c
Merge branch 'master' into dhc_buried_pipes
bravache May 19, 2021
680a268
remove BOM
bravache May 19, 2021
8d3b970
add surface temperature corrections to model
bravache May 21, 2021
44d1fc0
add documentation
bravache May 21, 2021
2cc8f12
fix html
bravache May 21, 2021
c704d1a
add documentation
bravache May 28, 2021
92422f4
Add two pipes in conduit example
bravache Jun 3, 2021
665e199
generate unittest results
bravache Jun 4, 2021
ea1c457
rename multiPlugFlowPipe
bravache Jun 7, 2021
7e4e8f5
Merge branch 'master' of github.com:lbl-srg/modelica-buildings into d…
AntoineGautier Jun 8, 2021
d74f730
Typos [ci skip]
AntoineGautier Jun 8, 2021
be75095
Merge branch 'dhc_buried_pipes' of github.com:lbl-srg/modelica-buildi…
AntoineGautier Jun 8, 2021
0cd80f7
Graphics and typo [ci skip]
AntoineGautier Jun 8, 2021
a5cb4a0
Typos
AntoineGautier Jun 9, 2021
da42735
Merge branch 'master' of github.com:lbl-srg/modelica-buildings into d…
AntoineGautier Jun 9, 2021
f99784b
various rename, docs and graphics changes
bravache Jun 10, 2021
f351dcd
remove bom
bravache Jun 10, 2021
0604c4d
Add ground coupling validation with AIT data
bravache Jun 15, 2021
62df183
add groundcoupling validation results
bravache Jul 6, 2021
7beb4ea
Update test results
bravache Jul 7, 2021
b4315ba
Merge branch 'master' into dhc_buried_pipes
bravache Jul 7, 2021
4f5aeca
Move classes around
bravache Jul 9, 2021
56b91d4
Update PlugFlowDiscretized and results
bravache Jul 13, 2021
4cc3469
revert back Floor
bravache Jul 13, 2021
ca867cb
Remove BOM
bravache Jul 13, 2021
0653863
fix dymola tests
bravache Jul 13, 2021
5853620
fix jmodelica tests
bravache Jul 13, 2021
cb4377f
Update top-level documentation
bravache Jul 13, 2021
6da7fe9
add a bit more documentation
bravache Jul 13, 2021
cea6e4d
Typo
AntoineGautier Jul 14, 2021
225ab92
Merge branch 'master' of github.com:lbl-srg/modelica-buildings into d…
AntoineGautier Jul 14, 2021
952f06d
Restore results that should not be modified
AntoineGautier Jul 14, 2021
e27e2c3
Revised html format
mwetter Aug 17, 2021
8e09a84
Reordered records
mwetter Aug 17, 2021
7b096cf
Moved parameter assignment to constraining clause
mwetter Aug 17, 2021
f8324bb
Moved media declaration to top of file
mwetter Aug 17, 2021
41bb6b2
Corrected hyperlink
mwetter Aug 17, 2021
d8e43d8
Formatted file
mwetter Aug 17, 2021
c4e9b4e
Formatted html
mwetter Aug 17, 2021
6f1c173
Removed empty lines
mwetter Aug 17, 2021
3922f82
Removed empty lines
mwetter Aug 17, 2021
f658dc6
Merge branch 'dhc_buried_pipes' of github.com:lbl-srg/modelica-buildi…
mwetter Aug 17, 2021
497f16a
Revised revision notes
mwetter Aug 17, 2021
1994c98
Merge branch 'master' into dhc_buried_pipes
mwetter Aug 17, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
within Buildings.BoundaryConditions.GroundTemperature.ClimaticConstants;
record Boston =
Buildings.BoundaryConditions.GroundTemperature.ClimaticConstants.Generic (
TMeaSur=273.15+11.08,
TSurAmp=11.57,
bravache marked this conversation as resolved.
Show resolved Hide resolved
sinPhaDay=115.1) "Boston";
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
within Buildings.BoundaryConditions.GroundTemperature.ClimaticConstants;
record Generic "Generic climatic constants"
extends Modelica.Icons.Record;
parameter Modelica.SIunits.Temperature TMeaSur "Mean annual surface temperature";
parameter Modelica.SIunits.TemperatureDifference TSurAmp "Surface temperature amplitude";
parameter Modelica.SIunits.Duration sinPhaDay "Phase lag of soil surface temperature (in days)";

end Generic;
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
within Buildings.BoundaryConditions.GroundTemperature.ClimaticConstants;
record NewYork =
Buildings.BoundaryConditions.GroundTemperature.ClimaticConstants.Generic (
TMeaSur=273.15+12.88,
TSurAmp=11.45,
sinPhaDay=112.6) "New York";
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
within Buildings.BoundaryConditions.GroundTemperature.ClimaticConstants;
record SanFrancisco =
Buildings.BoundaryConditions.GroundTemperature.ClimaticConstants.Generic (
TMeaSur=273.15+14.49,
TSurAmp=3.35,
sinPhaDay=120.6) "San Francisco";
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
within Buildings.BoundaryConditions.GroundTemperature;
package ClimaticConstants
bravache marked this conversation as resolved.
Show resolved Hide resolved
extends Modelica.Icons.MaterialPropertiesPackage;

annotation (Documentation(info="<html>
<p>
Surface temperature data that is used in the calculation of undisturbed soil temperature.
See <a href=\"https://tc0602.ashraetcs.org/Climatic_constants_using_ASHRAE_CD_Ver_6.0.pdf\">
Climatic Constants for Calculating Subsurface Soil Temperatures</a> for
more information and a table of values
</p>
</html>"));
end ClimaticConstants;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Boston
Generic
NewYork
SanFrancisco
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
within Buildings.BoundaryConditions.GroundTemperature.Examples;
model UndisturbedSoilTemperature "Example model for undisturbed soil temperature"
extends Modelica.Icons.Example;

Buildings.BoundaryConditions.GroundTemperature.UndisturbedSoilTemperature
Tsoi0(cliCon=cliCon, soiDat=soiDat, dep=0) "Surface temperature"
annotation (Placement(transformation(extent={{-10,80},{10,100}})));
Buildings.BoundaryConditions.GroundTemperature.UndisturbedSoilTemperature
Tsoi2(cliCon=cliCon, soiDat=soiDat, dep=2) "Soil temperature at 2m depth"
annotation (Placement(transformation(extent={{-10,40},{10,60}})));
Buildings.BoundaryConditions.GroundTemperature.UndisturbedSoilTemperature
Tsoi5(cliCon=cliCon, soiDat=soiDat, dep=5) "Soil temperature at 5m depth"
annotation (Placement(transformation(extent={{-10,-20},{10,0}})));
Buildings.BoundaryConditions.GroundTemperature.UndisturbedSoilTemperature
Tsoi9(cliCon=cliCon, soiDat=soiDat, dep=9) "Soil temperature at 9m depth"
annotation (Placement(transformation(extent={{-10,-100},{10,-80}})));

protected
replaceable parameter ClimaticConstants.Boston cliCon "Surface temperature climatic conditions";
replaceable parameter Buildings.HeatTransfer.Data.Soil.Generic soiDat(
k=1.58,c=1150,d=1600) "Soil thermal properties";
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
coordinateSystem(preserveAspectRatio=false)),
experiment(StopTime=31536000, __Dymola_Algorithm="Cvode", Tolerance=1e-6),
Documentation(info="<html>
<p>
This example model illustrates how the undisturbed soil temperature model decreases
seasonal temperature oscillations and increases delay as depth is increasing.
</p>
</html>", revisions="<html>
<ul>
<li>
March 17, 2021, by Baptiste Ravache:<br/>
First implementation.
</li>
</ul>
</html>"),
__Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/BoundaryConditions/GroundTemperature/Examples/UndisturbedSoilTemperature.mos"
"Simulate and plot"));
end UndisturbedSoilTemperature;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
within Buildings.BoundaryConditions.GroundTemperature;
package Examples
bravache marked this conversation as resolved.
Show resolved Hide resolved
extends Modelica.Icons.ExamplesPackage;
end Examples;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UndisturbedSoilTemperature
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
within Buildings.BoundaryConditions.GroundTemperature;
model UndisturbedSoilTemperature "Undisturbed soil temperature"
parameter Modelica.SIunits.Length dep "Depth";
replaceable parameter Buildings.HeatTransfer.Data.Soil.Generic soiDat "Soil thermal properties";
replaceable parameter ClimaticConstants.Generic cliCon "Surface temperature climatic conditions";

Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b port "Boundary heat port";
protected
constant Modelica.SIunits.Angle pi = Modelica.Constants.pi;
constant Modelica.SIunits.Duration Year = 365.2422*24*60*60 "Annual period length";

AntoineGautier marked this conversation as resolved.
Show resolved Hide resolved
parameter Modelica.SIunits.ThermalDiffusivity soiDif = soiDat.k / soiDat.c / soiDat.d "Soil diffusivity";
AntoineGautier marked this conversation as resolved.
Show resolved Hide resolved
parameter Modelica.SIunits.Duration timLag = cliCon.sinPhaDay*24*60*60 "Start time of surface temperature sinusoid";
parameter Real pha = - dep * (pi/soiDif/Year)^0.5 "Phase angle of ground temperature sinusoid";

equation
port.T = cliCon.TMeaSur + cliCon.TSurAmp * exp(pha) * sin(2*pi*(time-timLag)/Year - pha);
bravache marked this conversation as resolved.
Show resolved Hide resolved
annotation (Placement(transformation(extent={{-6,-104},{6,-92}}),
iconTransformation(extent={{-6,-104},{6,-92}})),
Icon(coordinateSystem(preserveAspectRatio=false), graphics={
Text(
lineColor={0,0,255},
extent={{-150,110},{150,150}},
textString="%name"),
Rectangle(
extent={{-100,20},{100,-100}},
lineColor={0,0,0},
fillColor={211,168,137},
fillPattern=FillPattern.Backward),
Rectangle(
extent={{-100,20},{100,26}},
lineColor={0,0,0},
fillColor={0,255,128},
fillPattern=FillPattern.Solid),
Rectangle(
extent={{-100,26},{100,100}},
lineColor={0,0,0},
fillColor={85,170,255},
fillPattern=FillPattern.Solid),
Line(
points={{0,38},{0,-60}},
color={191,0,0},
thickness=1),
Polygon(
points={{16,-60},{-16,-60},{0,-92},{16,-60}},
lineColor={191,0,0},
fillColor={191,0,0},
fillPattern=FillPattern.Solid),
Text(
extent={{-38,-38},{-100,-100}},
lineColor={0,0,0},
textString="K")}), Diagram(
coordinateSystem(preserveAspectRatio=false)),
Documentation(info="<html>
<p>
This model provides a prescribed temperature boundary counditions for buried objects,
where the temperature is computed per the ASCE (1996) equation:

</p>
<p align=\"center\">
<img alt=\"image\" src=\"modelica://Buildings/Resources/Images/BoundaryConditions/GroundTemperature/UndisturbedGroundTemperature.png\" />
</p>
bravache marked this conversation as resolved.
Show resolved Hide resolved
<p>
where T<sub>s,z</sub> is the ground temperature at depth z,
&tau; is the annual period length (constant 365.25 days),
&alpha; is the soil thermal diffusivity, and t is the time.
T<sub>ms</sub>, A<sub>s</sub> and t<sub>lag</sub> are function of the
climate and represent the offset, amplitude and phase, respectively,
of the representative surface temperature sinusoid.
bravache marked this conversation as resolved.
Show resolved Hide resolved
</p>
<h4>References</h4>
<p>
ASCE (1996). <i>Cold Regions Utilities Monograph</i>. D.W. Smith, Technical Editor.
</p>

</html>", revisions="<html>
<ul>
<li>
March 17, 2021, by Baptiste Ravache:<br/>
First implementation.
</li>
</ul>
</html>"));
end UndisturbedSoilTemperature;
5 changes: 5 additions & 0 deletions Buildings/BoundaryConditions/GroundTemperature/package.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
within Buildings.BoundaryConditions;
package GroundTemperature
bravache marked this conversation as resolved.
Show resolved Hide resolved
extends Modelica.Icons.VariantsPackage;

end GroundTemperature;
3 changes: 3 additions & 0 deletions Buildings/BoundaryConditions/GroundTemperature/package.order
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
UndisturbedSoilTemperature
ClimaticConstants
Examples
1 change: 1 addition & 0 deletions Buildings/BoundaryConditions/package.order
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
UsersGuide
GroundTemperature
SkyTemperature
SolarGeometry
SolarIrradiation
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
within Buildings.Fluid.BuriedPipes.BaseClasses.Functions;
function groundCouplingFactors
"Geometric factors for buried pipe-ground coupling"
extends Modelica.Icons.Function;
input Integer nPip(min=1, fixed=true) "Number of pipes";

input Modelica.SIunits.Length dep[nPip] "Pipes Buried Depth";
input Modelica.SIunits.Length pos[nPip] "Pipes Horizontal Coordinate (to an arbitrary reference point)";
input Modelica.SIunits.Length rad[nPip] "Pipes external radius";

output Real P[nPip, nPip] "Thermal coupling geometric factors";

algorithm
for i in 1:nPip loop
for j in 1:nPip loop
if i == j then
P[i,j] := Modelica.Math.log(2*dep[i]/rad[i]);
else
P[i,j] := Modelica.Math.log(
((pos[i] - pos[j])^2 + (dep[i] + dep[j])^2)/
((pos[i] - pos[j])^2 + (dep[i] - dep[j])^2));
end if;
end for;
end for;
bravache marked this conversation as resolved.
Show resolved Hide resolved

annotation (Documentation(info="<html>
<p>
This function computes the multiple buried pipe system coupling matrix P described by Kusuda (1981).
</p>
<p>
For a network of n buried pipes that are coaxial, the matrix P of size n x n is
computed from the system geometry:
</p>
<p align=\"center\">
<img alt=\"image\" src=\"modelica://Buildings/Resources/Images/Fluid/BuriedPipes/GroundCouplingMatrix.png\" />
</p>
bravache marked this conversation as resolved.
Show resolved Hide resolved
<p>
where a<sub>i</sub>, d<sub>i</sub> and r<sub>i</sub> corresponds to the
horizontal position, depth and external radius, respectively, of pipe i.
</p>
<h4>References</h4>
<p>
Kusuda, T. (1981). <i>Heat transfer analysis of underground heat
and chilled-water distribution systems</i>. National Bureau of Standards.
</p>
</html>", revisions="<html>
<ul>
<li>
March 17, 2020, by Baptiste Ravache:<br/>
First implementation.
</li>
</ul>
</html>"));
end groundCouplingFactors;
10 changes: 10 additions & 0 deletions Buildings/Fluid/BuriedPipes/BaseClasses/Functions/package.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
within Buildings.Fluid.BuriedPipes.BaseClasses;
package Functions "Package with base functions for Buildings.Fluid.BuriedPipes"
bravache marked this conversation as resolved.
Show resolved Hide resolved
extends Modelica.Icons.VariantsPackage;

annotation (Documentation(info="<html>
<p>
This package contains base functions that are used to construct the models in Buildings.Fluid.BuriedPipes.
bravache marked this conversation as resolved.
Show resolved Hide resolved
</p>
</html>"));
end Functions;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
groundCouplingFactors
10 changes: 10 additions & 0 deletions Buildings/Fluid/BuriedPipes/BaseClasses/package.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
within Buildings.Fluid.BuriedPipes;
package BaseClasses
bravache marked this conversation as resolved.
Show resolved Hide resolved
extends Modelica.Icons.BasesPackage;

annotation (Documentation(info="<html>
<p>
This package contains base classes that are used to construct the models in Buildings.Fluid.BuriedPipes.
</p>
</html>"));
end BaseClasses;
1 change: 1 addition & 0 deletions Buildings/Fluid/BuriedPipes/BaseClasses/package.order
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Functions
Loading