tespy 0.3.1__tar.gz → 0.3.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.
Files changed (163) hide show
  1. {TESPy-0.3.1 → TESPy-0.3.3}/PKG-INFO +1 -1
  2. {TESPy-0.3.1 → TESPy-0.3.3}/README.rst +2 -2
  3. {TESPy-0.3.1 → TESPy-0.3.3}/docs/tespy_modules/subsystems.rst +19 -16
  4. TESPy-0.3.3/docs/whats_new/v0-3-2.rst +47 -0
  5. TESPy-0.3.3/docs/whats_new/v0-3-3.rst +41 -0
  6. {TESPy-0.3.1 → TESPy-0.3.3}/docs/whats_new.rst +2 -0
  7. {TESPy-0.3.1 → TESPy-0.3.3}/setup.py +1 -1
  8. {TESPy-0.3.1 → TESPy-0.3.3}/src/TESPy.egg-info/PKG-INFO +1 -1
  9. {TESPy-0.3.1 → TESPy-0.3.3}/src/TESPy.egg-info/SOURCES.txt +2 -1
  10. {TESPy-0.3.1 → TESPy-0.3.3}/src/tespy/__init__.py +1 -1
  11. {TESPy-0.3.1 → TESPy-0.3.3}/src/tespy/components/combustion.py +8 -8
  12. {TESPy-0.3.1 → TESPy-0.3.3}/src/tespy/components/components.py +3 -2
  13. {TESPy-0.3.1 → TESPy-0.3.3}/src/tespy/components/heat_exchangers.py +8 -8
  14. {TESPy-0.3.1 → TESPy-0.3.3}/src/tespy/components/turbomachinery.py +1 -1
  15. {TESPy-0.3.1 → TESPy-0.3.3}/src/tespy/connections.py +4 -4
  16. {TESPy-0.3.1 → TESPy-0.3.3}/src/tespy/networks/network_reader.py +4 -4
  17. {TESPy-0.3.1 → TESPy-0.3.3}/src/tespy/networks/networks.py +549 -531
  18. {TESPy-0.3.1 → TESPy-0.3.3}/src/tespy/tools/characteristics.py +8 -8
  19. {TESPy-0.3.1 → TESPy-0.3.3}/src/tespy/tools/fluid_properties.py +120 -152
  20. {TESPy-0.3.1 → TESPy-0.3.3}/src/tespy/tools/global_vars.py +7 -0
  21. {TESPy-0.3.1 → TESPy-0.3.3}/tests/test_errors.py +0 -6
  22. {TESPy-0.3.1 → TESPy-0.3.3}/tests/test_models/test_heat_pump_model.py +0 -2
  23. {TESPy-0.3.1 → TESPy-0.3.3}/tests/test_networks/test_network.py +18 -2
  24. {TESPy-0.3.1 → TESPy-0.3.3}/tests/test_tools/test_fluid_properties.py +3 -1
  25. TESPy-0.3.1/.bumpversion.cfg +0 -20
  26. {TESPy-0.3.1 → TESPy-0.3.3}/.coveragerc +0 -0
  27. {TESPy-0.3.1 → TESPy-0.3.3}/.editorconfig +0 -0
  28. {TESPy-0.3.1 → TESPy-0.3.3}/.gitignore +0 -0
  29. {TESPy-0.3.1 → TESPy-0.3.3}/.pep8speaks.yml +0 -0
  30. {TESPy-0.3.1 → TESPy-0.3.3}/.readthedocs.yml +0 -0
  31. {TESPy-0.3.1 → TESPy-0.3.3}/.travis.yml +0 -0
  32. {TESPy-0.3.1 → TESPy-0.3.3}/CODE_OF_CONDUCT.md +0 -0
  33. {TESPy-0.3.1 → TESPy-0.3.3}/CONTRIBUTING.md +0 -0
  34. {TESPy-0.3.1 → TESPy-0.3.3}/LICENSE +0 -0
  35. {TESPy-0.3.1 → TESPy-0.3.3}/MANIFEST.in +0 -0
  36. {TESPy-0.3.1 → TESPy-0.3.3}/PULL_REQUEST_TEMPLATE.md +0 -0
  37. {TESPy-0.3.1 → TESPy-0.3.3}/ci/appveyor-with-compiler.cmd +0 -0
  38. {TESPy-0.3.1 → TESPy-0.3.3}/ci/bootstrap.py +0 -0
  39. {TESPy-0.3.1 → TESPy-0.3.3}/ci/requirements.txt +0 -0
  40. {TESPy-0.3.1 → TESPy-0.3.3}/ci/templates/.appveyor.yml +0 -0
  41. {TESPy-0.3.1 → TESPy-0.3.3}/ci/templates/.travis.yml +0 -0
  42. {TESPy-0.3.1 → TESPy-0.3.3}/ci/templates/tox.ini +0 -0
  43. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/basic.svg +0 -0
  44. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/basic_efficiency.svg +0 -0
  45. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/cc_bp.svg +0 -0
  46. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/chp.svg +0 -0
  47. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/chp_PQ.svg +0 -0
  48. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/combustion_chamber.svg +0 -0
  49. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/combustion_engine.svg +0 -0
  50. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/compressor.svg +0 -0
  51. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/condenser.svg +0 -0
  52. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/dhs.svg +0 -0
  53. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/dhs_closed.svg +0 -0
  54. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/dhs_forks.svg +0 -0
  55. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/dhs_open.svg +0 -0
  56. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/droplet_separator.svg +0 -0
  57. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/drum.svg +0 -0
  58. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/heat_exchanger.svg +0 -0
  59. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/heat_pump.svg +0 -0
  60. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/heat_pump_COP_air.svg +0 -0
  61. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/heat_pump_COP_water.svg +0 -0
  62. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/heat_pump_example.svg +0 -0
  63. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/intro_connections.svg +0 -0
  64. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/intro_district_heating_scheme.svg +0 -0
  65. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/logph_diagram_states.svg +0 -0
  66. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/merge.svg +0 -0
  67. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/node.svg +0 -0
  68. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/orc_evaporator.svg +0 -0
  69. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/parabolic_trough.svg +0 -0
  70. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/pipe.svg +0 -0
  71. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/pump.svg +0 -0
  72. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/solar_collector.svg +0 -0
  73. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/split.svg +0 -0
  74. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/subsys_interface.svg +0 -0
  75. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/subsystem_waste_heat_generator.svg +0 -0
  76. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/turbine.svg +0 -0
  77. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/tutorial_heat_pump.svg +0 -0
  78. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/valve.svg +0 -0
  79. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/_images/water_electrolyzer.svg +0 -0
  80. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/modules.rst +0 -0
  81. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/tespy.components.rst +0 -0
  82. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/tespy.networks.rst +0 -0
  83. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/tespy.rst +0 -0
  84. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api/tespy.tools.rst +0 -0
  85. {TESPy-0.3.1 → TESPy-0.3.3}/docs/api.rst +0 -0
  86. {TESPy-0.3.1 → TESPy-0.3.3}/docs/conf.py +0 -0
  87. {TESPy-0.3.1 → TESPy-0.3.3}/docs/developing_tespy.rst +0 -0
  88. {TESPy-0.3.1 → TESPy-0.3.3}/docs/first_steps.rst +0 -0
  89. {TESPy-0.3.1 → TESPy-0.3.3}/docs/index.rst +0 -0
  90. {TESPy-0.3.1 → TESPy-0.3.3}/docs/installation.rst +0 -0
  91. {TESPy-0.3.1 → TESPy-0.3.3}/docs/introduction.rst +0 -0
  92. {TESPy-0.3.1 → TESPy-0.3.3}/docs/references.bib +0 -0
  93. {TESPy-0.3.1 → TESPy-0.3.3}/docs/requirements.txt +0 -0
  94. {TESPy-0.3.1 → TESPy-0.3.3}/docs/tespy_modules/characteristics.rst +0 -0
  95. {TESPy-0.3.1 → TESPy-0.3.3}/docs/tespy_modules/components.rst +0 -0
  96. {TESPy-0.3.1 → TESPy-0.3.3}/docs/tespy_modules/connections.rst +0 -0
  97. {TESPy-0.3.1 → TESPy-0.3.3}/docs/tespy_modules/fluid_properties.rst +0 -0
  98. {TESPy-0.3.1 → TESPy-0.3.3}/docs/tespy_modules/networks.rst +0 -0
  99. {TESPy-0.3.1 → TESPy-0.3.3}/docs/tespy_modules/other.rst +0 -0
  100. {TESPy-0.3.1 → TESPy-0.3.3}/docs/tespy_modules.rst +0 -0
  101. {TESPy-0.3.1 → TESPy-0.3.3}/docs/tutorials_examples/clausius_rankine.rst +0 -0
  102. {TESPy-0.3.1 → TESPy-0.3.3}/docs/tutorials_examples/clausius_rankine_chp.rst +0 -0
  103. {TESPy-0.3.1 → TESPy-0.3.3}/docs/tutorials_examples/combined_cycle_chp.rst +0 -0
  104. {TESPy-0.3.1 → TESPy-0.3.3}/docs/tutorials_examples/combustion_engine.rst +0 -0
  105. {TESPy-0.3.1 → TESPy-0.3.3}/docs/tutorials_examples/district_heating.rst +0 -0
  106. {TESPy-0.3.1 → TESPy-0.3.3}/docs/tutorials_examples/heat_pump.rst +0 -0
  107. {TESPy-0.3.1 → TESPy-0.3.3}/docs/tutorials_examples/solar_collector.rst +0 -0
  108. {TESPy-0.3.1 → TESPy-0.3.3}/docs/tutorials_examples/tutorial_combustion_chamber.rst +0 -0
  109. {TESPy-0.3.1 → TESPy-0.3.3}/docs/tutorials_examples/tutorial_heat_pump.rst +0 -0
  110. {TESPy-0.3.1 → TESPy-0.3.3}/docs/tutorials_examples.rst +0 -0
  111. {TESPy-0.3.1 → TESPy-0.3.3}/docs/whats_new/v0-0-1.rst +0 -0
  112. {TESPy-0.3.1 → TESPy-0.3.3}/docs/whats_new/v0-0-2.rst +0 -0
  113. {TESPy-0.3.1 → TESPy-0.3.3}/docs/whats_new/v0-0-3.rst +0 -0
  114. {TESPy-0.3.1 → TESPy-0.3.3}/docs/whats_new/v0-0-4.rst +0 -0
  115. {TESPy-0.3.1 → TESPy-0.3.3}/docs/whats_new/v0-0-5.rst +0 -0
  116. {TESPy-0.3.1 → TESPy-0.3.3}/docs/whats_new/v0-1-0.rst +0 -0
  117. {TESPy-0.3.1 → TESPy-0.3.3}/docs/whats_new/v0-1-1.rst +0 -0
  118. {TESPy-0.3.1 → TESPy-0.3.3}/docs/whats_new/v0-1-2.rst +0 -0
  119. {TESPy-0.3.1 → TESPy-0.3.3}/docs/whats_new/v0-1-3.rst +0 -0
  120. {TESPy-0.3.1 → TESPy-0.3.3}/docs/whats_new/v0-1-4.rst +0 -0
  121. {TESPy-0.3.1 → TESPy-0.3.3}/docs/whats_new/v0-2-0.rst +0 -0
  122. {TESPy-0.3.1 → TESPy-0.3.3}/docs/whats_new/v0-2-1.rst +0 -0
  123. {TESPy-0.3.1 → TESPy-0.3.3}/docs/whats_new/v0-2-2.rst +0 -0
  124. {TESPy-0.3.1 → TESPy-0.3.3}/docs/whats_new/v0-3-0.rst +0 -0
  125. {TESPy-0.3.1 → TESPy-0.3.3}/docs/whats_new/v0-3-1.rst +0 -0
  126. {TESPy-0.3.1 → TESPy-0.3.3}/docs/zliterature.rst +0 -0
  127. {TESPy-0.3.1 → TESPy-0.3.3}/paper.bib +0 -0
  128. {TESPy-0.3.1 → TESPy-0.3.3}/paper.md +0 -0
  129. {TESPy-0.3.1 → TESPy-0.3.3}/pyproject.toml +0 -0
  130. {TESPy-0.3.1 → TESPy-0.3.3}/setup.cfg +0 -0
  131. {TESPy-0.3.1 → TESPy-0.3.3}/src/TESPy.egg-info/dependency_links.txt +0 -0
  132. {TESPy-0.3.1 → TESPy-0.3.3}/src/TESPy.egg-info/not-zip-safe +0 -0
  133. {TESPy-0.3.1 → TESPy-0.3.3}/src/TESPy.egg-info/requires.txt +0 -0
  134. {TESPy-0.3.1 → TESPy-0.3.3}/src/TESPy.egg-info/top_level.txt +0 -0
  135. {TESPy-0.3.1 → TESPy-0.3.3}/src/tespy/components/__init__.py +0 -0
  136. {TESPy-0.3.1 → TESPy-0.3.3}/src/tespy/components/basics.py +0 -0
  137. {TESPy-0.3.1 → TESPy-0.3.3}/src/tespy/components/customs.py +0 -0
  138. {TESPy-0.3.1 → TESPy-0.3.3}/src/tespy/components/nodes.py +0 -0
  139. {TESPy-0.3.1 → TESPy-0.3.3}/src/tespy/components/piping.py +0 -0
  140. {TESPy-0.3.1 → TESPy-0.3.3}/src/tespy/components/reactors.py +0 -0
  141. {TESPy-0.3.1 → TESPy-0.3.3}/src/tespy/components/subsystems.py +0 -0
  142. {TESPy-0.3.1 → TESPy-0.3.3}/src/tespy/data/__init__.py +0 -0
  143. {TESPy-0.3.1 → TESPy-0.3.3}/src/tespy/data/char_lines.json +0 -0
  144. {TESPy-0.3.1 → TESPy-0.3.3}/src/tespy/data/char_maps.json +0 -0
  145. {TESPy-0.3.1 → TESPy-0.3.3}/src/tespy/networks/__init__.py +0 -0
  146. {TESPy-0.3.1 → TESPy-0.3.3}/src/tespy/tools/__init__.py +0 -0
  147. {TESPy-0.3.1 → TESPy-0.3.3}/src/tespy/tools/data_containers.py +0 -0
  148. {TESPy-0.3.1 → TESPy-0.3.3}/src/tespy/tools/helpers.py +0 -0
  149. {TESPy-0.3.1 → TESPy-0.3.3}/src/tespy/tools/logger.py +0 -0
  150. {TESPy-0.3.1 → TESPy-0.3.3}/tests/test_busses.py +0 -0
  151. {TESPy-0.3.1 → TESPy-0.3.3}/tests/test_components/test_combustion.py +0 -0
  152. {TESPy-0.3.1 → TESPy-0.3.3}/tests/test_components/test_heat_exchangers.py +0 -0
  153. {TESPy-0.3.1 → TESPy-0.3.3}/tests/test_components/test_orc_evaporator.py +0 -0
  154. {TESPy-0.3.1 → TESPy-0.3.3}/tests/test_components/test_piping.py +0 -0
  155. {TESPy-0.3.1 → TESPy-0.3.3}/tests/test_components/test_reactors.py +0 -0
  156. {TESPy-0.3.1 → TESPy-0.3.3}/tests/test_components/test_turbomachinery.py +0 -0
  157. {TESPy-0.3.1 → TESPy-0.3.3}/tests/test_models/test_gas_turbine_models.py +0 -0
  158. {TESPy-0.3.1 → TESPy-0.3.3}/tests/test_tools/test_characteristics.py +0 -0
  159. {TESPy-0.3.1 → TESPy-0.3.3}/tests/test_tools/test_helpers.py +0 -0
  160. {TESPy-0.3.1 → TESPy-0.3.3}/tox.ini +0 -0
  161. {TESPy-0.3.1 → TESPy-0.3.3}/tutorial/step_1.py +0 -0
  162. {TESPy-0.3.1 → TESPy-0.3.3}/tutorial/step_2.py +0 -0
  163. {TESPy-0.3.1 → TESPy-0.3.3}/tutorial/step_3.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: TESPy
