He discusses the engine in a previous video. The integrator is RK4 with fixed step size (no error adjustment) and constraints are maintained by reaction forces. Numerical instability in that type of system comes primarily from energy added to maintain the constraints.
Thanks, that explains the instability and small step size. I really wish people would stop teaching RK4, not only exists there a slightly tuned set of coefficients which much better one called Tsit5 but in this case an explicit ODE solver of such high order just asks for trouble with what is effectively an Differential Algebraic Equation due to the constraints and fixed step size is ... an easy choice for implementation but it can really require very small steps if there is stiffness-esque behaviour anywhere.
Indeed the systems used for real engine design generally make use of the differential-algebraic equation form in order to have conservation and preserve the rigid body properties. But to do this accurately, you usually arrive at an Index-2 DAE, so you then have to use Pantelides algorithm to do an index reduction before hitting it with an integrator like DASSL. So it takes an order of magnitude of work to hit that extra accuracy and efficiency. But if you don't have Dymola or ModelingToolkit.jl hanging around, this at least decent. Agreed RK4 is a weird thing for people to default to: with almost no work you can at least do better than RK4 at least with Dormand-Price, Tsit5, or SSP methods.
Comments
I wonder that time integrator is used for what must be a DAE system and if a better integrator could cut those numbers of step required down by a lot.
He discusses the engine in a previous video. The integrator is RK4 with fixed step size (no error adjustment) and constraints are maintained by reaction forces. Numerical instability in that type of system comes primarily from energy added to maintain the constraints.
Thanks, that explains the instability and small step size. I really wish people would stop teaching RK4, not only exists there a slightly tuned set of coefficients which much better one called Tsit5 but in this case an explicit ODE solver of such high order just asks for trouble with what is effectively an Differential Algebraic Equation due to the constraints and fixed step size is ... an easy choice for implementation but it can really require very small steps if there is stiffness-esque behaviour anywhere.
Indeed the systems used for real engine design generally make use of the differential-algebraic equation form in order to have conservation and preserve the rigid body properties. But to do this accurately, you usually arrive at an Index-2 DAE, so you then have to use Pantelides algorithm to do an index reduction before hitting it with an integrator like DASSL. So it takes an order of magnitude of work to hit that extra accuracy and efficiency. But if you don't have Dymola or ModelingToolkit.jl hanging around, this at least decent. Agreed RK4 is a weird thing for people to default to: with almost no work you can at least do better than RK4 at least with Dormand-Price, Tsit5, or SSP methods.
Would an implicit ODE solver (Euler or higher order) where the constraint solve is included in the implicit step be helpful?