oemof / tespy

Thermal Engineering Systems in Python (TESPy). This package provides a powerful simulation toolkit for thermal engineering plants such as power plants, district heating systems or heat pumps.
https://tespy.readthedocs.io
MIT License
256 stars 80 forks source link

A method to calculate all partial derivatives of a component's equation numerically might be useful #465

Open fwitte opened 6 months ago

fwitte commented 6 months ago

The designer of a component needs to add equations and the respective derivatives for each desired parameter of that component. There is a possibility to use the numeric_deriv function, which calculates a derivative numerically calling the respective equation with a slight change in the specified variable. A list of variables could be added to the parameter information (i.e. the variables relevant for an equation, like inlet enthalpy and pressure, outlet mass flow, ...) and with that list the numeric derivatives would be calculated automatically sparing the designer of the requirement to write the respective _deriv method.