Dear Wolfram Community:
I am facing the problem of computing the gradient and divergence of a general tensor field.
In particular, expressions like the following ones (in Mathematica symbolic notation).
Grad[TensorProduct[A[t,X], B[t,X]],X];
Div[TensorProduct[A[t,X], B[t,X]],X];
Where:
A[t,X] and B[t,X] are two general tensor fields that are function of time “t” and the position vector “X”.
Those expressions are the more general forms (at least I hope) of the cited operators, very useful in continuum mechanics (specially in fluid mechanics: the Reynolds stress tensor is a ‘tensor product’ of turbulent velocity fields)
Unfortunately, the related identities are difficult to find in the bibliography/references.
I would like to know how to implement the product rule in symbolic notation.
Thank you in advance,
Alberto Silva
Notes:
-
I tried to do it before in explicit, component-by component notation, and the result was a very big, messy and confusing expression…
-
I am leaving a small notebook written in the last version of Wolfram Mathematica as an example.
-
A year ago I got a clue about how to do this computation (inserting a ‘custom operator’ using inactive expressions and replace rules) in the following community post:
How to use/ evaluate symbolic vector calculus identities?
The main problem that was left then was the true expression of the divergence was unknown and I just ‘guessed’ it, so my guess could be wrong.
Tensor derivatives of tensor products.nb (44.5 KB)