mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-09-22 02:40:51 +00:00
3d formulation still not converging
This commit is contained in:
@@ -115,5 +115,7 @@ function ideal_plasticity!(stress_new, stress_last, dstrain_vec, D, params, Dtan
|
||||
dfds = dfds_(stress_new)
|
||||
Dtan[:,:] = Dc - (Dc * dfds * dfds' * Dc) / (dfds' * Dc * dfds)[1]
|
||||
|
||||
println("equivalent stress")
|
||||
println(equivalent_stress(stress_new, type_))
|
||||
end
|
||||
end
|
||||
|
||||
@@ -108,7 +108,6 @@ function assemble{El<:Elasticity2DVolumeElements}(problem::Problem{Elasticity},
|
||||
w = ip.weight*detJ
|
||||
N = element(ip, time)
|
||||
dN = element(ip, time, Val{:Grad})
|
||||
|
||||
# kinematics
|
||||
|
||||
gradu = element("displacement", ip, time, Val{:Grad})
|
||||
@@ -413,7 +412,6 @@ end
|
||||
|
||||
""" Elasticity equations, 3d nonlinear. """
|
||||
function assemble{El<:Elasticity3DVolumeElements}(problem::Problem{Elasticity}, element::Element{El}, time::Real, ::Type{Val{:continuum}})
|
||||
|
||||
props = problem.properties
|
||||
dim = get_unknown_field_dimension(problem)
|
||||
nnodes = length(element)
|
||||
@@ -501,6 +499,7 @@ function assemble{El<:Elasticity3DVolumeElements}(problem::Problem{Elasticity},
|
||||
Dtan = D
|
||||
end
|
||||
|
||||
println(round(stress_vec, 4))
|
||||
:strain in props.store_fields && update!(ip, "strain", time => strain_vec)
|
||||
:stress in props.store_fields && update!(ip, "stress", time => stress_vec)
|
||||
:stress11 in props.store_fields && update!(ip, "stress11", time => stress_vec[1])
|
||||
|
||||
@@ -17,41 +17,43 @@ using JuliaFEM.Testing
|
||||
8 => [0.0, 1.0, 1.0])
|
||||
|
||||
element1 = Element(Hex8, [1, 2, 3, 4, 5, 6, 7, 8])
|
||||
element2 = Element(Quad4, [5, 6, 7, 8])
|
||||
update!([element1, element2], "geometry", nodes)
|
||||
update!([element1], "youngs modulus", 288.0)
|
||||
update!([element1], "poissons ratio", 1/3)
|
||||
update!([element2], "displacement traction force 3", 288.0)
|
||||
update!([element1], "displacement load 3", 576.0)
|
||||
update!([element1], "geometry", nodes)
|
||||
update!([element1], "youngs modulus", 200e3)
|
||||
update!([element1], "poissons ratio", 0.3)
|
||||
|
||||
element1.dev["plasticity"] = Dict{Any, Any}("stress" => JuliaFEM.ideal_plasticity!,
|
||||
element1.dev["plastdicity"] = Dict{Any, Any}("stress" => JuliaFEM.ideal_plasticity!,
|
||||
"yield_surface" => Val{:von_mises},
|
||||
"params" => Dict("yield_stress" => 570.0))
|
||||
"params" => Dict("yield_stress" => 500.0))
|
||||
|
||||
elasticity_problem = Problem(Elasticity, "solve continuum block", 3)
|
||||
elasticity_problem.properties.finite_strain = false
|
||||
elasticity_problem.properties.geometric_stiffness = false
|
||||
push!(elasticity_problem, element1)
|
||||
push!(elasticity_problem, element2)
|
||||
|
||||
symxy = Element(Quad4, [1, 2, 3, 4])
|
||||
symxz = Element(Quad4, [1, 2, 6, 5])
|
||||
symyz = Element(Quad4, [1, 4, 8, 5])
|
||||
update!([symxy, symxz, symyz], "geometry", nodes)
|
||||
symyz["displacement 1"] = 0.0
|
||||
symxz["displacement 2"] = 0.0
|
||||
symxy["displacement 3"] = 0.0
|
||||
bc = Element(Quad4, [1,4,8,5])
|
||||
update!([bc], "geometry", nodes)
|
||||
bc["displacement 1"] = 0.0
|
||||
bc["displacement 2"] = 0.0
|
||||
bc["displacement 3"] = 0.0
|
||||
boundary_problem = Problem(Dirichlet, "symmetry boundary conditions", 3, "displacement")
|
||||
push!(boundary_problem, symxy, symxz, symyz)
|
||||
push!(boundary_problem, bc)
|
||||
|
||||
disp = Element(Quad4, [2,3,7,6])
|
||||
update!([disp], "geometry", nodes)
|
||||
disp["displacement 1"] = 0.002
|
||||
boundary_motion = Problem(Dirichlet, "displacement bc", 3, "displacement")
|
||||
push!(boundary_motion, disp)
|
||||
|
||||
solver = NonlinearSolver("solve block problem")
|
||||
push!(solver, elasticity_problem, boundary_problem)
|
||||
push!(solver, elasticity_problem)
|
||||
push!(solver, boundary_problem)
|
||||
push!(solver, boundary_motion)
|
||||
solver()
|
||||
|
||||
disp = element1("displacement", [1.0, 1.0, 1.0], 0.0)
|
||||
info("displacement at tip: $disp")
|
||||
u_expected = 2.0 * [-1/3, -1/3, 1.0]
|
||||
@test isapprox(disp, u_expected)
|
||||
# @test isapprox(disp, u_expected)
|
||||
#end
|
||||
|
||||
# function solve_rod_model_elasticity(eltype)
|
||||
|
||||
Reference in New Issue
Block a user