Did I perform the partial derivative correctly?

84 Views Asked by At

I have the following expression:

$\gamma^s=\sum_{s'}(X^{ss'})^{-1}m^{s'}(C-\sigma\otimes I)\cdot\varepsilon$

Where $s$ is the number of slip systems in the material and can be any integer. For this question, let's consider FCC aluminum where $s=24$. So, $\gamma^s$ is a 24x1 vector of scalars at a each $s$, $m^s$ is a 6x1x24 matrix of vectors, $C$ is a 6x6 tensor, $\sigma$ is a 6x1 vector, $\varepsilon$ is a 6x1 vector, and $X^{ss'}$ is a 24 x 24 matrix:

$X^{ss'} = h^{ss'} + C\cdot m^s\otimes m^{s'}$

I take the partial derivative of $\gamma^s$ with respect to $m^s$:

$\frac{\partial}{\partial m^s}\gamma^s=\frac{\partial}{\partial m^s}\sum_{s'}(X^{ss'})^{-1}m^{s'}(C-\sigma\otimes I)\cdot\varepsilon$

$C$, $\sigma$, and $\varepsilon$ don't depend on $m^s$, and $I$ is an 6x6 identity tensor. So I have:

$\frac{\partial\gamma^s}{\partial m^s}=\sum_{s'}\frac{\partial}{\partial m^s}(X^{ss'})^{-1}m^{s'}(C-\sigma\otimes I)\cdot\varepsilon$

Applying the product rule:

$\frac{\partial\gamma^s}{\partial m^s}=\sum_{s'}(\frac{\partial (X^{ss'})^{-1}}{\partial m^s}m^{s'} + (X^{ss'})^{-1}\frac{\partial m^{s'}}{\partial m^s})(C-\sigma\otimes I)\cdot\varepsilon$

Applying the rule of taking the derivative of an inverse matrix:

$\frac{\partial\gamma^s}{\partial m^s}=\sum_{s'}(-(X^{ss'})^{-1}\frac{\partial (h^{ss'} + C\cdot m^s\otimes m^{s'})}{\partial m^s}(X^{ss'})^{-1}m^{s'} + (X^{ss'})^{-1}\frac{\partial m^{s'}}{\partial m^s})(C-\sigma\otimes I)\cdot\varepsilon$

$h^{ss'}$ does not depend on $m^s$, and $\frac{\partial m^{s'}}{\partial m^s}$ is zero when $s' \neq s$, and is $I$ when $s' = s$. For each $s$, I have:

$\frac{\partial\gamma^s}{\partial m^s}=\sum_{s'}[-(X^{ss'})^{-1}C\cdot (\frac{\partial m^s}{\partial m^{s}}\otimes m^{s'}+m^s\otimes \frac{\partial m^{s'}}{\partial m^{s}})(X^{ss'})^{-1}m^{s'} + (X^{ss'})^{-1}\frac{\partial m^{s'}}{\partial m^s}](C-\sigma\otimes I)\cdot\varepsilon$

Writing the terms where $s' = s$ separately:

