Message Boards Message Boards

0
|
3096 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

TransformedField[] with transformation "Cylindrical" -> "Cartesian"

Posted 3 years ago

What is the correct use of TransformedField when the coordinate transformation is

"Cylindrical" -> "Cartesian"

?

When I do

TransformedField[
 "Cylindrical" -> "Cartesian", {1, 1, 1}, {r, \[Theta], z} -> {x, y, z}]

I get nothing in return.

As I understand it, the problem is with the two zs in the "From" and "To" lists. Changing one of the z to something else, like \[Zeta] makes the function work:

TransformedField["Cylindrical" -> "Cartesian", {1, 1, 1}, {r, \[Theta], \[Zeta]} -> {x, y, z}]
(*{x/Sqrt[x^2 + y^2] - y/Sqrt[x^2 + y^2], x/Sqrt[x^2 + y^2] + y/Sqrt[x^2 + y^2], 1}*)

What if I am working on a field in cylindrical coordinates with explicit dependence on z, which I later want to transform into a field in Cartesian coordinates? In this instance I need to change every z to \[Zeta] and then call for TransformedField[].

Looks to me like Mathematica is smarter then this.

Is there any shorter way to do that?

POSTED BY: Ehud Behar

You can keep the the original z in the input field and make an automatic replacement after the transformation:

TransformedField["Cylindrical" -> "Cartesian",
  {1, 1, z},
  {r, \[Theta], z} -> {x, y, \[Zeta]}] /. \[Zeta] -> z
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

Group Abstract Group Abstract