Question: Gradient of a vector field and the Physics package

Vector calculus is very nicely handled in Maple's Physics package:

with(Physics[Vectors]):

The gradient of a scalar field in Cartesian coordinates

Gradient(f(x,y,z));

(diff(f(x, y, z), x))*_i+(diff(f(x, y, z), y))*_j+(diff(f(x, y, z), z))*_k

The gradient of a scalar field in cylindrical coordinates

Gradient(f(rho,phi,z));

(diff(f(rho, phi, z), rho))*_rho+(diff(f(rho, phi, z), phi))*_phi/rho+(diff(f(rho, phi, z), z))*_k

But the gradient of a vector field is not available:

Gradient(_rho*f(rho,phi,z) + _phi*g(rho,phi,z) + _k*h(rho,phi,z));

Error, (in Physics:-Vectors:-Nabla) Physics:-Vectors:-Gradient expected a scalar function, but received the vector function: _rho*f(rho, phi, z)+_phi*g(rho, phi, z)+_k*h(rho, phi, z)

I suppose this is because the gradient of a vector field needs to be
expressed in terms a basis consisting of the dyadic products  of the basis vectors

as in _i  _j, _rho_phi, etc., which does not seem to be implemented.

 

That said, it is quite possible that this is already done and I have missed it in
the documentation since the Physics package is so huge.  But if it's truly not there,
it would be a very useful feature to add.  Calculating gradients of vector fields

is central to continuum mechanics (including elasticity and fluid mechanics).

They are easy to represent in Cartesian coordinates but their calculation in the

frequently needed cylindrical and spherical coordinates are nontrivial and can use

Maple's help.

 

Please Wait...