v0.2

Changelog of the v0.2 release series.

v0.2.2 - Rankine’s Realm (March, 6, 2020)

New Features

  • Allow initialisation for the primary variables from previous calculation. Until now, the user needed to save the network’s state and reload that state for his next simulation. This feature is enabled as default. If you want to disable this feature, you need to state mynetwork.solve(..., init_previous=False) (PR #156).

  • Extrapolation for characteristic lines is available. In default state, the upper or lower value range limit is used when a characteristic line is evaluated outside of the available x-value range. The extrapolate parameter allows linear extrapolation, for an example see the corresponding sections in the online documentation: component characteristics, tespy characteristics (PR #159).

  • Add a new component evaporator for geothermal organic rankine cycle. The component has inlets for geothermal steam brine. On the cold side, the orc working fluid is evaporated. Read more about this component in the API documentation: tespy.components.customs.orc_evaporator (PR #148).

Documentation

  • Add method for automatic citations and references (PR #163).

Parameter renaming

Testing

  • Add convergence checks for all component tests. Some tests did not fail, even if the calculation did not converge (PR #153).

  • Improve coverage of the networks module (PR #153).

  • Add tests for characteristic line and map evaluation (PR #159).

Bug fixes

  • Fix the bugged tests for compressor characteristic maps (tespy.components.turbomachinery.compressor.char_map_func). The pressure ratio factor of the lowest speedline available in the default data ranges from about 0.2 to 0.5. Therefore the design pressure ratio should be higher than 5 (PR #156).

Other changes

  • Use the method tespy.components.components.component.fluid_deriv for all components, that do not change composition between an inlet and the respective outlet (PR #153).

  • Adjust the method tespy.components.components.component.zeta_func to work with all zeta value specifications (PR #153).

Contributors

v0.2.1 - Fourier’s Fable (February, 7 2020)

New Features

  • Back end modifications in order to improve calculation speed. For the results see (PR #147).

Documentation

  • Fixes in code and docstrings to meet PEP8 guidelines (PR #143).

  • Update the class documentations of component and connection classes (PR #146).

Parameter renaming

Testing

  • Improve the heat pump test (PR #150).

Bug fixes

  • Prevent pandas 1.0.0 installation due to bug in the to_csv() method (bug will be fixed in PR #31513 of pandas). Additionally,the version requirements of third party packages have been updated to prevent future bugs resulting from possible API changes (PR #146).

  • There was a bug in the heat exchanger kA-functions ( tespy.components.heat_exchangers.simple.kA_func, tespy.components.heat_exchangers.base.kA_func and tespy.components.heat_exchangers.condenser.kA_func). The factors for the heat transfer coefficient should not simultaneously amplify the value but instead with their inverse.

    \[f_{kA} = \frac{2}{\frac{1}{f_{kA,1}} + \frac{1}{f_{kA,2}}}\]

    For simple heat exchangers, \(f_{kA,2}\) will be equal to 1 (PR #150).

Other changes

  • Replacing some of the characteristic lines by generic ones. The simulation results using the default lines might slightly differ from the results using the original defaults (PR #149).

Contributors

  • Francesco Witte (@fwitte)

  • @maltefritz

v0.2.0 - Clausius’ Circus (January, 15, 2020)

TESPy Clausius’ Circus includes many back end adjustments for future development. Additionally, some new features have been implemented improving the usage of the software. Due to changes in the API, version 0.2.0 will not be compatible with older versions of TESPy!

New Features

  • Implemented a new component “cycle_closer”. This component may serve as substitute for a sink/source or splitter/merge combination in closed cycle simulations (PR #107).

  • Added optical efficiency to the “solar_collector”. The incoming radiation E no longer represents the actual absorption but the radiation on the collector surface area (PR #110).

  • Parameters local_design and local_offdesign are now also available for network exports and imports (PR #109).

  • Busses, components and connections are now equipped with printout attribute. For example, if you specify myconn.set_attr(printout=False) the results of the specified connection will not be printed by the print_results method of your network. This is especially useful, if you have a large network and only want to print the results at the most important points (PR #126).

  • It is possible to place custom characteristic lines and maps in the HOME/.tespy/data folder and import these for your TESPy scripts. Have a look at the documentation for more information (PR #118).

  • If the network check fails due to component inlets or outlets being connected to more than one connection at a time, all connections are printed for easier network topology debugging (PR #135).

Documentation

  • Full review of online documentation (PR #112).

  • Full review of the examples repository (PR #46 of oemof_examples).

  • Plots of default characteristic lines and maps are generated automatically on documentation build (PR #139).

Parameter renaming

  • New name for cogeneration_unit: combustion_engine (PR #105).

  • New name for subsys_interface: subsystem_interface (PR #107).

  • The module import shortcuts (from tespy import ...) for components (cmp), connections (con), helpers (hlp), logger (logger), networks (nwk), network_reader (nwkr) are no longer supported (PR #108)! We instead implemented new shortcuts instead for tespy.networks and tespy.components modules (PR #118).

  • The method set_printoptions for the tespy.networks.networks.network class is not available anymore. Use yournetwork.set_attr(iterinfo=True/False) in future (PR #109).

  • Parameter interface for sinks and sources has been removed (PR #109).

  • The method for loading networks from the network_reader module has been renamed from load_nwk to load_network (PR #118).

Testing

  • Improved doc-test for class tespy_fluid (PR #109).

  • Add doc-test for fluid_structure function of tespy.tools.helpers (PR #109).

  • Reworked a lot of examples in the components API-documentation (PR #109).

  • Update software tests (PR #111).

  • Add value limit test for newton-algorithm (PR #129).

Bug fixes

  • Bus value specification uses is_set instead of val_set as the component properties data container is used (39ca830).

  • Parameters local_design and local_offdesign are now also available for network exports and imports (PR #109).

  • Busses and characteristics are not exported, if none are used in the network. The network_reader can now handle missing bus.csv, char_line.csv and char_map.csv (PR #127).

  • Some parameters of class combustion_engine <tespy.components.combustion.engine> have been printed out twice in the value range check (PR #135).

Other changes

  • Adjust logging levels for grouped component parameter initialisation (PR #111).

  • Implement pep8speaks (PEP8 checker) in GitHub repository (PR #131).

  • The subsystem architecture has been simplified. Your connections and components are saved to dictionaries to make accessing the individual properties much easier (PR #126). For a use case of subsystems, have a look at the subsystem documentation.

  • Change the specification of set value for dc_simple <tespy.tools.data_containers.dc_simple> class from val_set to is_set (PR #138).

  • Move the default characteristic function plots to the tespy.data module documentation (PR #138).

Contributors

  • Francesco Witte (@fwitte)

  • @MarBrandt

  • @maltefritz

  • @jfreissmann

  • @stianchris

  • @FranziPl

Examples

Removed default import shortcuts

tespy 0.1.x

from tespy import cmp, cmp_char, con, hlp, logger, nwk, nwkr, subsys

tespy 0.2.x (example imports)

from tespy.components import heat_exchanger, turbine
from tespy.connections import connection, bus, ref
from tespy.networks import network, load_network
from tespy.tools import char_line, char_map
from tespy.tools import logger

Renaming components

tespy 0.1.x

from tespy import cmp
chp = cmp.cogeneration_unit('combined heat and power')
IF = cmp.subsys_interface('subsystem interface')

tespy 0.2.x

from tespy.components import combustion_engine, subsystem_interface
chp = combustion_engine('combined heat and power')
IF = subsystem_interface('subsystem interface')

Renaming tespy.networks functionalities

tespy 0.1.x

from tespy import nwkr
mynetwork = nwkr.load_nwk('path/to/exported/networkfiles')
mynetwork.set_printoptions(print_level='none')
mynetwork.set_printoptions(print_level='info')

tespy 0.2.x

from tespy.networks import load_network
mynetwork = load_network('path/to/exported/networkfiles')
mynetwork.set_attr(iterinfo=False)
mynetwork.set_attr(iterinfo=True)

Component characteristic specification

tespy 0.1.x

from tespy import cmp, hlp
turb = cmp.turbine('turbine')
x = [0.50, 0.75, 1.00, 1.25]
y = [0.90, 0.98, 1.00, 0.99]
char = hlp.dc_cc(is_set=True, x=x, y=y)
turb.set_attr(eta_s_char=char)

tespy 0.2.x

from tespy.components import turbine
from tespy.tools import char_line
turb = turbine('turbine')
x = [0.50, 0.75, 1.00, 1.25]
y = [0.90, 0.98, 1.00, 0.99]
char = dc_cc(is_set=True, func=char_line(x, y))
turb.set_attr(eta_s_char=char)