7
$\begingroup$

How may we vary vectors in

StreamPlot[{y, -Sin[x/2]}, {x, -4, 12}, {y, -4, 4}, 
  StreamColorFunction -> "Rainbow", AspectRatio -> Automatic]

to obtain a Von Kármán Vortex Street type vectored stream flow (alternating rotation sense in succeeding vortices)?

$\endgroup$
  • 2
    $\begingroup$ This doesn't seem like a Mathematica question ... it's more like a physics question. Note: it's Kármán, not Kàrmàn. $\endgroup$ – Szabolcs Jun 27 '15 at 11:11
  • $\begingroup$ At least there is a tag here, elsewhere it may not go through. $\endgroup$ – Narasimham Jun 27 '15 at 11:34
  • $\begingroup$ @Kattern : Thanks, I like to see vector changes pictured on either side of, for example a fluttering flag. Please feel free to suggest how I should change my question with this aim in view. $\endgroup$ – Narasimham Jun 27 '15 at 12:03
  • $\begingroup$ Replace StreamColorFunction "Rainbow" by StreamColorFunction -> "Rainbow". $\endgroup$ – bbgodfrey Jun 27 '15 at 13:07
  • $\begingroup$ @Kattern Is it possible to use Manipulate frames &c. to trace a few points embedded on the streamline? It c/should give an impression of dry leaves floating in the stream in video (around obstacles at center but free stream along x) caught by a stationary camera on riverbank. $\endgroup$ – Narasimham Jun 28 '15 at 5:36
11
$\begingroup$

Did you have something in mind like

StreamPlot[{(y - 2 Cos[x/4])  Cos[x/4], -Sin[x/4]}, {x, -4, 12}, 
  {y, -6, 6}, StreamColorFunction -> "Rainbow", AspectRatio -> Automatic]

enter image description here

Another plot, this one with net flow.

dy = 3; flow = 1; sv = 6; 
StreamPlot[{(y - dy Cos[x/4]) Exp[-(y - dy Cos[x/4])^2/sv]  Cos[x/4] + 
   flow (1 - Exp[-(y - dy Cos[x/4])^2/sv]), 
   -Sin[x/4] Exp[-(y - dy Cos[x/sv])^2/6]}, {x, -4, 18}, {y, -7, 7}, 
   StreamColorFunction -> "Rainbow", AspectRatio -> Automatic]

enter image description here

The graphics choice suggested by chris makes the plot look even better.

dy = 3; flow = 1; sv = 6; 
LineIntegralConvolutionPlot[{{(y - dy Cos[x/4]) Exp[-(y - dy Cos[x/4])^2/sv] 
   Cos[x/4] + flow (1 - Exp[-(y - dy Cos[x/4])^2/sv]), 
   -Sin[x/4] Exp[-(y - dy Cos[x/sv])^2/6]}, {"noise", 500, 500}}, {x, -4, 18}, 
   {y, -6, 6}, AspectRatio -> Automatic, LineIntegralConvolutionScale -> 3]

enter image description here

$\endgroup$
  • $\begingroup$ Yes right, vorticity of alternating whirlpools are same sign, also here in youtube towards the last part. The streamlines should be in x-direction always. youtube.com/watch?v=Gq-sUhP3kDI $\endgroup$ – Narasimham Jun 27 '15 at 18:36
  • $\begingroup$ Gotta love the LineIntegralConvolutionPlots -- they're both cool and ugly at the same time. $\endgroup$ – Michael E2 Jun 27 '15 at 23:18
  • $\begingroup$ Coool.. more than what I had expected.. Instead of brown another color combination could perhaps brighten it. $\endgroup$ – Narasimham Jun 28 '15 at 5:25
  • $\begingroup$ Add as an option the colors of your choice, such as ColorFunction -> "Rainbow". By the way, please accept this answer, if it meets your needs. $\endgroup$ – bbgodfrey Jun 28 '15 at 5:44
  • $\begingroup$ @chris Who can say? But, thanks. $\endgroup$ – bbgodfrey Jun 29 '15 at 2:21
7
$\begingroup$

Or, almost directly from the documentation

LineIntegralConvolutionPlot[{{(y - 2 Cos[x/4]) Cos[x/4], -Sin[x/4]},
  , {"noise", 500, 500}}, {x, -4, 12}, {y, -6, 6}, 
 StreamColorFunction -> "BeachColors", AspectRatio -> Automatic,
 LightingAngle -> 0, LineIntegralConvolutionScale -> 3, Frame -> False]

Mathematica graphics

$\endgroup$
  • $\begingroup$ "A Study in Cut Timber" :D $\endgroup$ – J. M. will be back soon Jun 30 '15 at 0:55
  • $\begingroup$ Annular rings.. more the merrier? $\endgroup$ – Narasimham Jul 4 '15 at 5:30

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.