$\frac{\partial\gamma^s}{\partial m^s}=[-(X^{ss})^{-1}C\cdot (I\otimes m^{s}+m^s\otimes I)(X^{ss})^{-1}m^{s} + (X^{ss})^{-1}I+\sum_{s',s' \neq s}(-(X^{ss'})^{-1}C\cdot (I\otimes m^{s'})(X^{ss'})^{-1}m^{s'})](C-\sigma\otimes I)\cdot\varepsilon$

The problem begins here. Up to this point, I derived each step by breaking down the summation. When I check the dimensions of the final equation at a specific s and s', I get:

  • The LHS partial derivative of a scalar with a 6x1 vector has a dimension of 6x6.
  • The sum of tensor products $(I\otimes m^{s}+m^s\otimes I)$ gives a 6x6x6 tensor.
  • Dot product with $C$ gives a 6x6x6 tensor.
  • $(X^{ss})^{-1}$ is inverted beforehand as a 24 x 24 matrix, and it is simply a scalar here for a specific s and s'.
  • Then multiplying by $m^s$, which is a 6x1 vector at specific s, gives a 6x6 tensor.
  • $(X^{ss})^{-1}I$ is a 6x6 tensor, where $I$ is a 6x6 identity tensor.
  • The summation has $C\cdot (I\otimes m^{s'})$ which is a 6x6x6 tensor.
  • Dots with $m^s$ gives 6x6 tensor.
  • The summation in the square bracket is a 6x6 tensor.
  • Next is $(C-\sigma\otimes I)$. In the numerical code version of this equation, $I$ is treated as a vector with values [1 1 1 0 0 0], which is a 3x3 identity tensor written in Voigt notation of [11 22 33 23 13 12]. This is allowed because $\sigma$, normally a 3x3 stress tensor, is written as a 6x1 vector in Voigt notation.
  • So we have a 6x6 tensor times a 6x6 tensor times a 6x1 $\varepsilon$ vector in Voigt notation. This is where I am lost since to match the LHS, it should be a 6x6 tensor, but it doesn't seem likely.
1

There are 1 best solutions below

3
On BEST ANSWER

First some notes on my understanding of the problem:

\begin{equation} \dot{\gamma}^s = \pmb{f}^s \cdot \dot{\boldsymbol\varepsilon} \end{equation} $\dot{\gamma}^s$ is a scalar $\dot{\gamma}$ with an index ; $\pmb{f}^s$ is a vector $\pmb{f}$ with an index. So we have the dot product of two vectors which generates a scalar.

We also know that, \begin{equation} \dot{\gamma}^s = \sum_{s'} (X^{ss'})^{-1} \pmb{m}^{s'} \left(\pmb{C}-\pmb{\sigma}\otimes\pmb{I}\right)\cdot\dot{\boldsymbol\varepsilon} \end{equation} so we must have, \begin{equation} \pmb{f}^s= \sum_{s'} (X^{ss'})^{-1} \pmb{m}^{s'} \left(\pmb{C}-\boldsymbol{\sigma}\otimes\pmb{I}\right) \label{fs} \tag{I} \end{equation} $X$ is a scalar quantity with two indices: \begin{equation} X^{ss'}=h^{ss'}+\pmb{C}\cdot \pmb{m}^s \otimes \pmb{m}^{s'} \end{equation} If we ignore the indices $s, s'$ we have a scalar $X$ equal to the sum of another scalar $h$ and a quantity that must also be a scalar. So, \begin{equation} \pmb{C} \cdot \pmb{m} \otimes \pmb{m}' \end{equation} must be a scalar. Since $\pmb{m}\otimes\pmb{m}'$ is a matrix I guess this is the trace of a matrix product. So the dot product of two matrices $\pmb{A},\pmb{B}$ must be, $$ \pmb{A}\cdot\pmb{B}=\sum_i \sum_j A_{ij} B_{ji} $$ Note that since $B_{ji}=m_j m'_i$ and $A_{ij}=C_{ij}$, $$ \pmb{C}\cdot \pmb{m}^s \otimes \pmb{m}^{s'} =(\pmb{m}^{s'})^T \pmb{C} \pmb{m}^s $$ which is a quadratic form ($(-)^T$ denotes the transpose of a vector or a matrix).

The only expression left to resolve is ($\ref{fs}$); on the l.h.s. we have a vector with an index. On the r.h.s. we have,

  1. The inverse of a scalar quantity $X^{ss'}$; this is not the inverse of a tensor.
  2. A vector $\pmb{m}^{s'}$.
  3. The difference between two matrices $\pmb{C}$ and $\boldsymbol{\sigma}\otimes \pmb{I}$.

So in order for the r.h.s. to match the l.h.s. $$ \pmb{m}^{s'} \left(\pmb{C}-\boldsymbol{\sigma}\otimes\pmb{I}\right) $$ must be the product of a matrix with a vector (which is a vector; usually in a product of a matrix with a vector we write the vector on the right but lets ignore this).

If these assumptions are true then, \begin{equation} d \pmb{f}^{s} = \sum_{s'} \pmb{m}^{s'} \left(\pmb{C}-\boldsymbol{\sigma}\otimes\pmb{I}\right) d(X^{ss'})^{-1} +\sum_{s'} (X^{ss'})^{-1} \left(\pmb{C}-\boldsymbol{\sigma}\otimes\pmb{I}\right) d{\pmb{m}}^{s'} \end{equation} If we want to derive $\partial{\pmb{f}^s}/\partial{\pmb{m}^s}$ (so the index for $\pmb{f}$ and $\pmb{m}$ is the same) then we have to rewrite the last equation as, \begin{align} d \pmb{f}^{s} & = \sum_{s' \neq s} \pmb{m}^{s'} \left(\pmb{C}-\boldsymbol{\sigma}\otimes\pmb{I}\right) d(X^{ss'})^{-1} + \pmb{m}^{s} \left(\pmb{C}-\boldsymbol{\sigma}\otimes\pmb{I}\right) d(X^{ss})^{-1} \nonumber \\ & + (X^{ss})^{-1} \left(\pmb{C}-\boldsymbol{\sigma}\otimes\pmb{I}\right) d{\pmb{m}}^{s} \end{align} We can apply the chain rule for the two differentials involving $X$: \begin{align} d(X^{ss'})^{-1} & = - (X^{ss'})^{-2} dX^{ss'} \\ d(X^{ss})^{-1} & = - (X^{ss})^{-2} dX^{ss} \end{align} For $dX^{ss'}$ we have, \begin{equation} dX^{ss'} = ( \pmb{m}^{s'})^T \pmb{C} d\pmb{m}^s \end{equation} and for $dX^{ss}$ we have, \begin{equation} dX^{ss} = \left( (\pmb{m}^{s})^T \left( \pmb{C} + \pmb{C}^T \right)\right) d\pmb{m}^s \end{equation}

We can therefore write, \begin{align} \frac{\partial\pmb{f}^s}{\partial\pmb{m}^s} & = -\sum_{s'\neq s} (X^{ss'})^{-2} \pmb{m}^{s'} \left(\pmb{C} - \boldsymbol{\sigma} \otimes \pmb{I}\right) (\pmb{m}^{s'})^T \pmb{C}\nonumber \\ & - (X^{ss})^{-2} \pmb{m}^{s} \left(\pmb{C} - \boldsymbol{\sigma} \otimes \pmb{I}\right) \left((\pmb{m}^s)^T (\pmb{C}+\pmb{C}^T) \right) \nonumber \\ & + (X^{ss})^{-1} \left(\pmb{C} - \boldsymbol{\sigma} \otimes \pmb{I} \right) \end{align} or, alternatively, \begin{align} \frac{\partial\pmb{f}^s}{\partial\pmb{m}^s} & = -\sum_{s'} (X^{ss'})^{-2} \pmb{m}^{s'} \left(\pmb{C} - \boldsymbol{\sigma} \otimes \pmb{I}\right) (\pmb{m}^{s'})^T \pmb{C}\nonumber \\ & - (X^{ss})^{-2} \pmb{m}^{s} \left(\pmb{C} - \boldsymbol{\sigma} \otimes \pmb{I}\right) (\pmb{C}\pmb{m}^s)^T \nonumber \\ & + (X^{ss})^{-1} \left(\pmb{C} - \boldsymbol{\sigma} \otimes \pmb{I} \right) \end{align} I would still prefer that we wrote this as \begin{align} \frac{\partial\pmb{f}^s}{\partial\pmb{m}^s} & = -\sum_{s'} (X^{ss'})^{-2} \left(\pmb{C} - \boldsymbol{\sigma} \otimes \pmb{I}\right) \pmb{m}^{s'}(\pmb{m}^{s'})^T \pmb{C}\nonumber \\ & - (X^{ss})^{-2} \left(\pmb{C} - \boldsymbol{\sigma} \otimes \pmb{I}\right) \pmb{m}^{s}(\pmb{C}\pmb{m}^s)^T \nonumber \\ & + (X^{ss})^{-1} \left(\pmb{C} - \boldsymbol{\sigma} \otimes \pmb{I} \right) \end{align}

Since $\partial{\pmb{f}^s}/\partial{\pmb{m}^s}$ is a matrix, the r.h.s. of this equation must also be a matrix. On the first line we have the product of, $$ \left(\pmb{C} - \boldsymbol{\sigma} \otimes \pmb{I}\right)\pmb{m}^{s'} $$ which is a vector with, $$ (\pmb{m}^{s'})^T\pmb{C} $$ which is the transpose of a vector; the result is a matrix. On the second line we have the product of, $$ \left(\pmb{C} - \boldsymbol{\sigma} \otimes \pmb{I}\right)\pmb{m}^{s} $$ which is a vector with, $$ (\pmb{C}\pmb{m}^s)^T $$ which is the transpose of a vector; the result is a matrix. The third line is a matrix with the same dimensions.