Vectors are column matrices of three components. grad(), divergence(),
curl() and laplacian() differentiate with respect to vars (default
x, y, z). dot() and cross() come from the matrix module.
is_conservative() and is_solenoidal() test fields, and
scalar_potential() integrates a conservative field.
Usage
grad(f, vars = .xyz(), doit = TRUE)
divergence(v, vars = .xyz(), doit = TRUE)
curl(v, vars = .xyz(), doit = TRUE)
laplacian(f, vars = .xyz())
is_conservative(v, vars = .xyz())
is_solenoidal(v, vars = .xyz())
scalar_potential(v, vars = .xyz())Arguments
- f
A scalar expression.
- vars
A list of three symbols. When
varsis not given and the field is aCoordSys3D()vector or refers to base scalars, the functions ofsympy.vectorare used instead;scalar_potential(v, coord_sys)then takes the coordinate system.- doit
Evaluate the derivatives (coordinate system fields only).
- v
A vector field: a list of three expressions or a column matrix.