VectorField - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


VectorCalculus

  

VectorField

  

create a vector field

 

Calling Sequence

Parameters

Description

Examples

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

> 

with⁡VectorCalculus:

Note the overbars on the basis Vectors

> 

v≔VectorField⁡x,y,z,cartesianx,y,z

v≔xe_x+ye_y+ze_z

(1)
> 

attributes⁡v

vectorfield,coords=cartesianx,y,z

(2)
> 

About⁡v

Type: Vector FieldComponents: x,y,zCoordinates: cartesianx,y,z

(3)
> 

evalVF⁡v,1,2,3

123

(4)
> 

SetCoordinates⁡sphericalr,φ,θ

sphericalr,φ,θ

(5)
> 

v≔VectorField⁡1r2,sin⁡φ,cos⁡θ

v≔1r2e_r+sin⁡φe_φ+cos⁡θe_θ

(6)
> 

About⁡v

Type: Vector FieldComponents: 1r2,sin⁡φ,cos⁡θCoordinates: sphericalr,φ,θ

(7)
> 

evalVF⁡v,1,π2,0

111

(8)
> 

SetCoordinates⁡cylindricalr,θ,z

cylindricalr,θ,z

(9)
> 

v≔VectorField⁡r⁢cos⁡θ,sin⁡θ,z2

v≔r⁢cos⁡θe_r+sin⁡θe_θ+z2e_z

(10)
> 

About⁡v

Type: Vector FieldComponents: r⁢cos⁡θ,sin⁡θ,z2Coordinates: cylindricalr,θ,z

(11)
> 

Curl⁡v

0e_r+0e_θ+sin⁡θ+r⁢sin⁡θre_z

(12)

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

> 

d≔Divergence⁡a,b,c↦b2+a2,1−c3,1

d≔a,b,c↦3⋅a2+b2a

(13)
> 

d⁡2,2,2

8

(14)

See Also

attributes

convert/PhysicsVectors

coords

Physics/Vectors

VectorCalculus

VectorCalculus[AddCoordinates]

VectorCalculus[BasisFormat]

VectorCalculus[evalVF]

VectorCalculus[GetCoordinates]

VectorCalculus[MapToBasis]

VectorCalculus[SetCoordinates]