1 NOTE: The current version of VECT is the one due to Stoutemyer from
2 the summer of 1977. It will be replaced soon by a package which
3 handles vectors and dyadics (as soon as I clean up a few remaining
4 details and write a new version of this usage file).
5 Michael C. Wirth (MCW), 12/18/78
7 BATCH file VECT > DSK SHARE contains a vector analysis package,
8 DEMO file VECT DEMO DSK SHARE contains a corresponding demonstration, and
9 BATCH file VECT ORTH DSK SHARE contains definitions of various orthogonal
10 curvilinear coordinate systems.
12 Send questions or comments to David R. Stoutemyer, Electrical
13 Engineering Department, University of Hawaii, Honolulu, Hawaii 96822,
16 The vector analysis package can combine and simplify symbolic
17 expressions including dot products and cross products, together with
18 the gradient, divergence, curl, and Laplacian operators. The
19 distribution of these operators over sums or products is under
20 user control, as are various other expansions, including expansion
21 into components in any specific orthogonal coordinate systems.
22 There is also a capability for deriving the scalar or vector potential
25 To establish indeterminate1, indeterminate2, ... as vector entities,
28 DECLARE([indeterminate1, indeterminate2, ...], NONSCALAR) $
29 Vectors can also be represented as lists of components.
31 "." is the dot-product operator, "~" is the cross-product operator,
32 GRAD is the gradient operator, DIV is the divergence operator, CURL
33 is the curl or rotation operator, and LAPLACIAN is DIV GRAD.
35 Most non-controversial simplifications are automatic. For additional
36 simplification, there is a function which can be used in the form
38 VECTORSIMP(vectorexpression)
40 This function employs additional non-controversial simplifications,
41 together with various optional expansions according to the settings
42 of the following global flags:
63 The PLUS suffix refers to employing additivity or distributivity.
64 The PROD suffix refers to the expansion for an operand that is any
65 kind of product. EXPANDCROSSCROSS refers to replacing p~(q~r)
66 with (p.r)*q-(p.q)*r, and EXPANDCURLCURL refers to replacing
67 CURL CURL p with GRAD DIV p + DIV GRAD p. EXPANDCROSS=TRUE has the
68 same effect as EXPANDCROSSPLUS=EXPANDCROSSCROSS=TRUE, etc. Two other
69 flags, EXPANDPLUS and EXPANDPROD, have the same effect as setting all
70 similarly suffixed flags true. When TRUE, another flag named
71 EXPANDLAPLACIANTODIVGRAD, replaces the LAPLACIAN operator with the
72 composition DIV GRAD. All of these flags are initially FALSE.
73 For convenience, all of these flags have been declared EVFLAG.
75 For orthogonal curvilinear coordinates, the global variables
76 COORDINATES, DIMENSION, SF, and SFPROD are set by the function
79 SCALEFACTORS(coordinatetransform) $
81 Here coordinatetransform evaluates to the form
82 [[expression1, expression2, ...], indeterminate1, indeterminat2, ...],
83 where indeterminate1, indeterminate2, etc. are the curvilinear
84 coordinate variables and where a set of rectangular Cartesian
85 components is given in terms of
86 the curvilinear coordinates by [expression1, expression2, ...]. COORDINATES
87 is set to the vector [indeterminate1, indeterminate2, ...], and
88 DIMENSION is set to the length of this vector. SF[1], SF[2], ...,
89 SF[DIMENSION] are set to the coordinate scale factors, and SFPROD is
90 set to the product of these scale factors. Initially, COORDINATES is
91 [X, Y, Z], DIMENSION is 3, and SF[1]=SF[2]=SF[3]=SFPROD=1,
92 corresponding to 3-dimensional rectangular Cartesian coordinates.
94 To expand an expression into physical components in the current
95 coordinate system, there is a function with usage of the form
99 The result uses the noun form of any derivatives arising from
100 expansion of the vector differential operators.
101 To force evaluation of these derivatives,
102 the built-in EV function can be used together with the DIFF evflag,
103 after using the built-in DEPENDS function to establish any new
104 implicit dependencies.
106 The scalar potential of a given gradient vector, in the current
107 coordinate system, is returned as the result of
109 POTENTIAL(givengradient).
111 The calculation makes use of the global variable POTENTIALZEROLOC,
112 which must be NONLIST or of the form [indeterminatej=expressionj,
113 indeterminatek=expressionk, ...], the former being equivalent to
114 the nonlist expression
115 for all right-hand sides in the latter. The indicated right-hand
116 sides are used as the lower limit of integration. The success of
117 the integrations may depend upon their values and order.
118 POTENTIALZEROLOC is initially set to 0.
120 The vector potential of a given curl vector, in the current
121 coordinate system, is returned as the result of
123 VECTORPOTENTIAL(givencurl).
125 POTENTIALZEROLOC has a similar role as for POTENTIAL, but the order
126 of the left-hand sides of the equations must be a cyclic permutation
127 of the coordinate variables.
129 EXPRESS, POTENTIAL, and VECTORPOTENTIAL can have a second argument
130 like the argument of SCALEFACTORS, causeing an corresponding
131 invocation of SCALEFACTORS before the other computations.
133 Warning: The VECT package DECLAREs "." to be a commutative operator.