Message Boards Message Boards

0
|
1906 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

How to compute the gradient and divergence of a 'Tensor Product' expression

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:

1) I tried to do it before in explicit, component-by component notation, and the result was a very big, messy and confusing expression...

2) I am leaving a small notebook written in the last version of Wolfram Mathematica as an example.

3) 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.

Attachments:
Posted 1 year ago

Without knowing the frame you are working in:

A Tensor is an array of covariant and contravariant ordered index groups. The tensor can be witten by the sum of products of the elements of the array with the tensor product of the basis vectors e_i and their dual 1-forms dx^i.

Any differential operator like D[#. xkl] or Del[#,xk] or the covariant derivative simpliy works on tensor products as with ordinary products.

As a linear Doperator it works conventionally on any scalar function including the scalar valued, indexed tensor component and deals with the tensor products of the basis vectors and forms as with ordinary products, The product rule yields a sum over the basis vectors and forms. If the basis vectors a covariantly constant, all these terms are zero. That means that in an euclidean spaces with Cartesian bases only the coefficients are differentiated

General differentials dont make much sense, only the exterior derivative, that works an functions as Dt[ f[x],x ] /.{HoldPattern[D[x]:> dx, HoldPattern[D[D[_]]]]:> 0} are used because they yield integrands for integrals of all kinds.

So much said, I define

ExteriorD[ Sum[  a _ik  dx^i  \[Wedge] dx^k ,...]]   

-->   Sum[  a_ik;l  dx^l\[Wedge] dx^i \[Wedge] dx^k  ]

where in Einstein notation ik;l denotes covariant D of ik component in direction l and \[Wedge] is the antisymmetrc vector product TensorProduct[a,b]-TensorProduct[ b, a]

In contrast to partial derivatives, covariant derivatives, exterior derivatives, that yiled linear appoximations to fields in a neighborhood of a point, the divergence of a vector or tensor field is a metric dependent object, because, in essence, it is the limit of the outward transport flow of a tensor field over the small sphere bound a ball from its center at any point, divided by the volume of the ball. In curved spaces volume and surface of spheres depend on the local metric.

So in order to define a coordinate independent notion of Div you have to replace tensor products of basis differnetials in your tensor product by their complentary tensor product of the differentials of the rest of the indices. This to be done by a metric product is defined to be the Hopf dual and is simply wittten as *T .

In this notation the Div of a mixed tensor field in Cartesian coordinates with unit euclidean metric

    Div[  Sum [T_ik(x)  TensorProduct[e_i  ,dx^k,] 


-->Sum[ TensorProduct[e_i  ExteriorD[  Tik(x)  (-1)^(k-1)  Delete[Wedge[ dx1 ,..., dx^n], k ]] ]

 -->   Sum[   TensiorProduct[ e_i , \[Partial_k T_ik ,x^k]   ]   Wedge[ dx1 ,..., dx^n]  

This means that the divergence of a mixed tensor is a volume form with coefficients in the tensor product of basis vectors in T. As a volume form it can be integrated over a volume and yield the outward current over the surface.

POSTED BY: Updating Name
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract