v0.9.0
HarmonicBalance v0.9.0
The new features include:
- All the time evolution feature are now only available when also
OrdinaryDiffEq
is loaded. This makes loading/compile time less convoluted and reduces our namespace in a normal HB session. I would say that in the future we want something similar to Plots. Allowing the user to choose their plotting package and not have clashing namespaces with for exampleMakie.plot
andPlots.plot
. - I added a ModelingToolkit extension which gets loaded when ModelingToolkit is loaded in the same session. It allows us to translate the
HarmonicEquation
struct to anODEProblem
. The ModelingToolkit framework does this very efficiently by: also compiling Jacobian automatically, freedom to choose in-place or out-of-place, making it statically compiling and adding extra structure for the OrdinaryDiffEq solver to use. The result in a dramatic increase in performance when solving the ODE (from 14ms to 500μs). - Lastly, I added a SteadyStateDiffEq extension. For the parameter estimation project, I had to rewrite the HarmonicBalance steady state sweep solver. It was highly inefficient (no use of Jacobian in the RK solver, not static, too many allocations) and it did an interpolation of the parameters sweep where it changed the parameter in every time step. The latter, at first thought, seems a good idea, but it introduces oscillations and you had to evolve for very long which introduces inefficiency and energy loss (timestep integration loss). Instead, we now use a root solver (Newton-Raphson) following the branch until the branch is unstable (bifurcation) and we use a steady solver to find the next branch. This is similar to what
follow_branch
does but without using HomotopyContinuation. This made it Automatic differentiable needed for optimization algorithms.
Merged pull requests:
- Remove
getindex
function forOrderedDict
(#141) (@oameye) - set progressbar length and some formatting (#142) (@oameye)
- add "no_sorting" option (#145) (@oameye)
- HarmonicBalance Extensions (#154) (@oameye)
- Update issue templates (#155) (@oameye)
- Bump actions/checkout from 2 to 4 (#159) (@dependabot[bot])
Closed issues: