Main Question

In the Chinese TIEBA community, there is a quite interesting post that have real world application, so I’m going to translate it and post it here to see if anyone can give an elegant result.

1. How to draw some sort of StreamPlot3D or so?

It seems that though Mathematica has StreamPlot, there’s no such an extension. Note that simply stacking multiple StreamPlot will not do the job.

The input of this function will be a vector field, just like StreamPlot.

1. How to draw a StreamPlot3D that can show the divergence and curl of the stream’s condition

Sometimes, especially when dealing with fluid dynamics, we’ll need to know how the fluid is compressed or know the rotation condition of the fluid. So by altering the radius of the stream lines’ 3D thickness and color according to the divergence of the corresponding point, we can easily know how the fluid is compressed. By twisting a “belt” according to the curling condition of the fluid will show how the fluid is swirling.

The input of these two functions will be both vector field and velocity field.

Sample Image

The sample image was created by Matlab. (Oh, I hate to find something can be easily done by matlab but not Mathematica.)

See Matlab's guide to these plotting functions:

streamline

stream3

streamtube

streamribbon

• Could you please include a minimal dataset, or at least a link to the same dataset that was used to plot the figures in Matlab? – István Zachar Aug 4 '16 at 9:28
• @István According to my understanding for the original post mentioned by OP, this question isn't a duplicate, but I admit OP should have asked the question in a clearer way, for example, these links, which can be easily found by a quick search if one reads the original Chinese post (the function names have been mentioned there!), should have be included in the question: cn.mathworks.com/help/matlab/ref/streamline.html cn.mathworks.com/help/matlab/ref/stream3.html cn.mathworks.com/help/matlab/ref/streamtube.html cn.mathworks.com/help/matlab/ref/streamribbon.html – xzczd Aug 4 '16 at 9:45
• – Michael E2 Aug 4 '16 at 11:27
• I understood it was made from a vector field (I meant from a plot of streamlines, one cannot see the curl). It would be helpful to be able to examine what was actually computed in the third plot. I don't think it is possible to show curl in this way, except in the rare cases that the curl is parallel to the flow or normal to the flow (would show direction only); if the twisting illustrates only the magnitude of the curl, then I think it's rather misleading. – Michael E2 Aug 4 '16 at 13:38
• You should add the links to the post, not only the names. – xzczd Aug 5 '16 at 1:28

Finally, StreamPlot3D and ListStreamPlot3D are introduced in v12.3:
\$Version