Re: Solving very large systems of ODEs with NDSolve
- To: mathgroup at smc.vnet.net
- Subject: [mg115361] Re: Solving very large systems of ODEs with NDSolve
- From: Oliver Ruebenkoenig <ruebenko at wolfram.com>
- Date: Sun, 9 Jan 2011 02:16:55 -0500 (EST)
On Fri, 7 Jan 2011, Gabriel Landi wrote:
> Greetings all.
>
> The problem I have in my hands is to solve a very large (500 to 10 000 or +)
> system of non-linear dense ODEs (the Landau-Lifshitz equations in
> particular).
>
> In general, I think what I perhaps would like to ask is general advice on
> implementing large systems in the NDSolve Framework
> In particular, some of the problems that arose are:
>
> - In certain cases, I am not interested in storing the solution to all the
> variables for all t. All I need is the value of each dependent variable at
> the final integration time. I have been using combos of DependentVariables
> and the EventLocator method but so far I haven't been able to formulate the
> problem in a efficient way.
Gabriel,
You could try something like this:
ndssdata =
First[NDSolve`ProcessEquations[{Derivative[1][x][
t] == -3 (x[t] - y[t]),
Derivative[1][y][t] == -x[t] z[t] + 26.5 x[t] - y[t],
Derivative[1][z][t] == x[t] y[t] - z[t], x[0] == z[0] == 0,
y[0] == 1}, {x, y, z}, {t, 0, 200}, MaxSteps -> \[Infinity]]]
NDSolve`Iterate[ndssdata, 10]
NDSolve`ProcessSolutions[ndssdata, "Forward"]
ndssdata@SolutionVector["Forward"]
Oliver
>
> - Each equation has a invariant and using the projection method to control
> the error on these invariants turned out to be a very nice thing.
> Unfortunately, if the system gets larger than 100 or so equations, the
> kernel immediately crashes when I call this method (with no message at all).
> I am not sure why since, when memory is the problem, a message is issued.
> Anyone have any thoughts on this?
>
> Thanks in advance for any suggestions,
>
> Cheers,
>
> Gabriel Landi
>
>
>