I want to determine the frequency of oscillations in a system of three stiff ODEs (Oregonator model). That model describes a chemical oscillator.
I have a slightly more advanced model of the default or regular Oregonator. It consists of three ODEs:
ode1=ε*x'[t]==x[t](1-x[t])-2*(x[t]-μ)/(x[t]+μ)*(r*α1*y[t]+q*((α2*z[t])/(1-z[t])));
ode2=ξ1*y'[t]==x[t](1+β2*z[t])-α1*y[t]-((x[t]*(1+β1*y[t]+β2*z[t]))/((1-z[t])+η*(1-y[t])))*(1-z[t]);
ode3=ξ2*z'[t]==x[t]*(1+β1*y[t])-(α2*z[t])/(1-z[t])-((x[t]*(1+β1*y[t]+β2*z[t]))/((1-z[t])+η*(1-y[t])))*η*(1-y[t]);
with the initial (example) conditions ic
ic2 = {x[0] == .5, y[0] == 0.1, z[0] == 0.3};
I use NDSolveValue for this:
{xSol, ySol, zSol} = NDSolveValue[{ode1, ode2, ode3, ic2}, {x, y, z}, {t, 0, 200}]
This looks like this:
So far, so fine. I now need to determine the frequency of the oscillations in this model with three ODEs.
I found this related question, but that only features a single ODE. And as I'm really a Mathematica novice, I also didn't understand how the Reap and Sow worked.
The suggested solution was as follows:
pts =
Reap[s = NDSolve[{y'[x] == y[x] Cos[x + y[x]], y[0] == 1,
WhenEvent[y'[x] == 0, Sow[x]]}, {y, y'}, {x, 0, 30}]][[2, 1]]
(* Out[290]= {0.448211158984, 4.6399193764, 7.44068279785, 10.953122261,
13.8722260952, 17.2486864443, 20.2244048853, 23.5386505821,
26.5478466115, 29.8261176372} *)
Plot[{Evaluate[y[x] /. s], Evaluate[y'[x] /. s]}, {x, 0, 30},
PlotRange -> All]
and then finding the differences:
diffs = Differences[pts, 1, 2]
(* Out[288]= {6.99247163887, 6.31320288463, 6.43154329733,
6.29556418327, 6.35217879014, 6.28996413777, 6.32344172616,
6.28746705515} *)
Mean[diffs]
(* Out[289]= 6.41072921417 *)
This looks exactly what I need, but I don't know how to apply this to my three ODEs? I preferably want to keep the initial conditions, ic, in a separate variable like I now have.
Can anyone show me how to modify the above solution so that it works with my system? I want to determine the frequency separately for x[t], y[t] and z[t]. If people have a different solution than proposed in the related question, you're of course very welcome!
Many thanks in advance!


