Ask Your Question

# Matrix/Tensor derivative for Stress Tensor

I need to do define/calculate the following stress tensor in an elegant way:

$T_{i,j} := -p \delta_{i,j} + \eta (\partial_i v_j + \partial_j v_i)$

where i,j can be x,y,z and

$\partial_i v_j := \frac{\partial v_j}{\partial i}$

I've found the sage-function kronecker_delta for the first term, but I am having problems with the two partial derivatives.

Thanks in advance!

edit retag close merge delete

## Comments

Can you post what have you tried, or what are exactly your problems? The diff function can compute partial derivatives: just pass the variable with respect to you are differentiating. Does this help you in any way?

( 2011-05-21 06:19:13 +0200 )edit

## 1 Answer

Sort by ยป oldest newest most voted

Have you tried SageManifolds? sagemanifolds.obspm.fr

I do tensor calculus with it and I think it's good. Then as Juanlu001 already told you try to use diff and post your code.

more

## Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

## Stats

Asked: 2011-05-18 17:20:46 +0200

Seen: 1,187 times

Last updated: May 24 '15