Student[VectorCalculus]
VectorField
create a vector field
Calling Sequence
Parameters
Description
Examples
VectorField(v, c, options)
v
-
list or Vector; components specifying the coefficients of the basis vectors at each point in space
c
(optional) name or indexed name; specify the coordinate system
options
(optional) equation(s) of the form option=value where option is one of output, fieldoptions, title, or view
The VectorField(v) command creates a vector field, one of the four principal Vector data structures of the Student[VectorCalculus] package. Note that the Student[VectorCalculus] and the VectorCalculus packages share the same Vector data structures.
For details on the differences between the four principal Vector data structures, namely, vector fields, position Vectors, rooted Vectors, and free Vectors, see VectorCalculus,Details.
A vector field is a Vector that has a vectorfield attribute and a coordinate system attribute. The coordinate system used to define this vector field is determined as follows.
If a coordinate system has been set by a call to SetCoordinates, that system is used;
Otherwise, if the Vector v has an associated coordinate system (see Vector), that system is used;
Otherwise, Maple will choose a default coordinate system, which will be a two- or three-dimensional cartesian system, depending on whether v is two- or three-dimensional.
The VectorField(v,c) command creates a vector field using the coordinate system c. If c is an indexed name, the coordinate names given in the index are used. Otherwise, default coordinates names are used.
Most commands in the Student[VectorCalculus] package that operate on vector fields also accept a Vector-valued operator; in this case, the output is generally an operator.
Note: A Vector that is not a vector field is not interpreted as a constant vector field by the Student[VectorCalculus] package commands. Vector Fields and the other Vectors cannot be used interchangeably.
By default, Vectors and vector fields created by commands from the Student[VectorCalculus] package are displayed using basis format, that is, as a sum of scalar multiples of basis vectors. Vector fields are visually distinguished in this format by displaying an overbar above each basis vector. For more information on Vector display formats, see BasisFormat.
To evaluate a Vector field at a point, use the evalVF command.
The options arguments primarily control plot options.
arrows=t
This option specifies the style of arrows used in a field plot. The style (t) can be one of: line, small (or thin), medium (or slim) and large (or thick).
output = value or plot
This option controls the return value of the command.
output = value returns the Vector field object. Plot options are ignored if output = value. This is the default value.
output = plot returns a field plot of the vector field.
fieldoptions = list
A list of plot options for plotting the field plot. For more information on plotting options, see plot/options. The default value is []. A list of plot options for plotting the Vector field. The field is plotted using a call to plots[fieldplot] or plots[fieldplot3d], so options valid for these commands can be passed in this option.
title = string
Give the plot a title. The default value is the empty string.
view = [realcons..realcons, realcons..realcons, realcons..realcons] (3-D) or [realcons..realcons, realcons..realcons] (2-D)
Specify the plot view. For more information, see plot3d/option or plot/options.
caption = anything
A caption for the plot.
The default caption is constructed from the parameters and the command options. caption = "" disables the default caption. For more information about specifying a caption, see plot/typesetting.
with⁡StudentVectorCalculus:
Note the overbars on the basis vectors.
v1≔VectorField⁡x2,y2
evalVF⁡v1,2,3
49
SetCoordinates⁡sphericalr,φ,θ
sphericalr,φ,θ
v2≔VectorField⁡1r2,0,1
Flux⁡v2,Box⁡−1..1,−1..1,−1..1
4⁢π
v3≔VectorField⁡r⁢θ,θ,z2,cylindricalr,θ,z
Curl⁡v3
SetCoordinates⁡cartesianx,y
cartesianx,y
VectorField⁡y,−x,output=plot,scaling=constrained
The command to create the plot from the Plotting Guide is
VectorField⁡y,−x,output=plot,view=−4..4,−4..4,scaling=constrained,color=NavyBlue,fieldoptions=fieldstrength=fixed,arrows=SLIM,grid=10,10
The flux computation above can be visualized using the following command.
Flux⁡v2,Box⁡−1..1,−1..1,−1..1,output=plot,scaling=constrained
See Also
attributes
Student[VectorCalculus][BasisFormat]
Student[VectorCalculus][Coordinates]
Student[VectorCalculus][Curl]
Student[VectorCalculus][evalVF]
Student[VectorCalculus][GetCoordinates]
Student[VectorCalculus][MapToBasis]
Student[VectorCalculus][SetCoordinates]
Student[VectorCalculus][Vector]
type/realcons
Download Help Document