Skip to content

Commit 61ae7f7

Browse files
committed
gitignore, ignore changes in example-folder
1 parent e290f3f commit 61ae7f7

File tree

2 files changed

+44
-17
lines changed

2 files changed

+44
-17
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ log.txt
77
*.out
88
submit
99
interact.txt
10+
examples/*
1011
examples/paraview/*
1112
*.png

examples/mels_2d.jl

+43-17
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ using IgAShell
33

44
#Dimension
55
DIM = 2
6-
NELX = 110
6+
NELX = 115
77
NELY = 1
88

99
ORDERS = (2,2)
1010

11-
L = 110.0
11+
L = 115.0
1212
h = 8.0
1313
b = 20.0
1414
au = 56.0
@@ -25,12 +25,19 @@ data = ProblemData(
2525
)
2626

2727
#interfacematerial = IGAShell.MatCohesive{dim}(λ_0,λ_f,τ,K)
28-
interfacematerial = MatCZBilinear(
28+
#=interfacematerial = MatCZBilinear(
2929
K = 1.0e4,
3030
Gᴵ = (1050/1000, 1050/1000, 211.0/1000 ),
3131
τᴹᵃˣ = 0.5.*(90.0, 90.0, 60.0),
3232
η = 1.6
33-
)
33+
) =#
34+
35+
interfacematerial = Five.MatVanDenBosch{2}(
36+
σₘₐₓ = 60 * 0.5,
37+
τₘₐₓ = 90 * 0.5,
38+
Φₙ = 211.0/1000,
39+
Φₜ = 1050.0/1000
40+
)
3441

3542
material(_α) =
3643
MatTransvLinearElastic(
@@ -68,9 +75,10 @@ addvertexset!(data.grid, "zfixed", (x)-> x[1] ≈ 9.5)
6875
#@show length(getvertexset(grid, "zfixed"))
6976

7077
cellstates = [IgAShell.LAYERED for i in 1:NELX]
71-
cellstates[precracked_u] .= IgAShell.STRONG_DISCONTINIUOS_AT_INTERFACE(3)
72-
cellstates[precracked_l] .= IgAShell.STRONG_DISCONTINIUOS_AT_INTERFACE((1,3))
78+
#cellstates[precracked_u] .= IgAShell.STRONG_DISCONTINIUOS_AT_INTERFACE(3)
79+
#cellstates[precracked_l] .= IgAShell.STRONG_DISCONTINIUOS_AT_INTERFACE((1,3))
7380
cellstates = [IgAShell.STRONG_DISCONTINIUOS_AT_INTERFACE((1,3)) for i in 1:NELX]
81+
cellstates[1:10] .= IgAShell.LAYERED
7482

7583
interface_damage = zeros(ninterfaces, NELX)
7684
interface_damage[1, precracked_l] .= 1.0
@@ -106,16 +114,26 @@ push!(data.parts, igashell)
106114

107115
#
108116
data.output[] = Output(
109-
interval = 5.0,
117+
interval = 0.0,
110118
runname = "mels_2d",
111119
savepath = "./"
112120
)
113121

114122
#
115123
etf = IGAShellWeakBC(
116124
set = getvertexset(data.grid, "left"),
117-
func = (x,t) -> zeros(DIM),
118-
comps = 1:DIM,
125+
func = (x,t) -> [0.0],
126+
comps = [2],
127+
igashell = igashell,
128+
penalty = 1e7
129+
)
130+
push!(data.constraints, etf)
131+
132+
edgeset_top_right = VertexInterfaceIndex(getvertexset(data.grid, "right"), 2)
133+
etf = IGAShellWeakBC(
134+
set = edgeset_top_right,
135+
func = (x,t) -> [0.0],
136+
comps = [1],
119137
igashell = igashell,
120138
penalty = 1e7
121139
)
@@ -128,16 +146,16 @@ z_fixed_edgeset = VertexInterfaceIndex(zfixedcell..., 1)
128146
etf = IGAShellWeakBC(
129147
set = [z_fixed_edgeset],
130148
func = (x,t) -> [0.0],
131-
comps = [DIM],
149+
comps = [2],
132150
igashell = igashell,
133151
penalty = 1e7
134152
)
135153
push!(data.constraints, etf)
136154

137155
#Force
138-
edgeset = VertexInterfaceIndex(getvertexset(data.grid, "right"), 2)
156+
139157
etf = IGAShellExternalForce(
140-
set = edgeset,
158+
set = edgeset_top_right,
141159
func = (x,t) -> [0.0, -1.0/b],
142160
igashell = igashell
143161
)
@@ -149,7 +167,7 @@ output = OutputData(
149167
comps = [DIM]
150168
),
151169
interval = 0.0,
152-
set = edgeset
170+
set = edgeset_top_right
153171
)
154172
data.outputdata["reactionforce"] = output
155173

@@ -161,8 +179,9 @@ Five.push_vtkoutput!(data.output[], vtkoutput)
161179

162180
#
163181
vtkoutput = VTKNodeOutput(
164-
type = MaterialStateOutput(
165-
field = :interface_damage
182+
type = IGAShellMaterialStateOutput(
183+
field = :interface_damage,
184+
dir = 2
166185
),
167186
)
168187
Five.push_vtkoutput!(data.output[], vtkoutput)
@@ -202,7 +221,7 @@ state, globaldata = build_problem(data) do dh, parts, dbc
202221
JuAFEM.copy!!(dbc.free_dofs, alldofs)
203222
end
204223

205-
solver = LocalDissipationSolver(
224+
solver = DissipationSolver(
206225
Δλ0 = 10.0,
207226
Δλ_max = 10.0,
208227
Δλ_min = 1e-2,
@@ -218,13 +237,20 @@ solver = LocalDissipationSolver(
218237
λ_max = 700.0,
219238
λ_min = -50.0,
220239
tol = 1e-4,
221-
max_residual = 1e5
240+
max_residual = 1e6
222241
)
223242

224243

225244

226245

227246
output = solvethis(solver, state, globaldata)
228247

248+
exp_u = [0.0, 7.876, 7.876, 13.929, 13.929]
249+
exp_f = [0.0, 601.935, 373.548, 671.613, 250]
250+
229251
d = [output.outputdata["reactionforce"].data[i].displacements for i in 1:length(output.outputdata["reactionforce"].data)]
230252
f = [output.outputdata["reactionforce"].data[i].forces for i in 1:length(output.outputdata["reactionforce"].data)]
253+
254+
fig = plot(reuse = false)
255+
plot!(fig, exp_u, exp_f, label = "Experiment")
256+
plot!(fig, abs.(d), abs.(f), label = "Non-addaptive")

0 commit comments

Comments
 (0)