MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: would like to compute a tensor derivative of a function and evaluate

  • To: mathgroup at smc.vnet.net
  • Subject: [mg105579] Re: would like to compute a tensor derivative of a function and evaluate
  • From: dh <dh at metrohm.com>
  • Date: Thu, 10 Dec 2009 04:55:10 -0500 (EST)
  • References: <hfnuum$gaq$1@smc.vnet.net>


Hi,

you should explain what you exactly mean by "tensorial derivative". If 

you really mean the covariant derivative then you did not give enough 

information.

But maybe you mean the ordinary derivative. E.g.: D[ W[C[x,y,z]], x]. 

Here we have the problem that Mathematica has no general rules for the 

derivative of Det. Therefore, either you specify these rules or you give 

the components of C explicitely as functions of x,y,z, so that Det can 

be evaluated.

Further, note that capital C is a reversed symbol, I changed it to lower 

case. Custom names should always begin with lowercase, system names 

always begin with a capital.



For simplicity I make a 2D example:



c[x_,y_]:= {{x+0.5 x^2,x},{x,1+2 x }};

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];



Now we can get our derivatives as usual. E.g.:

D[W[c[x, y]], x]

D[W[c[x, y]], {x,2}] e.t.c



Daniel



nooj wrote:

> 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

> 




  • Prev by Date: NDSolve: Affecting dependent variable during solution?
  • Next by Date: Re: multiplication of large multivariate polynomials
  • Previous by thread: would like to compute a tensor derivative of a function and evaluate
  • Next by thread: Plot3D Boxed Option