Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
topupheat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pmag
topupheat
Commits
77ac8ed5
Commit
77ac8ed5
authored
1 year ago
by
Pedro L. Magalhães
Browse files
Options
Downloads
Patches
Plain Diff
Example to demonstrate the pipe loss models.
parent
a836f567
Branches
Branches containing commit
No related tags found
1 merge request
!1
Revised tests for simplified heat transfer methods in the trench test section....
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/script_pipe_losses.py
+663
-0
663 additions, 0 deletions
examples/script_pipe_losses.py
with
663 additions
and
0 deletions
examples/script_pipe_losses.py
0 → 100644
+
663
−
0
View file @
77ac8ed5
# *****************************************************************************
# *****************************************************************************
# import libraries
import
matplotlib.pyplot
as
plt
import
math
# topupheat
import
topupheat.pipes.fic
as
fic
from
topupheat.pipes.single
import
StandardisedPipe
,
StandardisedPipeDatabase
from
topupheat.pipes.twin
import
StandardisedTwinPipe
from
topupheat.pipes.trenches
import
SupplyReturnPipeTrench
,
TwinPipeTrench
import
topupheat.pipes.trenches
as
_tre
# *****************************************************************************
# *****************************************************************************
# pipe data
pipedata_files
=
[
'
pipes/enerpipe_caldopex_single.csv
'
,
'
pipes/enerpipe_caldopex_twin.csv
'
,
'
pipes/isoplus_singlepipes_s1.csv
'
,
'
pipes/isoplus_singlepipes_s2.csv
'
,
'
pipes/isoplus_singlepipes_s3.csv
'
,
'
pipes/isoplus_twin_disconti_s1.csv
'
,
'
pipes/isoplus_twin_disconti_s2.csv
'
,
'
pipes/isoplus_twin_disconti_s3.csv
'
,
]
# *****************************************************************************
# *****************************************************************************
# specifications
# maximum specific pressure drop
list_max_specific_pressure_loss
=
[
100
]
# Pa/m
# district heating details
dh_flow_temperature
=
273.15
+
100
# K
dh_return_temperature
=
273.15
+
100
# K
# temperature fluid bulk
temperature_fluid_bulk
=
0.5
*
(
dh_return_temperature
+
dh_flow_temperature
)
# ground temperature
ground_temperature
=
273.15
+
10
# K
# pipe absolute/effective roughness
pipe_e_eff
=
0.01
/
1000
# m
# pipe length
pipe_length
=
1000
# pipe depth
pipe_depth
=
0.8
# pipe soil
soil_k
=
1
#0.5
# pipe distance
pipe_distance
=
0.1
# plus diameter
ground_air_heat_transfer_coefficient
=
math
.
inf
# single pipe method
# single_pipe_trench_config = (_tre.SHT_METHOD_DIRECT, _tre.TRGTPT_KRISCHER1936)
# single_pipe_trench_config = (_tre.SHT_METHOD_SYM_ASYM, _tre.TRGTPT_MULTIPOLE_ZERO_ORDER)
# single_pipe_trench_config = (_tre.SHT_METHOD_SYM_ASYM, _tre.TRGTPT_MULTIPOLE_FIRST_ORDER)
# single_pipe_trench_config = (_tre.SHT_METHOD_DIRECT, _tre.TRGTPT_MULTIPOLE_ZERO_ORDER)
single_pipe_trench_config
=
(
_tre
.
SHT_METHOD_DIRECT
,
_tre
.
TRGTPT_MULTIPOLE_FIRST_ORDER
)
# twin pipe method
# twin_pipe_trench_config = (_tre.SHT_METHOD_SYM_ASYM, _tre.TRGTPT_MULTIPOLE_ZERO_ORDER)
# twin_pipe_trench_config = (_tre.SHT_METHOD_SYM_ASYM, _tre.TRGTPT_MULTIPOLE_FIRST_ORDER)
twin_pipe_trench_config
=
(
_tre
.
SHT_METHOD_SYM_ASYM
,
_tre
.
TRGTPT_TWO_MODEL_APPROX
)
# *****************************************************************************
# specify the pipes
list_pipe_tuples
=
[
# (20, 1, 'caldopex', '25-76'),
# (20, 2, 'caldopex', 'PLUS 25-91'),
# (25, 1, 'caldopex', '32-76'),
# (25, 2, 'caldopex', 'PLUS 32-91'),
# (32, 1, 'caldopex', '40-91'),
# (32, 2, 'caldopex', 'PLUS 40-111'),
# (40, 1, 'caldopex', '50-111'),
# (40, 2, 'caldopex', 'PLUS 50-126'),
# (50, 1, 'caldopex', '63-126'),
# (50, 2, 'caldopex', 'PLUS 63-142'),
# (65, 1, 'caldopex', '75-142'),
# (65, 2, 'caldopex', 'PLUS 75-162'),
# (80, 1, 'caldopex', '90-162'),
# (80, 2, 'caldopex', 'PLUS 90-182'),
# (100, 1, 'caldopex', '110-162'),
# (100, 2, 'caldopex', '110-182'),
# (100, 3, 'caldopex', 'PLUS 110-202'),
# (125, 1, 'caldopex', '125-182'),
# (125, 2, 'caldopex', 'PLUS 125-202'),
# (125, 3, 'caldopex', '140-202'),
# (150, 1, 'caldopex', '160-250'),
# (20, 1, 'caldopex', '25+25-91'),
# (20, 2, 'caldopex', 'PLUS 25+25-111'),
# (25, 1, 'caldopex', '32+32-111'),
# (25, 2, 'caldopex', 'PLUS 32+32-126'),
# (32, 1, 'caldopex', '40+40-126'),
# (32, 2, 'caldopex', 'PLUS 40+40-142'),
# (40, 1, 'caldopex', '50+50-162'),
# (40, 2, 'caldopex', 'PLUS 50+50-182'),
# (50, 1, 'caldopex', '63+63-182'),
# (50, 2, 'caldopex', 'PLUS 63+63-202'),
# (65, 1, 'caldopex', '75+75-202'),
(
20
,
1
,
'
isoplus
'
,
'
DRE-20-STD
'
),
(
25
,
1
,
'
isoplus
'
,
'
DRE-25-STD
'
),
(
32
,
1
,
'
isoplus
'
,
'
DRE-32-STD
'
),
(
40
,
1
,
'
isoplus
'
,
'
DRE-40-STD
'
),
(
50
,
1
,
'
isoplus
'
,
'
DRE-50-STD
'
),
(
65
,
1
,
'
isoplus
'
,
'
DRE-65-STD
'
),
(
80
,
1
,
'
isoplus
'
,
'
DRE-80-STD
'
),
(
100
,
1
,
'
isoplus
'
,
'
DRE-100-STD
'
),
(
125
,
1
,
'
isoplus
'
,
'
DRE-125-STD
'
),
(
150
,
1
,
'
isoplus
'
,
'
DRE-150-STD
'
),
(
200
,
1
,
'
isoplus
'
,
'
DRE-200-STD
'
),
(
250
,
1
,
'
isoplus
'
,
'
DRE-250-STD
'
),
(
300
,
1
,
'
isoplus
'
,
'
DRE-300-STD
'
),
(
350
,
1
,
'
isoplus
'
,
'
DRE-350-STD
'
),
(
400
,
1
,
'
isoplus
'
,
'
DRE-400-STD
'
),
(
450
,
1
,
'
isoplus
'
,
'
DRE-450-STD
'
),
(
500
,
1
,
'
isoplus
'
,
'
DRE-500-STD
'
),
(
600
,
1
,
'
isoplus
'
,
'
DRE-600-STD
'
),
(
700
,
1
,
'
isoplus
'
,
'
DRE-700-STD
'
),
(
800
,
1
,
'
isoplus
'
,
'
DRE-800-STD
'
),
(
900
,
1
,
'
isoplus
'
,
'
DRE-900-STD
'
),
(
1000
,
1
,
'
isoplus
'
,
'
DRE-1000-STD
'
),
(
20
,
2
,
'
isoplus
'
,
'
DRE-20-RE
'
),
(
25
,
2
,
'
isoplus
'
,
'
DRE-25-RE
'
),
(
32
,
2
,
'
isoplus
'
,
'
DRE-32-RE
'
),
(
40
,
2
,
'
isoplus
'
,
'
DRE-40-RE
'
),
(
50
,
2
,
'
isoplus
'
,
'
DRE-50-RE
'
),
(
65
,
2
,
'
isoplus
'
,
'
DRE-65-RE
'
),
(
80
,
2
,
'
isoplus
'
,
'
DRE-80-RE
'
),
(
100
,
2
,
'
isoplus
'
,
'
DRE-100-RE
'
),
(
125
,
2
,
'
isoplus
'
,
'
DRE-125-RE
'
),
(
150
,
2
,
'
isoplus
'
,
'
DRE-150-RE
'
),
(
200
,
2
,
'
isoplus
'
,
'
DRE-200-RE
'
),
(
250
,
2
,
'
isoplus
'
,
'
DRE-250-RE
'
),
(
300
,
2
,
'
isoplus
'
,
'
DRE-300-RE
'
),
(
350
,
2
,
'
isoplus
'
,
'
DRE-350-RE
'
),
(
400
,
2
,
'
isoplus
'
,
'
DRE-400-RE
'
),
(
450
,
2
,
'
isoplus
'
,
'
DRE-450-RE
'
),
(
500
,
2
,
'
isoplus
'
,
'
DRE-500-RE
'
),
(
600
,
2
,
'
isoplus
'
,
'
DRE-600-RE
'
),
(
700
,
2
,
'
isoplus
'
,
'
DRE-700-RE
'
),
(
800
,
2
,
'
isoplus
'
,
'
DRE-800-RE
'
),
(
900
,
2
,
'
isoplus
'
,
'
DRE-900-RE
'
),
(
1000
,
2
,
'
isoplus
'
,
'
DRE-1000-RE
'
),
(
20
,
3
,
'
isoplus
'
,
'
DRE-20-TWIRE
'
),
(
25
,
3
,
'
isoplus
'
,
'
DRE-25-TWIRE
'
),
(
32
,
3
,
'
isoplus
'
,
'
DRE-32-TWIRE
'
),
(
40
,
3
,
'
isoplus
'
,
'
DRE-40-TWIRE
'
),
(
50
,
3
,
'
isoplus
'
,
'
DRE-50-TWIRE
'
),
(
65
,
3
,
'
isoplus
'
,
'
DRE-65-TWIRE
'
),
(
80
,
3
,
'
isoplus
'
,
'
DRE-80-TWIRE
'
),
(
100
,
3
,
'
isoplus
'
,
'
DRE-100-TWIRE
'
),
(
125
,
3
,
'
isoplus
'
,
'
DRE-125-TWIRE
'
),
(
150
,
3
,
'
isoplus
'
,
'
DRE-150-TWIRE
'
),
(
200
,
3
,
'
isoplus
'
,
'
DRE-200-TWIRE
'
),
(
250
,
3
,
'
isoplus
'
,
'
DRE-250-TWIRE
'
),
(
300
,
3
,
'
isoplus
'
,
'
DRE-300-TWIRE
'
),
(
350
,
3
,
'
isoplus
'
,
'
DRE-350-TWIRE
'
),
(
400
,
3
,
'
isoplus
'
,
'
DRE-400-TWIRE
'
),
(
450
,
3
,
'
isoplus
'
,
'
DRE-450-TWIRE
'
),
(
500
,
3
,
'
isoplus
'
,
'
DRE-500-TWIRE
'
),
(
600
,
3
,
'
isoplus
'
,
'
DRE-600-TWIRE
'
),
(
20
,
1
,
'
isoplus
'
,
'
DRD-20-STD
'
),
(
25
,
1
,
'
isoplus
'
,
'
DRD-25-STD
'
),
(
32
,
1
,
'
isoplus
'
,
'
DRD-32-STD
'
),
(
40
,
1
,
'
isoplus
'
,
'
DRD-40-STD
'
),
(
50
,
1
,
'
isoplus
'
,
'
DRD-50-STD
'
),
(
65
,
1
,
'
isoplus
'
,
'
DRD-65-STD
'
),
(
80
,
1
,
'
isoplus
'
,
'
DRD-80-STD
'
),
(
100
,
1
,
'
isoplus
'
,
'
DRD-100-STD
'
),
(
125
,
1
,
'
isoplus
'
,
'
DRD-125-STD
'
),
(
150
,
1
,
'
isoplus
'
,
'
DRD-150-STD
'
),
(
200
,
1
,
'
isoplus
'
,
'
DRD-200-STD
'
),
(
20
,
2
,
'
isoplus
'
,
'
DRD-20-RE
'
),
(
25
,
2
,
'
isoplus
'
,
'
DRD-25-RE
'
),
(
32
,
2
,
'
isoplus
'
,
'
DRD-32-RE
'
),
(
40
,
2
,
'
isoplus
'
,
'
DRD-40-RE
'
),
(
50
,
2
,
'
isoplus
'
,
'
DRD-50-RE
'
),
(
65
,
2
,
'
isoplus
'
,
'
DRD-65-RE
'
),
(
80
,
2
,
'
isoplus
'
,
'
DRD-80-RE
'
),
(
100
,
2
,
'
isoplus
'
,
'
DRD-100-RE
'
),
(
125
,
2
,
'
isoplus
'
,
'
DRD-125-RE
'
),
(
150
,
2
,
'
isoplus
'
,
'
DRD-150-RE
'
),
(
200
,
2
,
'
isoplus
'
,
'
DRD-200-RE
'
),
(
20
,
3
,
'
isoplus
'
,
'
DRD-20-TWIRE
'
),
(
25
,
3
,
'
isoplus
'
,
'
DRD-25-TWIRE
'
),
(
32
,
3
,
'
isoplus
'
,
'
DRD-32-TWIRE
'
),
(
40
,
3
,
'
isoplus
'
,
'
DRD-40-TWIRE
'
),
(
50
,
3
,
'
isoplus
'
,
'
DRD-50-TWIRE
'
),
(
65
,
3
,
'
isoplus
'
,
'
DRD-65-TWIRE
'
),
(
80
,
3
,
'
isoplus
'
,
'
DRD-80-TWIRE
'
),
(
100
,
3
,
'
isoplus
'
,
'
DRD-100-TWIRE
'
),
(
125
,
3
,
'
isoplus
'
,
'
DRD-125-TWIRE
'
),
(
150
,
3
,
'
isoplus
'
,
'
DRD-150-TWIRE
'
)
]
# specify the pipes
u_pipes
=
{
(
20
,
1
,
'
caldopex
'
,
'
25-76
'
):
0
,
(
20
,
2
,
'
caldopex
'
,
'
PLUS 25-91
'
):
0
,
(
25
,
1
,
'
caldopex
'
,
'
32-76
'
):
0
,
(
25
,
2
,
'
caldopex
'
,
'
PLUS 32-91
'
):
0
,
(
32
,
1
,
'
caldopex
'
,
'
40-91
'
):
0
,
(
32
,
2
,
'
caldopex
'
,
'
PLUS 40-111
'
):
0
,
(
40
,
1
,
'
caldopex
'
,
'
50-111
'
):
0
,
(
40
,
2
,
'
caldopex
'
,
'
PLUS 50-126
'
):
0
,
(
50
,
1
,
'
caldopex
'
,
'
63-126
'
):
0
,
(
50
,
2
,
'
caldopex
'
,
'
PLUS 63-142
'
):
0
,
(
65
,
1
,
'
caldopex
'
,
'
75-142
'
):
0
,
(
65
,
2
,
'
caldopex
'
,
'
PLUS 75-162
'
):
0
,
(
80
,
1
,
'
caldopex
'
,
'
90-162
'
):
0
,
(
80
,
2
,
'
caldopex
'
,
'
PLUS 90-182
'
):
0
,
(
100
,
1
,
'
caldopex
'
,
'
110-162
'
):
0
,
(
100
,
2
,
'
caldopex
'
,
'
110-182
'
):
0
,
(
100
,
3
,
'
caldopex
'
,
'
PLUS 110-202
'
):
0
,
(
125
,
1
,
'
caldopex
'
,
'
125-182
'
):
0
,
(
125
,
2
,
'
caldopex
'
,
'
PLUS 125-202
'
):
0
,
(
125
,
3
,
'
caldopex
'
,
'
140-202
'
):
0
,
(
150
,
1
,
'
caldopex
'
,
'
160-250
'
):
0
,
(
20
,
1
,
'
caldopex
'
,
'
25+25-91
'
):
0
,
(
20
,
2
,
'
caldopex
'
,
'
PLUS 25+25-111
'
):
0
,
(
25
,
1
,
'
caldopex
'
,
'
32+32-111
'
):
0
,
(
25
,
2
,
'
caldopex
'
,
'
PLUS 32+32-126
'
):
0
,
(
32
,
1
,
'
caldopex
'
,
'
40+40-126
'
):
0
,
(
32
,
2
,
'
caldopex
'
,
'
PLUS 40+40-142
'
):
0
,
(
40
,
1
,
'
caldopex
'
,
'
50+50-162
'
):
0
,
(
40
,
2
,
'
caldopex
'
,
'
PLUS 50+50-182
'
):
0
,
(
50
,
1
,
'
caldopex
'
,
'
63+63-182
'
):
0
,
(
50
,
2
,
'
caldopex
'
,
'
PLUS 63+63-202
'
):
0
,
(
65
,
1
,
'
caldopex
'
,
'
75+75-202
'
):
0
,
# single pipe, standard insulation
(
20
,
1
,
'
isoplus
'
,
'
DRE-20-STD
'
):
0.1295
,
(
25
,
1
,
'
isoplus
'
,
'
DRE-25-STD
'
):
0.1564
,
(
32
,
1
,
'
isoplus
'
,
'
DRE-32-STD
'
):
0.1589
,
(
40
,
1
,
'
isoplus
'
,
'
DRE-40-STD
'
):
0.1810
,
(
50
,
1
,
'
isoplus
'
,
'
DRE-50-STD
'
):
0.2013
,
(
65
,
1
,
'
isoplus
'
,
'
DRE-65-STD
'
):
0.2325
,
(
80
,
1
,
'
isoplus
'
,
'
DRE-80-STD
'
):
0.2418
,
(
100
,
1
,
'
isoplus
'
,
'
DRE-100-STD
'
):
0.2543
,
(
125
,
1
,
'
isoplus
'
,
'
DRE-125-STD
'
):
0.2880
,
(
150
,
1
,
'
isoplus
'
,
'
DRE-150-STD
'
):
0.3369
,
(
200
,
1
,
'
isoplus
'
,
'
DRE-200-STD
'
):
0.3686
,
(
250
,
1
,
'
isoplus
'
,
'
DRE-250-STD
'
):
0.3637
,
(
300
,
1
,
'
isoplus
'
,
'
DRE-300-STD
'
):
0.4126
,
(
350
,
1
,
'
isoplus
'
,
'
DRE-350-STD
'
):
0.4009
,
(
400
,
1
,
'
isoplus
'
,
'
DRE-400-STD
'
):
0.4222
,
(
450
,
1
,
'
isoplus
'
,
'
DRE-450-STD
'
):
0.4242
,
(
500
,
1
,
'
isoplus
'
,
'
DRE-500-STD
'
):
0.4149
,
(
600
,
1
,
'
isoplus
'
,
'
DRE-600-STD
'
):
0.5002
,
(
700
,
1
,
'
isoplus
'
,
'
DRE-700-STD
'
):
0.5665
,
(
800
,
1
,
'
isoplus
'
,
'
DRE-800-STD
'
):
0.6372
,
(
900
,
1
,
'
isoplus
'
,
'
DRE-900-STD
'
):
0.7027
,
(
1000
,
1
,
'
isoplus
'
,
'
DRE-1000-STD
'
):
0.7742
,
# single pipe, reinforced
(
20
,
2
,
'
isoplus
'
,
'
DRE-20-RE
'
):
0.1114
,
(
25
,
2
,
'
isoplus
'
,
'
DRE-25-RE
'
):
0.1308
,
(
32
,
2
,
'
isoplus
'
,
'
DRE-32-RE
'
):
0.1420
,
(
40
,
2
,
'
isoplus
'
,
'
DRE-40-RE
'
):
0.1593
,
(
50
,
2
,
'
isoplus
'
,
'
DRE-50-RE
'
):
0.1763
,
(
65
,
2
,
'
isoplus
'
,
'
DRE-65-RE
'
):
0.1980
,
(
80
,
2
,
'
isoplus
'
,
'
DRE-80-RE
'
):
0.2076
,
(
100
,
2
,
'
isoplus
'
,
'
DRE-100-RE
'
):
0.2148
,
(
125
,
2
,
'
isoplus
'
,
'
DRE-125-RE
'
):
0.2459
,
(
150
,
2
,
'
isoplus
'
,
'
DRE-150-RE
'
):
0.2794
,
(
200
,
2
,
'
isoplus
'
,
'
DRE-200-RE
'
):
0.2953
,
(
250
,
2
,
'
isoplus
'
,
'
DRE-250-RE
'
):
0.2914
,
(
300
,
2
,
'
isoplus
'
,
'
DRE-300-RE
'
):
0.3284
,
(
350
,
2
,
'
isoplus
'
,
'
DRE-350-RE
'
):
0.3169
,
(
400
,
2
,
'
isoplus
'
,
'
DRE-400-RE
'
):
0.3277
,
(
450
,
2
,
'
isoplus
'
,
'
DRE-450-RE
'
):
0.3299
,
(
500
,
2
,
'
isoplus
'
,
'
DRE-500-RE
'
):
0.3249
,
(
600
,
2
,
'
isoplus
'
,
'
DRE-600-RE
'
):
0.3748
,
(
700
,
2
,
'
isoplus
'
,
'
DRE-700-RE
'
):
0.4238
,
(
800
,
2
,
'
isoplus
'
,
'
DRE-800-RE
'
):
0.4732
,
(
900
,
2
,
'
isoplus
'
,
'
DRE-900-RE
'
):
0.5221
,
(
1000
,
2
,
'
isoplus
'
,
'
DRE-1000-RE
'
):
0.5733
,
# single pipe, twice reinforced
(
20
,
3
,
'
isoplus
'
,
'
DRE-20-TWIRE
'
):
0.10280
,
(
25
,
3
,
'
isoplus
'
,
'
DRE-25-TWIRE
'
):
0.1191
,
(
32
,
3
,
'
isoplus
'
,
'
DRE-32-TWIRE
'
):
0.1290
,
(
40
,
3
,
'
isoplus
'
,
'
DRE-40-TWIRE
'
):
0.1432
,
(
50
,
3
,
'
isoplus
'
,
'
DRE-50-TWIRE
'
):
0.1557
,
(
65
,
3
,
'
isoplus
'
,
'
DRE-65-TWIRE
'
):
0.1744
,
(
80
,
3
,
'
isoplus
'
,
'
DRE-80-TWIRE
'
):
0.1847
,
(
100
,
3
,
'
isoplus
'
,
'
DRE-100-TWIRE
'
):
0.1905
,
(
125
,
3
,
'
isoplus
'
,
'
DRE-125-TWIRE
'
):
0.2138
,
(
150
,
3
,
'
isoplus
'
,
'
DRE-150-TWIRE
'
):
0.2343
,
(
200
,
3
,
'
isoplus
'
,
'
DRE-200-TWIRE
'
):
0.2472
,
(
250
,
3
,
'
isoplus
'
,
'
DRE-250-TWIRE
'
):
0.2468
,
(
300
,
3
,
'
isoplus
'
,
'
DRE-300-TWIRE
'
):
0.2698
,
(
350
,
3
,
'
isoplus
'
,
'
DRE-350-TWIRE
'
):
0.2605
,
(
400
,
3
,
'
isoplus
'
,
'
DRE-400-TWIRE
'
):
0.2684
,
(
450
,
3
,
'
isoplus
'
,
'
DRE-450-TWIRE
'
):
0.2703
,
(
500
,
3
,
'
isoplus
'
,
'
DRE-500-TWIRE
'
):
0.2669
,
(
600
,
3
,
'
isoplus
'
,
'
DRE-600-TWIRE
'
):
0.3065
,
# isoplus twin disconti
(
20
,
1
,
'
isoplus
'
,
'
DRD-20-STD
'
):
0.1830
,
(
25
,
1
,
'
isoplus
'
,
'
DRD-25-STD
'
):
0.1981
,
(
32
,
1
,
'
isoplus
'
,
'
DRD-32-STD
'
):
0.2154
,
(
40
,
1
,
'
isoplus
'
,
'
DRD-40-STD
'
):
0.2573
,
(
50
,
1
,
'
isoplus
'
,
'
DRD-50-STD
'
):
0.2495
,
(
65
,
1
,
'
isoplus
'
,
'
DRD-65-STD
'
):
0.2923
,
(
80
,
1
,
'
isoplus
'
,
'
DRD-80-STD
'
):
0.3343
,
(
100
,
1
,
'
isoplus
'
,
'
DRD-100-STD
'
):
0.3348
,
(
125
,
1
,
'
isoplus
'
,
'
DRD-125-STD
'
):
0.3100
,
(
150
,
1
,
'
isoplus
'
,
'
DRD-150-STD
'
):
0.3763
,
(
200
,
1
,
'
isoplus
'
,
'
DRD-200-STD
'
):
0.4115
,
(
20
,
2
,
'
isoplus
'
,
'
DRD-20-RE
'
):
0.1608
,
(
25
,
2
,
'
isoplus
'
,
'
DRD-25-RE
'
):
0.1700
,
(
32
,
2
,
'
isoplus
'
,
'
DRD-32-RE
'
):
0.1856
,
(
40
,
2
,
'
isoplus
'
,
'
DRD-40-RE
'
):
0.2144
,
(
50
,
2
,
'
isoplus
'
,
'
DRD-50-RE
'
):
0.2076
,
(
65
,
2
,
'
isoplus
'
,
'
DRD-65-RE
'
):
0.2430
,
(
80
,
2
,
'
isoplus
'
,
'
DRD-80-RE
'
):
0.2653
,
(
100
,
2
,
'
isoplus
'
,
'
DRD-100-RE
'
):
0.2635
,
(
125
,
2
,
'
isoplus
'
,
'
DRD-125-RE
'
):
0.2488
,
(
150
,
2
,
'
isoplus
'
,
'
DRD-150-RE
'
):
0.2914
,
(
200
,
2
,
'
isoplus
'
,
'
DRD-200-RE
'
):
0.3037
,
(
20
,
3
,
'
isoplus
'
,
'
DRD-20-TWIRE
'
):
0.1423
,
(
25
,
3
,
'
isoplus
'
,
'
DRD-25-TWIRE
'
):
0.1516
,
(
32
,
3
,
'
isoplus
'
,
'
DRD-32-TWIRE
'
):
0.1661
,
(
40
,
3
,
'
isoplus
'
,
'
DRD-40-TWIRE
'
):
0.1882
,
(
50
,
3
,
'
isoplus
'
,
'
DRD-50-TWIRE
'
):
0.1833
,
(
65
,
3
,
'
isoplus
'
,
'
DRD-65-TWIRE
'
):
0.2074
,
(
80
,
3
,
'
isoplus
'
,
'
DRD-80-TWIRE
'
):
0.2199
,
(
100
,
3
,
'
isoplus
'
,
'
DRD-100-TWIRE
'
):
0.2197
,
(
125
,
3
,
'
isoplus
'
,
'
DRD-125-TWIRE
'
):
0.2126
,
(
150
,
3
,
'
isoplus
'
,
'
DRD-150-TWIRE
'
):
0.2379
}
# *****************************************************************************
# *****************************************************************************
# pipe data
pipedb
=
StandardisedPipeDatabase
(
source
=
pipedata_files
)
# fluid data
fluiddata_file
=
'
fluids/incropera2006_saturated_water.csv
'
fluiddb
=
fic
.
FluidDatabase
(
fluid
=
'
water
'
,
phase
=
'
l
'
,
source
=
fluiddata_file
)
# *****************************************************************************
# *****************************************************************************
# pipe tuples
list_single_pipe_tuples
=
[
pipe_tuple
for
pipe_tuple
in
list_pipe_tuples
if
not
pipedb
.
is_twin
[
pipe_tuple
]
]
list_twin_pipe_tuples
=
[
pipe_tuple
for
pipe_tuple
in
list_pipe_tuples
if
pipedb
.
is_twin
[
pipe_tuple
]
]
# pipe objects
list_single_pipes
=
[
StandardisedPipe
(
pipe_tuple
=
pipe_tuple
,
e_eff
=
pipe_e_eff
,
# override pipe absolute roughness
length
=
pipe_length
,
# override the pipe length
db
=
pipedb
)
for
pipe_tuple
in
list_single_pipe_tuples
]
list_twin_pipes
=
[
StandardisedTwinPipe
(
pipe_tuple
=
pipe_tuple
,
e_eff
=
pipe_e_eff
,
# override pipe absolute roughness
length
=
pipe_length
,
# override the pipe length
db
=
pipedb
)
for
pipe_tuple
in
list_twin_pipe_tuples
]
# *****************************************************************************
# *****************************************************************************
# 3) calculate the pipe efficiency as a function of the pipe diameter
# *****************************************************************************
# create a list of pipe objects
dict_single_trench
=
{}
dict_single_capacity
=
{}
dict_single_heat_transfer_rate
=
{}
dict_twin_trench
=
{}
dict_twin_capacity
=
{}
dict_twin_heat_transfer_rate
=
{}
# for each specific pressure loss level
for
max_specific_pressure_loss
in
list_max_specific_pressure_loss
:
if
len
(
list_single_pipe_tuples
)
!=
0
:
# single pipe trench
single_trench
=
SupplyReturnPipeTrench
(
pipe_center_depth
=
[
pipe_depth
+
pipe
.
d_cas
/
2
for
pipe
in
list_single_pipes
],
pipe_center_distance
=
[
pipe_distance
+
pipe
.
d_cas
for
pipe
in
list_single_pipes
],
fluid_db
=
fluiddb
,
phase
=
fluiddb
.
fluid_LIQUID
,
pressure
=
[
1e5
for
i
in
range
(
len
(
list_single_pipes
))],
supply_temperature
=
[
dh_flow_temperature
for
i
in
range
(
len
(
list_single_pipes
))],
return_temperature
=
[
dh_return_temperature
for
i
in
range
(
len
(
list_single_pipes
))],
max_specific_pressure_loss
=
[
max_specific_pressure_loss
for
i
in
range
(
len
(
list_single_pipes
))],
supply_pipe
=
list_single_pipes
)
assert
single_trench
.
vector_mode
# single pipe trench losses
qs
,
qr
=
single_trench
.
specific_heat_transfer_surroundings
(
ground_thermal_conductivity
=
soil_k
,
ground_air_heat_transfer_coefficient
=
ground_air_heat_transfer_coefficient
,
temperature_surroundings
=
ground_temperature
,
method
=
single_pipe_trench_config
[
0
],
model
=
single_pipe_trench_config
[
1
]
)
single_trench_htr
=
[
_qs
+
_qr
for
_qs
,
_qr
in
zip
(
qs
,
qr
)]
# add lists to the dicts
dict_single_trench
.
update
(
{
max_specific_pressure_loss
:
single_trench
}
)
dict_single_heat_transfer_rate
.
update
(
{
max_specific_pressure_loss
:
single_trench_htr
}
)
dict_single_capacity
.
update
(
{
max_specific_pressure_loss
:
single_trench
.
rated_heat_capacity
()}
)
# *************************************************************************
if
len
(
list_twin_pipes
)
!=
0
:
# twin pipe trench
twin_trench
=
TwinPipeTrench
(
pipe_center_depth
=
[
pipe_depth
+
pipe
.
d_cas
/
2
for
pipe
in
list_twin_pipes
],
fluid_db
=
fluiddb
,
phase
=
fluiddb
.
fluid_LIQUID
,
pressure
=
[
1e5
for
i
in
range
(
len
(
list_twin_pipes
))],
supply_temperature
=
[
dh_flow_temperature
for
i
in
range
(
len
(
list_twin_pipes
))],
return_temperature
=
[
dh_return_temperature
for
i
in
range
(
len
(
list_twin_pipes
))],
max_specific_pressure_loss
=
[
max_specific_pressure_loss
for
i
in
range
(
len
(
list_twin_pipes
))],
supply_pipe
=
list_twin_pipes
)
assert
twin_trench
.
vector_mode
# twin pipe trench losses
qs
,
qr
=
twin_trench
.
specific_heat_transfer_surroundings
(
ground_thermal_conductivity
=
soil_k
,
ground_air_heat_transfer_coefficient
=
ground_air_heat_transfer_coefficient
,
temperature_surroundings
=
ground_temperature
,
method
=
twin_pipe_trench_config
[
0
],
model
=
twin_pipe_trench_config
[
1
]
)
twin_trench_htr
=
[
_qs
+
_qr
for
_qs
,
_qr
in
zip
(
qs
,
qr
)]
# add lists to the dicts
dict_twin_trench
.
update
(
{
max_specific_pressure_loss
:
twin_trench
}
)
dict_twin_heat_transfer_rate
.
update
(
{
max_specific_pressure_loss
:
twin_trench_htr
}
)
dict_twin_capacity
.
update
(
{
max_specific_pressure_loss
:
twin_trench
.
rated_heat_capacity
()}
)
# *************************************************************************
# *****************************************************************************
# *****************************************************************************
# plot the pipe heat losses as a function of pipe specifiction
fig
,
ax
=
plt
.
subplots
()
fig
.
set_size_inches
(
15
,
10
)
model_string_ids
=
[
'
-STD
'
,
'
-RE
'
,
'
-TWIRE
'
]
single_pipe_tuples_per_tech
=
{
i
:
[
pipe_tuple
for
pipe_tuple
in
list_single_pipe_tuples
if
model_string_ids
[
i
]
in
pipe_tuple
[
3
]]
for
i
,
_str
in
enumerate
(
model_string_ids
)
}
twin_pipe_tuples_per_tech
=
{
i
:
[
pipe_tuple
for
pipe_tuple
in
list_twin_pipe_tuples
if
model_string_ids
[
i
]
in
pipe_tuple
[
3
]]
for
i
,
_str
in
enumerate
(
model_string_ids
)
}
for
max_specific_pressure_loss
in
list_max_specific_pressure_loss
:
for
tech_index
,
_single_pipe_tuples
in
single_pipe_tuples_per_tech
.
items
():
_indices
=
[
list_single_pipe_tuples
.
index
(
pipe_tuple
)
for
pipe_tuple
in
_single_pipe_tuples
]
# single pipe
ax
.
plot
(
[
1000
*
list_single_pipes
[
index
].
d_int
for
index
in
_indices
],
[
2
*
u_pipes
[
pipe_tuple
]
*
(
temperature_fluid_bulk
-
ground_temperature
)
for
pipe_tuple
in
_single_pipe_tuples
],
'
ro-
'
,
markersize
=
10
,
label
=
'
topupheat, tech
'
+
str
(
model_string_ids
[
tech_index
])
)
for
tech_index
,
_twin_pipe_tuples
in
twin_pipe_tuples_per_tech
.
items
():
_indices
=
[
list_twin_pipe_tuples
.
index
(
pipe_tuple
)
for
pipe_tuple
in
_twin_pipe_tuples
]
# twin pipe
ax
.
plot
(
[
1000
*
list_twin_pipes
[
index
].
d_int
for
index
in
_indices
],
[
u_pipes
[
pipe_tuple
]
*
(
temperature_fluid_bulk
-
ground_temperature
)
for
pipe_tuple
in
_twin_pipe_tuples
],
'
bo-
'
,
markersize
=
10
,
label
=
'
topupheat, tech
'
+
str
(
model_string_ids
[
tech_index
])
)
# # single pipe
# ax.plot([1000*pipe.d_int for pipe in list_single_pipes],
# [u_pipes[pipe.pipe_tuple]*(temperature_fluid_bulk-ground_temperature)
# for pipe in list_single_pipes],
# 'ro',
# markersize=10,
# label='Single @ '+str(max_specific_pressure_loss)+' Pa/m')
# # twin pipe
# ax.plot([1000*pipe.d_int for pipe in list_twin_pipes],
# [u_pipes[pipe.pipe_tuple]*(temperature_fluid_bulk-ground_temperature)
# for pipe in list_twin_pipes],
# 'go',
# markersize=10,
# label='Twin @ '+str(max_specific_pressure_loss)+' Pa/m')
# ax.plot([1000*single_trench.supply_pipe.d_int
# for single_trench in dict_single_trench[max_specific_pressure_loss]],
# [qloss_line #sum(qloss_line)
# for qloss_line in dict_heat_losses[max_specific_pressure_loss]],
# 'ro-',
# markersize=10,
# label='Results @ '+str(max_specific_pressure_loss)+' Pa/m')
# ax.plot([d_int*1000 for d_int in table_d_int],
# table_losses,
# 'bs-',
# markersize=10,
# label='Röder et al. (2021)')
ax
.
plot
([
1000
*
pipe
.
d_int
for
pipe
in
list_single_pipes
],
[
dict_single_heat_transfer_rate
[
max_specific_pressure_loss
][
i
]
for
i
,
pipe_tuple
in
enumerate
(
list_single_pipe_tuples
)],
'
gx
'
,
markersize
=
10
,
label
=
'
isoplus, 2x single
'
)
ax
.
plot
([
1000
*
pipe
.
d_int
for
pipe
in
list_twin_pipes
],
[
dict_twin_heat_transfer_rate
[
max_specific_pressure_loss
][
i
]
for
i
,
pipe_tuple
in
enumerate
(
list_twin_pipe_tuples
)],
'
k^
'
,
markersize
=
10
,
label
=
'
isoplus, 1x twin
'
)
ax
.
set
(
xlabel
=
'
Nominal diameter (DN)
'
,
ylabel
=
'
Specific heat losses [W/m]
'
,
title
=
'
Specific heat losses as a function of pipe diameter
'
)
ax
.
grid
()
ax
.
legend
()
# fig.savefig("test.png")
plt
.
show
()
# *****************************************************************************
# *****************************************************************************
# *****************************************************************************
# *****************************************************************************
# plot the pipe heat losses as a function of pipe heat capacity
# # Röder2021: http://doi.org/10.5278/ijsepm.6248
# table_phc = [0.07e6,0.08e6,0.1e6,0.2e6,0.35e6,0.6e6,0.800e6,1.495e6,2.05e6,3.95e6]
# table_losses = [7,8,9,8.5,12,16,18,22,31,33] # W/m
# list_losses = [heat/pipe_length for heat in list_heat_transfer_rate]
# fig, ax = plt.subplots()
# ax.plot([-pc for pc in list_pc],
# list_losses)
# ax.plot(table_phc,
# table_losses)
# ax.set(xlabel='pipe heat capacity (kW)',
# ylabel='Specific heat losses [-]',
# title='Specific heat losses as a function of pipe heat capacity')
# ax.grid()
# # fig.savefig("test.png")
# plt.show()
# *****************************************************************************
# *****************************************************************************
# *****************************************************************************
# *****************************************************************************
# *****************************************************************************
# *****************************************************************************
# # plot the pipe heat capacity as a function of the pipe diameter
# # Röder2021: http://doi.org/10.5278/ijsepm.6248
# fig, ax = plt.subplots()
# fig.set_size_inches(15,10)
# for max_specific_pressure_loss in list_max_specific_pressure_loss:
# ax.plot([1000*pipe.d_int
# for pipe in dict_single_trench[max_specific_pressure_loss].supply_pipe],
# [htr/1e3
# for htr in dict_single_capacity[max_specific_pressure_loss]],
# 'ro-',
# label='Results @ '+str(max_specific_pressure_loss)+' Pa/m')
# # *****************************************************************************
# ax.plot(table_dn,
# #[d_int*1000 for d_int in table_d_int],
# table_power,
# 'bx-',
# label='Röder et al. (2021)')
# ax.set(xlabel='Nominal diameter [mm]',
# ylabel='Heat transfer rate [kW]',
# title='Pipe design capacity comparison: own vs Röder et al. (2021)')
# ax.grid()
# ax.legend()
# # fig.savefig("test.png")
# plt.show()
# *****************************************************************************
# *****************************************************************************
# *****************************************************************************
# *****************************************************************************
# *****************************************************************************
# *****************************************************************************
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment