Hi guys, I am trying to plot the following functio as a vector field in 3D
Piecewise[{{{(3*z*(1 - z^2/(x^2 + y^2 + z^2))*Log[ro/ri]*
Sin[\[Phi][x, y, z]])/(4*Sqrt[x^2 + y^2 + z^2]),
(3/4)*(1 - z^2/(x^2 + y^2 + z^2))^(3/2)*Log[ro/ri]*
Sin[\[Phi][x, y, z]], (3/4)*(1 - z^2/(x^2 + y^2 + z^2))*
Cos[\[Phi][x, y, z]]*Log[ro/ri]},
Sqrt[x^2 + y^2 + z^2] < ri},
{{(z*(-(z^2/(6*(x^2 + y^2 + z^2))) + (1 -
z^2/(x^2 + y^2 + z^2))*(-(5/12) - (1/8)*(1 +
ri^2/(x^2 + y^2 + z^2))*Cos[2*ArcTan[x, y]] +
(3/4)*Log[ro/Sqrt[x^2 + y^2 + z^2]]))*
Sin[\[Phi][x, y, z]])/Sqrt[x^2 + y^2 + z^2],
Sqrt[1 - z^2/(x^2 + y^2 + z^2)]*
(-(z^2/(6*(x^2 + y^2 + z^2))) + (1 -
z^2/(x^2 + y^2 + z^2))*(-(5/12) - (1/8)*(1 +
ri^2/(x^2 + y^2 + z^2))*Cos[2*ArcTan[x, y]] +
(3/4)*Log[ro/Sqrt[x^2 + y^2 + z^2]]))*
Sin[\[Phi][x, y, z]],
Cos[\[Phi][x, y, z]]*(-(z^2/(6*(x^2 + y^2 + z^2))) +
(1 -
z^2/(x^2 + y^2 + z^2))*(-(5/12) - (1/8)*(1 +
ri^2/(x^2 + y^2 + z^2))*Cos[2*ArcTan[x, y]] + (3/4)*
Log[ro/Sqrt[x^2 + y^2 + z^2]]))},
ri < Sqrt[x^2 + y^2 + z^2] < ro}}, 0]
Then I try to plot it using:
vecs = VectorPlot3D[Bfield, {x, -4, 4}, {y, -4, 4}, {z, -4, 4}]
But nothing comes out. I’m not sure why it is behaving this way. Any suggestions would be really appreciated. Thanks