Skip to content

Commit 5783c57

Browse files
authored
Merge pull request #237 from kaipartmann/constitutive_models
Constitutive models
2 parents 253625f + 85263bf commit 5783c57

17 files changed

+647
-315
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "Peridynamics"
22
uuid = "4dc47793-80f3-4232-b30e-ca78ca9d621b"
33
authors = ["Kai Partmann"]
4-
version = "0.4.3-DEV"
4+
version = "0.5.0-DEV"
55

66
[deps]
77
AbaqusReader = "bc6b9049-e460-56d6-94b4-a597b2c0390d"

docs/src/public_api_reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ ZEMSilling
3030
ZEMWan
3131
LinearElastic
3232
NeoHooke
33-
MooneyRivlin
33+
NeoHookePenalty
3434
SaintVenantKirchhoff
3535
const_one_kernel
3636
linear_kernel

src/Peridynamics.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export BBMaterial, DHBBMaterial, OSBMaterial, CMaterial, CRMaterial, BACMaterial
1313
CKIMaterial, RKCMaterial, RKCRMaterial
1414

1515
# CMaterial related types
16-
export LinearElastic, NeoHooke, MooneyRivlin, SaintVenantKirchhoff, ZEMSilling, ZEMWan
16+
export LinearElastic, NeoHooke, NeoHookePenalty, SaintVenantKirchhoff, ZEMSilling, ZEMWan
1717

1818
# Kernels
1919
export const_one_kernel, linear_kernel, cubic_b_spline_kernel, cubic_b_spline_kernel_norm

src/physics/ba_correspondence.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ correspondence formulation of Chen and Spencer (2019).
88
- `kernel::Function`: Kernel function used for weighting the interactions between points.
99
(default: `linear_kernel`)
1010
- `model::AbstractConstitutiveModel`: Constitutive model defining the material behavior.
11-
(default: `LinearElastic()`)
11+
(default: `SaintVenantKirchhoff()`)
1212
- `dmgmodel::AbstractDamageModel`: Damage model defining the fracture behavior.
1313
(default: `CriticalStretch()`)
1414
- `maxdmg::Float64`: Maximum value of damage a point is allowed to obtain. If this value is
@@ -20,7 +20,7 @@ correspondence formulation of Chen and Spencer (2019).
2020
2121
```julia-repl
2222
julia> mat = BACMaterial()
23-
BACMaterial{LinearElastic, typeof(linear_kernel), CriticalStretch}()
23+
BACMaterial{SaintVenantKirchhoff, typeof(linear_kernel), CriticalStretch}()
2424
```
2525
---
2626
@@ -76,7 +76,7 @@ struct BACMaterial{CM,K,DM} <: AbstractBondAssociatedSystemMaterial
7676
end
7777

7878
function BACMaterial(; kernel::Function=linear_kernel,
79-
model::AbstractConstitutiveModel=LinearElastic(),
79+
model::AbstractConstitutiveModel=SaintVenantKirchhoff(),
8080
dmgmodel::AbstractDamageModel=CriticalStretch(),
8181
maxdmg::Real=0.85)
8282
return BACMaterial(kernel, model, dmgmodel, maxdmg)

src/physics/constitutive_models.jl

