Numerical integration "backwards"
15 次查看(过去 30 天)
显示 更早的评论
Hello everyone,
I have a system of nonlinear equations on the form
x1' = f1(x1,x2,x3)
x2' = f2(x1,x2,x3)
x3' = f3(x1,x2,x3)
Let the flow F(x,t) be the solution to the system, that is, F(x0,t) as a function of t is an integral curve that goes through x0 at t=0.
I need the value of the inverse flow to some particular values of x0 and t0, that is, the value of F^-1(x0,t0) = F(x0,-t0).
Wen I use Matlab's odeXX functions to integrate F() numerically, I get well-behaved integral curves. Now, the problem is, when I try to use them to integrate F^-1() by reversing the time span parameter (or by exchanging the signs of the right hand sides of the differential equations), then apparently a numerical unstability occurs, and the integral curve grows extremely fast.
Does any one know how I can get the curve for F^-1(x0,t0), for particular t0 and x0?
Code used so far:
%code to compute the solution for F(x0,t0):
[t1,flow] = ode15s(@f1f2f3,[0 t0],x0);
%code to compute the solution for F^-1(x0,t0)=F(x0,-t0):
[t2,flowinv] = ode15s(@f1f2f3,[t0 0],x0);
采纳的回答
Andrew Newell
2011-4-3
You seem to be talking about equations for some physical phenomenon like fluid flow. In general, you can't integrate physical equations backwards. You can only do it if you don't have dissipative terms like friction. The numerical blowup is probably telling you that you have such a term. This is not really a MATLAB issue.
EDIT: You could get an intuitive feel for whether it is feasible or not by plotting a phase portrait of the system, i.e., choose a grid of reasonable starting values, calculate the flow, and then plot all the curves together. Do you have attractors?
7 个评论
Andrew Newell
2011-4-8
Yes. The phase portrait is just a picture of flow lines while the Poincaré map is a less intuitive plot that looks at intersections of trajectories in some traversal section in phase space. Sorry, I can't really explain it in a comment. The point is that if the orbits are periodic they'll keep intersecting at the same points, but if it's chaotic you'll get a much more complex pattern.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Particle & Nuclear Physics 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!