0
$\begingroup$

The function is:

$\boldsymbol{\Psi}(\rho, \theta, 0)=-\left(2+\frac{8}{\rho}\right) \operatorname{Sin} \theta \boldsymbol{e}_{\boldsymbol{\theta}}+\left(2 \rho-\frac{8}{\rho}\right) \operatorname{Cos} \theta \boldsymbol{e}_{\boldsymbol{\rho}}$

with $r \in [2,6]$, $\theta \in [0,2\pi]$.

How could I graph this vector function and its curl in mathematica? is it mandatory to convert it to Cartesian coordinates?

$\endgroup$
5
  • $\begingroup$ In Italian language seno(=sinus), shortened as 'sen', is it what is Sen stands for here? $\endgroup$
    – yarchik
    Nov 11, 2021 at 7:57
  • $\begingroup$ @yarchik Oh I'm sorry! yes I mean sin $\endgroup$
    – Dayzk
    Nov 11, 2021 at 8:04
  • $\begingroup$ As a started, try this r[x_, y_] := Sqrt[x^2 + y^2] VectorPlot[{(2 r[x, y] - 8/r[x, y]) x/r[x, y], -(2 + 8/r[x, y]) y/r[x, y]}, {x, -1, 1}, {y, -1, 1}, StreamPoints -> 10] $\endgroup$
    – yarchik
    Nov 11, 2021 at 8:04
  • $\begingroup$ @yarchik I think you missed the transformation of ` e[Rho], e[Theta]`? $\endgroup$ Nov 11, 2021 at 8:31
  • $\begingroup$ @UlrichNeumann yes, I missed a lot of things, like curl, region boundaries, transformations. But the poster missed a lot of things too, like typing the equation in Mathematica format, showing some minimal efforts. $\endgroup$
    – yarchik
    Nov 11, 2021 at 8:38

1 Answer 1

2
$\begingroup$

Based on @yarchik's comment try

\[Psi] = -(2 + 8/\[Rho]) Sin[\[Theta]] e\[Theta] +(2 \[Rho] - 8/\[Rho]) Cos[\[Theta]] e\[Rho]

Transformation polar->cartesian

trafo = {e\[Rho] -> {Cos[\[Theta]], Sin[\[Theta]]}, 
e\[Theta] -> {-Sin[\[Theta]], Cos[\[Theta]]  }, 
\[Rho] -> Sqrt[x^2 + y^2], \[Theta] -> ArcTan[x, y]} 

VectorPlot[Evaluate[\[Psi] //. trafo], {x, -1,1}, {y, -1, 1}, StreamPoints -> 10]

enter image description here

The curl evaluates to

rot\[Psi] = Curl[Evaluate[\[Psi] //.trafo], {x, y }] // Simplify
Plot3D[rot\[Psi], {x, -1, 1}, {y, -1,1},MeshFunctions -> {#3 &}]

enter image description here

$\endgroup$
2
  • $\begingroup$ Thank you! I had a lot of trouble with the Mathematica commands as I'm still a newbie but this cleared up a lot for me and I'm sorry to inconvenience anyone $\endgroup$
    – Dayzk
    Nov 11, 2021 at 8:52
  • 1
    $\begingroup$ You're welcome. Mathematica stackexchange is a helpful place to deepen Mathematica knowledge. $\endgroup$ Nov 11, 2021 at 9:14

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