Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements to hyperelasticity example #461

Merged
merged 1 commit into from
Jul 5, 2022
Merged

Conversation

fredrikekre
Copy link
Member

No description provided.

@termi-official
Copy link
Member

I also forgot to fix the tangent in my PR. Maybe you can put it into this PR: ∂C∂S​=4∂C∂Ψ​. -> ∂C∂S​=4∂²C∂Ψ²​.

@fredrikekre fredrikekre changed the title [WIP] Improvements to hyperelasticity example Improvements to hyperelasticity example Jul 5, 2022
@fredrikekre fredrikekre marked this pull request as ready for review July 5, 2022 12:29
@@ -66,9 +78,72 @@ import KrylovMethods, IterativeSolvers
# and the tangent of ``\mathbf{S}`` as
#
# ```math
# \frac{\partial \mathbf{S}}{\partial \mathbf{C}} = 4 \frac{\partial \Psi}{\partial \mathbf{C}}.
# \frac{\partial \mathbf{S}}{\partial \mathbf{C}} = 2 \frac{\partial^2 \Psi}{\partial \mathbf{C}^2}.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 times was correct. We have
$$\mathbf{S} := \frac{\partial \Psi}{\partial \mathbf{E}} = 2 \frac{\partial \Psi}{\partial \mathbf{C}}$$
and
$$\mathbb{C} := 2 \frac{\partial \mathbf{S}}{\partial \mathbf{C}} = 4 \frac{\partial^2 \Psi}{\partial \mathbf{C}}$$

@@ -89,53 +164,51 @@ function constitutive_driver(C, mp::NeoHooke)
## Compute all derivatives in one function call
∂²Ψ∂C², ∂Ψ∂C = Tensors.hessian(y -> Ψ(y, mp), C, :all)
S = 2.0 * ∂Ψ∂C
∂S∂C = 4.0 * ∂²Ψ∂C²
∂S∂C = 2.0 * ∂²Ψ∂C²
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above.

@fredrikekre fredrikekre merged commit f7b0e0f into master Jul 5, 2022
@fredrikekre fredrikekre deleted the fe/hyperelasticity branch July 5, 2022 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants