VectorCalculus - Maple Programming Help

Home : Support : Online Help : Mathematics : Vector Calculus : VectorCalculus/VectorField

VectorCalculus

 VectorField
 create a vector field

 Calling Sequence VectorField(v, c)

Parameters

 v - list or Vector; components specifying the coefficients of the basis vectors at each point in space c - (optional) symbol[name, name, ...]; specify the coordinate system and coordinate names of the vector field

Description

 • The VectorField(v, c) command constructs a vector field, which is implemented as a Vector with the vectorfield attribute and a coordinate system attribute.
 • The vector field is one of the principal data structures of the Vector Calculus package.
 • Note that some VectorCalculus procedures require their input to be vector fields, but will accept Vector-valued operators as well; in this case, any input operator will be interpreted as a vector field, and the output will generally also be an operator.
 • The other principal data structures of the Vector Calculus package (free Vectors, position Vectors, and rooted Vectors) are not interpreted as constant vector fields.
 • If the second parameter, c, is not specified, the default coordinate system is used.  In this case, the default coordinate system must be indexed by coordinate names; otherwise, an error is raised.
 • If Vectors are displayed in BasisFormat, the basis vectors for a vector field object are displayed using overbars to visually distinguish a vector field from a free Vector.
 • The routine evalVF can be used to evaluate a vector field at a point.

Examples

 > $\mathrm{with}\left(\mathrm{VectorCalculus}\right):$

Note the overbars on the basis Vectors

 > $v≔\mathrm{VectorField}\left(⟨x,y,z⟩,{'\mathrm{cartesian}'}_{x,y,z}\right)$
 ${v}{≔}\left({x}\right){\stackrel{{_}}{{e}}}_{{x}}{+}\left({y}\right){\stackrel{{_}}{{e}}}_{{y}}{+}\left({z}\right){\stackrel{{_}}{{e}}}_{{z}}$ (1)
 > $\mathrm{attributes}\left(v\right)$
 ${\mathrm{vectorfield}}{,}{\mathrm{coords}}{=}{{\mathrm{cartesian}}}_{{x}{,}{y}{,}{z}}$ (2)
 > $\mathrm{About}\left(v\right)$
 $\left[\begin{array}{cc}{\mathrm{Type:}}& {\mathrm{Vector Field}}\\ {\mathrm{Components:}}& \left[{x}{,}{y}{,}{z}\right]\\ {\mathrm{Coordinates:}}& {{\mathrm{cartesian}}}_{{x}{,}{y}{,}{z}}\end{array}\right]$ (3)
 > $\mathrm{evalVF}\left(v,⟨1,2,3⟩\right)$
 $\left[\begin{array}{c}{1}\\ {2}\\ {3}\end{array}\right]$ (4)
 > $\mathrm{SetCoordinates}\left({'\mathrm{spherical}'}_{r,\mathrm{φ},\mathrm{θ}}\right)$
 ${{\mathrm{spherical}}}_{{r}{,}{\mathrm{\phi }}{,}{\mathrm{\theta }}}$ (5)
 > $v≔\mathrm{VectorField}\left(⟨\frac{1}{{r}^{2}},\mathrm{sin}\left(\mathrm{φ}\right),\mathrm{cos}\left(\mathrm{θ}\right)⟩\right)$
 ${v}{≔}\left(\frac{{1}}{{{r}}^{{2}}}\right){\stackrel{{_}}{{e}}}_{{r}}{+}\left({\mathrm{sin}}{}\left({\mathrm{\phi }}\right)\right){\stackrel{{_}}{{e}}}_{{\mathrm{φ}}}{+}\left({\mathrm{cos}}{}\left({\mathrm{\theta }}\right)\right){\stackrel{{_}}{{e}}}_{{\mathrm{θ}}}$ (6)
 > $\mathrm{About}\left(v\right)$
 $\left[\begin{array}{cc}{\mathrm{Type:}}& {\mathrm{Vector Field}}\\ {\mathrm{Components:}}& \left[\frac{{1}}{{{r}}^{{2}}}{,}{\mathrm{sin}}{}\left({\mathrm{\phi }}\right){,}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)\right]\\ {\mathrm{Coordinates:}}& {{\mathrm{spherical}}}_{{r}{,}{\mathrm{\phi }}{,}{\mathrm{\theta }}}\end{array}\right]$ (7)
 > $\mathrm{evalVF}\left(v,⟨1,\frac{\mathrm{Pi}}{2},0⟩\right)$
 $\left[\begin{array}{c}{1}\\ {1}\\ {1}\end{array}\right]$ (8)
 > $\mathrm{SetCoordinates}\left({'\mathrm{cylindrical}'}_{r,\mathrm{θ},z}\right)$
 ${{\mathrm{cylindrical}}}_{{r}{,}{\mathrm{\theta }}{,}{z}}$ (9)
 > $v≔\mathrm{VectorField}\left(⟨r\mathrm{cos}\left(\mathrm{θ}\right),\mathrm{sin}\left(\mathrm{θ}\right),{z}^{2}⟩\right)$
 ${v}{≔}\left({r}{}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)\right){\stackrel{{_}}{{e}}}_{{r}}{+}\left({\mathrm{sin}}{}\left({\mathrm{\theta }}\right)\right){\stackrel{{_}}{{e}}}_{{\mathrm{θ}}}{+}\left({{z}}^{{2}}\right){\stackrel{{_}}{{e}}}_{{z}}$ (10)
 > $\mathrm{About}\left(v\right)$
 $\left[\begin{array}{cc}{\mathrm{Type:}}& {\mathrm{Vector Field}}\\ {\mathrm{Components:}}& \left[{r}{}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right){,}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right){,}{{z}}^{{2}}\right]\\ {\mathrm{Coordinates:}}& {{\mathrm{cylindrical}}}_{{r}{,}{\mathrm{\theta }}{,}{z}}\end{array}\right]$ (11)
 > $\mathrm{Curl}\left(v\right)$
 $\left({0}\right){\stackrel{{_}}{{e}}}_{{r}}{+}\left({0}\right){\stackrel{{_}}{{e}}}_{{\mathrm{θ}}}{+}\left(\frac{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right){+}{r}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}{{r}}\right){\stackrel{{_}}{{e}}}_{{z}}$ (12)

Note that the Divergence procedure accepts a Vector-valued operator in place of a vector field.

 > $d≔\mathrm{Divergence}\left(\left(a,b,c\right)→⟨{a}^{2}+{b}^{2},1-{c}^{3},1⟩\right)$
 ${d}{≔}\left({a}{,}{b}{,}{c}\right){↦}\frac{{3}{}{{a}}^{{2}}{+}{{b}}^{{2}}}{{a}}$ (13)
 > $d\left(2,2,2\right)$
 ${8}$ (14)