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

Define Ogden strain energy density function

+1 vote

Hello,

I was studying the tutorials about Hyperelasticity and eigenvalues solvers, but I could not figure out how to define the strain energy density function in terms of the eigenvalues of the left Cauchy-Green deformation tensor (as it is required by Ogden model). Is it possible? If it is, can someone show me some lines of code with an example?

Thank you for your attention,
Eduardo

asked Nov 19, 2016 by EduardoMS FEniCS Novice (270 points)

1 Answer

+1 vote
 
Best answer

Hi, as far as I know this is not possible in a simple way. The problem is already at the first step of FEniCS chain - there is no operand for eigenvalues in UFL. I suggest you register this as a feature request. Alternatively you could try to make use of the following approach

from dolfin import *

mesh = UnitSquareMesh(10, 10)
V = VectorFunctionSpace(mesh, 'CG', 2)
u = interpolate(Expression(('x[0]', 'x[0]*x[1]'), degree=2), V)

F = Identity(2) + grad(u)
C = F*F.T

# Eigenvalues are roots of characteristic polynomial
# e**2 - tr(A)*e + det(A) = 0
def eig_plus(A): return (tr(A) + sqrt(tr(A)**2-4*det(A)))/2

def eig_minus(A): return (tr(A) - sqrt(tr(A)**2-4*det(A)))/2

# Check
S = FunctionSpace(mesh, 'CG', 2)

f0 = project(tr(C), S) 
f = project(eig_plus(C)+eig_minus(C), S)
print (f0.vector()-f.vector()).norm('l2')

f0 = project(det(C), S)
f = project(eig_plus(C)*eig_minus(C), S)
print (f0.vector()-f.vector()).norm('l2')
answered Nov 21, 2016 by MiroK FEniCS Expert (80,920 points)
selected Nov 21, 2016 by EduardoMS

Thank you! I will try this approach.

...