0
$\begingroup$

I'm trying to plot streamlines of Stokes solution to an sphere, the expression of streamlines is

enter image description here

I've seen similar questions before and this what I have tried

enter image description here

As you can see, a=1, U=1, but it seems not to work, any help? Thanks

$\endgroup$
1
  • 1
    $\begingroup$ Never post unsearchable pictures of equations. Instead typeset them, using MathJax or at lest copyable code. $\endgroup$ Jun 24, 2020 at 20:51

2 Answers 2

1
$\begingroup$

Perhaps ContourPlot is what you are looking for?

Try (Thanks to MarcoB for his answer and definition of simpler)

ContourPlot[simpler, {x, -2, 2}, {y, 0, 2} ,Contours -> Table[-10^-i, {i, 0, 4}],MaxRecursion -> 4]

enter image description here

$\endgroup$
4
  • $\begingroup$ That's what I need! Is there any way I can erase the streamlines inside the semicircle? $\endgroup$ Jun 25, 2020 at 19:22
  • $\begingroup$ Add a constraint 'x^2+y^2>1 ' inside Contourplot. $\endgroup$ Jun 25, 2020 at 21:07
  • $\begingroup$ for example ContourPlot[…,RegionFunction->Function[{x,y},x^2+y^2>= 1] $\endgroup$ Jun 26, 2020 at 8:06
  • $\begingroup$ Oh yeah I was able to do that, I searched for it! Thanks I chose this as the answer, yet MarcoB's answer really did help. $\endgroup$ Jun 26, 2020 at 15:01
1
$\begingroup$
expr = 
  With[
    {r = Sqrt[x^2 + y^2], theta = ArcTan[x, y]},
    -1/4 (Sin[theta]^2) (1/r - 3 r + 2 r^2)
  ]

initial expression

simpler = FullSimplify[ExpandAll@expr]

simplified expression

Region[
  ImplicitRegion[simpler == 0, {{x, -2, 2}, {y, 0, 2}}],
  Axes -> False, Frame -> True,
  PlotRange -> {{-2, 2}, {-2, 2}}
]

region plot

$\endgroup$
1
  • $\begingroup$ It does work, but what when I try a value of psi other than zero it says Region Embedding dimension:2. I'm new to mathematica so I really don't know what it means. $\endgroup$ Jun 24, 2020 at 22:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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