would like to compute a tensor derivative of a function and evaluate
- To: mathgroup at smc.vnet.net
- Subject: [mg105561] would like to compute a tensor derivative of a function and evaluate
- From: nooj <noojon at gmail.com>
- Date: Wed, 9 Dec 2009 05:42:38 -0500 (EST)
I study elasticity--hyperelasticity, to be more precise. Thus, I have a real-valued function W = W(C), called a strain energy function, which takes a tensor C as its argument. C is a second-rank tensor, equivalent in my case to a 3x3 matrix. C is symmetric. I would like to know how to compute in Mathematica the first and second tensor derivatives of W with respect to C, *and also* to evaluate these derivatives at a given tensor, say, C_0. Using D[f, {array}] hasn't worked for me, mostly because I don't know how to define f properly or specify the array properly. (The array is used in three different senses: as the dummy variable for the definition of f, as the dummy variable for the computation of the derivative, and as a real-valued matrix for the evaluation of the derivative at C_0.) I have looked at http://reference.wolfram.com/mathematica/ref/D.html. I would like to do this in order to check my code to see if it is working. Usually what happens is I compute the derivatives by hand, code them by hand, and no matter how many times I check, I am never 100% sure that what I have coded is correct, for lack of a good benchmark. My strain energy functions are quite complicated these days: I1[C_] := Tr[ Det[C]^(-1/3) C ] Wiso[C_] := a Exp[ b(I1[C]-3)^2 ] - a Wdil[C_] := k ( Det[C]^2 - 1 - Log[ Det[C] ] ) W[C_] := Wiso[C] + Wdil[C] a, b, and k are real-valued constants. Det[C] is real, so Det[C]^ (-1/3) should be real. The derivatives of W returned by Mathematica will be non-human- readable messes, which is why I want to evaluate them. Thanks for your help, Nooj