MATLAB Answers


Plotting a Figure for Velocity/Temperature as One moves along a 'radial line' in steps of 0.2

Asked by Tom
on 10 Aug 2019
Latest activity Edited by Tom
on 11 Aug 2019
I have results for velocity and temperature due to a flow when you choose fix theta and phi in spherical polar coordinates and move out in the radial direction at steps of 0.2 at a time, so that the radial coordinate goes from 1 to 10 in steps of 0.2.
Basically the result that you get is a 4 x 46 array, so that's 46 column vectors where the components are thought of as [v1, v2, v3, theta], so you have 46 column vectors giving the velocity vector and temperature at each position on the radial line (the velocity vector is in Cartesian coordinates however).
I need to plot separate graphs where I take the radial component of the velocity, the polar component of the velocity and the temperature and then plot against radius if that makes sense. So there will be a black circle on the plot at r = 1 for the radial component of the velocity in the first vector in the array, then at r = 1.2 another dot for the radial component of the velocity of the second vector in the array, and so on. Please let me know if my intention is not clear.


2019 年 8 月 10 日
Not entirely clear, no.... :)
Can you make a sketch of what you think this would look like and attach it?
Also, we can't do much with the data; attach a .mat file or just the text for no bigger array than this (presuming don't keep 2000 digits of precision for each).
2019 年 8 月 11 日
I am basically trying to reproduce the numerical results on Figure 6, page 429 of this paper.
So you see there are dots on the line corresponding to the numerical solution at various radii as you fix theta and phi and move outwards. What I am going for to is to have a dot at each step of 0.2 in the radius as you go from 1 to 1.2 and so on up to 10.
Now I've got the position vectors in a 3 x 46 array for all those radial points and I've got the 4 x 46 array which gives the velocity vector and the temperature at each point, and I just want to take each vector and plot the temperature on a graph against radius to match with the analytic solution, plus the radial component of the velocity and the polar component.
I've already got the graph of r against polar component to plot the analytic solution, so it would be sufficient to just take the first vector, find the polar component of velocity, plot it on graph and have it correspond to r = 1, then take the second vector, do the same, plot it on the graph and line it up with r = 1.2, then continue although all the points are on there.

Sign in to comment.


0 Answers