3
$\begingroup$

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.)

StreamPlot3D

Plot with div

Plot with curl

See Matlab's guide to these plotting functions:

streamline

stream3

streamtube

streamribbon

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.