Contents     Functions     Index     Previous Next     PDF

basis

Purpose

Coordinate system handling utilities

Syntax

p         = basis(x,y)
[node,bas]= basis(node,bas)
[bas,x]   = basis(node)
[ ... ]   = basis('Command', ... )

Description

p = basis(x,y)

Basis from nodes (typically used in element functions to determine local coordinate systems). x and y are two vectors of dimension 3 (for finite element purposes) which can be given either as rows or columns (they are automatically transformed to columns). The orthonormal matrix p is computed as follows

   p = [
x
 
||
x
 
||
,
y
 
1
||
y
 
1||
,
x
 
×
y
 
1
||
x
 
||||
y
 
1||
]

where y1 is the component of y that is orthogonal to x

  
y
 
1 = 
y
 
x
 
x
 
T
y
 
||
x
 
||2

If x and y are collinear y is selected along the smallest component of x. A warning message is passed unless a third argument exists (call of the form basis(x,y,1)).

p = basis([2 0 0],[1 1 1]) gives the orthonormal basis matrix p

 p = 
     1.0000        0        0
          0   0.7071   0.7071
          0   0.7071  -0.7071



[nodeGlob,bas]=basis('nodebas',model)

Local to global node transformation with recursive transformation of coordinate system definitions stored in bas. Column 2 in nodeLocal is assumed give displacement coordinate system identifiers PID matching those in the first column of bas. [nodeGlobal,bas]= basis(nodeLocal,bas) is an older acceptable format.

Coordinate systems are stored in a matrix where each row represents a coordinate system using any of the three formats

 CorID Type RefID A1   A2   A3   B1 B2 B3 C1 C2 C3 0  0  0  s
 CorID Type 0     NIdA NIdB NIdC 0  0  0  0  0  0  0  0  0  s
 CorID Type 0     Ax Ay Az       Ux Uy Uz Vx Vy Vz Wx Wy Wz s

Supported coordinate types are 1 rectangular, 2 cylindrical, 3 spherical. For these types, the nodal coordinates in the initial nodeLocal matrix are x y z, r teta z, r teta phi respectively.


Figure 9.1: Coordinates convention.

The first format defines the coordinate system by giving the coordinates of three nodes A, B, C as shown in the figure above. These coordinates are given in coordinate system RefID which can be 0 (global coordinate system) or an another CordId in the list (recursive definition).

The second format specifies the same nodes using identifiers NIdA, NIdB, NIdC of nodes defined in node.

The last format gives, in the global reference system, the position Ax Ay Az of the origin of the coordinate system and the directions of the x, y and z axes.

The s scale factor can be used to define position of nodes using two different unit systems. This is used for test/analysis correlation. The scale factor has no effect on the definition of displacement coordinate systems.

cGL= basis('trans [ ,t][ ,l][,e]',bas,node,DOF)

The transformation basis for displacement coordinate systems is returned with this call. Column 3 in node is assumed give displacement coordinate system identifiers DID matching those in the first column of bas.

By default, node is assumed to be given in global coordinates. The l modifier is used to tell basis that the nodes are given in local coordinates.

Without the DOF input argument, the function returns a transformation defined at the 3 translation and 3 rotations at each node. The t modifier restricts the result to translations. With the DOF argument, the output is defined at DOFs in DOF. The e modifier returns a square transformation matrix.

nodeGlobal = basis('gnode',bas,nodeLocal)

Given a single coordinate system definition bas, associated nodes nodeLocal (with coordinates x y z, r teta z, r teta phi for Cartesian, cylindrical and spherical coordinate systems respectively) are transformed to the global Cartesian coordinate system. This is a low level command used for the global transformation [node,bas] = basis(node,bas).

[p,nodeL] = basis(node)

Element basis computation With two output arguments and an input node matrix, basis computes an appropriate local basis bas and node positions in local coordinates x. This is used by some element functions (quad4) to determine the element basis.

See also

beam1, section 7.1,section 7.2
Note : the name of this function is in conflict with basis of the Financial Toolbox.

©1991-2008 by SDTools
Previous Up Next