plotting a transient solution

8 vues (au cours des 30 derniers jours)
Sudharsan Srinivasan
Sudharsan Srinivasan le 27 Juil 2017
Lets say I have a rectangular domain of length = 500m and height = 100m. I have the computed velocity distribution through the grid say 'v'. clearly, v is a 500 by 100 matrix. I am running the simulation for lets say 5000 time steps. Now, I want to store the value of 'v' from each and every iteration (i.e) from 1 to 5000 and plot the velocity Vs height for different time steps and check how the solution evolves over time. How can I code this ?
  1 commentaire
Abhi Sundararaman
Abhi Sundararaman le 1 Août 2017
When you say you want to store the value of 'v' from each iteration, do you mean each time step has its own corresponding 500x100 matrix? Also, since you want to plot velocity vs height, do you still need the "length" dimension? Do you wish to plot "velocity vs position(height,length) vs time"?
If you just wanted to plot velocity vs height vs time, you could make a 3-d plot using the "surf" function.
When you say you want to check how the solution evolves over time, do you mean you want to see how these 500x100 matrices change over time? Or just how the velocity changes over time with respect to one of the dimensions (length OR height)?

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Mathematics dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by