Matrix/Tensor derivative for Stress Tensor
I need to do define/calculate the following stress tensor in an elegant way:
Ti,j:=−pδi,j+η(∂ivj+∂jvi)
where i,j can be x,y,z and
∂ivj:=∂vj∂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!
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?