3
- Version: 0.3.1
3
+ Version: 0.3.3
4
4
  Summary: Thermal Engineering Systems in Python (TESPy)
5
5
  Home-page: https://github.com/oemof/tespy
6
6
  Author: Francesco Witte
@@ -41,11 +41,11 @@ https://guides.github.com/activities/hello-world/
41
41
  :target: https://readthedocs.org/projects/tespy
42
42
  :alt: Documentation Status
43
43
 
44
- .. |travis| image:: https://api.travis-ci.org/oemof/tespy.svg?branch=dev
44
+ .. |travis| image:: https://api.travis-ci.org/oemof/tespy.svg?branch=master
45
45
  :alt: Travis-CI Build Status
46
46
  :target: https://travis-ci.org/oemof/tespy
47
47
 
48
- .. |coveralls| image:: https://coveralls.io/repos/oemof/tespy/badge.svg?branch=dev&service=github
48
+ .. |coveralls| image:: https://coveralls.io/repos/oemof/tespy/badge.svg?branch=master&service=github
49
49
  :alt: Coverage Status
50
50
  :target: https://coveralls.io/r/oemof/tespy
51
51
 
@@ -52,6 +52,7 @@ Create a file, e.g. :code:`mysubsystems.py` and add the following lines:
52
52
  from tespy.components import subsystem, heat_exchanger, drum
