tespy 0.3.1__tar.gz → 0.3.2__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.3.1 → TESPy-0.3.2}/PKG-INFO +3 -3
- TESPy-0.3.2/docs/whats_new/v0-3-2.rst +47 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/whats_new.rst +2 -1
- {TESPy-0.3.1 → TESPy-0.3.2}/setup.py +1 -1
- {TESPy-0.3.1 → TESPy-0.3.2}/src/TESPy.egg-info/PKG-INFO +3 -3
- {TESPy-0.3.1 → TESPy-0.3.2}/src/TESPy.egg-info/SOURCES.txt +1 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/src/tespy/__init__.py +1 -1
- {TESPy-0.3.1 → TESPy-0.3.2}/src/tespy/components/heat_exchangers.py +4 -4
- {TESPy-0.3.1 → TESPy-0.3.2}/src/tespy/connections.py +2 -2
- {TESPy-0.3.1 → TESPy-0.3.2}/src/tespy/networks/network_reader.py +2 -2
- {TESPy-0.3.1 → TESPy-0.3.2}/src/tespy/networks/networks.py +22 -8
- {TESPy-0.3.1 → TESPy-0.3.2}/src/tespy/tools/fluid_properties.py +45 -64
- {TESPy-0.3.1 → TESPy-0.3.2}/src/tespy/tools/global_vars.py +7 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/tests/test_errors.py +0 -6
- {TESPy-0.3.1 → TESPy-0.3.2}/tests/test_tools/test_fluid_properties.py +3 -1
- {TESPy-0.3.1 → TESPy-0.3.2}/.bumpversion.cfg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/.coveragerc +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/.editorconfig +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/.gitignore +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/.pep8speaks.yml +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/.readthedocs.yml +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/.travis.yml +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/CODE_OF_CONDUCT.md +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/CONTRIBUTING.md +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/LICENSE +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/MANIFEST.in +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/PULL_REQUEST_TEMPLATE.md +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/README.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/ci/appveyor-with-compiler.cmd +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/ci/bootstrap.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/ci/requirements.txt +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/ci/templates/.appveyor.yml +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/ci/templates/.travis.yml +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/ci/templates/tox.ini +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/basic.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/basic_efficiency.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/cc_bp.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/chp.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/chp_PQ.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/combustion_chamber.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/combustion_engine.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/compressor.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/condenser.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/dhs.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/dhs_closed.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/dhs_forks.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/dhs_open.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/droplet_separator.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/drum.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/heat_exchanger.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/heat_pump.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/heat_pump_COP_air.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/heat_pump_COP_water.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/heat_pump_example.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/intro_connections.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/intro_district_heating_scheme.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/logph_diagram_states.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/merge.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/node.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/orc_evaporator.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/parabolic_trough.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/pipe.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/pump.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/solar_collector.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/split.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/subsys_interface.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/subsystem_waste_heat_generator.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/turbine.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/tutorial_heat_pump.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/valve.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/_images/water_electrolyzer.svg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/modules.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/tespy.components.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/tespy.networks.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/tespy.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api/tespy.tools.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/api.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/conf.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/developing_tespy.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/first_steps.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/index.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/installation.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/introduction.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/references.bib +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/requirements.txt +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/tespy_modules/characteristics.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/tespy_modules/components.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/tespy_modules/connections.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/tespy_modules/fluid_properties.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/tespy_modules/networks.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/tespy_modules/other.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/tespy_modules/subsystems.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/tespy_modules.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/tutorials_examples/clausius_rankine.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/tutorials_examples/clausius_rankine_chp.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/tutorials_examples/combined_cycle_chp.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/tutorials_examples/combustion_engine.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/tutorials_examples/district_heating.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/tutorials_examples/heat_pump.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/tutorials_examples/solar_collector.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/tutorials_examples/tutorial_combustion_chamber.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/tutorials_examples/tutorial_heat_pump.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/tutorials_examples.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/whats_new/v0-0-1.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/whats_new/v0-0-2.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/whats_new/v0-0-3.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/whats_new/v0-0-4.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/whats_new/v0-0-5.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/whats_new/v0-1-0.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/whats_new/v0-1-1.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/whats_new/v0-1-2.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/whats_new/v0-1-3.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/whats_new/v0-1-4.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/whats_new/v0-2-0.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/whats_new/v0-2-1.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/whats_new/v0-2-2.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/whats_new/v0-3-0.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/whats_new/v0-3-1.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/docs/zliterature.rst +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/paper.bib +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/paper.md +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/pyproject.toml +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/setup.cfg +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/src/TESPy.egg-info/dependency_links.txt +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/src/TESPy.egg-info/not-zip-safe +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/src/TESPy.egg-info/requires.txt +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/src/TESPy.egg-info/top_level.txt +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/src/tespy/components/__init__.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/src/tespy/components/basics.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/src/tespy/components/combustion.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/src/tespy/components/components.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/src/tespy/components/customs.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/src/tespy/components/nodes.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/src/tespy/components/piping.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/src/tespy/components/reactors.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/src/tespy/components/subsystems.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/src/tespy/components/turbomachinery.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/src/tespy/data/__init__.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/src/tespy/data/char_lines.json +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/src/tespy/data/char_maps.json +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/src/tespy/networks/__init__.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/src/tespy/tools/__init__.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/src/tespy/tools/characteristics.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/src/tespy/tools/data_containers.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/src/tespy/tools/helpers.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/src/tespy/tools/logger.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/tests/test_busses.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/tests/test_components/test_combustion.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/tests/test_components/test_heat_exchangers.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/tests/test_components/test_orc_evaporator.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/tests/test_components/test_piping.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/tests/test_components/test_reactors.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/tests/test_components/test_turbomachinery.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/tests/test_models/test_gas_turbine_models.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/tests/test_models/test_heat_pump_model.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/tests/test_networks/test_network.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/tests/test_tools/test_characteristics.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/tests/test_tools/test_helpers.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/tox.ini +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/tutorial/step_1.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/tutorial/step_2.py +0 -0
- {TESPy-0.3.1 → TESPy-0.3.2}/tutorial/step_3.py +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: TESPy
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: Thermal Engineering Systems in Python (TESPy)
|
|
5
5
|
Home-page: https://github.com/oemof/tespy
|
|
6
6
|
Author: Francesco Witte
|
|
7
7
|
Author-email: francesco.witte@hs-flensburg.de
|
|
8
8
|
License: MIT
|
|
9
|
+
Project-URL: Issue Tracker, https://github.com/oemof/tespy/issues
|
|
9
10
|
Project-URL: Documentation, https://tespy.readthedocs.io/
|
|
10
11
|
Project-URL: Changelog, https://tespy.readthedocs.io/en/latest/whats_new.html
|
|
11
|
-
Project-URL: Issue Tracker, https://github.com/oemof/tespy/issues
|
|
12
12
|
Description: Thermal Engineering Systems in Python
|
|
13
13
|
=====================================
|
|
14
14
|
|
|
@@ -139,5 +139,5 @@ Classifier: Programming Language :: Python :: 3.7
|
|
|
139
139
|
Classifier: Programming Language :: Python :: 3.8
|
|
140
140
|
Classifier: Topic :: Scientific/Engineering
|
|
141
141
|
Requires-Python: >=3.6, <3.9
|
|
142
|
-
Provides-Extra: dev
|
|
143
142
|
Provides-Extra: dummy
|
|
143
|
+
Provides-Extra: dev
|
|
@@ -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>`_
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: TESPy
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: Thermal Engineering Systems in Python (TESPy)
|
|
5
5
|
Home-page: https://github.com/oemof/tespy
|
|
6
6
|
Author: Francesco Witte
|
|
7
7
|
Author-email: francesco.witte@hs-flensburg.de
|
|
8
8
|
License: MIT
|
|
9
|
+
Project-URL: Issue Tracker, https://github.com/oemof/tespy/issues
|
|
9
10
|
Project-URL: Documentation, https://tespy.readthedocs.io/
|
|
10
11
|
Project-URL: Changelog, https://tespy.readthedocs.io/en/latest/whats_new.html
|
|
11
|
-
Project-URL: Issue Tracker, https://github.com/oemof/tespy/issues
|
|
12
12
|
Description: Thermal Engineering Systems in Python
|
|
13
13
|
=====================================
|
|
14
14
|
|
|
@@ -139,5 +139,5 @@ Classifier: Programming Language :: Python :: 3.7
|
|
|
139
139
|
Classifier: Programming Language :: Python :: 3.8
|
|
140
140
|
Classifier: Topic :: Scientific/Engineering
|
|
141
141
|
Requires-Python: >=3.6, <3.9
|
|
142
|
-
Provides-Extra: dev
|
|
143
142
|
Provides-Extra: dummy
|
|
143
|
+
Provides-Extra: dev
|
|
@@ -109,6 +109,7 @@ docs/whats_new/v0-2-1.rst
|
|
|
109
109
|
docs/whats_new/v0-2-2.rst
|
|
110
110
|
docs/whats_new/v0-3-0.rst
|
|
111
111
|
docs/whats_new/v0-3-1.rst
|
|
112
|
+
docs/whats_new/v0-3-2.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
|
|
@@ -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.
|
|
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((
|
|
@@ -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.
|
|
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.
|
|
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.
|
|
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((
|
|
@@ -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.
|
|
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.
|
|
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.
|
|
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.
|
|
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)
|
|
@@ -42,6 +42,7 @@ from tespy.components.reactors import water_electrolyzer
|
|
|
42
42
|
from tespy.tools import data_containers as dc
|
|
43
43
|
from tespy.tools import fluid_properties as fp
|
|
44
44
|
from tespy.tools import helpers as hlp
|
|
45
|
+
from tespy.tools.global_vars import coloring
|
|
45
46
|
from tespy.tools.global_vars import err
|
|
46
47
|
|
|
47
48
|
|
|
@@ -2542,13 +2543,18 @@ class network:
|
|
|
2542
2543
|
if c.printout is True:
|
|
2543
2544
|
row = (c.source.label + ':' + c.source_id + ' -> ' +
|
|
2544
2545
|
c.target.label + ':' + c.target_id)
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2546
|
+
|
|
2547
|
+
row_data = []
|
|
2548
|
+
for var in ['m', 'p', 'h', 'T']:
|
|
2549
|
+
if c.get_attr(var).val_set is True:
|
|
2550
|
+
row_data += [
|
|
2551
|
+
coloring['set'] + str(c.get_attr(var).val) +
|
|
2552
|
+
coloring['end']
|
|
2553
|
+
]
|
|
2554
|
+
else:
|
|
2555
|
+
row_data += [str(c.get_attr(var).val)]
|
|
2556
|
+
|
|
2557
|
+
df.loc[row] = row_data
|
|
2552
2558
|
if len(df) > 0:
|
|
2553
2559
|
print('##### RESULTS (connections) #####')
|
|
2554
2560
|
print(
|
|
@@ -2580,7 +2586,15 @@ class network:
|
|
|
2580
2586
|
|
|
2581
2587
|
def print_components(c, *args):
|
|
2582
2588
|
if c.name.printout is True:
|
|
2583
|
-
|
|
2589
|
+
val = float(c.name.get_attr(args[0]).val)
|
|
2590
|
+
if (val < c.name.get_attr(args[0]).min_val or
|
|
2591
|
+
val > c.name.get_attr(args[0]).max_val):
|
|
2592
|
+
return coloring['err'] + ' ' + str(val) + ' ' + coloring['end']
|
|
2593
|
+
if c.name.get_attr(args[0]).is_var:
|
|
2594
|
+
return coloring['var'] + ' ' + str(val) + ' ' + coloring['end']
|
|
2595
|
+
if c.name.get_attr(args[0]).is_set:
|
|
2596
|
+
return coloring['set'] + ' ' + str(val) + ' ' + coloring['end']
|
|
2597
|
+
return str(val)
|
|
2584
2598
|
else:
|
|
2585
2599
|
return np.nan
|
|
2586
2600
|
|
|
@@ -114,19 +114,16 @@ class tespy_fluid:
|
|
|
114
114
|
0.0
|
|
115
115
|
|
|
116
116
|
>>> v_tespy = v_mix_pT(fluid_props, T2)
|
|
117
|
-
>>> fluid_props_CP = [0, p, 0, {'air': 1}]
|
|
118
117
|
>>> v = v_mix_pT(fluid_props_CP, T2)
|
|
119
118
|
>>> round(abs(v_tespy - v) / v, 2)
|
|
120
119
|
0.0
|
|
121
120
|
|
|
122
121
|
>>> s_tespy = s_mix_pT(fluid_props, T2) - s_mix_pT(fluid_props, T1)
|
|
123
|
-
>>> fluid_props_CP = [0, p, 0, {'air': 1}]
|
|
124
122
|
>>> s = s_mix_pT(fluid_props_CP, T2) - s_mix_pT(fluid_props_CP, T1)
|
|
125
123
|
>>> round(abs(s_tespy - s) / s, 2)
|
|
126
124
|
0.0
|
|
127
125
|
|
|
128
126
|
>>> visc_tespy = visc_mix_pT(fluid_props, T2)
|
|
129
|
-
>>> fluid_props_CP = [0, p, 0, {'air': 1}]
|
|
130
127
|
>>> visc = visc_mix_pT(fluid_props_CP, T2)
|
|
131
128
|
>>> round(abs(visc_tespy - visc) / visc, 2)
|
|
132
129
|
0.0
|
|
@@ -767,67 +764,46 @@ def T_mix_ps(flow, s, T0=300):
|
|
|
767
764
|
|
|
768
765
|
val = newton(s_mix_pT, ds_mix_pdT, flow, s, val0=T0,
|
|
769
766
|
valmin=valmin, valmax=3000, imax=10)
|
|
770
|
-
if memorisation is True:
|
|
771
|
-
new = np.asarray(
|
|
772
|
-
[[flow[1], flow[2]] + list(flow[3].values()) + [s, val]])
|
|
773
|
-
# memorise the newly calculated value
|
|
774
|
-
memorise.T_ps[fl] = np.append(memorise.T_ps[fl], new, axis=0)
|
|
775
767
|
|
|
776
|
-
return val
|
|
777
768
|
else:
|
|
778
769
|
# calculate fluid property for pure fluids
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
770
|
+
val = T_ps(flow[1], s, fluid)
|
|
771
|
+
|
|
772
|
+
if memorisation is True:
|
|
773
|
+
new = np.asarray(
|
|
774
|
+
[[flow[1], flow[2]] + list(flow[3].values()) + [s, val]])
|
|
775
|
+
# memorise the newly calculated value
|
|
776
|
+
memorise.T_ps[fl] = np.append(memorise.T_ps[fl], new, axis=0)
|
|
777
|
+
|
|
778
|
+
return val
|
|
779
|
+
|
|
780
|
+
|
|
781
|
+
def T_ps(p, s, fluid):
|
|
782
|
+
r"""
|
|
783
|
+
Calculate the temperature from pressure and entropy for a pure fluid.
|
|
784
|
+
|
|
785
|
+
Parameters
|
|
786
|
+
----------
|
|
787
|
+
p : float
|
|
788
|
+
Pressure p / Pa.
|
|
787
789
|
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
# ----------
|
|
806
|
-
# p : float
|
|
807
|
-
# Pressure p / Pa.
|
|
808
|
-
#
|
|
809
|
-
# s : float
|
|
810
|
-
# Specific entropy h / (J/(kgK)).
|
|
811
|
-
#
|
|
812
|
-
# fluid : str
|
|
813
|
-
# Fluid name.
|
|
814
|
-
#
|
|
815
|
-
# Returns
|
|
816
|
-
# -------
|
|
817
|
-
# T : float
|
|
818
|
-
# Temperature T / K.
|
|
819
|
-
# """
|
|
820
|
-
# if 'IDGAS::' in fluid:
|
|
821
|
-
# msg = 'Ideal gas calculation not available by now.'
|
|
822
|
-
# logging.warning(msg)
|
|
823
|
-
# if 'TESPy::' in fluid:
|
|
824
|
-
# db = tespy_fluid.fluids[fluid].funcs['s_pT']
|
|
825
|
-
# return newton(reverse_2d, reverse_2d_deriv, [db, p, s], 0)
|
|
826
|
-
# elif 'INCOMP::' in fluid:
|
|
827
|
-
# return CPPSI('T', 'P', p, 'H', s, fluid)
|
|
828
|
-
# else:
|
|
829
|
-
# memorise.state[fluid].update(CP.PSmass_INPUTS, p, s)
|
|
830
|
-
# return memorise.state[fluid].T()
|
|
790
|
+
s : float
|
|
791
|
+
Specific entropy h / (J/(kgK)).
|
|
792
|
+
|
|
793
|
+
fluid : str
|
|
794
|
+
Fluid name.
|
|
795
|
+
|
|
796
|
+
Returns
|
|
797
|
+
-------
|
|
798
|
+
T : float
|
|
799
|
+
Temperature T / K.
|
|
800
|
+
"""
|
|
801
|
+
if fluid in tespy_fluid.fluids.keys():
|
|
802
|
+
db = tespy_fluid.fluids[fluid].funcs['s_pT']
|
|
803
|
+
return newton(reverse_2d, reverse_2d_deriv, [db, p, s], 0)
|
|
804
|
+
else:
|
|
805
|
+
memorise.state[fluid].update(CP.PSmass_INPUTS, p, s)
|
|
806
|
+
return memorise.state[fluid].T()
|
|
831
807
|
|
|
832
808
|
# %%
|
|
833
809
|
|
|
@@ -1327,14 +1303,19 @@ def v_mix_pT(flow, T):
|
|
|
1327
1303
|
|
|
1328
1304
|
.. math::
|
|
1329
1305
|
|
|
1330
|
-
v_{mix}(p,T)=\sum_{i} \
|
|
1306
|
+
v_{mix}(p,T)=\frac{1}{\sum_{i} \rho(pp_{i}, T, fluid_{i})}\;
|
|
1307
|
+
\forall i \in \text{fluid components}\\
|
|
1308
|
+
pp: \text{partial pressure}
|
|
1331
1309
|
"""
|
|
1332
|
-
|
|
1310
|
+
n = molar_mass_flow(flow[3])
|
|
1311
|
+
|
|
1312
|
+
d = 0
|
|
1333
1313
|
for fluid, x in flow[3].items():
|
|
1334
1314
|
if x > err:
|
|
1335
|
-
|
|
1315
|
+
ni = x / molar_masses[fluid]
|
|
1316
|
+
d += d_pT(flow[1] * ni / n, T, fluid)
|
|
1336
1317
|
|
|
1337
|
-
return
|
|
1318
|
+
return 1 / d
|
|
1338
1319
|
|
|
1339
1320
|
|
|
1340
1321
|
def d_mix_pT(flow, T):
|
|
@@ -32,7 +32,6 @@ from tespy.tools.characteristics import load_custom_char
|
|
|
32
32
|
from tespy.tools.data_containers import data_container
|
|
33
33
|
from tespy.tools.data_containers import dc_cc
|
|
34
34
|
from tespy.tools.data_containers import dc_flu
|
|
35
|
-
from tespy.tools.fluid_properties import T_mix_ps
|
|
36
35
|
from tespy.tools.fluid_properties import h_mix_pQ
|
|
37
36
|
from tespy.tools.fluid_properties import memorise
|
|
38
37
|
from tespy.tools.fluid_properties import tespy_fluid
|
|
@@ -720,8 +719,3 @@ def test_IF97_back_end():
|
|
|
720
719
|
def test_h_mix_pQ_on_mixtures():
|
|
721
720
|
with raises(ValueError):
|
|
722
721
|
h_mix_pQ([0, 0, 0, {'O2': 0.24, 'N2': 0.76}], 0.75)
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
def test_T_mix_ps_on_pure_fluids():
|
|
726
|
-
with raises(ValueError):
|
|
727
|
-
T_mix_ps([0, 0, 0, {'O2': 1}], 1e3)
|
|
@@ -168,9 +168,11 @@ def test_tespy_fluid_mixture():
|
|
|
168
168
|
pmin = 1e4
|
|
169
169
|
pmax = 1e7
|
|
170
170
|
|
|
171
|
+
# As the tespy fluid is part of a mixture, the minimum pressure for lookup
|
|
172
|
+
# table creation must be much lower than the actual pressure range tested.
|
|
171
173
|
fp.tespy_fluid(
|
|
172
174
|
alias='partial', fluid=partial_mix,
|
|
173
|
-
p_range=[pmin, pmax], T_range=[Tmin, Tmax])
|
|
175
|
+
p_range=[pmin / 3, pmax], T_range=[Tmin, Tmax])
|
|
174
176
|
|
|
175
177
|
flow_mix = [0, 0, 0, mixture]
|
|
176
178
|
flow_full = [0, 0, 0, full_mix]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|