Group Abstract Group Abstract

Message Boards Message Boards

0
|
258 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

How to transform a general vector using TransformedField

Posted 1 month ago
TransformedField["Cartesian"->"Spherical",{0,0,1} ,{x,y,z}->{r,\[Theta],\[CurlyPhi]}]//Simplify//MatrixForm

This gives the correct transformed vector in Spherical: {Cos[\[Theta]], -Sin[\[Theta]],0}, which is dependent on the starting point of the vector. If I make it start from the origin, i.e.,\[Theta] ->0, it becomes the same as transforming point {0,0,1} into Spherical, which is {1,0,0}. Everything is good.

However, if I want to transform a general vector, say {x,y,z}.

 TransformedField["Cartesian"->"Spherical",{x,y,z} ,{x,y,z}->{r,\[Theta],\[CurlyPhi]}]//Simplify//MatrixForm

It goes directly to {r,0,0}, which means TransformedField treats {x,y,z} as a position vector rather than a general. It seems the behavior of TransformedField depends on the input: {0,0,1} or {x,y,z}. Do I get it right?

I was wondering how I would transform a symbolic vector without it being treated as a position vector.

Thank you!

POSTED BY: Xiangyang Zhou
2 Replies
Posted 1 month ago

That makes more sense now. Thank you!

POSTED BY: Xiangyang Zhou

The cartesian field {x, y, z} is not general, it is radial. No wonder that in spherical coordinates it has zero angular components. The documentation of TransformedField has this example in the plane:

TransformedField[ "Cartesian" -> "Polar", {x, y},
   {x, y} -> {r, \[Theta]}] // Simplify

This is a general vector field:

TransformedField["Cartesian" -> "Spherical",
  {f[x, y, z], g[x, y, z], h[x, y, z]},
  {x, y, z} -> {r, \[Theta], \[CurlyPhi]}] // Simplify
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard