Replies: 1 comment
-
Hi @nkawerau, thank you for reaching out, the docs are kind of outdated here and should be improvemed!
There are two different types of derivative methods:
For example,
Hope it helps :). How would the equation(s) you want to implement look like? |
Beta Was this translation helpful? Give feedback.
-
I am currently trying to implement a new custom component in Tespy for an alkaline electrolysis. The basic steps are clear to me from the documentation. Nevertheless, I am having trouble setting up the method for the partial derivatives of the system equations for the Newton–Raphson solver correctly. I think the following section in the documentation tries to explain this: “For the derivative, the partial derivatives to all variables of the network are required. This means, that you have to calculate the partial derivatives to mass flow, pressure, enthalpy and all fluids in the fluid vector on each connection affecting the equation defined before”. However, it’s still not clear to me what the structure of the derivatives should look like. Please explain the differences between derivatives for component variables and for component equations. Some methods “_deriv“ write directly to self.jacobian others return a numpy array called deriv.
Beta Was this translation helpful? Give feedback.
All reactions