2

The divergence of a vector field in Cartesian coordinate system (CCS) is defined as follows

$$ \mathrm{div}(\mathbf v) = \nabla \cdot \mathbf v = \begin{bmatrix} \frac{\partial}{\partial x} \\ \frac{\partial}{\partial y} \\ \frac{\partial}{\partial z} \end{bmatrix} \cdot \begin{bmatrix} v_1 \\ v_2 \\ v_3 \end{bmatrix} = \begin{bmatrix} \frac{\partial}{\partial x} \\ \frac{\partial}{\partial y} \\ \frac{\partial}{\partial z} \end{bmatrix}^T \begin{bmatrix} v_1 \\ v_2 \\ v_3 \end{bmatrix} = \begin{bmatrix} \frac{\partial}{\partial x} & \frac{\partial}{\partial y} & \frac{\partial}{\partial z} \end{bmatrix} \begin{bmatrix} v_1 \\ v_2 \\ v_3 \end{bmatrix} =\frac{\partial v_1}{\partial x}+ \frac{\partial v_2}{\partial y}+ \frac{\partial v_3}{\partial z} $$

where $\cdot$ denotes the dot product; it was changed to transposition with matrix multiplication. Now lets define some matrix

$$A = \begin{bmatrix} a_{11} && a_{12} && a_{13} \\ a_{21} && a_{22} && a_{23} \\ a_{31} && a_{32} && a_{33} \\ \end{bmatrix} $$

How to calculate divergence of matrix in CCS and how looks its 'dot' product and 'matrix multiplication' form?

$$\mathrm{div}(A) = ?$$

  • 1
    as far I know, the divergence of matrix should give vector as a result – Kamil Kiełczewski Dec 30 '19 at 17:04
  • 1
  • @mvpq thank for link, but someone told there in comments that forumla given in wiki is WRONG (idex-es are bad) – Kamil Kiełczewski Dec 30 '19 at 17:06
  • First calculate the gradient $;g_{ij}=\partial_iv_j;$ then calculate the divergence by contracting over the leading two indices, i.e. $;\phi=\delta_{ij}g_{ij}=g_{ii}.;$ This procedure can be extended to arbitrary tensors, just add more indices on the right, e.g. $$\eqalign{g_{ijklm}&=\partial_iv_{jklm}\ \phi_{klm}&=\delta_{ij}g_{ijklm}=g_{iiklm}}$$ – greg Dec 30 '19 at 18:14
  • @greg in your approach (for 3x3 matrix) the div(A) will give scalar (if I read your formulas in good way) - but as far I know, the div(A) should give VECTOR as result – Kamil Kiełczewski Dec 30 '19 at 18:21
  • My approach yields a vector, just omit the $(l,m)$ indices everywhere. I'm using $\phi$ to represent the divergence, $g$ for the gradient, and $v$ to represent either $A$ or $v$. – greg Dec 30 '19 at 18:23
  • @greg sorry, probably I read your formulas in wrong way - can I know what is $\phi$ (without indexes) and how it relate to div(A) ? – Kamil Kiełczewski Dec 30 '19 at 18:26
  • You use sloppy notation, then get confused. You take the divergence of a vector field, not of a vector. The partial derivatives of a constant vector field are all zero. You seem to be interested in "matrix fields". Just use the Frobenius inner product instead. – Rodrigo de Azevedo Dec 31 '19 at 01:39
  • @RodrigodeAzevedo - yes of course, the A and v components are not constant - they are some functions dependent on x,y,z. But still there is a problem how to calclutate div(A). The Frobenius inner product gives SCALAR as result - but div(A) should give VECTOR as result – Kamil Kiełczewski Dec 31 '19 at 08:00
  • Then left-multiply by $\nabla$ or something. You need to define what the divergence of a "matrix field" is. – Rodrigo de Azevedo Dec 31 '19 at 09:45
  • @RodrigodeAzevedo - no - I don't want to create new definition. As far as I know In math definition of general divergence (for arbitrary order tensors like matrix above) already exists - but Im confused - people say that wiki definition has bugs with indexes. – Kamil Kiełczewski Dec 31 '19 at 09:57
  • Is Wikipedia the only place where such definitions are written? Have you tried Google Books? – Rodrigo de Azevedo Dec 31 '19 at 10:37

1 Answers1

4

In this answer I use $x=x_1, y=x_2, z=x_3$ and Einstein notation. On wikipedia in this article I found following information (in article they use S instead A) for CCS:

$$ \nabla\cdot A = \cfrac{\partial A_{ki}}{\partial x_k}~\mathbf{e}_i = A_{ki,k}~\mathbf{e}_i = \begin{bmatrix} \frac{\partial a_{11}}{\partial x} + \frac{\partial a_{21}}{\partial y} + \frac{\partial a_{31}}{\partial z} \\ \frac{\partial a_{12}}{\partial x} + \frac{\partial a_{22}}{\partial y} + \frac{\partial a_{32}}{\partial z} \\ \frac{\partial a_{13}}{\partial x} + \frac{\partial a_{23}}{\partial y} + \frac{\partial a_{33}}{\partial z} \\ \end{bmatrix} $$

The result is contravariant (column) vector. But in this article is mention that $\mathrm{div}(A) \neq \nabla\cdot A$ and

$$ \mathrm{div}(A) = \nabla\cdot A^T = \cfrac{\partial A_{ik}}{\partial x_k}~\mathbf{e}_i = A_{ik,k}~\mathbf{e}_i = \begin{bmatrix} \frac{\partial a_{11}}{\partial x} + \frac{\partial a_{12}}{\partial y} + \frac{\partial a_{13}}{\partial z} \\ \frac{\partial a_{21}}{\partial x} + \frac{\partial a_{22}}{\partial y} + \frac{\partial a_{23}}{\partial z} \\ \frac{\partial a_{31}}{\partial x} + \frac{\partial a_{32}}{\partial y} + \frac{\partial a_{33}}{\partial z} \\ \end{bmatrix} $$

When A is symetric: $a_{ij}=a_{ji}$ then $\mathrm{div}(A) = \nabla\cdot A$

Wiki also mention that some authors use alternative definition: $\nabla\cdot A = \cfrac{\partial A_{ik}}{\partial x_k}~\mathbf{e}_i $ probably only for case when A is symmetric (for which that alternative definition is equal to original). However alternative definition is NOT compatible with general curvilinear definition which I found on wiki too:

$$ \nabla\cdot A = \left(\cfrac{\partial A_{ki}}{\partial x_k}- A_{li}~\Gamma_{kk}^l - A_{kl}~\Gamma_{ki}^l\right)~\mathbf{g}^i $$