Application Center - Maplesoft

App Preview:

Dynamics in Spherical Coordinates

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application


 

Image 

DYNAMICS IN SPHERICAL COORDINATES 

J.M. Redwood  2007 

Introduction 

This worksheet is intended as a brief introduction to dynamics in spherical coordinates. 

Definition and Sketch 

Consider a point P on the surface of a sphere such that its spherical coordinates form a right handed triple Typesetting:-mrow(Typesetting:-mover(Typesetting:-mrow(Typesetting:-mi( in 3 dimensional space, as illustrated in the sketch below.  These coordinates are usually referred to as the radius, polar angle (or co-latitude) and azimuth (or longitude) respectively, and follow the so-called American convention.  The unit vectors are indicated in the sketch by Typesetting:-mrow(Typesetting:-mover(Typesetting:-mi(, normal to the surface of the sphere at P;  Typesetting:-mrow(Typesetting:-mover(Typesetting:-mi(, tangent to the meridian at P; and Typesetting:-mrow(Typesetting:-mover(Typesetting:-mi(, tangent to the latitude circle at P.  For a fuller definition see Maple's help pages at sphericalcoordinatesDefinition. 

 

Image 

 

 The transformation equations from spherical to Cartesian coordinates are: 

Typesetting:-mrow(Typesetting:-mi( 

Typesetting:-mrow(Typesetting:-mi( 

Typesetting:-mrow(Typesetting:-mi( 

 

 The transformation equations from Cartesian to spherical coordinates are: 

Typesetting:-mrow(Typesetting:-msup(Typesetting:-mi(  

Typesetting:-mrow(Typesetting:-msup(Typesetting:-mi(   or   Typesetting:-mrow(Typesetting:-msup(Typesetting:-mi( 

Typesetting:-mrow(Typesetting:-mi( 

Velocity 

 Denoting vectors by bold face type, let r be the vector joining the centre of the sphere to P and Typesetting:-mrow(Typesetting:-mover(Typesetting:-mi( be its unit vector.  Let v and a be the velocity and acceleration respectively of P.  In what follows, it is to be understood that r, v and a, together with their magnitudes in the directions of the unit vectors, are functions of time.  In order to present equations that are easier to read the usual functional notation (t) will be omitted. 

 

The velocity of P is given by 

Typesetting:-mrow(Typesetting:-mover(Typesetting:-mrow(Typesetting:-mover(Typesetting:-mrow(Typesetting:-mi(  

But Typesetting:-mrow(Typesetting:-mi(  

Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mi(       equation (a) 

Expanding the second term on the rhs of the above, 

 

Typesetting:-mrow(Typesetting:-mi(        equation (b) 

 

Substituting in the above from the following table of partial derivatives of the unit vectorsTypesetting:-mrow(Typesetting:-mover(Typesetting:-mi(, Typesetting:-mrow(Typesetting:-mi( and Typesetting:-mrow(Typesetting:-mover(Typesetting:-mi( with respect to r, ϕ and ϑ 

 

 

Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mo( 

Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mo( 

Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mo( 

Typesetting:-mrow(Typesetting:-mover(Typesetting:-mi(  

0 

Typesetting:-mrow(Typesetting:-mi( 

Typesetting:-mrow(Typesetting:-mover(Typesetting:-mrow(Typesetting:-mi( 

Typesetting:-mrow(Typesetting:-mover(Typesetting:-mrow(Typesetting:-mi(  

Typesetting:-mrow(Typesetting:-mn( 

Typesetting:-mrow(Typesetting:-mo( 

Typesetting:-mrow(Typesetting:-mi( 

Typesetting:-mrow(Typesetting:-mover(Typesetting:-mrow(Typesetting:-mi(  

Typesetting:-mrow(Typesetting:-mn( 

0 

Typesetting:-mrow(Typesetting:-mo( 

 

Equation (b) becomes 

Typesetting:-mrow(Typesetting:-mo(  

Substituting this in equation (a)                                                       

Typesetting:-mrow(Typesetting:-mover(Typesetting:-mrow(Typesetting:-mi( Typesetting:-mrow(Typesetting:-mover(Typesetting:-mrow(Typesetting:-mi(  

 

 It will be noted that this equation contains no derivatives of the unit vectors.  The two rightmost terms are tangential velocities and are much as might be expected from experience with polar coordinates. 

 

Acceleration 

 The acceleration, a, of the point P is obtained by differentiating v w.r.t. time, expanding the terms containing derivatives of unit vectors in the same way as above, substituting from the table, and collecting terms.  The result is: 

 

Typesetting:-mrow(Typesetting:-mover(Typesetting:-mrow(Typesetting:-mi(
Typesetting:-mrow(Typesetting:-mover(Typesetting:-mrow(Typesetting:-mi(
 

 

Again, this equation contains no derivatives of the unit vectors: indeed none are present in any of the higher derivatives of r.  The three double differentials w.r.t. time are accelerations of the coordinates.  The terms in Typesetting:-mrow(Typesetting:-msup(Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mi( and Typesetting:-mrow(Typesetting:-msup(Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi(are accelerations toward the centre and the polar axis (OZ) respectively.  The terms with a coefficient of 2 are Coriolis accelerations.  The Coriolis term in the Typesetting:-mrow(Typesetting:-mover(Typesetting:-mi( coordinate is as might be expected from experience with polar coordinates.  The first Coriolis term in theTypesetting:-mrow(Typesetting:-mover(Typesetting:-mi(coordinate is caused by the velocity of P about OZ  i.e. Typesetting:-mrow(Typesetting:-mi(, while the second in that coordinate may be thought of as being caused by the velocity of P about OZ in the equatorial plane (OXY) and the component of Typesetting:-mrow(Typesetting:-mi( , i.e. Typesetting:-mrow(Typesetting:-mi(Typesetting:-mrow(Typesetting:-mi(, along the projection of OP in that plane. 

 

Force and Moment 

 If m is the mass of a particle at the point P, the force, F, needed to accelerate it is, 

Typesetting:-mrow(Typesetting:-mi(  

 The moment (or torque) needed to produce the acceleration is obtained from 

Typesetting:-mrow(Typesetting:-mi( 

This reduces to 

Typesetting:-mrow(Typesetting:-mi(  

The components of the moment may be thought of as right-handed (clockwise) rotation vectors with their axes along the angular unit vectors. 

 

Worksheet 

 The velocity and acceleration shown above are now written as Maple input so that they can be readily copied and pasted into a worksheet.  The unit vectors Typesetting:-mrow(Typesetting:-mover(Typesetting:-mi(, Typesetting:-mrow(Typesetting:-mi( Typesetting:-mrow(Typesetting:-mover(Typesetting:-mrow(Typesetting:-mi( are inconvenient in a worksheet and will now be written as Typesetting:-mrow(Typesetting:-msub(Typesetting:-mi( and Typesetting:-mrow(Typesetting:-msub(Typesetting:-mi( respectively, which is the format used in Maple's Vector Calculus package. 

 

> restart; with(VectorCalculus):
> SetCoordinates(spherical[r,phi,theta]):
> OP := <r(t)|phi(t)|theta(t)>:
> v := <diff(r(t),t)|r*diff(phi(t),t)|r*sin(phi)*diff(theta(t),t)>:
> a := <diff(r(t),t$2)-r*(diff(phi(t),t))^2 - r*sin(phi)^2*(diff(theta(t),t))^2|
2*diff(r(t),t)*diff(phi(t),t) + r*diff(phi(t),t$2)- r*sin(phi)*cos(phi)*(diff(theta(t),t))^2|
2*sin(phi)*diff(r(t),t)*diff(theta(t),t) + r*sin(phi)*diff(theta(t),t$2) +
2*r*cos(phi)* diff(phi(t),t)* diff(theta(t),t)>:
> M := <0|-m*r*(2*sin(phi)*diff(r(t),t)*diff(theta(t),t) + r*sin(phi)*diff(theta(t),t$2) +
2*r*cos(phi)*diff(theta(t),t)*diff(phi(t),t) )|m*r*(2*diff(r(t),t)*diff(phi(t),t) +
r*diff(phi(t),t$2) - r*sin(phi)*cos(phi)*(diff(theta(t),t)))^2>:

 

 The command PDETools[declare] is now used to indicate the derivatives of r, ϕ and ϑ w.r.t. time will be shown with primes in order t make the equations easier to read.   

 

> PDETools[declare](prime=t):
`derivatives with respect to`*t*`of functions of one variable will now be displayed with '` (6.1)
> v;
(Typesetting:-mprintslash)([Vector[row]([[`r'`], [r*phi^`'`], [r*sin(phi)*theta^`'`]], [ (6.2)
> a;
(Typesetting:-mprintslash)([Vector[row]([[`r''`-r*(phi^`'`)^2-r*sin(phi)^2*(theta^`'`)^2], [2*`r'`*phi^`'`+r*phi^`''`-r*sin(phi)*cos(phi)*(theta^`'`)^2], [2*sin(phi)*`r'`*theta^`'`+r*sin(phi)*theta^`'...
(Typesetting:-mprintslash)([Vector[row]([[`r''`-r*(phi^`'`)^2-r*sin(phi)^2*(theta^`'`)^2], [2*`r'`*phi^`'`+r*phi^`''`-r*sin(phi)*cos(phi)*(theta^`'`)^2], [2*sin(phi)*`r'`*theta^`'`+r*sin(phi)*theta^`'...
(6.3)
> M;
(Typesetting:-mprintslash)([Vector[row]([[0], [-m*r*(2*sin(phi)*`r'`*theta^`'`+r*sin(phi)*theta^`''`+2*r*cos(phi)*phi^`'`*theta^`'`)], [m*r*(2*`r'`*phi^`'`+r*phi^`''`-r*sin(phi)*cos(phi)*theta^`'`)^2]... (6.4)

 

Derivation 

 A derivation of the above table of partial derivatives is given below.  It is not a proof; it is but one of several ways of demonstrating the validity of the table. 

 

Image 

 

 In the sketch, the points O, Q, P and Z are in the meridian plane perpendicular to the equatorial plane OXQY .  Ox, Oy and Oz represent the Cartesian coordinates of the point P.  It will be seen from the sketch that Ox and Oy can be resolved to form Oq, which itself resolves into components in the directions of the unit vectors Typesetting:-mrow(Typesetting:-msub(Typesetting:-mi( and Typesetting:-mrow(Typesetting:-msub(Typesetting:-mi(.  Similarly, Oz can be resolved along the same directions and its components added to those of Ox and Oy, thus forming the vectors r and ϕ.  The components of Ox and Oy perpendicular to Oq form the vector Typesetting:-mrow(Typesetting:-mi(. 

 

 The unit vectors Typesetting:-mrow(Typesetting:-msub(Typesetting:-mi( and Typesetting:-mrow(Typesetting:-msub(Typesetting:-mi( along OX and OY may be resolved and equated to the components of the unit vectors Typesetting:-mrow(Typesetting:-msub(Typesetting:-mi( and Typesetting:-mrow(Typesetting:-msub(Typesetting:-mi( in the OXQY plane, as shown in equation ( 7.1 ) below. 

   

> restart: with(VectorCalculus): SetCoordinates(spherical[r,phi,theta]):
> cos(theta)*e[x] + sin(theta)*e[y] = sin(phi)*e[r] + cos(phi)*e[phi];
cos(theta)*e[x]+sin(theta)*e[y] = sin(phi)*e[r]+cos(phi)*e[phi] (7.1)
 

 Let xyz represent the unit vectors in Cartesian coordinates. 

 

> xyz:= SetCoordinates(<1,1,1>,cartesian[x,y,z]);
(Typesetting:-mprintslash)([xyz := Vector[column]([[1], [1], [1]], [ (7.2)
 

 The trigonometric functions used above to resolve x, y and z in the directions r, ϕ and Typesetting:-mrow(Typesetting:-mi( are now written as a matrix of functions that transform Cartesian coordinates to spherical coordinates.  Let it be called c2s. 

 

> c2s := << sin(phi)*cos(theta) | sin(phi)*sin(theta) | cos(phi)>,
       < cos(phi)*cos(theta) | cos(phi)*sin(theta) | -sin(phi)>,
       < -sin(theta)         | cos(theta)          | 0        >>:
 

 The orthogonality of c2s is now tested and its determinant is obtained. 

 

> LinearAlgebra:-IsOrthogonal(c2s); simplify(LinearAlgebra:-Determinant(c2s));

true 

1 (7.3)
 

 

 Since the transformation matrix, c2s, is orthogonal, the spherical coordinates are orthogonal; and since they were defined as such, this acts as a check on the validity of the transformation matrix.  The determinant of c2s has a value of +1, and so the transformation to spherical coordinates requires only a rotation of the axes, and thus the spherical coordinates are right handed.  Again, they were defined as such, and this acts as a further check on the validity of the transformation matrix.  (In passing, it is worth noting that the transpose of c2s is the transformation matrix from spherical to Cartesian coordinates.) 

 

 The unit vectors in spherical coordinates are given by, 

 

> <1,1,1> = c2s.<xyz>;
Typesetting:-mrow(Typesetting:-mrow(Typesetting:-mrow(Typesetting:-msub(Typesetting:-mi( (7.4)
 

 Let rtp represent these unit vectors. 

 

> rtp := c2s.<xyz>:

 

 An inert matrix of the partial derivatives of the unit vectors in spherical coordinates is now constructed, thus: 

 

> `Derivatives of spherical unit vectors` := <<seq(Diff(e[i],r),i in [r,phi,theta])>  |
                                           <seq(Diff(e[i],phi),i in [r,phi,theta])>|
                                           <seq(Diff(e[i],theta),i in [r,phi,theta])>>:

 

This inert matrix is equated to the Jacobian of the unit vectors in spherical coordinates i.e. to their partial derivatives. 

 

> J := Jacobian(convert(rtp,Vector),[r,phi,theta]):
> `Derivatives of spherical unit vectors` = J;
Typesetting:-mrow(Typesetting:-mfenced(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mstyle(Typesetting:-mo( (7.5)
 

The rhs of (7.5) can be compared with the rhs of the matrix of unit vectors (7.4) and substitutions made from the latter.  Noting that the magnitudes of the Cartesian vectors in (7.1) are unity, a similar substitution can be made from (7.1) into (7.5) . 

> J[1,2] := e[phi]; J[1,3] := sin(phi)*e[theta];
> J[2,2] := -e[r]; J[2,3] := cos(phi)*e[theta];
> J[3,3] := -sin(phi)*e[r] -cos(phi)*e[phi];

(Typesetting:-mprintslash)([J[1, 2] := e[phi]], [e[phi]]) 

(Typesetting:-mprintslash)([J[1, 3] := sin(phi)*e[theta]], [sin(phi)*e[theta]]) 

(Typesetting:-mprintslash)([J[2, 2] := -e[r]], [-e[r]]) 

(Typesetting:-mprintslash)([J[2, 3] := cos(phi)*e[theta]], [cos(phi)*e[theta]]) 

(Typesetting:-mprintslash)([J[3, 3] := -sin(phi)*e[r]-cos(phi)*e[phi]], [-sin(phi)*e[r]-cos(phi)*e[phi]]) (7.6)
 

 Hence, 

> `Derivatives of spherical unit vectors` = J;
Typesetting:-mrow(Typesetting:-mfenced(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mstyle(Typesetting:-mo( (7.7)
 

 Writing Typesetting:-mrow(Typesetting:-msub(Typesetting:-mi(, Typesetting:-mrow(Typesetting:-msub(Typesetting:-mi( and Typesetting:-mrow(Typesetting:-msub(Typesetting:-mi( as Typesetting:-mrow(Typesetting:-mover(Typesetting:-mi(, Typesetting:-mrow(Typesetting:-mover(Typesetting:-mi( and Typesetting:-mrow(Typesetting:-mover(Typesetting:-mi( respectively, equation (7.7) can be written as a table thus: 

 

 

Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mo( 

Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mo( 

Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mo( 

Typesetting:-mrow(Typesetting:-msub(Typesetting:-mi(or Typesetting:-mrow(Typesetting:-mover(Typesetting:-mi(  

0 

Typesetting:-mrow(Typesetting:-mi( 

Typesetting:-mrow(Typesetting:-mover(Typesetting:-mrow(Typesetting:-mi( 

Typesetting:-mrow(Typesetting:-msub(Typesetting:-mi(orTypesetting:-mrow(Typesetting:-mo(Typesetting:-mrow(Typesetting:-mover(Typesetting:-mrow(Typesetting:-mi(  

Typesetting:-mrow(Typesetting:-mn( 

Typesetting:-mrow(Typesetting:-mo( 

Typesetting:-mrow(Typesetting:-mi( 

Typesetting:-msub(Typesetting:-mi( orTypesetting:-mrow(Typesetting:-mo(Typesetting:-mrow(Typesetting:-mover(Typesetting:-mrow(Typesetting:-mi(  

Typesetting:-mrow(Typesetting:-mn( 

0 

Typesetting:-mrow(Typesetting:-mo( 

 

Legal Notice: The copyright for this application is owned by the author(s). Neither Maplesoft nor the author are responsible for any errors contained within and are not liable for any damages resulting from the use of this material. This application is intended for non-commercial, non-profit use only. If you wish to use this application in for-profit activities, please make a donation to Cancer Research.
 

Image