mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-08-06 04:21:33 +00:00
test(materials): assert J2 yield after radial return for PerfectPlasticity
Add a focused regression that `compute_stress` lands on the von Mises surface when the trial state lies outside yield, using the returned backstress state. - SPDX header refresh for the file.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# This file is a part of JuliaFEM.
|
||||
# License is MIT: see https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/LICENSE.md
|
||||
# SPDX-FileCopyrightText: 2015-2026 Jukka Aho
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
using Test
|
||||
using JuliaFEM
|
||||
@@ -135,6 +135,15 @@ using Tensors
|
||||
@test norm(σ) < mat.σ_y # Below yield
|
||||
end
|
||||
|
||||
@testset "J2 yield surface after radial return (‖dev(σ−α)‖_vm ≈ σᵧ)" begin
|
||||
mat = PerfectPlasticity(E = 210e9, ν = 0.3, σ_y = 250e6, H = 2.1e9)
|
||||
ε = SymmetricTensor{2,3}((0.02, -0.005, 0.0, 0.0, 0.0, 0.0))
|
||||
σ, _, st = compute_stress(mat, ε, NamedTuple(), 0.0)
|
||||
s = dev(σ - st.α)
|
||||
seq = sqrt(3 / 2 * (s ⊡ s))
|
||||
@test seq ≈ mat.σ_y rtol = 1e-5 atol = 1.0
|
||||
end
|
||||
|
||||
@testset "Plastic response (above yield)" begin
|
||||
# Test that material yields when stress exceeds yield
|
||||
mat = PerfectPlasticity(E=210e9, ν=0.3, σ_y=250e6, H=1e9)
|
||||
|
||||
Reference in New Issue
Block a user