Skip to content

Commit

Permalink
Reset to unphysical test model that allow easy check of correctness
Browse files Browse the repository at this point in the history
  • Loading branch information
KnutAM committed Nov 5, 2023
1 parent d4b79fd commit 6c6ef4d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/TestMaterials.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ function MMB.differentiate_material!(
ForwardDiff.jacobian!(diff.dσdp, σ_from_p, material2vector(m))
end

# ViscoElastic material (decide model)
# ViscoElastic material: Note - not physically reasonable model because
# the volumetric response is also viscous
struct ViscoElastic{T} <: AbstractMaterial
E1::LinearElastic{T}
E2::LinearElastic{T}
Expand All @@ -63,7 +64,7 @@ MMB.initial_material_state(::ViscoElastic) = ViscoElasticState(zero(SymmetricTen
function get_stress_ϵv(m::ViscoElastic, ϵ::SymmetricTensor{2,3}, old::ViscoElasticState, Δt)
E1 = get_stiffness(m.E1)
E2 = get_stiffness(m.E2)
ϵv = inv(Δt*E2+one(E2)*m.η)(Δt*E2dev(ϵ) + m.η*old.ϵv)
ϵv = inv(Δt*E2+one(E2)*m.η)(Δt*E2ϵ + m.η*old.ϵv)
σ = E1ϵ + m.η*(ϵv-old.ϵv)/Δt
return σ, ϵv
end
Expand Down

0 comments on commit 6c6ef4d

Please sign in to comment.