0
$\begingroup$

I have the equation of vector fields which are in cylindrical polar coordinates. How do I plot 3-D vector field? I never used Mathematica.

Edit2:

a = 1
v = 1
F = 1    
q = 4*Pi^2*v^2*a^2
Htheta = F*q*2*Pi*v*r/(Pi*a^2*log[1 + q]*(1 + q*r^2/a^2))
Hz = F*q/(Pi*a^2*log[1 + q]*(1 + q*r^2/a^2))
H = TransformedField[
  "Polar" -> "Cartesian", {0, Htheta}, {r, \[Theta]} -> {x, y}]
VectorPlot3D[{H.{1, 0}, H.{0, 1}, z}, {x, -10, 10}, {y, -10, 10}, {z, 
  0, 6}, VectorColorFunction -> "DeepSeaColors"]

This was my code, and I got a black graph. enter image description here

$\endgroup$

closed as off-topic by Coolwater, halirutan Jun 27 '18 at 11:40

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – halirutan
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ As a start, check the Plot Field Vectors in 3D documentation and the Related Guides. $\endgroup$ – creidhne Jun 27 '18 at 10:18
  • $\begingroup$ @creidhne Hey, I have edited body, can you help me out from here. $\endgroup$ – Kartik Chhajed Jun 27 '18 at 10:37
  • $\begingroup$ Mathematica has some quirks, for example, pi is Pi, and functions such as log(...) are capitalized with brackets like Log[...]. You need to define values for a, q, F, and v. $\endgroup$ – creidhne Jun 27 '18 at 10:52
  • $\begingroup$ Also, I would expect Hr to get a three-dimensional vector field $\endgroup$ – Ruud3.1415 Jun 27 '18 at 10:54
  • $\begingroup$ Resolved thank you guys. $\endgroup$ – Kartik Chhajed Jun 27 '18 at 11:02
0
$\begingroup$

So, this was easy, from comments mentioned above:

a = 1
v = 1
F = 1
q = 4*Pi^2*v^2*a^2
Htheta = F*q*2*Pi*v*r/(Pi*a^2*Log[1 + q]*(1 + q*r^2/a^2))
Hz = F*q/(Pi*a^2*Log[1 + q]*(1 + q*r^2/a^2))
H = TransformedField[
  "Polar" -> "Cartesian", {0, Htheta}, {r, \[Theta]} -> {x, y}]
VectorPlot3D[{H.{1, 0}, H.{0, 1}, z}, {x, -10, 10}, {y, -10, 10}, {z, 
  0, 6}, VectorColorFunction -> "DeepSeaColors"]
VectorPlot[{H.{1, 0}, H.{0, 1}}, {x, -1, 1}, {y, -1, 1}]
$\endgroup$

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