v0.9

Changelog of the v0.9 release series.

v0.9.16 - Kelvin’s Kingdom (April, 27, 2026)

New features

  • There is a new type of connection, HAConnection, which utilizes the HAPropsSI functionalities of CoolProp. The feature is still in experimental stage, go and check it out in the example on this page (PR #940).

Other Changes

  • Improve convergence behavior of UA and kA related equations of HeatExchanger classes (PR #953).

  • Implement a method to catch all-zero entries in rows of the Jacobian to continue iterations (PR #955).

  • Remove under-stoichiometric combustion due to numerical issues with hydrogen (PR #957). UPDATE: The fix has been reverted and a better solutions was implemented: (94063d3).

Bug Fixes

  • UPDATE post3: The temperature starting value guess for referenced temperature specifications was originally updated before updating all guess values for all connections. This could lead to doing a guess for one conneciton, while the referenced connection did not have that update yet (3d99318).

Contributors

v0.9.15 - Kelvin’s Kingdom (April, 18, 2026)

New Features

  • A draft for a high-level tespy.model class is available: ModelTemplate. The class provides some interfacing and orchestration methods to make sensitivity analysis, cycle plotting and optimization easier. For examples on how to use it please check the Integration and Optimization tutorials (PR #944).

  • The API for OptimizationProblem changed from nested type dictionary specification to flat type dictionary specification and is fully compatible to the new ModelTemplate class. We strongly recommend to use it together with :code:`ModelTemplate` in the future. The optimization tutorial has been revised accordingly (PR #944).

Other Changes

  • The set_attr methods of Component and Connection type classes have been refactored for improved readability and maintainability. The responsibility for the value checks now lies in separate methods, which are handled by the respective data containers (PR #936).

  • The set_attr method of Network class has been deprecated, now all the attributes need to be directly assigned in the future (PR #939).

  • TESPy now exports 'vol' as key for specific volume in context of data transfer to fluprodia for cycle plots. fluprodia version 4.1 will align with the TESPy unit and naming schemes (PR #941).

  • There now is a quantity for pressure_difference separate from the pressure quantity. You will need to specify them individually in the future (PR #942).

  • T_dew and T_bubble are now also available as outputs parameters of the connection post-processing (PR #944).

  • It is possible to set or unset a UserDefinedEquation without needing to remove and add it again to a Network, check the example in the respective section of the docs (PR #944).

  • HeatExchanger class type components now also have the calc_sections method to make QT diagrams in the same structure as available in SectionedHeatExchanger (PR #944).

  • Improve performance for passing data to the Network.results dataframes (PR #944).

Bug Fixes

  • Fixed a bug, which prevented reading the correct information for the connections adjacent to a component in local_offdesign=True mode in a design simulation or with an individual design_path in an offdesign simulation (PR #943).

  • Fixed a bug that prevented derivative calculation for volumetric flow of gas mixtures and the postprocessing of valve type components (PR #949).

Contributors

v0.9.14 - Kelvin’s Kingdom (April, 7, 2026)

Bug Fixes

  • When setting a Ref for a temperature, the starting value for enthalpy of the connection with the Ref specified is updated in preprocessing (PR #921).

  • When loading a Network from its serialized form the is_var information of component properties being a variable was missing (PR #932).

  • For component characteristic maps the default if no map is found in the tespy.data module was a CharLine by accident. This was a silent error because if not used, it did not do any trouble. Only when importing a Network and reconstructing the component parameters the CharMap could not be constructed successfully because it was missing dimensions (PR #933).

  • The reactor classes FuelCell and WaterElectrolyzer were missing the implementation for a PowerConnection (PR #934).

Other Changes

  • A CITATION.cff file is available to reference the GitHub repository (PR #917).

  • You can now specify the flow speed at the inlet of pipes (PR #924).

  • It is now possible to specify the efficiency of class Pump based on flow work (\(v\cdot \int dp\)) next to isentropic efficiency (PR #927).

  • The SectionedHeatExchanger and MovingBoundaryHeatExchanger now can utilize the UA_char as offdesign parameter. It utilizes the characteristic kA_char lines of the standard heat exchangers to evaluate the change of UA to UA_design as function of mass flow. It is similar to the UA_cecchinato method, but does not need the specification of Reynolds exponents, area or alpha ratios (PR #928).

Contributors

v0.9.13 - Kelvin’s Kingdom (March, 5, 2026)

New Features

  • The Valve class now has flow coefficient Kv equations implemented. You can either specify the Kv value directly, specify a Kv_char with an opening which does a value lookup of Kv as function of the opening or you can provide a custom function, which takes the opening and a set of custom parameters that will be called by the equation (PR #891).

  • It is now possible to dynamically add missing combustion fluids to your model by importing COMBUSTION_FLUIDS from the tespy.tools module and adding the respective information (fluid name, LHV and/or enthalpy of formation). For an example check out the docs: tespy.components.combustion.base.CombustionChamber (PR #770).

  • The Pump class now implements hydraulic head over flow and frequency as well as efficiency over flow and frequency characteristic maps. For an example check out the docs: tespy.components.turbomachinery.pump.Pump (PR #911)

  • You can skip the complete postprocessing of components and connections after solving a model. This can speed up the calculations quite significantly and might be useful, if you are executing many simulations and you are not interested in all results and internal validations (value checks of the results to identify negative pinches, efficiencies larger than 1 etc.) (PR #907).

Other Changes

  • Characteristic map extrapolation is possible by providing the keyword extrapolate=True when creating the map.

Contributors

v0.9.12 - Kelvin’s Kingdom (January, 24, 2026)

New Features

  • Custom fluid property wrappers can now receive arbitrary kwargs making injection of information for the underlying property models much easier. Check the section on the incompressible fluid properties (PR #877).

  • There is a new FluidPropertyWrapper for incompressible fluids such as thermo-oils, which you can pass measurement or manufacturer data to. The IncompressibleFluidWrapper will automatically fit functions to the data points you provide:

    • heat capacity and density: linear interpolation \(f\left(T\right) = A + B \cdot T\).

    • viscosity: exponential polynomial equation \(\eta\left(T\right) = e ^ {\frac{A}{T ^ 3} + \frac{B}{T ^ 2} + \frac{C}{T} + D}\)

    For an example in a TESPy model see this section (PR #878).

Other changes

  • The optimization API has changed to integrate pymoo instead of PyGMO. This change was done, because PyGMO required conda to be installed on Windows, and the latest installable version available with pip for Linux based systems was broken.

    Very few changes have to be made to utilize pymoo compared to the original implementation with PyGMO, which only concern

    • specifying the population,

    • selecting the algorithm and

    • running the optimization.

    Old variant:

    algo = pg.algorithm(pg.ihs(gen=num_gen, seed=42))
    # create starting population
    pop = pg.population(pg.problem(optimize), size=num_ind, seed=42)
    
    optimize.run(algo, pop, num_ind, num_gen)
    
    results = optimize.individuals
    

    New variant:

    algorithm = DE(pop_size=20)
    
    res = minimize(
        problem,
        algorithm,
        termination=('n_gen', num_evo)
    )
    
    results = problem.log
    

    With the new implementation you also have more control on automatic termination of the optimization. For all information see the pymoo docs, and check out the tutorial to see, how to use pymoo (PR #872).

  • The logging of the optimization with pymoo now can keep track of additional kpi (PR #873).

  • Many methods of the Network class, that are supposed to be private are now named appropriately with a leading underscore. On top, some methods have been renamed to clarify what they do (PR #875).

  • The logging level of some messages has been changed from warning to debug (PR #893).

  • isentropic method for calculation of isentropic outlet enthalpy can now receive starting values for both inlet and outlet temperature in the context of gas mixtures (PR #896).

Bug Fixes

  • The starting points for fluid wrapper propagation now can handle classes that inherit from the starting point components. Before, they had to have the identical name because a class name comparison was done (PR #871).

  • Fix a bug in the specification of the relaxation factors that cause the pressure relaxation factor to overwrite the factors for all other variables (PR #875).

Contributors

v0.9.11 - Kelvin’s Kingdom (December, 17, 2025)

Other changes

  • The documentation has been completely restructured to improve navigation. On top new tutorials on creating custom components and model debugging, a section on frequently asked questions and a more compact overview on the available component classes and the respective specification parameters with their underlying equations have been added (PR #820).

Bug Fixes

  • The moving boundary identification failed in some cases, when the phase change boundary was directly at the inlet or the outlet of a respective stream in the heat exchanger because brentq was to able to perform the root finding in that case (PR #865).

  • With the change of the scaling of the variables in context of the calculation of numerical derivatives, the identification of minimum and maximum enthalpy limits is now working as expected again (PR #867).

Contributors

v0.9.10 - Kelvin’s Kingdom (November, 30, 2025)

New Features

  • The MovingBoundaryHeatExchanger now handles a pressure drop by assuming linear change of pressure with enthalpy. Furthermore, this capability is integrated into the SectionedHeatExchanger, which uses the specified number of sections and inserts the phase change boundaries additionally into its sections. With this the SectionedHeatExchanger also identifies phase changes correctly (PR #851).

Other changes

  • Physical exergy evaluation: Introduced a robust, domain-safe fallback for cases where CoolProp cannot evaluate ambient-state properties h(p0, T0) or s(p0, T0). When the ambient temperature T0 is below the FluidPropertyWrapper’s minimum supported temperature, TESPy now evaluates the reference state at the wrapper’s Tmin (offset by 1e-6 K to avoid boundary issues) and calculates the physical exergy with respect to that temperature without exergy splitting (PR #828).

  • Numerical derivative calculation is now done with a different delta for the central differences of the variables. Instead of having a fixed absolute delta, the delta is relative to size or absolute for variable values that are very close to zero (PR #851).

Bug Fixes

  • Fix a bug which prevented unsetting component characteristics and properties stored in SimpleDataContainer (PR #847).

  • Fix a bug which prevented functions with multiple equations of returning numpy arrays instead of a list SimpleDataContainer (PR #850).

Contributors

v0.9.9 - Kelvin’s Kingdom (November, 7, 2025)

Other changes

  • The parsing/exporting a tespy model to exerpy has been included in the exerpy package in its latest release. Therefore the respective capabilities and methods are removed from tespy (PR #729).

Bug Fixes

  • Some component parameters were missing the quantity specification. This has been fixed (PR #823).

  • Some component equations were utilizing the .val property inside some equations, leading to false results when these properties were specified in non-SI units (PR #832).

  • Fix an issue with the PolynomialCompressorWithCooling in which the parameters dp_cooling and pr_cooling where missing the specification of num_eq_sets (PR #836).

Contributors

v0.9.8 - Kelvin’s Kingdom (October, 17, 2025)

New Features

  • It is now possible the specify pressure indirectly by specifying the dew line or bubble line temperature of the fluid T_dew or T_bubble. Specifying any of these will precalculate the pressure in the preprocessing and set it as fixed value on the respective connection (PR #793).

  • A new component SectionedHeatExchanger is available. This component works similar to the MovingBoundaryHeatExchanger but discretizes with a specific number of steps (user specified) over the enthalpy and linearly over the pressure drop. This allows you to integrate pressure drop in the UA and internal pinch calculation. For an example look up the component in the API documentation (PR #794).

  • A new component PolynomialCompressorWithCooling is available. This component is an extension on the PolynomialCompressor adding a inflow and an outflow for a cooling fluid. The eta_recovery identifies the share of heat transferred from the dissipated heat (based on the dissipation_ratio) of the refrigerant. Along with this a restructuring has taken place, and the PolynomialCompressor classes now are located in the tespy.components.displacementmachinery module.

    Attention

    With the components moving you now need to import the compressor specific setup methods for the polynomials calculations from the new module, e.g.:

    >>> from tespy.components.displacementmachinery.polynomial_compressor import generate_eta_polys_from_data
    

    (PR #804).

Other changes

  • Q_diss_rel of the PolynomialCompressor class has been renamed to dissipation_ratio (PR #802).

  • A nice new tutorial on the different types of heat exchangers is available (PR #798).

  • Parameter groups (e.g. darcy_group or UA_cecchinato) can now be specified to not be used in design or offdesign even when all elements of the group are set with offdesign=["UA_cecchinato"] (PR #812).

  • It is now possible to desirialize a Network from a dictionary. For this you have to do the following:

    >>> from tespy.networks import Network
    >>> from tespy.components import Source, Sink
    >>> from tespy.connections import Connection
    >>> nw = Network()
    >>> c = Connection(Source("source"), "out1", Sink("sink"), "in1", label="c")
    >>> nw.add_conns(c)
    >>> serialization = nw.export()  # you can save the serialization in a variable
    >>> new_nw = Network.from_dict(serialization)
    

    (PR #816).

Bug Fixes

  • td_bubble and td_dew are now calculated in postprocessing if they are not specified (PR #792).

  • The component classes missing the @component_registry decorator have been updated (PR #815).

  • h_ps and h_pQ have been added to the FluidPropertyWrapper class (PR #818).

Contributors

v0.9.7 - Kelvin’s Kingdom (September, 28, 2025)

New Features

  • A partload UA modification is available for the MovingBoundaryHeatExchanger class implementing the equation described in [5] (PR #752).

  • There is a method to automatically extract all states and processes within a cycle to be passed to fluprodia. You can import the get_plotting_data from the tespy.tools module and then pass your Network object as well as a connection label of the cycle (the label of any connection within that cycle works) to retrieve the data required by fluprodia. Consider the example of a simple heat pump below:

    Show network setup code
    >>> from tespy.networks import Network
    >>> from tespy.connections import Connection
    >>> from tespy.components import (
    ...     CycleCloser, MovingBoundaryHeatExchanger, Compressor, Valve,
    ...     SimpleHeatExchanger, Source, Sink
    ... )
    
    >>> nw = Network(iterinfo=False)
    >>> nw.units.set_defaults(
    ...     temperature="°C", pressure="bar"
    ... )
    
    >>> cp = Compressor("compressor")
    >>> cc = CycleCloser("cycle_closer")
    >>> cd = MovingBoundaryHeatExchanger("condenser")
    >>> va = Valve("expansion valve")
    >>> ev = SimpleHeatExchanger("evaporator")
    >>> so = Source("water source")
    >>> si = Sink("water sink")
    
    >>> c1 = Connection(cc, "out1", cd, "in1", label="c1")
    >>> c2 = Connection(cd, "out1", va, "in1", label="c2")
    >>> c3 = Connection(va, "out1", ev, "in1", label="c3")
    >>> c4 = Connection(ev, "out1", cp, "in1", label="c4")
    >>> c5 = Connection(cp, "out1", cc, "in1", label="c5")
    
    >>> nw.add_conns(c1, c2, c3, c4, c5)
    
    >>> a1 = Connection(so, "out1", cd, "in2", label="a1")
    >>> a2 = Connection(cd, "out2", si, "in1", label="a2")
    
    >>> nw.add_conns(a1, a2)
    
    >>> cd.set_attr(dp1=0, dp2=0, Q=-1e6)
    >>> ev.set_attr(dp=0)
    >>> cp.set_attr(eta_s=0.8)
    
    >>> c1.set_attr(fluid={"R290": 1})
    >>> c2.set_attr(td_bubble=5, T=65)
    >>> c4.set_attr(td_dew=5, T=15)
    
    >>> a1.set_attr(fluid={"water": 1}, p=1, T=50)
    >>> a2.set_attr(T=65)
    
    >>> c2.set_attr(T=None)
    >>> cd.set_attr(td_pinch=5)  # resolve with minimal pinch specification
    >>> nw.solve("design")
    >>> nw.assert_convergence()
    

    Now you create the diagram:

    >>> from fluprodia import FluidPropertyDiagram
    >>> import matplotlib.pyplot as plt
    >>> diagram = FluidPropertyDiagram("R290")
    >>> diagram.set_unit_system(units=nw.units)
    >>> diagram.set_isolines_subcritical(0, 120)
    >>> diagram.calc_isolines()
    

    You can retrieve the process data and points from the mentioned method and then call the fluprodia method on it:

    >>> from tespy.tools import get_plotting_data
    >>> processes, points = get_plotting_data(nw, "c1")
    >>> processes = {
    ...     key: diagram.calc_individual_isoline(**value)
    ...     for key, value in processes.items()
    ...     if value is not None
    ... }
    

    And then make the plot:

    >>> fig, ax = plt.subplots(1)
    >>> diagram.draw_isolines(fig, ax, "Ts", 1000, 2750, 0, 120)
    >>> for label, values in processes.items():
    ...     _ = ax.plot(values["s"], values["T"], label=label, color="tab:red")
    >>> for label, point in points.items():
    ...     _ = ax.scatter(point["s"], point["T"], label=label, color="tab:red")
    

    For visualization purpose, it is also possible to include the secondary sides of heat exchangers specifically in context of Ts diagrams!

    >>> from tespy.tools.plotting import get_heatexchanger_secondary_Ts
    >>> other_processes, other_points = get_heatexchanger_secondary_Ts(nw, "c1")
    >>> for data in other_processes.values():
    ...     for label, values in data.items():
    ...         _ = ax.plot(values["s"], values["T"], label=label, color="tab:blue")
    
    >>> for data in other_points.values():
    ...     for label, point in data.items():
    ...         _ = ax.scatter(point["s"], point["T"], label=label, color="tab:blue")
    
    >>> fig.savefig("process_Ts.svg", bbox_inches="tight")
    

    (PR #785).

Bug Fixes

  • The printout of components included the units in the Network.print_results() method. This was not intended and removed again. On top, all columns that, where all entries are NaN are removed as well (PR #782).

  • Pint cache is not placed inside package installation anymore but inside platforms.user_cache_dir (PR #787).

Contributors

v0.9.6 - Kelvin’s Kingdom (September, 22, 2025)

New Features

  • There is a new component ParallelFlowHeatExchanger implementing parallel flow heat exchange, which works analogously to the counter current variant HeatExchanger (PR #766).

Bug Fixes

  • Calculation with humid air (water air mixtures) were broken for a state where partial pressure of the water exactly corresponds the saturation pressure at the given temperature of the mixture. Now there is an additional check in place to make sure the correct calculations are employed (PR #774).

  • The caching for pint broke when the python version of an environment was changed. Now a __pint_cache__ is placed in the tespy installation folder, to which the cache_folder of pint’s UnitRegistry is linked (PR #777).

Contributors

v0.9.5 - Kelvin’s Kingdom (September, 6, 2025)

New Features

  • Temperature differences to bubble and dew temperature are now explicitly set with the td_bubble and td_dew parameters, which will replace the specification of Td_bp in the next major release. The API for these specifications is as follows:

    • td_bubble references the temperature at bubble line (T(p,Q=0))

    • td_dew references the temperature at dew line (T(p,Q=1))

    • For pure fluids, this will be the same temperature, for mixtures (e.g. as accessible through REFPROP it will not)!

    • For td_bubble:

      • A positive value indicates a temperature below bubble temperature by the specified value.

      • A negative value indicates a temperature above bubble temperature by the specified value.

    • For td_dew:

      • A positive value indicates a temperature above dew temperature by the specified value.

      • A negative value indicates a temperature below dew temperature by the specified value.

    • You can also specify td_bubble=0 or td_dew=0, which will enforce saturated liquid or saturated gas state.

    >>> from tespy.connections import Connection
    >>> from tespy.networks import Network
    >>> from tespy.components import Source, Sink
    >>> nw = Network(iterinfo=False)
    >>> nw.units.set_defaults(temperature="degC", pressure="bar")
    >>> so = Source("source")
    >>> si = Sink("sink")
    >>> c = Connection(so, "out1", si, "in1")
    >>> nw.add_conns(c)
    >>> c.set_attr(fluid={"R290": 1}, m=1, p=10, td_bubble=5)
    >>> nw.solve("design")
    >>> round(c.T.val, 2)
    21.94
    >>> c.set_attr(td_bubble=None, td_dew=5)
    >>> nw.solve("design")
    >>> round(c.T.val, 2)
    31.94
    >>> c.set_attr(td_dew=-5)
    >>> nw.solve("design")
    >>> round(c.T.val, 2)
    21.94
    >>> c.set_attr(td_dew=None, td_bubble=-5)
    >>> nw.solve("design")
    >>> round(c.T.val, 2)
    31.94
    >>> c.set_attr(td_bubble=0)
    >>> nw.solve("design")
    >>> round(c.T.val, 2)
    26.94
    

    (PR #758).

Other Changes

  • Component parameters which have structure_matrix specified now also invoke equations if the do not have func associated at the same time. This was already the case for mandatory constraints, but now it is also rolled out to the parameters (PR #756).

  • Selection of mass flow starting values, where no value is available is now reproducibly random (PR #755).

  • Fix a couple of broken internal links (PR #757).

  • Immediately check temperature difference unit compatibility when specifying via set_defaults (PR #764).

  • Make a modification to the _calc_td_log method of SimpleHeatExchanger classes to enable simulations with tiny temperature difference between fluid outlet and ambient temperature (PR #761).

Bug Fixes

  • The post-processing of the components and connections now does not overwrite user specified values anymore. Instead a warning is issued (PR #767).

  • Component properties are saved and exported with units and reading design point information for components considers the unit specification (PR #771).

Contributors

v0.9.4 - Kelvin’s Kingdom (August, 31, 2025)

API Changes

  • The specification of units via the Network class instance is deprecated and will be removed with the next major release. Use the new Units class from the tespy.units module instead. It also includes units for all component properties.

    >>> from tespy.networks import Network
    >>> from tespy.components import (
    ...     Source, Sink, Turbine, SimpleHeatExchanger, PowerSink, Generator
    ... )
    >>> from tespy.connections import Connection, PowerConnection
    >>> nw = Network(iterinfo=False)
    >>> nw.units.set_defaults(**{
    ...     "pressure": "bar",
    ...     "pressure_difference": "bar",
    ...     "temperature": "degC",
    ...     "temperature_difference": "delta_degC",
    ...     "power": "MW",
    ...     "heat": "hp",
    ...     "efficiency": "%"
    ... })
    >>> source = Source("source")
    >>> heater = SimpleHeatExchanger("heater")
    >>> turbine = Turbine("turbine")
    >>> sink = Sink("sink")
    >>> generator = Generator("generator")
    >>> grid = PowerSink("grid")
    >>> c1 = Connection(source, "out1", heater, "in1", label="c1")
    >>> c2 = Connection(heater, "out1", turbine, "in1", label="c2")
    >>> c3 = Connection(turbine, "out1", sink, "in1", label="c3")
    >>> e1 = PowerConnection(turbine, "power", generator, "power_in", label="e1")
    >>> e2 = PowerConnection(generator, "power_out", grid, "power", label="e2")
    >>> nw.add_conns(c1, c2, c3, e1, e2)
    

    Parameter specifications come with the specified units.

    >>> c1.set_attr(fluid={"water": 1}, T=25, p=100)  # degC and bar
    >>> c2.set_attr(T=600)  # degC
    >>> c3.set_attr(p=5)  # bar
    >>> e2.set_attr(E=10)  # MW
    >>> heater.set_attr(dp=5)  # pressure drop -> bar
    >>> generator.set_attr(eta=97)  # efficiency
    >>> turbine.set_attr(eta_s=85)  # efficiency
    >>> nw.solve("design")
    

    It is even possible to specify a custom unit for a single parameter:

    >>> Q = nw.units.ureg.Quantity
    >>> heater.set_attr(dp=Q(20, "psi"))  # set pressure drop with in psi
    >>> nw.solve("design")
    >>> round(c2.p.val_with_unit, 4)  # retrieve pint.Quantity
    <Quantity(98.621, 'bar')>
    >>> round(turbine.P.val, 2)  # val still only retrieves number, but in specified default unit
    -10.31
    >>> round(heater.dp.val, 1)  # individually assign units are retained
    20.0
    

    If you want to make use of the unit conversion capabilities yourself for custom components and their attributes, then you have to provide the quantity information to the respective parameter. For more information on this, please check the respective section in the docs.

  • In the back-end of the tespy.components you have to adjust the access to internal component property values. Previously, these were accessed through the val property of the respective object, e.g.

    • turbine efficiency: turbine.eta_s.val

    return (
        -(outl.h.val_SI - inl.h.val_SI)
        + (
            isentropic(
                inl.p.val_SI,
                inl.h.val_SI,
                outl.p.val_SI,
                inl.fluid_data,
                inl.mixing_rule,
                T0=inl.T.val_SI
            )
            - inl.h.val_SI
        ) * self.eta_s.val_SI
    )
    

    With the introduction of units for all component parameters, these should now exclusively be accessed with the val_SI property, which also aligns the API with the Connection class API, e.g.:

    • turbine efficiency: turbine.eta_s.val_SI

    return (
        -(outl.h.val_SI - inl.h.val_SI)
        + (
            isentropic(
                inl.p.val_SI,
                inl.h.val_SI,
                outl.p.val_SI,
                inl.fluid_data,
                inl.mixing_rule,
                T0=inl.T.val_SI
            )
            - inl.h.val_SI
        ) * self.eta_s.val
    )
    

    The old way of access may still work if you are exclusively using SI units in your models, but may have unexpected side-effects.

New Features

  • A new component Node is available. The component combines the Splitter and Merge component in a single one, meaning you can connect multiple inlets and multiple outlets at the same time. The pressure is forced equal for all connections, the enthalpy and fluid composition will be equal for all of the outlets and based on the incoming fluids’ states (PR #733).

  • TESPy now integrates pint for unit conversions. With this change, you can now also specify units for the missing connection parameters

    • quality: x,

    • temperature differences: Td_bp and

    • power/heat E for PowerConnections

    as well as all component parameters. For an example on how to work with the new units, please check this section (PR #743).

  • A new component PolynomialCompressor is available. The component uses EN 12900 type polynomial coefficients to calculate isentropic and volumetric efficiencies, and can take dissipative heat loss into consideration. Displacement in offdesign conditions can be calculated based on variable rpm of the compressor. For an extensive example please check the docstrings of this component (PR #741).

Other Changes

  • A few broken internal links have been fixed in the documentation (PR #735).

  • An error is raised, when a Subsystem calls its add_conns method and the label of the to be added connection is already existing inside the Subsystem (PR #745).

  • For pure fluids in two-phase at the state of p=p and T=T0 the splitting of exergy was broken, because the enthalpy h(p=p, T=T0) cannot be calculated. Instead ex_therm is assigned 0.0 in this case (PR #738).

  • Clean up some residual code, that was not used anymore (PR #753).

Contributors

v0.9.3 - Kelvin’s Kingdom (July, 30, 2025)

Hotfix for Postreleases

  • UserDefinedEquations now automatically reassign their connection and component objections. This is necessary in context of pygmo base optimization (PR #726).

  • When either ttd_u or ttd_l on a class HeatExchanger component is zero, kA will be set to nan to prevent a crash (PR #728).

  • A bug has been fixed, that applied a convergence check based on Td_bp value even if it was not a set value (PR #731).

Other Changes

  • Td_bp and x are now set to nan, if the state of the fluid is supercritical. The _make_p_subcritical method has been removed from the FluidPropertyWrapper classes, because the convergence helpers will ensure, that no two-phase properties are accessed in supercritical states. Otherwise it was possible, that a simulation converged with a supercritical state and x or Td_bp set by the user (PR #722).

Bug Fixes

  • When adding connections to a subsystem in the create_network method components were sometimes added multiple times (PR #718).

  • The error message when imposing boundary conditions leading to a cyclic linear dependency was wrong for some instances (PR #720).

  • The starting value guesses for enthalpy of Turbine class instances now differentiates between supercritical and non-supercritical pressure (PR #721).

Contributors

v0.9.2 - Kelvin’s Kingdom (July, 24, 2025)

Other Changes

  • The generic starting values have been reworked to some extent (and as an interim solution). Through this, the guesses are more fluid agnostic and should work better for a larger variety of fluids, including incompressibles. An overall refactoring of this part of the presolver follow in the future (PR #708).

Bug Fixes

  • The Pump convergence check now enforces liquid state in the first iterations (PR #708).

  • The FutureWarningHandler now passes through the warnings correctly to the logger without change the type of warning (PR #712).

  • The _to_exerpy export of the Network instance was broken due to the change in the connector IDs for some components with the introduction of the PowerConnection class (PR #713).

Contributors

v0.9.1 - Kelvin’s Kingdom (June, 27, 2025)

New Features

  • A new component Pipeline has been added, which can calculate heat losses based on its material, insulation as well as the surrounding conditions, e.g. if it is an above surface pipeline or a subsurface buried pipeline (PR #661).

Other Changes

  • A short description has been added to the SimpleHeatExchanger docstrings on how to use the PowerConnection in this context (PR #705).

Contributors

v0.9.0 - Kelvin’s Kingdom (June, 27, 2025)

This version of tespy comes with a refactoring of the complete presolver and solver back-end. This comes with many changes in the back-end APIs and potentially with unintended consequences for models, which were recently working and stopped working with this version. All tests in tespy including the different models have been carried out successfully in context of the refactoring, but it cannot be guaranteed, that this is the case for all models. For that reason: We are looking forward for your feedback to the new version. You can submit your feedback on this GitHub discussion.

On the high-level API (what users see when working with the standard components of tespy) few changes have been made, they are listed below. In contrast, the back-end has changed quite a bit. The most relevant changes in your custom component implementations are listed in that sections. Apart from these changes, further API changes will follow in the future. These will be dealing with:

  • The units of different quantities so that both component and connection parameters can be associated with non-SI units in a structured way.

  • The post-processing of components and connections will be harmonized.

High-level API changes

  • The UserDefinedEquation now needs additional specifications. You have to provide the dependents and the deriv has become optional. The dependents keyword takes a function, which returns a list of variables the equation depends on and then automatically performs the calculation of all partial derivatives. The deriv method may still be passed, in this case, it will be used instead of automatically determining the derivatives.

    In the deriv method, the placement of values in the Jacobian has changed and should now be made through the partial_derivative method of the UserDefinedEquation instance.

    See the docs for the specific implementations.

  • The reset_topology_reduction_specifications method of the Network has been deprecated and is not required anymore.

  • The Bus class and the ExergyAnalysis class will be deprecated in the next major version release following v0.9. The PowerConnection and the respective power components replace the Bus class. The ExergyAnalysis feature moved to an external library: exerpy.

Back-end API changes

  • The mandatory constraints of components are also stored in DataContainer instances, instead of plain dictionaries.

  • Every mandatory constraint or component parameter associated with an equation now requires the specification of the dependents keyword, which is a method, that returns the variables, the equation depends on, similar to the UserDefinedEquation. This allows the solver to automatically determine the partial derivatives of the corresponding equation.

  • The specification of the deriv method is now optional for parameters, that are associated with a single equation. It overrides the automatic derivative calculation using the dependents and may be useful in context of analytical derivative formulations. For multi-equation parameters, the deriv method formulation is still mandatory.

  • Instead of providing a func and dependents for equations, that connect pairs of two variables in a linear way, e.g. pressure ratio or delta pressure specification, enthalpy or mass flow equality, etc., it is now possible to provide a structure_matrix method. This method will be used be the presolving steps to reduce the variable space by creating mappings between the physical variables on the different connections to variables, that can represent multiple other variables at the same time. This reduces the size of the problem and can improve calculation speed. In the future, this will also simplify the activating or deactivating of specific variables for the solver or removing parts of the network.

  • For a couple of examples please refer to the updated documentation section on custom components.

New Features

  • The Bus class will be deprecated in favor of PowerConnections with respective components PowerSource, Motor, Generator, PowerSink and PowerBus. These are optional connections and components, that can connect to components like Turbine, Compressor, Pump or SimpleHeatExchanger. It streamlines the API between connections transporting material flows and connections with non-material flows. For more information and examples please check this section in the docs.

  • The new version of tespy comes with great debugging capabilities, which allow you to explore, which variables have been solved in presolving with the help of which equations. Also, the variables left for the solver to solve for and the corresponding equations can be outputted after the presolving. Read more information in the new section on debugging.

  • With the refactored preprocessing, it linear relationships between pairs of variables (e.g. inlet to outlet pressure with specified pressure ratio) will be presolved in a way, that fixing any of the pressure values in a branch of connected pressure values will determine the value of all of them. This will help you with the initial set up of your model: At the example of the pressure, there is no difference anymore between fixing one pressure value with a number of pressure ratios or pressure differences between connections in a connected branch and fixing individual pressure values for all of those connections (as it was recommended to generate stable starting values before version 0.9).

  • You can now customize the orientation for the optimization by passing a list of True and False values in the minimize argument (PR #704).

Known Issues

  • The setting of starting values is still done connection by connection, even if the variable of one connection is linearly dependent to a variable of a different connection and both are mapped to a common variable for the final problem formulation. The starting value for the common variable will be taken from one of the both original variables. The procedure will be updated in a future release.

  • The Bus class preprocessing and solving process has not been updated to the same back-end API as it has been done for the components, connections and user defined equations as the class is deprecated.

Other Changes

  • Removed python 3.9 support.

  • Removed load_network and document_models modules.

Bug Fixes

  • Fixed a bug which made the simulation crash, when using MITSW or LiBr as fluids as their T_freeze is equal to 0 K in CoolProp (PR #703).

Contributors