ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 24 May 2015 00:37:51 +0200Matrix/Tensor derivative for Stress Tensorhttps://ask.sagemath.org/question/8119/matrixtensor-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!Wed, 18 May 2011 17:20:46 +0200https://ask.sagemath.org/question/8119/matrixtensor-derivative-for-stress-tensor/Comment by Juanlu001 for <p>I need to do define/calculate the following stress tensor in an elegant way:</p>
<p>$T_{i,j} := -p \delta_{i,j} + \eta (\partial_i v_j + \partial_j v_i)$</p>
<p>where i,j can be x,y,z and </p>
<p>$\partial_i v_j := \frac{\partial v_j}{\partial i}$</p>
<p>I've found the sage-function kronecker_delta for the first term, but I am having problems with the two partial derivatives.</p>
<p>Thanks in advance!</p>
https://ask.sagemath.org/question/8119/matrixtensor-derivative-for-stress-tensor/?comment=21701#post-id-21701Can 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?Sat, 21 May 2011 06:19:13 +0200https://ask.sagemath.org/question/8119/matrixtensor-derivative-for-stress-tensor/?comment=21701#post-id-21701Answer by roberto for <p>I need to do define/calculate the following stress tensor in an elegant way:</p>
<p>$T_{i,j} := -p \delta_{i,j} + \eta (\partial_i v_j + \partial_j v_i)$</p>
<p>where i,j can be x,y,z and </p>
<p>$\partial_i v_j := \frac{\partial v_j}{\partial i}$</p>
<p>I've found the sage-function kronecker_delta for the first term, but I am having problems with the two partial derivatives.</p>
<p>Thanks in advance!</p>
https://ask.sagemath.org/question/8119/matrixtensor-derivative-for-stress-tensor/?answer=26927#post-id-26927Have 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.
Sun, 24 May 2015 00:37:51 +0200https://ask.sagemath.org/question/8119/matrixtensor-derivative-for-stress-tensor/?answer=26927#post-id-26927