question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

weak forms for hyperelasticity

See original GitHub issue

@bhaveshshrimali (from #438):

Thanks! I was starting to take a look at implementing the hyperelasticity demo. The most natural examples to follow seem to be linear elasticity, nonlinear poisson and laplace with inhomogeneous bcs.

What would be the best place to look for functions like log, inv, det (like in UFL) when writing the weak forms? For instance the stress would have an expression that looks like the following in UFL:

def firstPKStress(u):
    F = Identity(len(u)) + grad(u) 
    J = det(F)
    return mu * F - mu * inv(F).T + J * (J-1) * inv(F).T

I can see the helper functions eye and grad, which should help in defining F as eye(1, u.shape[0]) + grad(u), but how about the determinant (det) and inverse (inv) ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:71 (71 by maintainers)

github_iconTop GitHub Comments

1reaction
kinnalacommented, Sep 11, 2020

I’m closing this discussion for now since the hyperelasticity example is merged. Let’s create a new issue if something pops up.

1reaction
kinnalacommented, Aug 6, 2020

And just to have an idea, there the bulk of the time is indeed taken by the solve

It’s not clear to me that this timing properly separates assembly time and linear solve time.

Looking at the source code of solving.py it seems that _solve_varproblem includes both: https://bitbucket.org/fenics-project/dolfin/src/946dbd3e268dc20c64778eb5b734941ca5c343e5/python/dolfin/fem/solving.py#lines-276

I assume linear solve time is more or less equal in both cases because no magical differences there. Your previous profiling indicates that in scikit-fem linear solve takes a total of 15 seconds. Assuming that linear solve time is more or less equal, the assembly of the Jacobian takes approximately a total of 10 seconds in FEniCS and 70 seconds in scikit-fem.

It’s actually surprisingly good, I would have expected a larger difference given the amount of optimizations done automatically by FEniCS.

Read more comments on GitHub >

github_iconTop Results From Across the Web

5 Hyper-elasticity · Gridap tutorials - GitHub Pages
Setup weak form terms t_Ω = NonLinearFETerm(res,jac,trian,quad). Setup non-linear solver nls = NLSolver( show_trace=true, method=:newton, ...
Read more >
Theory of FEA -8.4 Finite strain elasticity
8.4 Finite element method for large deformations: hyperelastic materials. The finite element method can be used to solve problems involving large shape changes....
Read more >
2D Hyper-elasticity - FEniCS solid tutorial's documentation!
The symmetric gradient of displacement ε is a good strain measure for small deformations and quadratic energy is the simplest choice working for...
Read more >
Simulation of elasticity, biomechanics and virtual surgery
Equilibrium and weak form ... Here, we will focus on hyperelastic materials. ... The hyperelastic strain energy density for such materials is given....
Read more >
CHAP 3 FEA for Nonlinear Elastic Problems - UF MAE
The weak form must be expressed based on a frame of reference. – Often initial (undeformed) geometry ... Fitting Hyperelastic Material Parameters from...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found