tespy 0.0.2__tar.gz → 0.0.3__tar.gz
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.
- {TESPy-0.0.2 → TESPy-0.0.3}/PKG-INFO +5 -4
- {TESPy-0.0.2 → TESPy-0.0.3}/README.rst +2 -2
- {TESPy-0.0.2 → TESPy-0.0.3}/TESPy.egg-info/PKG-INFO +5 -4
- {TESPy-0.0.2 → TESPy-0.0.3}/TESPy.egg-info/SOURCES.txt +1 -1
- TESPy-0.0.3/TESPy.egg-info/requires.txt +5 -0
- {TESPy-0.0.2 → TESPy-0.0.3}/setup.cfg +0 -1
- {TESPy-0.0.2 → TESPy-0.0.3}/setup.py +1 -1
- {TESPy-0.0.2 → TESPy-0.0.3}/tespy/__init__.py +1 -1
- {TESPy-0.0.2 → TESPy-0.0.3}/tespy/components/characteristics.py +87 -64
- {TESPy-0.0.2 → TESPy-0.0.3}/tespy/components/components.py +1726 -678
- {TESPy-0.0.2 → TESPy-0.0.3}/tespy/connections.py +17 -32
- {TESPy-0.0.2 → TESPy-0.0.3}/tespy/helpers.py +657 -367
- TESPy-0.0.3/tespy/network_reader.py +313 -0
- {TESPy-0.0.2 → TESPy-0.0.3}/tespy/networks.py +310 -260
- TESPy-0.0.2/TESPy.egg-info/requires.txt +0 -5
- TESPy-0.0.2/tespy/csv_reader.py +0 -86
- {TESPy-0.0.2 → TESPy-0.0.3}/TESPy.egg-info/dependency_links.txt +0 -0
- {TESPy-0.0.2 → TESPy-0.0.3}/TESPy.egg-info/top_level.txt +0 -0
- {TESPy-0.0.2 → TESPy-0.0.3}/tespy/components/__init__.py +0 -0
- {TESPy-0.0.2 → TESPy-0.0.3}/tespy/components/subsystems.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 1.
|
|
1
|
+
Metadata-Version: 1.2
|
|
2
2
|
Name: TESPy
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.3
|
|
4
4
|
Summary: Thermal Engineering Systems in Python (TESPy)
|
|
5
5
|
Home-page: http://github.com/oemof/tespy
|
|
6
6
|
Author: Francesco Witte
|
|
@@ -34,7 +34,7 @@ Description: TESPy stands for "Thermal Engineering Systems in Python" and provid
|
|
|
34
34
|
|
|
35
35
|
pip install tespy
|
|
36
36
|
|
|
37
|
-
If you want to use the latest features, you might want to install the **developer version**. See section `
|
|
37
|
+
If you want to use the latest features, you might want to install the **developer version**. See section `Developing TESPy <http://tespy.readthedocs.io/en/latest/developing_tespy.html>`_ for more information. The developer version is not recommended for productive use.
|
|
38
38
|
|
|
39
39
|
Examples
|
|
40
40
|
========
|
|
@@ -50,7 +50,8 @@ Description: TESPy stands for "Thermal Engineering Systems in Python" and provid
|
|
|
50
50
|
|
|
51
51
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
52
52
|
|
|
53
|
-
You should have received a copy of the GNU General Public License along with this program.
|
|
53
|
+
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
Platform: UNKNOWN
|
|
57
|
+
Requires-Python: >=3
|
|
@@ -26,7 +26,7 @@ If you have a working Python3 environment, use pypi to install the latest tespy
|
|
|
26
26
|
|
|
27
27
|
pip install tespy
|
|
28
28
|
|
|
29
|
-
If you want to use the latest features, you might want to install the **developer version**. See section `
|
|
29
|
+
If you want to use the latest features, you might want to install the **developer version**. See section `Developing TESPy <http://tespy.readthedocs.io/en/latest/developing_tespy.html>`_ for more information. The developer version is not recommended for productive use.
|
|
30
30
|
|
|
31
31
|
Examples
|
|
32
32
|
========
|
|
@@ -42,5 +42,5 @@ This program is free software: you can redistribute it and/or modify it under th
|
|
|
42
42
|
|
|
43
43
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
44
44
|
|
|
45
|
-
You should have received a copy of the GNU General Public License along with this program.
|
|
45
|
+
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
|
|
46
46
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 1.
|
|
1
|
+
Metadata-Version: 1.2
|
|
2
2
|
Name: TESPy
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.3
|
|
4
4
|
Summary: Thermal Engineering Systems in Python (TESPy)
|
|
5
5
|
Home-page: http://github.com/oemof/tespy
|
|
6
6
|
Author: Francesco Witte
|
|
@@ -34,7 +34,7 @@ Description: TESPy stands for "Thermal Engineering Systems in Python" and provid
|
|
|
34
34
|
|
|
35
35
|
pip install tespy
|
|
36
36
|
|
|
37
|
-
If you want to use the latest features, you might want to install the **developer version**. See section `
|
|
37
|
+
If you want to use the latest features, you might want to install the **developer version**. See section `Developing TESPy <http://tespy.readthedocs.io/en/latest/developing_tespy.html>`_ for more information. The developer version is not recommended for productive use.
|
|
38
38
|
|
|
39
39
|
Examples
|
|
40
40
|
========
|
|
@@ -50,7 +50,8 @@ Description: TESPy stands for "Thermal Engineering Systems in Python" and provid
|
|
|
50
50
|
|
|
51
51
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
52
52
|
|
|
53
|
-
You should have received a copy of the GNU General Public License along with this program.
|
|
53
|
+
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
Platform: UNKNOWN
|
|
57
|
+
Requires-Python: >=3
|
|
@@ -8,8 +8,8 @@ TESPy.egg-info/requires.txt
|
|
|
8
8
|
TESPy.egg-info/top_level.txt
|
|
9
9
|
tespy/__init__.py
|
|
10
10
|
tespy/connections.py
|
|
11
|
-
tespy/csv_reader.py
|
|
12
11
|
tespy/helpers.py
|
|
12
|
+
tespy/network_reader.py
|
|
13
13
|
tespy/networks.py
|
|
14
14
|
tespy/components/__init__.py
|
|
15
15
|
tespy/components/characteristics.py
|
|
@@ -323,7 +323,9 @@ class characteristics:
|
|
|
323
323
|
**allowed keywords** in kwargs (also see characteristics.attr()):
|
|
324
324
|
|
|
325
325
|
- x, y (*numeric*) - values for function parameters x and function values y
|
|
326
|
-
- method (*str*) - method
|
|
326
|
+
- method (*str*) - keyword method is necessary, if you do not provide any
|
|
327
|
+
x or y data. TESPy will use the characteristics as stated in the
|
|
328
|
+
subclasses
|
|
327
329
|
"""
|
|
328
330
|
|
|
329
331
|
def __init__(self, **kwargs):
|
|
@@ -363,6 +365,21 @@ class characteristics:
|
|
|
363
365
|
def f_x(self, x):
|
|
364
366
|
return self.char(x)
|
|
365
367
|
|
|
368
|
+
def get_attr(self, key):
|
|
369
|
+
"""
|
|
370
|
+
get the value of a characteristics attribute
|
|
371
|
+
|
|
372
|
+
:param key: attribute to return its value
|
|
373
|
+
:type key: str
|
|
374
|
+
:returns:
|
|
375
|
+
- :code:`self.__dict__[key]` if object has attribute key
|
|
376
|
+
- :code:`None` if object has no attribute key
|
|
377
|
+
"""
|
|
378
|
+
if key in self.__dict__:
|
|
379
|
+
return self.__dict__[key]
|
|
380
|
+
else:
|
|
381
|
+
return None
|
|
382
|
+
|
|
366
383
|
|
|
367
384
|
class turbine(characteristics):
|
|
368
385
|
r"""
|
|
@@ -375,7 +392,6 @@ class turbine(characteristics):
|
|
|
375
392
|
|
|
376
393
|
**literature**
|
|
377
394
|
|
|
378
|
-
- EBSILON®Professional -> (EBS_ST, EBS_GT)
|
|
379
395
|
- Walter Traupel (2001): Thermische Turbomaschinen Band 2. Berlin: Spinger.
|
|
380
396
|
-> TRAUPEL
|
|
381
397
|
"""
|
|
@@ -383,14 +399,14 @@ class turbine(characteristics):
|
|
|
383
399
|
def default(self, key):
|
|
384
400
|
r"""
|
|
385
401
|
|
|
386
|
-
default characteristic lines for turbines
|
|
387
|
-
cases
|
|
402
|
+
default **characteristic lines** for turbines **are designed for the
|
|
403
|
+
following cases**:
|
|
388
404
|
|
|
389
405
|
\frac{\eta_\mathrm{s,t}}{\eta_\mathrm{s,t,ref}}=f\left(X \right)
|
|
390
406
|
|
|
391
407
|
available lines characteristics:
|
|
392
408
|
|
|
393
|
-
**
|
|
409
|
+
**GENERIC**
|
|
394
410
|
|
|
395
411
|
.. math::
|
|
396
412
|
|
|
@@ -405,19 +421,22 @@ class turbine(characteristics):
|
|
|
405
421
|
\text{pressure ratio}
|
|
406
422
|
\end{cases}
|
|
407
423
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
X=f\left(
|
|
413
|
-
\frac{\dot{m}}{\dot{m}_{ref}} \right)
|
|
424
|
+
.. image:: _images/GENERIC.svg
|
|
425
|
+
:scale: 100 %
|
|
426
|
+
:alt: alternative text
|
|
427
|
+
:align: center
|
|
414
428
|
|
|
415
429
|
**TRAUPEL**
|
|
416
430
|
|
|
417
431
|
.. math::
|
|
418
432
|
|
|
419
|
-
X
|
|
420
|
-
\sqrt{\Delta h_\mathrm{s,ref}}}{\sqrt{\Delta h_\mathrm{s}}}
|
|
433
|
+
X=\frac{
|
|
434
|
+
\sqrt{\Delta h_\mathrm{s,ref}}}{\sqrt{\Delta h_\mathrm{s}}}
|
|
435
|
+
|
|
436
|
+
.. image:: _images/TRAUPEL.svg
|
|
437
|
+
:scale: 100 %
|
|
438
|
+
:alt: alternative text
|
|
439
|
+
:align: center
|
|
421
440
|
"""
|
|
422
441
|
|
|
423
442
|
if key == 'default':
|
|
@@ -426,14 +445,8 @@ class turbine(characteristics):
|
|
|
426
445
|
x = {}
|
|
427
446
|
y = {}
|
|
428
447
|
|
|
429
|
-
x['
|
|
430
|
-
|
|
431
|
-
y['EBS_ST'] = np.array([0.98, 0.991, 0.993, 0.995, 0.9975,
|
|
432
|
-
0.999, 0.9998, 1, 0.9995, 0.995])
|
|
433
|
-
|
|
434
|
-
x['EBS_GT'] = np.array([0, 0.4, 0.7, 1, 1.2])
|
|
435
|
-
y['EBS_GT'] = np.array([0.85, 0.9, 0.95, 1, 1.1])
|
|
436
|
-
|
|
448
|
+
x['GENERIC'] = np.array([0, 0.5, 0.8, 0.95, 1, 1.05, 1.2])
|
|
449
|
+
y['GENERIC'] = np.array([0.975, 0.985, 0.994, 0.999, 1, 0.999, 0.99])
|
|
437
450
|
x['TRAUPEL'] = np.array([0.0, 0.1905, 0.3810, 0.5714, 0.7619, 0.9524,
|
|
438
451
|
1.0, 1.1429, 1.3333, 1.5238, 1.7143, 1.9048])
|
|
439
452
|
y['TRAUPEL'] = np.array([0.0, 0.3975, 0.6772, 0.8581, 0.9593, 0.9985,
|
|
@@ -450,17 +463,13 @@ class heat_ex(characteristics):
|
|
|
450
463
|
- links heat transfer coefficient :math:`kA` to keyfigures
|
|
451
464
|
- different default characteristic lines available for different types of
|
|
452
465
|
heat exchangers (see method heat_exchanger.default())
|
|
453
|
-
|
|
454
|
-
**literature**
|
|
455
|
-
|
|
456
|
-
- EBSILON®Professional
|
|
457
466
|
"""
|
|
458
467
|
|
|
459
468
|
def default(self, key):
|
|
460
469
|
r"""
|
|
461
470
|
|
|
462
|
-
default characteristic lines for heat exchangers
|
|
463
|
-
following cases
|
|
471
|
+
default **characteristic lines** for heat exchangers **are designed for
|
|
472
|
+
the following cases**:
|
|
464
473
|
|
|
465
474
|
.. math::
|
|
466
475
|
|
|
@@ -471,9 +480,41 @@ class heat_ex(characteristics):
|
|
|
471
480
|
|
|
472
481
|
**condensing fluid** (COND)
|
|
473
482
|
|
|
483
|
+
.. image:: _images/COND_HOT.svg
|
|
484
|
+
:scale: 100 %
|
|
485
|
+
:alt: alternative text
|
|
486
|
+
:align: center
|
|
487
|
+
|
|
488
|
+
.. image:: _images/COND_COLD.svg
|
|
489
|
+
:scale: 100 %
|
|
490
|
+
:alt: alternative text
|
|
491
|
+
:align: center
|
|
492
|
+
|
|
474
493
|
**economiser, evaporator, superheater** (EVA)
|
|
475
494
|
|
|
495
|
+
.. image:: _images/EVA_HOT.svg
|
|
496
|
+
:scale: 100 %
|
|
497
|
+
:alt: alternative text
|
|
498
|
+
:align: center
|
|
499
|
+
|
|
500
|
+
.. image:: _images/EVA_COLD.svg
|
|
501
|
+
:scale: 100 %
|
|
502
|
+
:alt: alternative text
|
|
503
|
+
:align: center
|
|
504
|
+
|
|
505
|
+
|
|
476
506
|
**heat exchanger without phase change** (HE)
|
|
507
|
+
|
|
508
|
+
.. image:: _images/HE_HOT.svg
|
|
509
|
+
:scale: 100 %
|
|
510
|
+
:alt: alternative text
|
|
511
|
+
:align: center
|
|
512
|
+
|
|
513
|
+
.. image:: _images/HE_COLD.svg
|
|
514
|
+
:scale: 100 %
|
|
515
|
+
:alt: alternative text
|
|
516
|
+
:align: center
|
|
517
|
+
|
|
477
518
|
"""
|
|
478
519
|
|
|
479
520
|
if key == 'default':
|
|
@@ -486,67 +527,49 @@ class heat_ex(characteristics):
|
|
|
486
527
|
0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75,
|
|
487
528
|
0.8, 0.85, 0.9, 0.95, 1, 1.5, 2])
|
|
488
529
|
y['COND_HOT'] = np.array(
|
|
489
|
-
[0.
|
|
490
|
-
0.
|
|
491
|
-
0.
|
|
492
|
-
0.971948814, 0.977216972, 0.981954722, 0.986241309,
|
|
493
|
-
0.990140862, 0.993705593, 0.996980089, 1,
|
|
494
|
-
1.021079344, 1.033356087])
|
|
530
|
+
[0.030, 0.158, 0.344, 0.567, 0.838, 0.888, 0.906, 0.921, 0.933,
|
|
531
|
+
0.943, 0.952, 0.959, 0.966, 0.972, 0.977, 0.982, 0.986, 0.990,
|
|
532
|
+
0.994, 0.997, 1.000, 1.021, 1.033])
|
|
495
533
|
|
|
496
534
|
x['COND_COLD'] = np.array([0.01, 0.04, 0.07, 0.11, 0.15, 0.2, 0.25,
|
|
497
535
|
0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65,
|
|
498
536
|
0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1, 1.5, 2])
|
|
499
537
|
y['COND_COLD'] = np.array(
|
|
500
|
-
[0.
|
|
501
|
-
0.
|
|
502
|
-
0.
|
|
503
|
-
0.648375355, 0.691240341, 0.732981162, 0.773690063,
|
|
504
|
-
0.813445241, 0.852314326, 0.890355383, 0.927620578,
|
|
505
|
-
0.96415523, 1, 1.32719114, 1.611507617])
|
|
538
|
+
[0.019, 0.075, 0.134, 0.192, 0.243, 0.303, 0.359, 0.412, 0.463,
|
|
539
|
+
0.512, 0.559, 0.604, 0.648, 0.691, 0.733, 0.774, 0.813, 0.852,
|
|
540
|
+
0.890, 0.928, 0.964, 1.000, 1.327, 1.612])
|
|
506
541
|
|
|
507
542
|
x['EVA_HOT'] = np.array([0.01, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35,
|
|
508
543
|
0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75,
|
|
509
544
|
0.8, 0.85, 0.9, 0.95, 1, 1.5, 2])
|
|
510
545
|
y['EVA_HOT'] = np.array(
|
|
511
|
-
[0.
|
|
512
|
-
0.
|
|
513
|
-
0.
|
|
514
|
-
0.729874262, 0.766801896, 0.802672745, 0.837578965,
|
|
515
|
-
0.871597681, 0.904795341, 0.937229127, 0.968949206,
|
|
516
|
-
1, 1.280887381, 1.522736893])
|
|
546
|
+
[0.030, 0.158, 0.245, 0.313, 0.373, 0.427, 0.477, 0.524, 0.569,
|
|
547
|
+
0.611, 0.652, 0.692, 0.730, 0.767, 0.803, 0.838, 0.872, 0.905,
|
|
548
|
+
0.937, 0.969, 1.000, 1.281, 1.523])
|
|
517
549
|
|
|
518
550
|
x['EVA_COLD'] = np.array([0.01, 0.04, 0.07, 0.11, 0.15, 0.2, 0.25,
|
|
519
551
|
0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65,
|
|
520
|
-
0.7, 0.
|
|
552
|
+
0.7, 0.8, 1, 2])
|
|
521
553
|
y['EVA_COLD'] = np.array(
|
|
522
|
-
[0.
|
|
523
|
-
0.
|
|
524
|
-
|
|
525
|
-
0.993588025, 0.995293228, 0.996578973, 0.997548422,
|
|
526
|
-
0.998278986, 0.99883052, 0.999248543, 0.99956641,
|
|
527
|
-
0.99981029, 1, 1.000821953, 1.001399035])
|
|
554
|
+
[0.018, 0.075, 0.134, 0.215, 0.300, 0.412, 0.531, 0.658, 0.794,
|
|
555
|
+
0.934, 0.988, 0.991, 0.994, 0.995, 0.997, 0.998, 0.999, 1.000,
|
|
556
|
+
1.001])
|
|
528
557
|
|
|
529
558
|
x['HE_HOT'] = np.array([0.01, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35,
|
|
530
559
|
0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75,
|
|
531
560
|
0.8, 0.85, 0.9, 0.95, 1, 1.5, 2])
|
|
532
561
|
y['HE_HOT'] = np.array(
|
|
533
|
-
[0.
|
|
534
|
-
0.
|
|
535
|
-
0.
|
|
536
|
-
0.838728656, 0.863589075, 0.886802791, 0.908551927,
|
|
537
|
-
0.928989721, 0.948247667, 0.966438652, 0.983660777,
|
|
538
|
-
1, 1.127936069, 1.215724268])
|
|
562
|
+
[0.030, 0.158, 0.344, 0.469, 0.535, 0.590, 0.638, 0.680, 0.718,
|
|
563
|
+
0.752, 0.783, 0.812, 0.839, 0.864, 0.887, 0.909, 0.929, 0.948,
|
|
564
|
+
0.966, 0.984, 1.000, 1.128, 1.216])
|
|
539
565
|
|
|
540
566
|
x['HE_COLD'] = np.array([0.01, 0.04, 0.07, 0.11, 0.15, 0.2, 0.25,
|
|
541
567
|
0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65,
|
|
542
568
|
0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1, 1.5, 2])
|
|
543
569
|
y['HE_COLD'] = np.array(
|
|
544
|
-
[0.
|
|
545
|
-
0.
|
|
546
|
-
0.
|
|
547
|
-
0.773858327, 0.806203578, 0.836251881, 0.864264923,
|
|
548
|
-
0.890463551, 0.915036349, 0.938144588, 0.959929163,
|
|
549
|
-
0.980511906, 1, 1.151082849, 1.25295985])
|
|
570
|
+
[0.018, 0.075, 0.134, 0.215, 0.300, 0.412, 0.507, 0.564, 0.614,
|
|
571
|
+
0.660, 0.701, 0.739, 0.774, 0.806, 0.836, 0.864, 0.890, 0.915,
|
|
572
|
+
0.938, 0.960, 0.981, 1.000, 1.151, 1.253])
|
|
550
573
|
|
|
551
574
|
return x[key], y[key]
|
|
552
575
|
|