trano 0.1.34__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- LICENSE +21 -0
- trano/__init__.py +37 -0
- trano/data/default.yaml +239 -0
- trano/data/include.py +43 -0
- trano/data_models/__init__.py +0 -0
- trano/data_models/conversion.py +371 -0
- trano/data_models/converter.py +147 -0
- trano/data_models/parameters.yaml +553 -0
- trano/data_models/trano.yaml +582 -0
- trano/data_models/trano_final.yaml +951 -0
- trano/elements/__init__.py +91 -0
- trano/elements/base.py +207 -0
- trano/elements/boundary.py +7 -0
- trano/elements/bus.py +44 -0
- trano/elements/components.py +58 -0
- trano/elements/connection.py +186 -0
- trano/elements/construction.py +236 -0
- trano/elements/control.py +46 -0
- trano/elements/controller_bus.py +201 -0
- trano/elements/element.yaml +197 -0
- trano/elements/envelope.py +289 -0
- trano/elements/figure.py +30 -0
- trano/elements/inputs.py +84 -0
- trano/elements/models/ahu_control.yaml +455 -0
- trano/elements/models/air_handling_unit.yaml +216 -0
- trano/elements/models/boiler.yaml +125 -0
- trano/elements/models/boiler_control.yaml +167 -0
- trano/elements/models/boundary.yaml +32 -0
- trano/elements/models/collector_control.yaml +118 -0
- trano/elements/models/data_bus.yaml +95 -0
- trano/elements/models/duct.yaml +27 -0
- trano/elements/models/emission_control.yaml +150 -0
- trano/elements/models/external_wall.yaml +39 -0
- trano/elements/models/floor_on_ground.yaml +26 -0
- trano/elements/models/internal_element.yaml +66 -0
- trano/elements/models/merged_windows.yaml +36 -0
- trano/elements/models/occupancy.yaml +50 -0
- trano/elements/models/pump.yaml +87 -0
- trano/elements/models/radiator.yaml +70 -0
- trano/elements/models/space.yaml +362 -0
- trano/elements/models/split_valve.yaml +36 -0
- trano/elements/models/temperature_sensor.yaml +40 -0
- trano/elements/models/three_way_valve.yaml +39 -0
- trano/elements/models/three_way_valve_control.yaml +88 -0
- trano/elements/models/valve.yaml +41 -0
- trano/elements/models/vav.yaml +126 -0
- trano/elements/models/vav_control.yaml +409 -0
- trano/elements/models/weather.yaml +51 -0
- trano/elements/models/window.yaml +36 -0
- trano/elements/parameters.py +106 -0
- trano/elements/space.py +191 -0
- trano/elements/system.py +79 -0
- trano/elements/types.py +59 -0
- trano/elements/utils.py +61 -0
- trano/exceptions.py +9 -0
- trano/library/library.py +161 -0
- trano/library/library.yaml +239 -0
- trano/main.py +64 -0
- trano/plot/__init__.py +0 -0
- trano/plot/plot.py +201 -0
- trano/reporting/__init__.py +0 -0
- trano/reporting/docx.py +123 -0
- trano/reporting/html.py +69 -0
- trano/reporting/reporting.py +223 -0
- trano/reporting/types.py +110 -0
- trano/reporting/utils.py +309 -0
- trano/scripts/__init__.py +0 -0
- trano/scripts/parse.py +242 -0
- trano/scripts/schema.py +20 -0
- trano/simulate/__init__.py +0 -0
- trano/simulate/configure.mos +6 -0
- trano/simulate/simulate.py +120 -0
- trano/templates/Trano.jinja2 +2025 -0
- trano/templates/base.jinja2 +31 -0
- trano/templates/macros.jinja2 +40 -0
- trano/topology.py +597 -0
- trano/utils/__init__.py +0 -0
- trano/utils/utils.py +18 -0
- trano-0.1.34.dist-info/LICENSE +21 -0
- trano-0.1.34.dist-info/METADATA +51 -0
- trano-0.1.34.dist-info/RECORD +82 -0
- trano-0.1.34.dist-info/WHEEL +4 -0
LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Ando Andriamamonjy
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
trano/__init__.py
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import logging.config
|
|
2
|
+
|
|
3
|
+
LOGGING_CONFIG = {
|
|
4
|
+
"version": 1,
|
|
5
|
+
"disable_existing_loggers": False,
|
|
6
|
+
"formatters": {
|
|
7
|
+
"standard": {
|
|
8
|
+
"format": "%(asctime)s [%(levelname)s] %(name)s: [%(funcName)s] %(message)s"
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
"handlers": {
|
|
12
|
+
"console": {
|
|
13
|
+
"level": "ERROR",
|
|
14
|
+
"class": "logging.StreamHandler",
|
|
15
|
+
"formatter": "standard",
|
|
16
|
+
},
|
|
17
|
+
"file": {
|
|
18
|
+
"level": "DEBUG",
|
|
19
|
+
"class": "logging.FileHandler",
|
|
20
|
+
"formatter": "standard",
|
|
21
|
+
"filename": "trano.log",
|
|
22
|
+
"mode": "w+",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
"loggers": {
|
|
26
|
+
"": {
|
|
27
|
+
"handlers": ["console", "file"],
|
|
28
|
+
"level": "DEBUG",
|
|
29
|
+
"propagate": True,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
logging.config.dictConfig(LOGGING_CONFIG)
|
|
36
|
+
logging.getLogger("docker").setLevel(logging.CRITICAL)
|
|
37
|
+
logging.getLogger("urllib3").setLevel(logging.CRITICAL)
|
trano/data/default.yaml
ADDED
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
constructions:
|
|
2
|
+
- id: FLOORONGROUND:001
|
|
3
|
+
layers:
|
|
4
|
+
- material: CONCRETE:001
|
|
5
|
+
thickness: 0.2
|
|
6
|
+
- material: ROCKWOOL:001
|
|
7
|
+
thickness: 0.1
|
|
8
|
+
- material: SCREED:001
|
|
9
|
+
thickness: 0.08
|
|
10
|
+
- material: CONCRETE:001
|
|
11
|
+
thickness: 0.015
|
|
12
|
+
- id: CONCRETESLAB:001
|
|
13
|
+
layers:
|
|
14
|
+
- material: CONCRETE:001
|
|
15
|
+
thickness: 0.125
|
|
16
|
+
- material: CONCRETE:001
|
|
17
|
+
thickness: 0.125
|
|
18
|
+
- id: TABS:001
|
|
19
|
+
layers:
|
|
20
|
+
- material: CONCRETE:001
|
|
21
|
+
thickness: 0.125
|
|
22
|
+
- material: CONCRETE:001
|
|
23
|
+
thickness: 0.125
|
|
24
|
+
- material: ROCKWOOL:001
|
|
25
|
+
thickness: 0.01
|
|
26
|
+
- material: SCREED:001
|
|
27
|
+
thickness: 0.05
|
|
28
|
+
- material: TILE:001
|
|
29
|
+
thickness: 0.005
|
|
30
|
+
- id: INSULATEDFLOORHEATING:001
|
|
31
|
+
layers:
|
|
32
|
+
- material: CONCRETE:001
|
|
33
|
+
thickness: 0.1
|
|
34
|
+
- material: PUR:001
|
|
35
|
+
thickness: 0.07
|
|
36
|
+
- material: SCREED:001
|
|
37
|
+
thickness: 0.05
|
|
38
|
+
- material: TILE:001
|
|
39
|
+
thickness: 0.01
|
|
40
|
+
- id: CAVITYWALL:001
|
|
41
|
+
layers:
|
|
42
|
+
- material: BRICK:001
|
|
43
|
+
thickness: 0.08
|
|
44
|
+
- material: ROCKWOOL:001
|
|
45
|
+
thickness: 0.1
|
|
46
|
+
- material: BRICKHOLLOW:001
|
|
47
|
+
thickness: 0.14
|
|
48
|
+
- material: GYPSUM:001
|
|
49
|
+
thickness: 0.015
|
|
50
|
+
- id: CAVITYWALLPARTIALFILL:001
|
|
51
|
+
layers:
|
|
52
|
+
- material: BRICK:001
|
|
53
|
+
thickness: 0.08
|
|
54
|
+
- material: AIR:001
|
|
55
|
+
thickness: 0.03
|
|
56
|
+
- material: ROCKWOOL:001
|
|
57
|
+
thickness: 0.1
|
|
58
|
+
- material: BRICKHOLLOW:001
|
|
59
|
+
thickness: 0.14
|
|
60
|
+
- material: GYPSUM:001
|
|
61
|
+
thickness: 0.015
|
|
62
|
+
gas:
|
|
63
|
+
- density: 5.46
|
|
64
|
+
id: XENON:001
|
|
65
|
+
longwave_emissivity: 0.0
|
|
66
|
+
shortwave_emissivity: 0.0
|
|
67
|
+
specific_heat_capacity: 158.0
|
|
68
|
+
thermal_conductivity: 0.0055
|
|
69
|
+
- density: 1.2
|
|
70
|
+
id: AIR:001
|
|
71
|
+
longwave_emissivity: 0.0
|
|
72
|
+
shortwave_emissivity: 0.0
|
|
73
|
+
specific_heat_capacity: 1006.0
|
|
74
|
+
thermal_conductivity: 0.0256
|
|
75
|
+
- density: 3.48
|
|
76
|
+
id: KRYPTON:001
|
|
77
|
+
longwave_emissivity: 0.0
|
|
78
|
+
shortwave_emissivity: 0.0
|
|
79
|
+
specific_heat_capacity: 248.0
|
|
80
|
+
thermal_conductivity: 0.0092
|
|
81
|
+
- density: 1.66
|
|
82
|
+
id: ARGON:001
|
|
83
|
+
longwave_emissivity: 0.0
|
|
84
|
+
shortwave_emissivity: 0.0
|
|
85
|
+
specific_heat_capacity: 522.0
|
|
86
|
+
thermal_conductivity: 0.0174
|
|
87
|
+
glass_material:
|
|
88
|
+
- density: 2500.0
|
|
89
|
+
id: GLASS:001
|
|
90
|
+
longwave_emissivity: 0.84
|
|
91
|
+
shortwave_emissivity: 0.67
|
|
92
|
+
specific_heat_capacity: 840.0
|
|
93
|
+
thermal_conductivity: 1.0
|
|
94
|
+
glazings:
|
|
95
|
+
- id: INS2AR2020:001
|
|
96
|
+
layers:
|
|
97
|
+
- glass: GLASS:001
|
|
98
|
+
thickness: 0.006
|
|
99
|
+
- gas: ARGON:001
|
|
100
|
+
thickness: 0.016
|
|
101
|
+
- glass: GLASS:001
|
|
102
|
+
thickness: 0.006
|
|
103
|
+
- id: INS3AR2020:001
|
|
104
|
+
layers:
|
|
105
|
+
- glass: GLASS:001
|
|
106
|
+
thickness: 0.006
|
|
107
|
+
- gas: ARGON:001
|
|
108
|
+
thickness: 0.016
|
|
109
|
+
- glass: GLASS:001
|
|
110
|
+
thickness: 0.006
|
|
111
|
+
- gas: ARGON:001
|
|
112
|
+
thickness: 0.016
|
|
113
|
+
- glass: GLASS:001
|
|
114
|
+
thickness: 0.006
|
|
115
|
+
- id: EPCDOUBLE:001
|
|
116
|
+
layers:
|
|
117
|
+
- glass: GLASS:001
|
|
118
|
+
thickness: 0.0038
|
|
119
|
+
- gas: AIR:001
|
|
120
|
+
thickness: 0.012
|
|
121
|
+
- glass: GLASS:001
|
|
122
|
+
thickness: 0.0038
|
|
123
|
+
- id: EPCSINGLE:001
|
|
124
|
+
layers:
|
|
125
|
+
- glass: GLASS:001
|
|
126
|
+
thickness: 0.0038
|
|
127
|
+
material:
|
|
128
|
+
- density: 1920.0
|
|
129
|
+
id: BRICK:001
|
|
130
|
+
longwave_emissivity: 0.88
|
|
131
|
+
shortwave_emissivity: 0.55
|
|
132
|
+
specific_heat_capacity: 800.0
|
|
133
|
+
thermal_conductivity: 0.89
|
|
134
|
+
- density: 2700.0
|
|
135
|
+
id: SLATE:001
|
|
136
|
+
longwave_emissivity: 0.97
|
|
137
|
+
shortwave_emissivity: 0.9
|
|
138
|
+
specific_heat_capacity: 1260.0
|
|
139
|
+
thermal_conductivity: 1.44
|
|
140
|
+
- density: 640.0
|
|
141
|
+
id: GYPSUMBOARD:001
|
|
142
|
+
longwave_emissivity: 0.85
|
|
143
|
+
shortwave_emissivity: 0.65
|
|
144
|
+
specific_heat_capacity: 1150.0
|
|
145
|
+
thermal_conductivity: 0.16
|
|
146
|
+
- density: 2240.0
|
|
147
|
+
id: CONCRETE:001
|
|
148
|
+
longwave_emissivity: 0.88
|
|
149
|
+
shortwave_emissivity: 0.55
|
|
150
|
+
specific_heat_capacity: 900.0
|
|
151
|
+
thermal_conductivity: 1.4
|
|
152
|
+
- density: 2100.0
|
|
153
|
+
id: TILE:001
|
|
154
|
+
longwave_emissivity: 0.88
|
|
155
|
+
shortwave_emissivity: 0.55
|
|
156
|
+
specific_heat_capacity: 840.0
|
|
157
|
+
thermal_conductivity: 1.4
|
|
158
|
+
- density: 1120.0
|
|
159
|
+
id: GYPSUM:001
|
|
160
|
+
longwave_emissivity: 0.85
|
|
161
|
+
shortwave_emissivity: 0.65
|
|
162
|
+
specific_heat_capacity: 840.0
|
|
163
|
+
thermal_conductivity: 0.38
|
|
164
|
+
- density: 2000.0
|
|
165
|
+
id: SCREED:001
|
|
166
|
+
longwave_emissivity: 0.88
|
|
167
|
+
shortwave_emissivity: 0.55
|
|
168
|
+
specific_heat_capacity: 1000.0
|
|
169
|
+
thermal_conductivity: 1.3
|
|
170
|
+
- density: 1600.0
|
|
171
|
+
id: GROUND:001
|
|
172
|
+
longwave_emissivity: 0.88
|
|
173
|
+
shortwave_emissivity: 0.68
|
|
174
|
+
specific_heat_capacity: 1250.0
|
|
175
|
+
thermal_conductivity: 2.0
|
|
176
|
+
- density: 540.0
|
|
177
|
+
id: PLYWOOD:001
|
|
178
|
+
longwave_emissivity: 0.86
|
|
179
|
+
shortwave_emissivity: 0.44
|
|
180
|
+
specific_heat_capacity: 1880.0
|
|
181
|
+
thermal_conductivity: 0.15
|
|
182
|
+
- density: 850.0
|
|
183
|
+
id: BRICKHOLLOW:001
|
|
184
|
+
longwave_emissivity: 0.88
|
|
185
|
+
shortwave_emissivity: 0.55
|
|
186
|
+
specific_heat_capacity: 880.0
|
|
187
|
+
thermal_conductivity: 0.3
|
|
188
|
+
- density: 350.0
|
|
189
|
+
id: YTONG:001
|
|
190
|
+
longwave_emissivity: 0.8
|
|
191
|
+
shortwave_emissivity: 0.8
|
|
192
|
+
specific_heat_capacity: 1000.0
|
|
193
|
+
thermal_conductivity: 0.09
|
|
194
|
+
- density: 24.0
|
|
195
|
+
id: EPS:001
|
|
196
|
+
longwave_emissivity: 0.8
|
|
197
|
+
shortwave_emissivity: 0.8
|
|
198
|
+
specific_heat_capacity: 1500.0
|
|
199
|
+
thermal_conductivity: 0.035
|
|
200
|
+
- density: 1.23
|
|
201
|
+
id: NONE:001
|
|
202
|
+
longwave_emissivity: 0.8
|
|
203
|
+
shortwave_emissivity: 0.8
|
|
204
|
+
specific_heat_capacity: 1008.0
|
|
205
|
+
thermal_conductivity: 1000.0
|
|
206
|
+
- density: 120.0
|
|
207
|
+
id: CELLULARGLASS:001
|
|
208
|
+
specific_heat_capacity: 800.0
|
|
209
|
+
thermal_conductivity: 0.042
|
|
210
|
+
- density: 40.0
|
|
211
|
+
id: PF:001
|
|
212
|
+
specific_heat_capacity: 1400.0
|
|
213
|
+
thermal_conductivity: 0.02
|
|
214
|
+
- density: 100.0
|
|
215
|
+
id: ROCKWOOL:001
|
|
216
|
+
longwave_emissivity: 0.8
|
|
217
|
+
shortwave_emissivity: 0.8
|
|
218
|
+
specific_heat_capacity: 800.0
|
|
219
|
+
thermal_conductivity: 0.035
|
|
220
|
+
- density: 40.0
|
|
221
|
+
id: PUR:001
|
|
222
|
+
longwave_emissivity: 0.8
|
|
223
|
+
shortwave_emissivity: 0.8
|
|
224
|
+
specific_heat_capacity: 1500.0
|
|
225
|
+
thermal_conductivity: 0.025
|
|
226
|
+
- density: 30.0
|
|
227
|
+
id: XPS:001
|
|
228
|
+
longwave_emissivity: 0.8
|
|
229
|
+
shortwave_emissivity: 0.8
|
|
230
|
+
specific_heat_capacity: 1500.0
|
|
231
|
+
thermal_conductivity: 0.03
|
|
232
|
+
- density: 30.0
|
|
233
|
+
id: PIR:001
|
|
234
|
+
specific_heat_capacity: 1500.0
|
|
235
|
+
thermal_conductivity: 0.025
|
|
236
|
+
- density: 60.0
|
|
237
|
+
id: GLASSWOOL:001
|
|
238
|
+
specific_heat_capacity: 800.0
|
|
239
|
+
thermal_conductivity: 0.035
|
trano/data/include.py
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import json
|
|
2
|
+
import os
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
from typing import IO, Any
|
|
5
|
+
|
|
6
|
+
import yaml
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class Loader(yaml.SafeLoader):
|
|
10
|
+
"""YAML Loader with `!include` constructor."""
|
|
11
|
+
|
|
12
|
+
def __init__(self, stream: IO) -> None: # type: ignore
|
|
13
|
+
"""Initialise Loader."""
|
|
14
|
+
|
|
15
|
+
try:
|
|
16
|
+
self._root = os.path.split(stream.name)[0]
|
|
17
|
+
except AttributeError:
|
|
18
|
+
self._root = os.path.curdir
|
|
19
|
+
|
|
20
|
+
super().__init__(stream)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def include_default(loader: Loader, node: yaml.Node) -> Any: # noqa: ANN401
|
|
24
|
+
filename = Path(__file__).parent.joinpath("default.yaml")
|
|
25
|
+
|
|
26
|
+
return _load(filename)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def _load(filename: Path) -> Any: # noqa: ANN401
|
|
30
|
+
with filename.open("r") as f:
|
|
31
|
+
if filename.suffix in (".yaml", ".yml"):
|
|
32
|
+
return yaml.load(f, Loader) # noqa: S506
|
|
33
|
+
elif filename.suffix == ".json":
|
|
34
|
+
return json.load(f)
|
|
35
|
+
else:
|
|
36
|
+
return "".join(f.readlines())
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
yaml.add_constructor(
|
|
40
|
+
"!include_default",
|
|
41
|
+
include_default,
|
|
42
|
+
Loader,
|
|
43
|
+
)
|
|
File without changes
|