Closed alxbilger closed 3 weeks ago
Poke @fjourdes @bakpaul ;)
TODO :
The simulation diverges at dt=0.00006 (compared to being stable at dt=0.00005), independently on the method used to fix points.
[ci-build][with-all-tests]
@hugtalbot @bakpaul I don't really understand why there is a factor 2 here: https://github.com/sofa-framework/sofa/blob/975b4ab35149b23915490e715da0fb3cdcc3bb92/Sofa/Component/SolidMechanics/FEM/HyperElastic/tests/Material_test.cpp#L250
And here:
I don't understand how C_H_C
relates to $C^{-1} \underline{\overline{\otimes}} C^{-1}$ and trC_HC_
relates to $C^{-1} \otimes C^{-1}$
Let me invoke @fjourdes
Hi @fjourdes, thanks for the suggestion. I used HOBAK for the implementation, adapting it to SOFA TetrahedronHyperelasticityFEMForceField
. I implemented only the material. Therefore, everything outside of the material, such as matrix clamping, is not yet implemented. Note that HOBAK has also a test suite, with some similarities with mine (test derivative against finite differences). I guess we can check that both test suites match for the same input.
On top of the introduction of the stable Neo Hookean hyperelastic material (from Smith, Breannan, Fernando De Goes, and Theodore Kim. "Stable neo-hookean flesh simulation." ACM Transactions on Graphics (TOG) 37.2 (2018): 1-15.), I rewrote the St Venant-Kirchhoff and Neo Hookean materials to make it clearer to read. I also added unit tests, validating some material constitutive equations.
I added an example having inverted tetrahedra:
Based on https://github.com/sofa-framework/sofa/pull/4600
$$ \alpha = 1 + \frac{\mu}{\lambda + \mu} $$
Strain Energy Density Function
$$ \psi = \frac{1}{2} \left(\mu (I_C - 3) + (\lambda + \mu) (J - \alpha)^2 \right) $$
Second Piola-Kirchoff stress tensor
$$ S = \mu I_3 + \left((\lambda + \mu) J (J - \alpha)\right) C^{-1} $$
Elasticity tensor
$$ \mathbb{C} = (\lambda + \mu) \left(-2 J (J - \alpha) C^{-1} \underline{\overline{\otimes}} C^{-1} + J (2 J-\alpha) C^{-1} \otimes C^{-1} \right) $$
By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).
Reviewers will merge this pull-request only if