evouga / libshell

Discrete shell energy, and its derivatives and Hessian.
Mozilla Public License 2.0
55 stars 15 forks source link

Reference for NeoHookeanMaterial<SFF>::stretchingEnergy ? #8

Open alecjacobson opened 6 months ago

alecjacobson commented 6 months ago

libshell is a great library.

Does the NeoHookean flavour in https://github.com/evouga/libshell/blob/220a5f2a3a5871f445a4b8fa1eec1ae80cc40a92/src/MaterialModel/NeoHookeanMaterial.cpp#L22

appear as a formula in a paper?

evouga commented 6 months ago

No, sorry, not as far as I know. I started from the volumetric Neo-Hookean energy density (in the comments at the top of https://github.com/evouga/libshell/blob/220a5f2a3a5871f445a4b8fa1eec1ae80cc40a92/include/NeoHookeanMaterial.h), expanded the rest and deformed volumetric metric in terms of the surface fundamental forms to second order in the thickness h, and integrated in closed form.

If you do this naively you will get a bending energy term which can become negative. Using the usual assumption/justification that in-plane strain is not too large relative to the bending strain you can drop some cubic terms to get the non-negative energy in the code, but unfortunately I don't remember the details.

If it matters I can try to reconstitute the derivation.

alecjacobson commented 6 months ago

Thanks, Etienne. This is really helpful. A derivation would be great if/when you ever do it. If I happen to do it on my own out of curiosity I'll post it here.

In the meantime, I wonder if you think there's a substantial difference between what you've implemented and multiplying a 2D Stable Neohookean energy by area * thickness. Something like

$$\begin{align} F &= [X₂-X₁, X₃-X₁]⁺ [x₂-x₁, x₃-x₁]\ I₂ &= \text{trace}(FᵀF) \ I₃ &= \text{det}(F) \ α &= 1 + \frac{μ}{λ} \ Φ &= A δ (\frac{μ}{2} (I₂ - 2) + \frac{λ}{2} (I₃ - α)²) \end{align}$$

where $A$ and $δ$ are the per-triangle area and thickness.

evouga commented 6 months ago

The main difference is that the code implements an unstable Neo-Hookean material model, i.e. one whose energy diverges if the area of a triangle collapses. (This barrier is needed since terms in the bending energy become undefined if the triangle stops having a well-defined normal).

BTW the tricky part of the derivation is the bending energy; if you're mainly interested in the stretching term let me know as that should be quick to derive. It'll basically be the volumetric energy density applied to the 2D triangle strain.

alecjacobson commented 6 months ago

Ah, cool. I didn't realize that the bending energy is derived in tandem. That makes sense. I was considering something like SNH⋅area⋅thickness + the simple discrete shells hinge energy.

It makes sense about the barrier.

again, I'd love a derivation when/if you have it, but don't intend to nerd snipe you. This is already a lot of help, thanks.