How can I use NDSolve
when running out of RAM?
The code I am implementing:
sol = NDSolve[ pdes, {A, B, C},
{x, -L, L}, {t, Tf, Tf} ]
in order to obtain the end solution of NDSolve
to be exported to the next run (due to limited RAM).
In previous attempts the solution of NDSolve
was exported as an interpolating function, such as:
Export["sol_Tf.wdx",sol]
sol_Tf.wdx
is the export file of the NDSolve
run.
Also see my previous question.
I then imported it as:
Import["sol_Tf.wdx"]
and used the boundary conditions:
A[x, Ti] == A[x, Tf]
B[x, Ti] == B[x, Tf]
C[x, Ti] == C[x, Tf]
But the results were different from running it all in one go. What went wrong here? Is there a better way of doing this?
For example, in the heat equation:
sol = NDSolve[{D[u[t, x], t] == D[u[t, x], x, x], u[0, x] == 0,
u[t, 0] == Sin[t], u[t, 5] == 0}, u, {t, 0, 10}, {x, 0, 5}]
I would want to continue it with the end results of the previous run, as the new boundary conditions of the next run; RAM free, and by running it again from t = 10 to t = 20.