53
53
  from tespy.connections import connection
54
54
 
55
+
55
56
  class waste_heat_steam_generator(subsystem):
56
57
  """Class documentation"""
57
58
 
@@ -64,18 +65,18 @@ Create a file, e.g. :code:`mysubsystems.py` and add the following lines:
64
65
 
65
66
  def create_conns(self):
66
67
  """Define the subsystem's connections."""
67
- self.conns['eco_dr'] = connection(self.comps['eco'], 'out2',
68
- self.comps['drum'], 'in1')
69
- self.conns['dr_eva'] = connection(self.comps['drum'], 'out1',
70
- self.comps['eva'], 'in2')
71
- self.conns['eva_dr'] = connection(self.comps['eva'], 'out2',
72
- self.comps['drum'], 'in2')
73
- self.conns['dr_sup'] = connection(self.comps['drum'], 'out2',
74
- self.comps['sup'], 'in2')
75
- self.conns['sup_eva'] = connection(self.comps['sup'], 'out1',
76
- self.comps['eva'], 'in1')
77
- self.conns['eva_eco'] = connection(self.comps['eva'], 'out1',
78
- self.comps['eco'], 'in1')
68
+ self.conns['eco_dr'] = connection(
69
+ self.comps['eco'], 'out2', self.comps['drum'], 'in1')
70
+ self.conns['dr_eva'] = connection(
71
+ self.comps['drum'], 'out1', self.comps['eva'], 'in2')
72
+ self.conns['eva_dr'] = connection(
73
+ self.comps['eva'], 'out2', self.comps['drum'], 'in2')
74
+ self.conns['dr_sup'] = connection(
75
+ self.comps['drum'], 'out2', self.comps['sup'], 'in2')
76
+ self.conns['sup_eva'] = connection(
77
+ self.comps['sup'], 'out1', self.comps['eva'], 'in1')
78
+ self.conns['eva_eco'] = connection(
79
+ self.comps['eva'], 'out1', self.comps['eco'], 'in1')
79
80
 
