-
Notifications
You must be signed in to change notification settings - Fork 44
Description
I suppose for newcomers chapter 12.7 is not really easy to understand.
It is not clearly stated, that the function der_y defining the derivative of another function y(x) has to be constructed as the derivative with respect to time, i.e. der_y=dy/dx*dx/dt. This also clarifies why dx/dt has to be liste as an input to function der_y.
For me the difference or the pruposes of noDerivative versus zeroDerivative is not completely clear.
What if I have a parameter record which won't influence der_y? Do I have to specify noDerivative or zeroDerivative?
For me it's always a little bit shaky if a tool is free to inline a function an create analytic derivatives itself. All tools? What if not?
Maybe a complete simple example could help to explain that. Feel free to take something from my enclosed example with physical background (saturating inductor, where we use for the approximation of MagneticFlux psi = f(Current i) a special sigmoid (the normal cumulative distribution function). In the model we need der(psi), and maybe not all tools can calculate the derivative of Modelica.Math.Distributions.cumulative (which in fact is Modelica.Math.Distributions.density).
