Using cylindrical coordinates
Hi,
Can someone tell me how to use cylindrical coordinate (radius) value in defining a field functin ? I have made this Cylindrical coordinate system under Tools>coordinate system>Laboratory>Local coordinate system. I would like to use the radial length in a field function. The function ${RadialCoordinate} seems to give me axial length. (My radial length is in the original X axis direction and axis lies along Y axis) Thanks for your replies and suggestions. |
You can refer to components of a coordinate system (or any vector component) using the [i] notation, with i=0 for the first element, i=1 for the 2nd, etc. In a field function, $$Position[0] returns the x-coordinate in the lab coordinate system. For a custom coordinate system, you need to add the name in parenthesis and quotes like $$Position("myCustomCsys")[0]. For positions, 0 refers to x, 1 refers to y, 2 refers to z component of the position vector. In the case of a cylindrical coordinate system, 0 refers to radius, 1 refers to theta, and 2 refers to z. More info (including embedded coordinate systems) is in the user guide, search for "Referencing Field Functions, Coordinate Systems, and Reference Frames".
I should add, I believe that $RadialCoordinate refers to the coordinate with respect to the region's defined axis. Under the Region you can define the axis origin and orientation for this and other purposes (like moving reference frame). So, typically you are better off defining the coordinate system and referring to components as indicated above, rather than defining the region axis and using RadialCoordinate (or TangentialVelocity, etc). |
Thank you very much. That helped a lot.
|
Quote:
Assuming that Cylindrical 1 is my cylindrical coordinate system, is that will be okay? $$Position("Cylindrical 1")[0,1,0] or I should write: [$$Position("Cylindrical 1")[0]=0 ,$$Position("Cylindrical 1")[1]=1 , $$Position("Cylindrical 1")[2]=0] I don't see my coordinate system on the options list, there is a screenshot: https://ibb.co/wg4w0pS |
All times are GMT -4. The time now is 08:32. |