80
81
  Import your subsystem
81
82
  ^^^^^^^^^^^^^^^^^^^^^
@@ -131,16 +132,18 @@ within the same folder as your script.
131
132
 
132
133
  # %% component parameters
133
134
 
134
- sg.comps['eco'].set_attr(pr1=0.999, pr2=0.97, ttd_u=25,
135
+ sg.comps['eco'].set_attr(pr1=0.999, pr2=0.97,
135
136
  design=['pr1', 'pr2', 'ttd_u'],
136
- offdesign=['zeta1', 'zeta2', 'kA'])
137
+ offdesign=['zeta1', 'zeta2', 'kA_char'])
137
138
 
138
139
  sg.comps['eva'].set_attr(pr1=0.999, ttd_l=20, design=['pr1', 'ttd_l'],
139
- offdesign=['zeta1', 'kA'])
140
+ offdesign=['zeta1', 'kA_char'])
140
141
 
141
142
  sg.comps['sup'].set_attr(pr1=0.999, pr2=0.99, ttd_u=50,
142
143
  design=['pr1', 'pr2', 'ttd_u'],
143
- offdesign=['zeta1', 'zeta2', 'kA'])
144
+ offdesign=['zeta1', 'zeta2', 'kA_char'])
145
+
146
+ sg.conns['eco_dr'].set_attr(Td_bp=-5, design=['Td_bp'])
144
147
 