Lines changed: 152 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,82 @@
1+
@doc raw"""
2+
SaintVenantKirchhoff
3+
4+
Saint-Venant-Kirchhoff constitutive model that can be specified when using a
5+
[`CMaterial`](@ref) and [`BACMaterial`](@ref).
6+
7+
The strain energy density ``\Psi`` is given by
8+
```math
9+
\Psi = \frac{1}{2} \lambda \, \mathrm{tr}(\boldsymbol{E})^2 + \mu \, \mathrm{tr}(\boldsymbol{E} \cdot \boldsymbol{E}) \; ,
10+
```
11+
with the first and second Lamé parameters ``\lambda`` and ``\mu``, and the Green-Lagrange
12+
strain tensor
13+
```math
14+
\boldsymbol{E} = \frac{1}{2} \left( \boldsymbol{F}^{\top} \boldsymbol{F} - \boldsymbol{I}
15+
\right) \; .
16+
```
17+
18+
The first Piola-Kirchhoff stress ``\boldsymbol{P}`` is given by
19+
```math
20+
\begin{aligned}
21+
\boldsymbol{S} &= \lambda \, \mathrm{tr}(\boldsymbol{E}) \, \boldsymbol{I}
22+
+ 2 \mu \boldsymbol{E} \; , \\
23+
\boldsymbol{P} &= \boldsymbol{F} \, \boldsymbol{S} \; ,
24+
\end{aligned}
25+
```
26+
with the deformation gradient ``\boldsymbol{F}`` and the second Piola-Kirchhoff stress
27+
``\boldsymbol{S}``.
28+
29+
!!! note
30+
This model is equivalent to the [`LinearElastic`](@ref) model, both using the same
31+
strain energy density function.
32+
"""
33+
struct SaintVenantKirchhoff <: AbstractConstitutiveModel end
34+
35+
function first_piola_kirchhoff(::SaintVenantKirchhoff, storage::AbstractStorage,
36+
params::AbstractPointParameters, F::SMatrix{3,3,T,9}) where T
37+
E = 0.5 .* (F' * F - I)
38+
S = params.λ * tr(E) * I + 2 * params.μ * E
39+
P = F * S
40+
return P
41+
end
42+
43+
function strain_energy_density(::SaintVenantKirchhoff, storage::AbstractStorage,
44+
params::AbstractPointParameters, F::SMatrix{3,3,T,9}) where T
45+
E = 0.5 .* (F' * F - I)
46+
Ψ = 0.5 * params.λ * tr(E)^2 + params.μ * tr(E * E)
47+
return Ψ
48+
end
49+
150
@doc raw"""
251
LinearElastic
352
453
Linear elastic constitutive model that can be specified when using a [`CMaterial`](@ref) and
554
[`BACMaterial`](@ref).
6-
The first Piola-Kirchhoff stress ``\boldsymbol{P}`` is given by
55+
56+
The strain energy density ``\Psi`` is given by
757
```math
8-
\boldsymbol{P} = \mathbb{C} : \boldsymbol{E} \; ,
58+
\Psi = \frac{1}{2} \lambda \, \mathrm{tr}(\boldsymbol{E})^2 + \mu \, \mathrm{tr}(\boldsymbol{E} \cdot \boldsymbol{E}) \; ,
959
```
10-
with the elastic stiffness tensor ``\mathbb{C}`` and the Green-Lagrange strain tensor
11-
``\boldsymbol{E}`` with
60+
with the first and second Lamé parameters ``\lambda`` and ``\mu``, and the Green-Lagrange
61+
strain tensor ``\boldsymbol{E}``
1262
```math
1363
\boldsymbol{E} = \frac{1}{2} \left( \boldsymbol{F}^{\top} \boldsymbol{F} - \boldsymbol{I}
1464
\right) \; .
1565
```
66+
67+
The first Piola-Kirchhoff stress ``\boldsymbol{P}`` is given by
68+
```math
69+
\begin{aligned}
70+
\boldsymbol{S} &= \mathbb{C} : \boldsymbol{E} \; , \\
71+
\boldsymbol{P} &= \boldsymbol{F} \, \boldsymbol{S} \; ,
72+
\end{aligned}
73+
```
74+
with the deformation gradient ``\boldsymbol{F}``, the elastic stiffness tensor ``\mathbb{C}``,
75+
and the second Piola-Kirchhoff stress ``\boldsymbol{S}``.
76+
77+
!!! note
78+
This model is equivalent to the Saint-Venant-Kirchhoff model, but uses a
79+
different implementation based on the elastic stiffness tensor.
1680
"""
1781
struct LinearElastic <: AbstractConstitutiveModel end
1882

@@ -21,13 +85,25 @@ function first_piola_kirchhoff(::LinearElastic, storage::AbstractStorage,
2185
E = 0.5 .* (F' * F - I)
2286
Evoigt = SVector{6,Float64}(E[1,1], E[2,2], E[3,3], 2 * E[2,3], 2 * E[3,1], 2 * E[1,2])
2387
Cvoigt = get_hooke_matrix_voigt(params.nu, params.λ, params.μ)
24-
Pvoigt = Cvoigt * Evoigt
25-
P = SMatrix{3,3,Float64,9}(Pvoigt[1], Pvoigt[6], Pvoigt[5],
26-
Pvoigt[6], Pvoigt[2], Pvoigt[4],
27-
Pvoigt[5], Pvoigt[4], Pvoigt[3])
88+
Svoigt = Cvoigt * Evoigt
89+
# Convert second Piola-Kirchhoff stress from Voigt to tensor form
90+
S = SMatrix{3,3,Float64,9}(Svoigt[1], Svoigt[6], Svoigt[5],
91+
Svoigt[6], Svoigt[2], Svoigt[4],
92+
Svoigt[5], Svoigt[4], Svoigt[3])
93+
# First Piola-Kirchhoff stress: P = F * S
94+
P = F * S
2895
return P
2996
end
3097

98+
function strain_energy_density(::LinearElastic, storage::AbstractStorage,
99+
params::AbstractPointParameters, F::SMatrix{3,3,T,9}) where T
100+
E = 0.5 .* (F' * F - I)
101+
# For energy density, use the standard form: Ψ = 0.5 * λ * tr(E)^2 + μ * tr(E*E)
102+
# This is equivalent to the Saint-Venant-Kirchhoff model
103+
Ψ = 0.5 * params.λ * tr(E)^2 + params.μ * tr(E * E)
104+
return Ψ
105+
end
106+
31107
function get_hooke_matrix_voigt(nu, λ, μ)
32108
a = (1 - nu) * λ / nu
33109
Cvoigt = SMatrix{6,6,Float64,36}(
@@ -56,12 +132,21 @@ function get_hooke_matrix(nu, λ, μ)
56132
return C
57133
end
58134

59-
60135
@doc raw"""
61136
NeoHooke
62137
63-
Neo-Hookean constitutive model that can be specified when using a [`CMaterial`](@ref) and
64-
[`BACMaterial`](@ref).
138+
Compressible Neo-Hookean hyperelastic constitutive model that can be specified when using
139+
a [`CMaterial`](@ref) and [`BACMaterial`](@ref).
140+
141+
The strain energy density ``\Psi`` is given by
142+
```math
143+
\Psi = \frac{1}{2} \mu \left( I_1 - 3 \right) - \mu \log(J) + \frac{1}{2} \lambda \log(J)^2 \; ,
144+
```
145+
with the first invariant ``I_1 = \mathrm{tr}(\boldsymbol{C})`` of the right Cauchy-Green
146+
deformation tensor ``\boldsymbol{C} = \boldsymbol{F}^{\top} \boldsymbol{F}``, the Jacobian
147+
``J = \mathrm{det}(\boldsymbol{F})``, and the first and second Lamé parameters ``\lambda``
148+
and ``\mu``.
149+
65150
The first Piola-Kirchhoff stress ``\boldsymbol{P}`` is given by
66151
```math
67152
\begin{aligned}
@@ -71,10 +156,13 @@ The first Piola-Kirchhoff stress ``\boldsymbol{P}`` is given by
71156
\boldsymbol{P} &= \boldsymbol{F} \, \boldsymbol{S} \; ,
72157
\end{aligned}
73158
```
74-
with the deformation gradient ``\boldsymbol{F}``, the right Cauchy-Green deformation tensor
75-
``\boldsymbol{C}``, the Jacobian ``J = \mathrm{det}(\boldsymbol{F})``, the second
76-
Piola-Kirchhoff stress ``\boldsymbol{S}``, and the first and second Lamé parameters
77-
``\lambda`` and ``\mu``.
159+
with the deformation gradient ``\boldsymbol{F}`` and the second Piola-Kirchhoff stress
160+
``\boldsymbol{S}``.
161+
162+
# Reference
163+
Treloar, L. R. G. (1943). "The elasticity of a network of long-chain molecules—II."
164+
*Transactions of the Faraday Society*, 39, 241–246.
165+
DOI: [10.1039/TF9433900241](https://doi.org/10.1039/TF9433900241)
78166
"""
79167
struct NeoHooke <: AbstractConstitutiveModel end
80168

@@ -87,33 +175,62 @@ function first_piola_kirchhoff(::NeoHooke, storage::AbstractStorage,
87175
return P
88176
end
89177

178+
function strain_energy_density(::NeoHooke, storage::AbstractStorage,
179+
params::AbstractPointParameters, F::SMatrix{3,3,T,9}) where T
180+
J = det(F)
181+
C = F' * F
182+
I₁ = tr(C)
183+
Ψ = 0.5 * params.μ * (I₁ - 3) - params.μ * log(J) + 0.5 * params.λ * log(J)^2
184+
return Ψ
185+
end
186+
90187
@doc raw"""
91-
MooneyRivlin
188+
NeoHookePenalty
189+
190+
Compressible Neo-Hookean hyperelastic model with a penalty-type volumetric formulation,
191+
suitable for modeling rubber-like and biological materials. Can be specified when using a
192+
[`CMaterial`](@ref) and [`BACMaterial`](@ref).
193+
194+
The strain energy density ``\Psi`` is given by
195+
```math
196+
\Psi = \frac{1}{2} G \left( \bar{I}_1 - 3 \right) + \frac{K}{8} \left( J^2 + J^{-2} - 2 \right) \; ,
197+
```
198+
with the modified first invariant ``\bar{I}_1 = I_1 J^{-2/3}`` where
199+
``I_1 = \mathrm{tr}(\boldsymbol{C})`` is the first invariant of the right Cauchy-Green
200+
deformation tensor ``\boldsymbol{C} = \boldsymbol{F}^{\top} \boldsymbol{F}``, the Jacobian
201+
``J = \mathrm{det}(\boldsymbol{F})``, the shear modulus ``G``, and the bulk modulus ``K``.
92202
93-
Mooney-Rivlin constitutive model that can be specified when using a [`CMaterial`](@ref) and
94-
[`BACMaterial`](@ref).
95203
The first Piola-Kirchhoff stress ``\boldsymbol{P}`` is given by
96204
```math
97205
\begin{aligned}
98206
\boldsymbol{C} &= \boldsymbol{F}^{\top} \boldsymbol{F} \; , \\
99207
\boldsymbol{S} &= G \left( \boldsymbol{I} - \frac{1}{3} \mathrm{tr}(\boldsymbol{C})
100-
\boldsymbol{C}^{-1} \right) \cdot J^{-\frac{2}{3}}
208+
\boldsymbol{C}^{-1} \right) J^{-\frac{2}{3}}
101209
+ \frac{K}{4} \left( J^2 - J^{-2} \right) \boldsymbol{C}^{-1} \; , \\
102210
\boldsymbol{P} &= \boldsymbol{F} \, \boldsymbol{S} \; ,
103211
\end{aligned}
104212
```
105-
with the deformation gradient ``\boldsymbol{F}``, the right Cauchy-Green deformation tensor
106-
``\boldsymbol{C}``, the Jacobian ``J = \mathrm{det}(\boldsymbol{F})``, the second
107-
Piola-Kirchhoff stress ``\boldsymbol{S}``, the shear modulus ``G``, and the
108-
bulk modulus ``K``.
213+
with the deformation gradient ``\boldsymbol{F}`` and the second Piola-Kirchhoff stress
214+
``\boldsymbol{S}``.
215+
216+
!!! note "Penalty-type volumetric formulation"
217+
This model uses a penalty-type volumetric term ``\Psi_{\mathrm{vol}} = \frac{K}{8}(J^2 + J^{-2} - 2)``,
218+
which is computationally efficient and widely used in commercial finite element codes
219+
for nearly-incompressible materials. The term penalizes volume changes from the
220+
reference configuration (``J = 1``).
221+
222+
This differs from other volumetric formulations such as:
223+
- Standard Neo-Hookean (logarithmic): ``\Psi_{\mathrm{vol}} = -\mu \ln J + \frac{\lambda}{2}\ln^2 J``
224+
- Simo-Miehe (polyconvex): ``\Psi_{\mathrm{vol}} = \frac{K}{4}(J^2 - 1 - 2\ln J)``
109225
110226
# Error handling
111-
If the Jacobian ``J`` is smaller than the machine precision `eps()` or a `NaN`, the first
112-
Piola-Kirchhoff stress tensor is defined as ``\boldsymbol{P} = \boldsymbol{0}``.
227+
If the Jacobian ``J`` is smaller than the machine precision `eps()` or a `NaN`, the strain
228+
energy density and first Piola-Kirchhoff stress tensor are defined as zero:
229+
``\Psi = 0`` and ``\boldsymbol{P} = \boldsymbol{0}``.
113230
"""
114-
struct MooneyRivlin <: AbstractConstitutiveModel end
231+
struct NeoHookePenalty <: AbstractConstitutiveModel end
115232

116-
function first_piola_kirchhoff(::MooneyRivlin, storage::AbstractStorage,
233+
function first_piola_kirchhoff(::NeoHookePenalty, storage::AbstractStorage,
117234
params::AbstractPointParameters, F::SMatrix{3,3,T,9}) where T
118235
J = det(F)
119236
J < eps() && return zero(SMatrix{3,3,T,9})
@@ -126,31 +243,13 @@ function first_piola_kirchhoff(::MooneyRivlin, storage::AbstractStorage,
126243
return P
127244
end
128245

129-
@doc raw"""
130-
SaintVenantKirchhoff
131-
132-
Saint-Venant-Kirchhoff constitutive model that can be specified when using a
133-
[`CMaterial`](@ref) and [`BACMaterial`](@ref).
134-
The first Piola-Kirchhoff stress ``\boldsymbol{P}`` is given by
135-
```math
136-
\begin{aligned}
137-
\boldsymbol{E} &= \frac{1}{2} \left( \boldsymbol{F}^{\top} \boldsymbol{F} - \boldsymbol{I}
138-
\right) \; , \\
139-
\boldsymbol{S} &= \lambda \, \mathrm{tr}(\boldsymbol{E}) \, \boldsymbol{I}
140-
+ 2 \mu \boldsymbol{E} \; , \\
141-
\boldsymbol{P} &= \boldsymbol{F} \, \boldsymbol{S} \; ,
142-
\end{aligned}
143-
```
144-
with the deformation gradient ``\boldsymbol{F}``, the Green-Lagrange strain tensor
145-
``\boldsymbol{E}``, the second Piola-Kirchhoff stress ``\boldsymbol{S}``, and the first and
146-
second Lamé parameters ``\lambda`` and ``\mu``.
147-
"""
148-
struct SaintVenantKirchhoff <: AbstractConstitutiveModel end
149-
150-
function first_piola_kirchhoff(::SaintVenantKirchhoff, storage::AbstractStorage,
246+
function strain_energy_density(::NeoHookePenalty, storage::AbstractStorage,
151247
params::AbstractPointParameters, F::SMatrix{3,3,T,9}) where T
152-
E = 0.5 .* (F' * F - I)
153-
S = params.λ * tr(E) * I + 2 * params.μ * E
154-
P = F * S
155-
return P
248+
J = det(F)
249+
J < eps() && return zero(T)
250+
isnan(J) && return zero(T)
251+
C = F' * F
252+
I₁ = tr(C)
253+
Ψ = 0.5 * params.G * (I₁ * J^(-2 / 3) - 3) + params.K / 8 * (J^2 + J^(-2) - 2)
254+
return Ψ
156255
end

src/physics/correspondence.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ consistent (correspondence) formulation of non-ordinary state-based peridynamics
1212
- [`linear_kernel`](@ref)
1313
- [`cubic_b_spline_kernel`](@ref)
1414
- `model::AbstractConstitutiveModel`: Constitutive model defining the material behavior. \\
15-
(default: `LinearElastic()`) \\
15+
(default: `SaintVenantKirchhoff()`) \\
1616
The following models can be used:
17+
- [`SaintVenantKirchhoff`](@ref)
1718
- [`LinearElastic`](@ref)
1819
- [`NeoHooke`](@ref)
19-
- [`MooneyRivlin`](@ref)
20-
- [`SaintVenantKirchhoff`](@ref)
20+
- [`NeoHookePenalty`](@ref)
2121
- `zem::AbstractZEMStabilization`: Algorithm of zero-energy mode stabilization. \\
2222
(default: [`ZEMSilling`](@ref)) \\
2323
The following algorithms can be used:
@@ -39,7 +39,7 @@ consistent (correspondence) formulation of non-ordinary state-based peridynamics
3939
4040
```julia-repl
4141
julia> mat = CMaterial()
42-
CMaterial{LinearElastic, ZEMSilling, typeof(linear_kernel), CriticalStretch}(maxdmg=0.85)
42+
CMaterial{SaintVenantKirchhoff, ZEMSilling, typeof(linear_kernel), CriticalStretch}(maxdmg=0.85)
4343
```
4444
4545
---
@@ -119,7 +119,7 @@ struct CMaterial{CM,ZEM,K,DM} <: AbstractCorrespondenceMaterial{CM,ZEM}
119119
end
120120

121121
function CMaterial(; kernel::Function=linear_kernel,
122-
model::AbstractConstitutiveModel=LinearElastic(),
122+
model::AbstractConstitutiveModel=SaintVenantKirchhoff(),
123123
zem::AbstractZEMStabilization=ZEMSilling(),
124124
dmgmodel::AbstractDamageModel=CriticalStretch(), maxdmg::Real=0.85)
125125
return CMaterial(kernel, model, zem, dmgmodel, maxdmg)

0 commit comments

Comments
 (0)