Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
a180c00
Draft of modular small strain plasticity model
KnutAM Jun 7, 2021
230a9c4
Added keyword argument constructor and corrected naming for elastic m…
KnutAM Jun 9, 2021
6126f78
Fixed bugs caused by merging to package functions
KnutAM Jun 9, 2021
e033d31
Added a basic test showing a simple example
KnutAM Jun 9, 2021
f1d7ba0
Added some docstrings
KnutAM Jun 9, 2021
1ca196c
Fixed minor bug in documentation
KnutAM Jun 9, 2021
069cf1d
Updated naming of Elastic to LinearIsotropicElasticity
KnutAM Jun 9, 2021
9954621
Updated test example to reflect changes
KnutAM Jun 9, 2021
37a7e48
Corrected some docstrings
KnutAM Jun 10, 2021
c97f99b
Added abstract supertypes to match other routines
KnutAM Jun 10, 2021
10b1525
Moved content of Residual.jl into SmallStrainPlasticity.jl
KnutAM Jun 11, 2021
b118606
Deleted empty Residual.jl
KnutAM Jun 11, 2021
6a78f2a
Removed typespec for abstract type
KnutAM Jun 11, 2021
3b2426e
Updated naming of hardening types
KnutAM Jun 11, 2021
ce5d372
Updated names of hardening and evolution functions to be more general…
KnutAM Jun 11, 2021
05bb83c
Removed uncessary using Tensors
KnutAM Jun 11, 2021
f634ef8
Removed custom newton caching
KnutAM Jun 14, 2021
6ecbe6b
Cleaned solve_local_problem to (approx) match Plasticity.jl
KnutAM Jun 14, 2021
9ff99b5
Commented and simplified get_plastic_output
KnutAM Jun 14, 2021
21a520b
Fixed minor bug due to typo
KnutAM Jun 14, 2021
a5773c6
Updated to follow naming convention of lower case function names
KnutAM Jun 14, 2021
a1a16be
Bug fix
KnutAM Jun 14, 2021
838702b
Added another example to show modularity
KnutAM Jun 14, 2021
fd57c0a
Remove print statement
KnutAM Jun 16, 2021
ec6be8b
Remove explicit setting of blas threads
KnutAM Jun 16, 2021
cce47cd
Updated naming of isotropic/kinematic hardening
KnutAM Jun 16, 2021
4ac46ea
Removed chunking from get_plastic_output
KnutAM Jun 16, 2021
7115cd6
Removed uncessary Val types
KnutAM Jun 16, 2021
8105821
Changed to non-reduced residual, equation system increase by 6 unknowns
KnutAM Jun 16, 2021
add46a6
Added get initial material state to elastic
KnutAM Jun 18, 2021
3d83cb7
Fixed bug in dphi/dsigma calculation
KnutAM Jun 18, 2021
ab81e52
Merge branch 'main' into SmallStrainPlasticity
KnutAM Jun 18, 2021
e3bf097
Fixed type instability at nlopt output
KnutAM Jun 21, 2021
4aeb872
Merge branch 'SmallStrainPlasticity' of github.com:KnutAM/MaterialMod…
KnutAM Jun 21, 2021
dcf8faf
Updated LinearElastic to use new convention of full strain
KnutAM Jun 21, 2021
e5f3e63
Moved AbstractElasticity to LinearElasticity.jl
KnutAM Jun 21, 2021
b0aec3c
Included support for a general elasticity law (removed converged from…
KnutAM Jun 21, 2021
83c6f4c
Removed converged bool to follow standard material_response interface
KnutAM Jun 21, 2021
430bc11
Updated naming from SmallStrainPlasticity to VonMisesPlasticity
KnutAM Jun 21, 2021
6bc710a
Fixed wrong include file
KnutAM Jun 21, 2021
03efb1f
Moved utility function to general routine
KnutAM Jun 21, 2021
00fde5c
Updated documentation
KnutAM Jun 22, 2021
a62dce1
Added description of AbstractElasticity
KnutAM Jun 22, 2021
b4e170b
Added documentation to LinearIsotropicElasticity
KnutAM Jun 22, 2021
210fd66
Removed old elastic routine
KnutAM Jun 22, 2021
03de2d0
Updated documentation and test
KnutAM Jun 22, 2021
535298d
Adopted LinearElastic.jl from branch ka/use_full_strain
KnutAM Jun 22, 2021
89a6766
Adopted test_linear_elastic.jl from branch ka/use_full_strain
KnutAM Jun 22, 2021
b2402dc
Removed all boldface
KnutAM Jun 22, 2021
c573fd6
Modified cache to be compatible with wrappers.jl
KnutAM Jun 22, 2021
ab5efdd
Added proper testing to VonMisesPlasticity
KnutAM Jun 22, 2021
4b58faa
Fixed documentation errors for LinearElastic
KnutAM Jun 23, 2021
48d4349
Added VonMisesPlasticity to documentation
KnutAM Jun 23, 2021
ceb953d
Removed explicit state for VonMisesPlasticity (not exported)
KnutAM Jun 23, 2021
7941f11
Changed to using ForwardDiff when checking isotropic hardening deriva…
KnutAM Jun 23, 2021
0fe9f3c
Updated documentation formatting
KnutAM Jun 24, 2021
caa7875
Added docstrings to utility functions and cosmetic fixes
KnutAM Jun 25, 2021
4ae37b5
Added unit tests for utility functions
KnutAM Jun 25, 2021
d45464d
Fixed test errors due to using internal functions
KnutAM Jun 25, 2021
c41a791
Merge branch 'main' into SmallStrainPlasticity
KnutAM Jun 26, 2021
045209b
Moved calculate_sigma to LinearElastic.jl (where it belongs)
KnutAM Jun 26, 2021
1834346
Removed Delta input for Plastic comparison
KnutAM Jun 26, 2021
d19550f
Updated VonMisesPlasticity jld2 due to changes in main branch get_Pla…
KnutAM Jun 26, 2021
7af6761
Cosmetic change, zero(x) instead of zero(typeof(x))
KnutAM Jun 26, 2021
4cb88a3
Modify Project.toml to minimize changes wrt main
KnutAM Jun 26, 2021
798e6b0
Minimize changes to LinearElastic.jl
KnutAM Jun 26, 2021
c8c0d31
Minimize whitespace changes
KnutAM Jun 26, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
# Materials
## Elastic materials
```@docs
LinearElastic
material_response(m::LinearElastic, Δε::SymmetricTensor{2,3}, state::LinearElasticState)
material_response(m::LinearElastic, ε::SymmetricTensor{2,3}, state::LinearElasticState)
```
## Plastic materials
```@docs
Plastic
material_response(m::Plastic, Δε::SymmetricTensor{2,3,T,6}, state::PlasticState{3}; kwargs...) where T
VonMisesPlasticity
material_response(m::VonMisesPlasticity, ϵ::SymmetricTensor{2,3}, old::MaterialModels.VonMisesPlasticityState; kwargs...)
```
### Isotropic hardening laws
```@docs
Voce
Swift
```
### Kinematic hardening laws
```@docs
ArmstrongFrederick
Delobelle
OhnoWang
```
6 changes: 4 additions & 2 deletions src/LinearElastic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ Return the stress tensor and the stress tangent for the given strain ε such tha
No `MaterialState` is needed for the stress computation, thus if a state is handed over to `material_response`, the same state is returned.
"""
function material_response(m::LinearElastic, ε::SymmetricTensor{2,3}, state::LinearElasticState=LinearElasticState(), Δt=nothing; cache=nothing, options=nothing)
σ = m.Eᵉ ⊡ ε
σ = calculate_sigma(m, ε)
return σ, m.Eᵉ, state
end
end

calculate_sigma(m::LinearElastic, ε) = m.Eᵉ ⊡ ε
7 changes: 7 additions & 0 deletions src/MaterialModels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ include("Plastic.jl")
include("CrystalViscoPlastic/slipsystems.jl")
include("CrystalViscoPlastic/CrystalViscoPlastic.jl")
include("CrystalViscoPlastic/CrystalViscoPlasticRed.jl")
include("VonMisesPlasticity/VonMisesPlasticity.jl")

include("utility_functions.jl")
include("nonlinear_solver.jl")
include("wrappers.jl")

Expand All @@ -83,4 +85,9 @@ export LinearElastic, Plastic
export LinearElasticState, PlasticState
export OneD, UniaxialStrain, UniaxialStress, PlaneStrain, PlaneStress

export VonMisesPlasticity
export LinearIsotropicElasticity
export Voce, Swift
export ArmstrongFrederick, Delobelle, OhnoWang

end
58 changes: 58 additions & 0 deletions src/VonMisesPlasticity/IsotropicHardening.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Isotropic hardening
abstract type AbstractIsotropicHardening end

"""
Voce(Hiso, κ∞)

Exponentially saturating isotropic hardening

```math
\\kappa_i = g_{\\mathrm{iso},i}(\\lambda) = \\kappa_\\infty \\left[1 - \\mathrm{exp}\\left(\\frac{H_\\mathrm{iso}}{\\kappa_\\infty} \\lambda \\right)\\right]
```
or alternatively as differential equations
```math
\\dot{\\kappa_i} = \\dot{\\lambda} H_\\mathrm{iso} \\left[1 - \\frac{\\kappa_i}{\\kappa_\\infty}\\right]
```

# Arguments
- `Hiso`: Isotropic hardening modulus, ``H_\\mathrm{iso}``
- `κ∞`: Saturation hardening value, ``\\kappa_\\infty``

"""
struct Voce{T} <:AbstractIsotropicHardening
Hiso::T # Initial hardening modulus
κ∞::T # Saturation stress
end
Voce(;Hiso, κ∞) = Voce(Hiso, κ∞) # Keyword argument constructor

function get_hardening(param::Voce, λ::Number)
param.κ∞ * (1.0 - exp(-param.Hiso * λ / param.κ∞))
end

"""
Swift(K, λ0, n)

Isotropic hardening by the Swift power law

```math
\\kappa_i = g_{\\mathrm{iso},i}(\\lambda) = K \\left[\\lambda_0 + \\lambda \\right]^n
```

# Arguments
- `K`: ``K``
- `λ0`: ``\\lambda_0``
- `n`: ``n``

"""
struct Swift{T} <:AbstractIsotropicHardening
K::T
λ0::T
n::T
end
Swift(;K, λ0, n) = Swift(K, λ0, n) # Keyword argument constructor


function get_hardening(param::Swift, λ::Number)
param.K * (param.λ0 + λ)^param.n
end

97 changes: 97 additions & 0 deletions src/VonMisesPlasticity/KinematicHardening.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Kinematic hardening
abstract type AbstractKinematicHardening end

"""
ArmstrongFrederick(Hkin, β∞)

Armstrong-Frederick kinematic hardening law (doi: 10.1179/096034007X207589)

```math
g_{\\mathrm{kin},i}(\\nu, \\boldsymbol{\\beta}_i) = H_\\mathrm{kin} (\\frac{2}{3}\\boldsymbol{\\nu} - \\frac{\\boldsymbol{\\beta}_i}{\\beta_\\infty})
```

# Arguments
- `Hkin`: Kinematic hardening modulus, ``H_\\mathrm{kin}``
- `β∞`: Effective back-stress saturation value, ``\\beta_\\infty``
"""
struct ArmstrongFrederick{T} <: AbstractKinematicHardening
Hkin::T # Initial hardening modulus
β∞::T # Saturation stress
end
ArmstrongFrederick(;Hkin, β∞) = ArmstrongFrederick(Hkin, β∞) # Keyword argument constructor

function get_evolution(param::ArmstrongFrederick, ν::SecondOrderTensor, βᵢ::SecondOrderTensor)
param.Hkin * ((2.0/3.0) * ν - βᵢ/param.β∞)
end

"""
Delobelle(Hkin, β∞, δ)

Kinematic hardening law according to Delobelle, which combines the Armstrong-Frederick law with the Burlet-Cailletaud law
(doi: 10.1016/S0749-6419(95)00001-1)

```math
g_{\\mathrm{kin},i}(\\nu, \\boldsymbol{\\beta}_i) = H_\\mathrm{kin} \\left[\\frac{2}{3}\\boldsymbol{\\nu}
- \\delta\\frac{\\boldsymbol{\\beta}_i}{\\beta_\\infty}
- \\frac{2}{3\\beta_\\infty}\\left[1 - \\delta\\right]\\left[\\boldsymbol{\\nu}:\\boldsymbol{\\beta}_i\\right]\\boldsymbol{\\nu}
\\right]
```

# Arguments
- `Hkin`: Kinematic hardening modulus, ``H_\\mathrm{kin}``
- `β∞`: Effective back-stress saturation value, ``\\beta_\\infty``
- `δ`: Amount of Armstrong-Frederick type of kinematic hardening, ``\\delta``

"""
struct Delobelle{T} <: AbstractKinematicHardening
Hkin::T # Initial hardening modulus
β∞::T # Saturation stress
δ::T # Amount of Armstrong-Frederick hardening
end
Delobelle(;Hkin, β∞, δ) = Delobelle(Hkin, β∞, δ) # Keyword argument constructor

function get_evolution(param::Delobelle, ν::SecondOrderTensor, βᵢ::SecondOrderTensor)
AF_Term = (param.δ/param.β∞) * βᵢ # Armstrong Frederick term
BC_Term = (2.0/3.0) * (1.0-param.δ)*((ν⊡βᵢ)/param.β∞)*ν # Burlet Cailletaud term
return param.Hkin * ((2.0/3.0) * ν - AF_Term - BC_Term) # Complete evolution
end


"""
OhnoWang(Hkin, β∞, m)

Kinematic hardening law according to Ohno-Wang (doi: 10.1016/0749-6419(93)90042-O)

```math
g_{\\mathrm{kin},i}(\\nu, \\boldsymbol{\\beta}_i) = H_\\mathrm{kin} \\left[\\frac{2}{3}\\boldsymbol{\\nu}
- \\frac{\\boldsymbol{\\beta}_i}{\\beta_\\infty}
\\frac{\\langle \\boldsymbol{\\nu}:\\boldsymbol{\\beta}_i \\rangle}{\\beta_\\infty}
\\left[\\frac{\\beta_i^\\mathrm{vM}}{\\beta_\\infty}\\right]^m
\\right]
```
where ``\\langle x \\rangle`` is 0 if ``x\\leq 0`` and ``x`` if ``x>0``.
``\\beta_i^\\mathrm{vM} = \\sqrt{2\\boldsymbol{\\beta}_i:\\boldsymbol{\\beta}_i/3}``, noting that
``\\boldsymbol{\\beta}_i`` is deviatoric.

# Arguments
- `Hkin`: Kinematic hardening modulus, ``H_\\mathrm{kin}``
- `β∞`: Effective back-stress saturation value, ``\\beta_\\infty``
- `m`: Exponent in the OhnoWang equation, ``m``

"""
struct OhnoWang{T} <: AbstractKinematicHardening
Hkin::T # Initial hardening modulus
β∞::T # Saturation stress
m::T # Ohno Wang exponent
end
OhnoWang(;Hkin, β∞, m) = OhnoWang(Hkin, β∞, m) # Keyword argument constructor

function get_evolution(param::OhnoWang{Tp}, ν::SecondOrderTensor, βᵢ::SecondOrderTensor{dim,Tβ}) where{Tp,Tβ,dim}
β_vm = vonmises_dev(βᵢ)
if β_vm < param.β∞ * eps(promote_type(Tp,Tβ))
return param.Hkin * (2.0/3.0) * ν + 0*βᵢ
end
mac_term = (macaulay(ν⊡βᵢ) /param.β∞)
exp_term = (β_vm/param.β∞)^param.m
return param.Hkin * ((2.0/3.0) * ν - βᵢ * mac_term * exp_term / β_vm )
end
Loading