# Using cylindrical coordinates

 Register Blogs Members List Search Today's Posts Mark Forums Read

 June 29, 2016, 07:09 Using cylindrical coordinates #1 Member   Join Date: Aug 2014 Location: Germany Posts: 75 Rep Power: 8 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.  June 29, 2016, 17:01 #2 New Member Kevin Join Date: Oct 2012 Posts: 29 Rep Power: 10 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). marmot and harry123 like this.

 July 1, 2016, 04:26 #3 Member   Join Date: Aug 2014 Location: Germany Posts: 75 Rep Power: 8 Thank you very much. That helped a lot.

May 25, 2020, 13:20
#4
New Member

Daniel
Join Date: May 2020
Posts: 3
Rep Power: 2
Quote:
 Originally Posted by kirrer 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).
I still dont get it, lets say I want to make a drag force report on a rotating body, hence I need to choose theta direction. How do I write it?
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

Last edited by DanielStar; May 25, 2020 at 14:12. Reason: Add content