adtzlr / matadi

Material Definition with Automatic Differentiation
GNU General Public License v3.0
21 stars 2 forks source link

Add Two-Field (u/p) Variation for hyperelastic materials #101

Closed adtzlr closed 2 years ago

adtzlr commented 2 years ago
F, p = x

J = det(F)
W = fun(F, **kwargs)
U = fun(J ** (1 / 3) * eye(3), **kwargs)

dWdF = grad(W, F)
dWdJ = trace(dWdF @ F.T) / J / 3
d2WdJdJ = trace(grad(dWdJ, F) @ F.T) / J / 3

W - U + 1 / d2WdJdJ * (p * dWdJ - p ** 2 / 2)
codecov-commenter commented 2 years ago

Codecov Report

Merging #101 (57e064d) into main (c2102a3) will not change coverage. The diff coverage is 100.00%.

:exclamation: Current head 57e064d differs from pull request most recent head 2b505a7. Consider uploading reports for the commit 2b505a7 to get more accurate results

@@            Coverage Diff            @@
##              main      #101   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           20        20           
  Lines          810       855   +45     
=========================================
+ Hits           810       855   +45     
Impacted Files Coverage Δ
matadi/__init__.py 100.00% <ø> (ø)
matadi/math.py 100.00% <ø> (ø)
matadi/models/_helpers.py 100.00% <ø> (ø)
matadi/models/microsphere/affine/__init__.py 100.00% <ø> (ø)
matadi/_templates.py 100.00% <100.00%> (ø)
matadi/models/microsphere/affine/_models.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c2102a3...2b505a7. Read the comment docs.