This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Time dependent problem

0 votes

Hello. I want to solve a time dependent problem and plot its solution in time and space. I've done the first, but not the last. How is it possible to do the last???

asked May 22, 2014 by kspanakis FEniCS Novice (160 points)

1 Answer

0 votes

You can save the solutions to a file

f = File("solution.pvd")
t = 0
while t < tfinal:
       ... solve for u
       f << u
       t += dt

Then you can open solution.pvd in paraview and animate it and do other things.

answered May 23, 2014 by praveen FEniCS User (2,760 points)

OK. But how is it possible to open the file and plot with respecto to space and time?

You must learn to use paraview. You can also plot within fenics using "plot".

I know "plot". But what i want is to take the solutions that are calculated every time t and gather them into a single plot.

@ kspanakis

Please post the solution or your findings If you were able to solve your problem of plotting solutions for time dependent problems.

Please post the solution or your findings If you were able to solve your problem of plotting solutions for time dependent problems.

...