Which ODE solver for this equation?

15 views (last 30 days)
Pl Pl
Pl Pl on 19 Mar 2013
Dear all,
I have to simulate the behaviour of a magnetic system described by a generalised Landau Lifshitz Gilbert equation, which looks like:
dm/dt = k1*mxH + k2*mx(mxH) + k3*cos(w*t)*mx(mxv) + k4*cos(w*t)*mx(mx(mxv))
where:
  • m is a 3*1 vector
  • the ki's are constant coefficients
  • H is a vector depending on both m and t, i.e. H = H(m,t)
  • v is a constant vector
  • * stands for the usual product
  • x stands for the vector product
The starting point is an equilibrium point (for t = 0, so that the cos are unity) and then I got very different results depending on the solver I used. My guess was that the equation is stiff but even with stiff solvers, the solution doesn't look like what I expect. I tried to reduce the step size as much as possible but the problem remains.
Here is a picture of the different solutions with the different solvers for one of the components of m.
The stiff solvers basically give a constant zero solution (not visible on the plot), but I would have expected some oscillations in any case. Do you have any idea what I could do to get a proper solution?
Thank you,

Answers (1)

Benjamin Friedrich
Benjamin Friedrich on 19 Mar 2013
I would have thought that m=0 is a fixed point, i.e. m=0 at time=0 implies m=0 for all times, at least in theory. Now, any numerical scheme will introduce rounding errors, which amount to a perturbation of the fixed point. I would suspect that the dynamics you see are just rounding errors, which of course are (1) solver specific, (2) are expected to decay faster for stiff solvers. Have you tried other values of m, do you get sensible results for those?
Best Ben

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!