Previous Page Next Page Contents

linalg::ogCoordTab -- table of orthogonal coordinate transformations

Introduction

linalg::ogCoordTab is a table of predefined orthogonal coordinate transformations in R^3.

Call(s)


linalg::ogCoordTab[ogCoord <, Scales>](u1, u2, u3 <, c...>)

Parameters

ogCoord - the name of a predefined coordinate system (an identifier)
u1,u2,u3 - names of the coordinates of the specified coordinate system (identifiers)
c - an arithmetical expression

Options

Scales - returns the scaling factors of the coordinate system ogCoord.

Returns

a function in the coordinates u1,u2,u3 of the specified coordinate system. The function returns a list of the three vectors e_u1, e_u2, e_u3, where each vector is a list of three arithmetical expressions.

Related Functions

linalg::curl, linalg::divergence, linalg::grad, linalg::hessian, linalg::jacobian

Details

Option: Scales

Example 1

The following call returns the vector [x,y,z] in spherical coordinates, expressed in terms of r, theta and phi:

>> delete r, theta, phi:
   linalg::ogCoordTab[Spherical](r, theta, phi)
      [[cos(phi) sin(theta), sin(phi) sin(theta), cos(theta)],
      
         [cos(phi) cos(theta), sin(phi) cos(theta), -sin(theta)],
      
         [-sin(phi), cos(phi), 0]]

The scaling factors of the corresponding coordinate transformation are:

>> linalg::ogCoordTab[Spherical,Scales](r, theta, phi)
                           [1, r, r sin(theta)]

Example 2

We express the Cartesian coordinates [x,y,z] in elliptic cylindrical coordinates written in terms of u, v and z, choosing c=1:

>> delete u, v, z:
   linalg::ogCoordTab[EllipticCylindrical](u, v, z, 1)
      -- --     cos(v) sinh(u)           sin(v) cosh(u)         --
      |  |  -----------------------, -----------------------, 0  |,
      |  |          2         2 1/2          2         2 1/2     |
      -- -- (cosh(u)  - cos(v) )     (cosh(u)  - cos(v) )       --
      
         --       sin(v) cosh(u)           cos(v) sinh(u)         --
         |  - -----------------------, -----------------------, 0  |
         |            2         2 1/2          2         2 1/2     |
         --   (cosh(u)  - cos(v) )     (cosh(u)  - cos(v) )       --
      
                     --
         , [0, 0, 1]  |
                      |
                     --

To compute the gradient of the vector function 2*x*y+z in elliptic cylindrical coordinates with c=1 we enter:

>> delete x, y, z:
   linalg::grad(2*x*y + z, [x, y, z],
     linalg::ogCoordTab[EllipticCylindrical,Scales](u, v, z, 1)
   )
                      +-                           -+
                      |             2 y             |
                      |  -------------------------  |
                      |           2          2 1/2  |
                      |  (- cos(v)  + cosh(u) )     |
                      |                             |
                      |             2 x             |
                      |  -------------------------  |
                      |           2          2 1/2  |
                      |  (- cos(v)  + cosh(u) )     |
                      |                             |
                      |              1              |
                      +-                           -+




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000