且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在索引到数组时求解向量二阶微分方程

更新时间:2022-06-10 21:40:46

求解器使用适合问题的内部步进.给定的时间列表是一个点列表,在这些点中,内部解决方案为输出样本进行了插值.内部和外部时间列表没有任何关系,内部列表只取决于给定的容差.

The solver uses an internal stepping that is problem adapted. The given time list is a list of points where the internal solution gets interpolated for output samples. The internal and external time lists are in no way related, the internal list only depends on the given tolerances.

数组索引和采样时间之间没有实际的自然关系.

There is no actual natural relation between array indices and sample times.

将给定时间转换为索引并从周围表条目构建样本值称为插值(通过分段多项式函数).

The translation of a given time into an index and construction of a sample value from the surrounding table entries is called interpolation (by a piecewise polynomial function).

扭矩作为一种物理现象至少是连续的,分段线性插值是将给定的函数值表转换为实际连续函数的最简单方法.当然也需要时间数组.


Torque as a physical phenomenon is at least continuous, a piecewise linear interpolation is the easiest way to transform the given function value table into an actual continuous function. Of course one also needs the time array.

因此使用 numpy.interp1d 或更高级的 scipy.interpolate 例程来定义扭矩函数,该函数可以根据求解器及其要求在任意时间进行评估集成方法.

So use numpy.interp1d or the more advanced routines of scipy.interpolate to define the torque function that can be evaluated at arbitrary times as demanded by the solver and its integration method.