145
148
  # %% solve
146
149
 
@@ -0,0 +1,47 @@
1
+ v0.3.2 - Carnot's Colors (June, 10, 2020)
2
+ +++++++++++++++++++++++++++++++++++++++++
3
+
4
+ New features
5
+ ############
6
+ - Colored printouts are available in the :code:`print_results()` method of the
7
+ network class. There are three different color codes available with default
8
+ settings:
9
+
10
+ - user specified parameters (:code:`'set'`, blue)
11
+ - component parameters specified as variables (:code:`'var'`, green)
12
+ - faulty parameters (:code:`'err'`, red)
13
+
14
+ In order to change the colors, simply import :code:`coloring` from the
15
+ :py:mod:`tespy.tools.global_vars` module and adjust the escape codes. For
16
+ example, to reset all colors to white text:
17
+
18
+ .. code-block:: python
19
+
20
+ from tespy.tools.global_vars import coloring
21
+ coloring['set'] = '\033[0m'
22
+ coloring['err'] = '\033[0m'
23
+ coloring['var'] = '\033[0m'
24
+
25
+ See `here <https://en.wikipedia.org/wiki/ANSI_escape_code#Colors>`_ for a
26
+ list of available codes
27
+ (`PR #205 <https://github.com/oemof/tespy/pull/205>`_).
28
+
29
+ Bug fixes
30
+ #########
31
+ - Readd method for :code:`T_mix_ps` calculation for pure fluids: In case the
32
+ fluid propagation did not go through (e.g. due to availability of good
33
+ starting values) the fluid composition at a turbomachine's inlet and outlet
34
+ may not be equal (`PR #207 <https://github.com/oemof/tespy/pull/207>`_).
35
+ - Fix the calculation of mixture density: The density is calculated as sum of
36
+ the densities of the mixture components at their respective partial pressure
37
+ and the mixture temperature
38
+ (`PR #207 <https://github.com/oemof/tespy/pull/207>`_). With the old method,
39
+ the specific volume was calculated according to Amagat's law, which produced
40
+ incorrect values if one or more components of the mixture were liquid at the
41
+ mixture's temperature and pressure. See discussion about humid air propreties
42
+ here: `Issue #206 <https://github.com/oemof/tespy/issues/206>`_.
43
+
44
+ Contributors
45
+ ############
46
+ - Francesco Witte (`@fwitte <https://github.com/fwitte>`_)
47
+ - `@jbueck <https://github.com/jbueck>`_
@@ -0,0 +1,41 @@
1
+ v0.3.3 - Maxwell’s Memory (July, 21, 2020)
2
+ ++++++++++++++++++++++++++++++++++++++++++
3
+
4
+ New Features
5
+ ############
6
+ - In some cases - especially large networks and many simulation runs within a
7
+ a single script - the fluid property memorisation added a lot of calculation
8
+ time for searching through the lookup tables of previously calculated fluid
9
+ property values. It is now possible to manually specify whether or not the
10
+ fluid property memorisation is performed.
11
+
12
+ The memorisation benefits
13
+
14
+ - networks using gaseous mixtures and
15
+ - smaller networks using the HEOS back end.
16
+
17
+ The memorisation slows down
18
+
19
+ - very large networks and
20
+ - usage of tabular back ends (BICUBIC or TTSE).
21
+
22
+ In order to deactivate memorisation, add
23
+ :code:`memorise_fluid_properties=False` on network creation, for example:
24
+
25
+ .. code-block:: python
26
+
27
+ from tespy.networks import network
28
+
29
+ mynetwork = network(
30
+ fluids=['BICUBIC::water'], memorise_fluid_properties=False)
31
+
32
+ (`PR #211 <https://github.com/oemof/tespy/pull/211>`_).
33
+
34
+ Other Changes
35
+ #############
36
+ - Reorder network initialisation process for improved maintenance and faster
37
+ performance (`PR #204 <https://github.com/oemof/tespy/pull/204>`_).
38
+
39
+ Contributors
40
+ ############
41
+ - Francesco Witte (`@fwitte <https://github.com/fwitte>`_)
@@ -8,6 +8,8 @@ Discover noteable new features and improvements in each release
8
8
  :local:
9
9
  :backlinks: top
10
10
 
11
+ .. include:: whats_new/v0-3-3.rst
12
+ .. include:: whats_new/v0-3-2.rst
11
13
  .. include:: whats_new/v0-3-1.rst
12
14
  .. include:: whats_new/v0-3-0.rst
13
15
  .. include:: whats_new/v0-2-2.rst
@@ -25,7 +25,7 @@ def read(*names, **kwargs):
25
25
 
26
26
  setup(
27
27
  name='TESPy',
28
- version='0.3.1',
28
+ version='0.3.3',
29
29
  license='MIT',
30
30
  description='Thermal Engineering Systems in Python (TESPy)',
31
31
  long_description='%s' % (
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: TESPy
3
- Version: 0.3.1
3
+ Version: 0.3.3
4
4
  Summary: Thermal Engineering Systems in Python (TESPy)
5
5
  Home-page: https://github.com/oemof/tespy
6
6
  Author: Francesco Witte
@@ -1,4 +1,3 @@
1
- .bumpversion.cfg
2
1
  .coveragerc
3
2
  .editorconfig
4
3
  .gitignore
@@ -109,6 +108,8 @@ docs/whats_new/v0-2-1.rst
109
108
  docs/whats_new/v0-2-2.rst
110
109
  docs/whats_new/v0-3-0.rst
111
110
  docs/whats_new/v0-3-1.rst
111
+ docs/whats_new/v0-3-2.rst
112
+ docs/whats_new/v0-3-3.rst
112
113
  src/TESPy.egg-info/PKG-INFO
113
114
  src/TESPy.egg-info/SOURCES.txt
114
115
  src/TESPy.egg-info/dependency_links.txt
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8
2
2
 
3
- __version__ = '0.3.1 - Mayer\'s Merit'
3
+ __version__ = '0.3.3 - Maxwell\'s Memory'
4
4
 
5
5
  # tespy data and connection import
6
6
  from . import connections # noqa: F401
@@ -1870,7 +1870,7 @@ class combustion_chamber_stoich(combustion_chamber):
1870
1870
  air = self.air_alias.val
1871
1871
  flue_gas = self.fuel_alias.val + '_fg'
1872
1872
 
1873
- for c in nw.comps.loc[self, 'outlets']:
1873
+ for c in self.outl:
1874
1874
  if not c.fluid.val_set[air]:
1875
1875
  c.fluid.val[air] = 0.8
1876
1876
  if not c.fluid.val_set[flue_gas]:
@@ -1895,7 +1895,7 @@ class combustion_chamber_stoich(combustion_chamber):
1895
1895
  flue_gas = self.fuel_alias.val + '_fg'
1896
1896
  fuel = self.fuel_alias.val
1897
1897
 
1898
- for c in nw.comps.loc[self, 'outlets']:
1898
+ for c in self.outl:
1899
1899
  if not c.fluid.val_set[air]:
1900
1900
  if c.fluid.val[air] > 0.95:
1901
1901
  c.fluid.val[air] = 0.95
@@ -1914,11 +1914,11 @@ class combustion_chamber_stoich(combustion_chamber):
1914
1914
 
1915
1915
  nw.init_target(c, c.target)
1916
1916
 
1917
- for i in nw.comps.loc[self, 'inlets']:
1917
+ for i in self.inl:
1918
1918
  if i.m.val_SI < 0 and not i.m.val_set:
1919
1919
  i.m.val_SI = 0.01
1920
1920
 
1921
- for c in nw.comps.loc[self, 'outlets']:
1921
+ for c in self.outl:
1922
1922
  if c.m.val_SI < 0 and not c.m.val_set:
1923
1923
  c.m.val_SI = 10
1924
1924
  nw.init_target(c, c.target)
@@ -2160,21 +2160,21 @@ class combustion_engine(combustion_chamber):
2160
2160
  >>> mode = 'design'
2161
2161
  >>> nw.solve(mode=mode)
2162
2162
  >>> nw.save('tmp')
2163
- >>> round(chp.ti.val)
2163
+ >>> round(chp.ti.val, 0)
2164
2164
  25300000.0
2165
- >>> round(chp.Q1.val)
2165
+ >>> round(chp.Q1.val, 0)
2166
2166
  4980000.0
2167
2167
  >>> chp.set_attr(Q1=4e6, P=np.nan)
2168
2168
  >>> mode = 'offdesign'
2169
2169
  >>> nw.solve(mode=mode, init_path='tmp', design_path='tmp')
2170
- >>> round(chp.ti.val)
2170
+ >>> round(chp.ti.val, 0)
2171
2171
  17794554.0
2172
2172
  >>> round(chp.P.val / chp.P.design, 3)
2173
2173
  0.617
2174
2174
  >>> chp.set_attr(P=chp.P.design * 0.75, Q1=np.nan)
2175
2175
  >>> mode = 'offdesign'
2176
2176
  >>> nw.solve(mode=mode, init_path='tmp', design_path='tmp')
2177
- >>> round(chp.ti.val)
2177
+ >>> round(chp.ti.val, 0)
2178
2178
  20550000.0
2179
2179
  >>> round(chp.P.val / chp.P.design, 3)
2180
2180
  0.75
@@ -27,6 +27,7 @@ from tespy.tools.data_containers import dc_cp
27
27
  from tespy.tools.data_containers import dc_gcp
28
28
  from tespy.tools.data_containers import dc_simple
29
29
  from tespy.tools.fluid_properties import v_mix_ph
30
+ from tespy.tools.global_vars import err
30
31
  from tespy.tools.helpers import bus_char_derivative
31
32
  from tespy.tools.helpers import bus_char_evaluation
32
33
  from tespy.tools.helpers import newton
@@ -563,7 +564,7 @@ class component:
563
564
  for p, data in self.variables.items():
564
565
  if isinstance(data, dc_cp):
565
566
  val = self.get_attr(p).val
566
- if round(val, 6) > data.max_val:
567
+ if val > data.max_val + err:
567
568
  msg = (
568
569
  'Invalid value for ' + p + ': ' + p + ' = ' +
569
570
  str(val) + ' above maximum value (' +
@@ -571,7 +572,7 @@ class component:
571
572
  '.')
572
573
  logging.warning(msg)
573
574
 
574
- elif round(val, 6) < data.min_val:
575
+ elif val < data.min_val - err:
575
576
  msg = (
576
577
  'Invalid value for ' + p + ': ' + p + ' = ' +
577
578
  str(val) + ' below minimum value (' +
@@ -319,7 +319,7 @@ class heat_exchanger_simple(component):
319
319
  'in the calculation. If you want to use the value adaption of '
320
320
  'kA by the characteristic line, please use kA_char as '
321
321
  'parameter instead (occurred at ' + self.label + '). This '
322
- 'warning will disappear in TESPy version 0.3.2.')
322
+ 'warning will disappear in TESPy version 0.4.0.')
323
323
  warnings.warn(msg, FutureWarning, stacklevel=2)
324
324
 
325
325
  self.jacobian = np.zeros((
@@ -1052,9 +1052,9 @@ class parabolic_trough(heat_exchanger_simple):
1052
1052
  >>> inc.set_attr(T=None)
1053
1053
  >>> outg.set_attr(T=350, m=20)
1054
1054
  >>> nw.solve('design')
1055
- >>> round(inc.T.val)
1055
+ >>> round(inc.T.val, 0)
1056
1056
  229.0
1057
- >>> round(pt.A.val)
1057
+ >>> round(pt.A.val, 0)
1058
1058
  6862.0
1059
1059
 
1060
1060
  Given this design, it is possible to calculate the outlet temperature as
@@ -1066,9 +1066,9 @@ class parabolic_trough(heat_exchanger_simple):
1066
1066
  >>> inc.set_attr(T=150)
1067
1067
  >>> outg.set_attr(T=None)
1068
1068
  >>> nw.solve('design')
1069
- >>> round(outg.T.val)
1069
+ >>> round(outg.T.val, 0)
1070
1070
  244.0
1071
- >>> round(pt.Q.val)
1071
+ >>> round(pt.Q.val, 0)
1072
1072
  3603027.0
1073
1073
  """
1074
1074
 
@@ -1828,7 +1828,7 @@ class heat_exchanger(component):
1828
1828
  'in the calculation. If you want to use the value adaption of '
1829
1829
  'kA by the characteristic line, please use kA_char as '
1830
1830
  'parameter instead (occurred at ' + self.label + '). This '
1831
- 'warning will disappear in TESPy version 0.3.2.')
1831
+ 'warning will disappear in TESPy version 0.4.0.')
1832
1832
  warnings.warn(msg, FutureWarning, stacklevel=2)
1833
1833
 
1834
1834
  self.jacobian = np.zeros((
@@ -2705,7 +2705,7 @@ class condenser(heat_exchanger):
2705
2705
  'in the calculation. If you want to use the value adaption of '
2706
2706
  'kA by the characteristic line, please use kA_char as '
2707
2707
  'parameter instead (occurred at ' + self.label + '). This '
2708
- 'warning will disappear in TESPy version 0.3.2.')
2708
+ 'warning will disappear in TESPy version 0.4.0.')
2709
2709
  warnings.warn(msg, FutureWarning, stacklevel=2)
2710
2710
 
2711
2711
  self.jacobian = np.zeros((
@@ -3073,7 +3073,7 @@ class desuperheater(heat_exchanger):
3073
3073
  'in the calculation. If you want to use the value adaption of '
3074
3074
  'kA by the characteristic line, please use kA_char as '
3075
3075
  'parameter instead (occurred at ' + self.label + '). This '
3076
- 'warning will disappear in TESPy version 0.3.2.')
3076
+ 'warning will disappear in TESPy version 0.4.0.')
3077
3077
  warnings.warn(msg, FutureWarning, stacklevel=2)
3078
3078
 
3079
3079
  self.jacobian = np.zeros((
@@ -473,7 +473,7 @@ class compressor(turbomachine):
473
473
 
474
474
  if self.char_warnings is True:
475
475
  msg = ('Created characteristic map for parameter char_map '
476
- ' at component ' + self.label + ' from default data.\n'
476
+ 'at component ' + self.label + ' from default data.\n'
477
477
  'You can specify your own data using component.char_map'
478
478
  '.set_attr(func=custom_char).\n'
479
479
  'If you want to disable these warnings use '
@@ -732,7 +732,7 @@ class bus:
732
732
  array([0., 3.])
733
733
  >>> heat_bus.comps.loc[fgc]['char'].y
734
734
  array([-1., -1.])
735
- >>> round(chp.ti.val)
735
+ >>> round(chp.ti.val, 0)
736
736
  25813247.0
737
737
  >>> round(chp.Q1.val + chp.Q2.val, 0)
738
738
  8896898.0
@@ -745,7 +745,7 @@ class bus:
745
745
  >>> power_bus.set_attr(P=7.5e6)
746
746
  >>> mode = 'offdesign'
747
747
  >>> nw.solve(mode=mode, design_path='tmp', init_path='tmp')
748
- >>> round(chp.ti.val)
748
+ >>> round(chp.ti.val, 0)
749
749
  21187528.0
750
750
  >>> round(chp.P.val / chp.P.design, 3)
751
751
  0.761
@@ -902,7 +902,7 @@ class bus:
902
902
  comp = c['c']
903
903
  msg = (
904
904
  'The dictionary keyword "c" will be removed in '
905
- 'TESPy version 0.3.2. Please use "comp" instead.')
905
+ 'TESPy version 0.4.0. Please use "comp" instead.')
906
906
  warnings.warn(msg, FutureWarning, stacklevel=2)
907
907
  else:
908
908
  comp = c['comp']
@@ -924,7 +924,7 @@ class bus:
924
924
  if k == 'p':
925
925
  msg = (
926
926
  'The dictionary keyword "p" will be removed '
927
- 'TESPy version 0.3.2. Please use "param" '
927
+ 'TESPy version 0.4.0. Please use "param" '
928
928
  'instead.')
929
929
  warnings.warn(msg, FutureWarning, stacklevel=2)
930
930
  if isinstance(v, str) or v is None:
@@ -214,7 +214,7 @@ def load_network(path):
214
214
  >>> eta_s_t
215
215
  0.898
216
216
  >>> igva
217
- 20.139
217
+ 20.138
218
218
 
219
219
  The designed network is exported to the path 'exported_nwk'. Now import the
220
220
  network and recalculate. Check if the results match with the previous
@@ -305,7 +305,7 @@ def load_network(path):
305
305
  'component data for component of type ' + f[:-4] + '. '
306
306
  'Please make sure to add the column bus_base to your data '
307
307
  'or recreate the network export with the TESPy 0.3.x API. '
308
- 'This warning will be removed in TESPy version 0.3.2.')
308
+ 'This warning will be removed in TESPy version 0.4.0.')
309
309
  warnings.warn(msg, FutureWarning, stacklevel=2)
310
310
 
311
311
  comps = pd.concat((comps, df[cols]), axis=0)
@@ -395,8 +395,8 @@ def construct_comps(c, *args):
395
395
  instance : tespy.components.components.component
396
396
  TESPy component object.
397
397
  """
398
- target_class = comp_target_classes[c.cp]
399
- instance = target_class(c.label)
398
+ target_class = comp_target_classes[c['comp_type']]
399
+ instance = target_class(c['label'])
400
400
  kwargs = {}
401
401
 
402
402
  # basic properties