This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Help on specifying a functional

0 votes

Hello,

How can I specify this functional:

M = integral( u.inv(F).xJ )* dx

u = displacement
F = deformation gradient
x = updated position vector after defromation
J = determinant of F

Currently, I have:

V       = VectorElement("CG", tetrahedron, 2)
x       = Coefficient( V )
u       = Coefficient( V )

F      = I + grad(u)           
invF = inv(F)
J      = det(F)

M = ( dot(u, dot(invF, x*J)) )*dx

forms = [M]

but it doesn't compile.

asked Sep 23, 2014 by gennadiy FEniCS Novice (590 points)

Hi, did you forget I = Identity(3) ?

Yes, of course. Thanks, Mirok.

On a related note, how do I specify the position vector x of a deformed mesh given the displacement u? Is it enough to do:

cell    = tetrahedron    
x       = SpatialCoordinate(cell)

I am not sure about the answer here, so I suggest you ask this as a new question.

...