Message Boards Message Boards

Plot solutions to NDSolve while solution is being computed

Posted 11 years ago
Hello, I am currently using NDSolve to explore the solution to some PDEs, and my workflow is evry straight foward: pose the equations+B.Cs, the choose a method, and have NDSolve do the required computations, and then use Manipulate to visualize the solution as I change one of the variables, typically time. I am wondering if it is possible to plot the solution of NDSolve, while it is being solved so that one can for example visualize the time evolution of the solution. I tried wrapping one of the independent variables with Dynamic, but could not get it work, so I am wondering if someone has an idea on how to get his done.

P.S. I know in this case Manipulate gets the job done, but I am trying to better understand the Dynamic command and how far one can push Mathematica with some deep understanding of some basic commands to move on to some more challenging problems writing small efficient Mathematica code.
POSTED BY: Francisco Obando
There is an option to NDSolve and related numerical functions like FindRoot, which is called EvaluationMonitor. This allows you to capture the individual solution steps, assign them to a variable and use that variable within a Dynamic construct.
POSTED BY: Arnoud Buzing
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract