Curl of a vector field
This functionality does not run in MATLAB.
curl(v, x) curl(v, x, ogCoord, <c>)
curl(v, x) computes the curl of the three-dimensional vector field with respect to the three-dimensional vector in Cartesian coordinates. This is the vector field
curl(v, x, ogCoord) computes the curl of v with respect to x in the orthogonally curvilinear coordinate system specified by ogCoord.
Alternatively, ogCoord can be a list of vector of algebraic expressions representing the scale factors of the coordinate system. See example Example 3. For details, see the description of the Scales option on the linalg::ogCoordTab page.
If v is a vector then the component ring of v must be a field (a domain of category Cat::Field) for which differentiation with respect to x is defined.
curl returns a vector of the domain Dom::Matrix().
Compute the curl of the vector field in Cartesian coordinates:
delete x, y, z: curl([x*y, 2*y, z], [x, y, z])
Compute the curl of the vector field , (0 ≤ ϕ < 2 π) in cylindrical coordinates:
delete r, phi, z: V := matrix([r, cos(phi), z]):
curl(V, [r, phi, z], Cylindrical)
The following relations between Cartesian and cylindrical coordinates hold:
Other predefined orthogonal coordinate systems can be found in the table linalg::ogCoordTab.
Compute the curl of a vector field in spherical coordinates r, θ,ϕ given by
with 0 ≤ θ ≤ π, 0 ≤ ϕ < 2 π. The vectors
form an orthogonal system of unit vectors corresponding to the spherical coordinates. The scaling factors of the coordinate transformation (see linalg::ogCoordTab) are , , , which we use in the following example to compute the curl of the vector field = :
delete r, Theta, phi: curl([0, 0, r^2], [r, Theta, phi], [1, r, r*sin(Theta)])
These are the coefficients of the curl of in the bases given by the vectors , , , that is, the curl of is given by the vector field .
The spherical coordinates are already defined in linalg::ogCoordTab. The last result can also be achieved with the input curl([0, 0, r^2], [r, Theta, phi], Spherical[RightHanded]).
curl([0, 0, r^2], [r, Theta, phi], Spherical[RightHanded])
A list of three arithmetical expressions, or a three-dimensional vector (a 3×1 or 1 ×3 matrix of a domain of category Cat::Matrix)
A list of three (indexed) identifiers
The name of a three-dimensional orthogonal coordinate system predefined in the table linalg::ogCoordTab, or a list of algebraic expressions representing the scale factors of an orthogonal coordinate system.