Skip to content

Commit 260e193

Browse files
PetrKryslUCSDCopilot
andcommitted
update naming
Co-authored-by: Copilot <copilot@github.com>
1 parent 00d0c07 commit 260e193

10 files changed

Lines changed: 163 additions & 136 deletions

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "FinEtoolsFlexStructures"
22
uuid = "723391e6-6814-4d1d-921c-018f691214d8"
33
authors = ["Petr Krysl <pkrysl@ucsd.edu>"]
4-
version = "3.5.0"
4+
version = "3.6.0"
55

66
[deps]
77
Arpack = "7d9fca2a-8960-54d3-9f78-7d1dccf2cb97"

docs/issues-and-ideas.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ I implemented, even though this is based on the central point.
100100
# scf = 5/6; # shear correction factor
101101
# Dt .*= scf
102102
# drilling_stiffness_scale = self.drilling_stiffness_scale
103-
# mult_el_size = self.mult_el_size
103+
# stab_fun = self.stab_fun
104104
# edisp = fill(0.0, 18)
105105
# nodal_moments = 0.0 .* deepcopy(normals)
106106
# nodal_rotations = 0.0 .* deepcopy(normals)
@@ -121,7 +121,7 @@ I implemented, even though this is based on the central point.
121121
# add_btdb_ut_only!(elmat, Bb, (t^3)/12*Ae, Dps, DpsBmb)
122122
# he = sqrt(2*Ae)
123123
# _Bsmat!(Bs, ecoords_e, Ae)
124-
# add_btdb_ut_only!(elmat, Bs, (t^3/(t^2+mult_el_size*he^2))*Ae, Dt, DtBs)
124+
# add_btdb_ut_only!(elmat, Bs, (t^3/(t^2+stab_fun*he^2))*Ae, Dt, DtBs)
125125
# # Complete the elementwise matrix by filling in the lower triangle
126126
# complete_lt!(elmat)
127127
# # Now treat the transformation from the element to the nodal triad

examples/shells/statics/homogeneous/barrel_vault/scordelis_lo_shear_examples.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function _execute_t3ff_model(n = 8, beta = 0.1, visualize = true)
5858
sfes = FESetShellT3()
5959
accepttodelegate(fes, sfes)
6060
femm = formul.make(IntegDomain(fes, TriRule(1), thickness), mater)
61-
femm.mult_el_size = beta
61+
femm.stab_fun = beta
6262
# femm.transv_shear_formulation = formul.__TRANSV_SHEAR_FORMULATION_AVERAGE_B
6363
# femm.transv_shear_formulation = formul.__TRANSV_SHEAR_FORMULATION_AVERAGE_K
6464
stiffness = formul.stiffness
@@ -148,7 +148,7 @@ function _execute_Q4RS_model(n = 8, beta = 0.1, visualize = true)
148148
sfes = FESetShellQ4()
149149
accepttodelegate(fes, sfes)
150150
femm = formul.make(IntegDomain(fes, GaussRule(2, 2), thickness), mater)
151-
femm.mult_el_size = beta
151+
femm.stab_fun = beta
152152
stiffness = formul.stiffness
153153
associategeometry! = formul.associategeometry!
154154

@@ -309,13 +309,13 @@ end
309309

310310
function test_convergence(ns = [8, 16, 32, 64, 128])
311311
for beta in [1, 0.5, 0.1, 0.0]
312-
@info "Scordelis-Lo shell, T3FF, mult_el_size = $(beta)"
312+
@info "Scordelis-Lo shell, T3FF, stab_fun = $(beta)"
313313
for n in ns
314314
_execute_t3ff_model(n, beta, false)
315315
end
316316
end
317317
for beta in [1, 0.5,0.1, 0.0]
318-
@info "Scordelis-Lo shell, Q4RS, mult_el_size = $(beta)"
318+
@info "Scordelis-Lo shell, Q4RS, stab_fun = $(beta)"
319319
for n in ns
320320
_execute_Q4RS_model(n, beta, true)
321321
end

examples/shells/statics/homogeneous/hemisphere/hemisphere_open_examples.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ function _execute_w_exact_normals(n = 8, visualize = true, drilling_stiffness_mu
219219
ocsys = CSys(3, 3, spherical!)
220220
femm = formul.make(IntegDomain(fes, TriRule(1), thickness), ocsys, mater)
221221
femm.drilling_stiffness_scale = 0.1 * drilling_stiffness_multiplier
222-
femm.mult_el_size = 5/12/1.5
222+
femm.stab_fun = 5/12/1.5
223223
stiffness = formul.stiffness
224224
associategeometry! = formul.associategeometry!
225225

examples/shells/statics/homogeneous/hypar/clamped_hypar_parametric_study_examples.jl

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ hard test for locking behaviour as suggested in References (Chapelle and Bathe,
88
1998; Bathe, Iosilevich, and Chapelle, 2000).
99
1010
Table 2 in Bathe, Iosilevich, and Chapelle, 2000 (computed with MITC16).
11-
mult_el_size Strain energy Displacement
11+
stab_fun Strain energy Displacement
1212
1/100 1.6790e-3 9.3355e-5
1313
1/1000 1.1013e-2 6.3941e-3
1414
1/10,000 8.9867e-2 5.2988e-1
@@ -58,7 +58,7 @@ function (o::_CSEval)(csmatout, XYZ, tangents, feid, qpid)
5858
end
5959

6060

61-
function _execute_t3ff(tL_ratio = 1/100, g = 80*0.1^0, mult_el_size = 1.0, n = 32, visualize = false)
61+
function _execute_t3ff(tL_ratio = 1/100, g = 80*0.1^0, stab_fun = 1.0, n = 32, visualize = false)
6262
thickness = tL_ratio * L
6363
formul = FEMMShellT3FFModule
6464

@@ -77,7 +77,7 @@ function _execute_t3ff(tL_ratio = 1/100, g = 80*0.1^0, mult_el_size = 1.0, n = 3
7777
sfes = FESetShellT3()
7878
accepttodelegate(fes, sfes)
7979
femm = formul.make(IntegDomain(fes, TriRule(1), thickness), mater)
80-
femm.mult_el_size = mult_el_size
80+
femm.stab_fun = stab_fun
8181
stiffness = formul.stiffness
8282
associategeometry! = formul.associategeometry!
8383

@@ -143,7 +143,7 @@ function _execute_t3ff(tL_ratio = 1/100, g = 80*0.1^0, mult_el_size = 1.0, n = 3
143143
return targetu, targetenergy
144144
end
145145

146-
function _execute_q4rs(tL_ratio = 1/100, g = 80*0.1^0, mes_fun=:linfract, mult_el_size = 1.0, n = 32, visualize = false)
146+
function _execute_q4rs(tL_ratio = 1/100, g = 80*0.1^0, mes_fun=:linfract, stab_fun = 1.0, n = 32, visualize = false)
147147
thickness = tL_ratio * L
148148
formul = FEMMShellQ4RSModule
149149

@@ -167,24 +167,24 @@ function _execute_q4rs(tL_ratio = 1/100, g = 80*0.1^0, mes_fun=:linfract, mult_e
167167
GaussRule(2, 2),
168168
thickness), ocsys, mater,
169169
if mes_fun == :linfract
170-
(t, h) -> 1 / (1 + mult_el_size * h/t)
170+
(t, h) -> 1 / (1 + stab_fun * h/t)
171171
elseif mes_fun == :powfract
172-
(t, h) -> 1 / (1 + mult_el_size * (h/t)^(5/4))
172+
(t, h) -> 1 / (1 + stab_fun * (h/t)^(5/4))
173173
elseif mes_fun == :sqrtlinfract
174-
(t, h) -> 1 / (1 + mult_el_size * sqrt(h/t))
174+
(t, h) -> 1 / (1 + stab_fun * sqrt(h/t))
175175
elseif mes_fun == :sqrtquadfract
176-
(t, h) -> 1 / sqrt(1 + mult_el_size * (h/t)^2)
176+
(t, h) -> 1 / sqrt(1 + stab_fun * (h/t)^2)
177177
elseif mes_fun == :quadfract
178-
(t, h) -> 1 / (1 + mult_el_size * (h/t)^2)
178+
(t, h) -> 1 / (1 + stab_fun * (h/t)^2)
179179
elseif mes_fun == :simple
180-
(t, h) -> (t < h / sqrt(mult_el_size)) ? mult_el_size * (t/h)^2 : 1.0
180+
(t, h) -> (t < h / sqrt(stab_fun)) ? stab_fun * (t/h)^2 : 1.0
181181
elseif mes_fun == :linsimple
182-
(t, h) -> (t < h / (mult_el_size)) ? mult_el_size * (t/h) : 1.0
182+
(t, h) -> (t < h / (stab_fun)) ? stab_fun * (t/h) : 1.0
183183
elseif mes_fun == :mix
184-
(t, h) -> (1 / (1 + mult_el_size * (h/t)^2)) * 97 / 100 + 3 / 100
184+
(t, h) -> (1 / (1 + stab_fun * (h/t)^2)) * 97 / 100 + 3 / 100
185185
end
186-
# (t, h) -> 1 / (1 + mult_el_size * h^2/t^2))
187-
# (t, h) -> t^2 / (t^2 + mult_el_size * h^2))
186+
# (t, h) -> 1 / (1 + stab_fun * h^2/t^2))
187+
# (t, h) -> t^2 / (t^2 + stab_fun * h^2))
188188
)
189189
stiffness = formul.stiffness
190190
associategeometry! = formul.associategeometry!
@@ -212,7 +212,7 @@ function _execute_q4rs(tL_ratio = 1/100, g = 80*0.1^0, mes_fun=:linfract, mult_e
212212
associategeometry!(femm, geom0)
213213
vtkwrite("debug-normals.vtu", fens, fes; vectors = [("normals", deepcopy(femm._normals[:, 1:3]))])
214214
Kff = stiffness(femm, massem, geom0, u0, Rfield0, dchi);
215-
# @info "mult_el_size = $mult_el_size, Condition number: $(cond(Kff, Inf))"
215+
# @info "stab_fun = $stab_fun, Condition number: $(cond(Kff, Inf))"
216216

217217
# Midpoint of the free edge
218218
nl = selectnode(fens; box = Float64[L/2 L/2 0 0 -Inf Inf], inflate = tolerance)
@@ -275,7 +275,7 @@ function start_case()
275275
return objects
276276
end
277277

278-
function plot_case_approx_error!(objects, j, nu_errs, ns, mult_el_sizes)
278+
function plot_case_approx_error!(objects, j, nu_errs, ns, stab_funs)
279279
@pgf p = PGFPlotsX.Plot(
280280
{
281281
color = colors[j],
@@ -285,7 +285,7 @@ function plot_case_approx_error!(objects, j, nu_errs, ns, mult_el_sizes)
285285
Coordinates([v for v in zip(L ./ ns, abs.(nu_errs))])
286286
)
287287
push!(objects, p)
288-
push!(objects, LegendEntry("$(mult_el_sizes[j])"))
288+
push!(objects, LegendEntry("$(stab_funs[j])"))
289289
end
290290

291291
function display_case_approx_error(objects, tL_ratio, mes_fun)
@@ -314,15 +314,15 @@ function display_case_approx_error(objects, tL_ratio, mes_fun)
314314
pgfsave("approx_error-$(mes_fun)-tL_ratio=$(tL_ratio).pdf", ax)
315315
end
316316

317-
function test_convergence_all(cases, ns = [4, 8, 16, 32, 64, 128, ], mes_fun = :linfract, mult_el_sizes = [0.0, 0.05, 0.1, 0.2, 0.4])
317+
function test_convergence_all(cases, ns = [4, 8, 16, 32, 64, 128, ], mes_fun = :linfract, stab_funs = [0.0, 0.05, 0.1, 0.2, 0.4])
318318
for c in cases
319319
@info "--------------------------------------------------"
320320
@info "Convergence study for case t/L=$(c.tL_ratio) "
321-
or = _test_convergence_q4rs(c, ns, mes_fun, mult_el_sizes)
321+
or = _test_convergence_q4rs(c, ns, mes_fun, stab_funs)
322322
objects_errors = start_case()
323323
objects_displacements = start_case()
324324
for (j, (_, m, r)) in enumerate(or)
325-
@info " mult_el_size=$(m)"
325+
@info " stab_fun=$(m)"
326326
aprox_u_sols = [r[i][1] for i in eachindex(r)]
327327
approx_energy_sols = [r[i][2] for i in eachindex(r)]
328328
nu_errs = [abs(aprox_u_sols[i+1] - aprox_u_sols[i]) / aprox_u_sols[end] for i in 1:length(aprox_u_sols)-1]
@@ -331,30 +331,30 @@ function test_convergence_all(cases, ns = [4, 8, 16, 32, 64, 128, ], mes_fun = :
331331
# @info " Displ. norm. solutions: $(round.(aprox_u_sols ./ c[3], digits = 4))"
332332
@info " Displ. norm. approximate errors: $(round.(nu_errs, digits = 4))"
333333
# @info " Energy convergence: $(nenergy_sols)"
334-
plot_case_approx_error!(objects_errors, j, nu_errs, ns, mult_el_sizes)
335-
plot_case_result!(objects_displacements, j, nus, ns, mult_el_sizes)
334+
plot_case_approx_error!(objects_errors, j, nu_errs, ns, stab_funs)
335+
plot_case_result!(objects_displacements, j, nus, ns, stab_funs)
336336
end
337337
display_case_approx_error(objects_errors, c.tL_ratio, mes_fun)
338338
display_case_result(objects_displacements, c.tL_ratio, mes_fun)
339339
end
340340
return true
341341
end
342342

343-
function _test_convergence_q4rs(c, ns, mes_fun, mult_el_sizes)
343+
function _test_convergence_q4rs(c, ns, mes_fun, stab_funs)
344344
@info "Clamped hypar, Q4RS elements, t/L=$(c.tL_ratio)"
345345
all_results = []
346-
for mult_el_size in mult_el_sizes
346+
for stab_fun in stab_funs
347347
results = []
348348
for n in ns
349-
r = _execute_q4rs(c.tL_ratio, c.g, mes_fun, mult_el_size, n, false)
349+
r = _execute_q4rs(c.tL_ratio, c.g, mes_fun, stab_fun, n, false)
350350
push!(results, r)
351351
end
352-
push!(all_results, (case = c, mult_el_size = mult_el_size, results = results))
352+
push!(all_results, (case = c, stab_fun = stab_fun, results = results))
353353
end
354354
return all_results
355355
end
356356

357-
function plot_case_result!(objects, j, res, ns, mult_el_sizes)
357+
function plot_case_result!(objects, j, res, ns, stab_funs)
358358
@pgf p = PGFPlotsX.Plot(
359359
{
360360
color = colors[j],
@@ -364,7 +364,7 @@ function plot_case_result!(objects, j, res, ns, mult_el_sizes)
364364
Coordinates([v for v in zip(L ./ ns, res)])
365365
)
366366
push!(objects, p)
367-
push!(objects, LegendEntry("$(mult_el_sizes[j])"))
367+
push!(objects, LegendEntry("$(stab_funs[j])"))
368368
end
369369

370370
function display_case_result(objects, tL_ratio, mes_fun)
@@ -395,10 +395,10 @@ end
395395

396396
using FinEtools.AlgoBaseModule: richextrapol
397397

398-
function try_rich_all(c, ns = [4, 8, 16, 32, 64, 128, ], mes_fun = :linfract, mult_el_sizes = [0.0, 0.05, 0.1, 0.2, 0.4])
398+
function try_rich_all(c, ns = [4, 8, 16, 32, 64, 128, ], mes_fun = :linfract, stab_funs = [0.0, 0.05, 0.1, 0.2, 0.4])
399399
@info "--------------------------------------------------"
400400
@info "Convergence study for case t/L=$(c.tL_ratio), ns=$(ns), u_sol=$(c.u_sol), energy_sol=$(c.energy_sol)"
401-
or = _test_convergence_q4rs(c, ns, mes_fun, mult_el_sizes)
401+
or = _test_convergence_q4rs(c, ns, mes_fun, stab_funs)
402402
_try_rich(or)
403403
return true
404404
end
@@ -407,14 +407,14 @@ function _try_rich(all_results)
407407
start = 1
408408
for j in eachindex(all_results)
409409
c = all_results[j].case
410-
mult_el_size = all_results[j].mult_el_size
410+
stab_fun = all_results[j].stab_fun
411411
results = all_results[j].results
412412
aprox_u_sols = [results[s][1] for s in start:start+2]
413413
try
414414
er = richextrapol(aprox_u_sols, [4.0, 2.0, 1.0])
415-
@info "mult_el_size=$(mult_el_size): $(er[1]), i.e. $(round(er[1]/c.u_sol, digits = 4)*100)%"
415+
@info "stab_fun=$(stab_fun): $(er[1]), i.e. $(round(er[1]/c.u_sol, digits = 4)*100)%"
416416
catch e
417-
@warn "Richardson extrapolation failed for mult_el_size=$(mult_el_size)\n $(aprox_u_sols)"
417+
@warn "Richardson extrapolation failed for stab_fun=$(stab_fun)\n $(aprox_u_sols)"
418418
end
419419
end
420420
end
@@ -427,19 +427,19 @@ function allrun()
427427
# mes_fun = :sqrtlinfract
428428
# mes_fun = :powfract
429429
# mes_fun = :mix
430-
mult_el_sizes = [0.0, 0.0001, 0.001, 0.01, 0.02, 0.05]
430+
stab_funs = [0.0, 0.0001, 0.001, 0.01, 0.02, 0.05]
431431
# mes_fun = :simple
432-
# mult_el_sizes = [1.0, 2.0, 5.0, 10.0, 20.0, 50.0].^2
432+
# stab_funs = [1.0, 2.0, 5.0, 10.0, 20.0, 50.0].^2
433433
# mes_fun = :linsimple
434-
# mult_el_sizes = [1.0, 2.0, 5.0, 10.0, 20.0, 50.0]
434+
# stab_funs = [1.0, 2.0, 5.0, 10.0, 20.0, 50.0]
435435
println("#####################################################")
436436
println("# test_convergence_all ")
437-
test_convergence_all(case_data, ns, mes_fun, mult_el_sizes)
437+
test_convergence_all(case_data, ns, mes_fun, stab_funs)
438438
println("#####################################################")
439439
println("# try_rich_all ")
440-
try_rich_all(case_data[1], [4, 8, 16], mes_fun, mult_el_sizes)
441-
try_rich_all(case_data[1], [8, 16, 32], mes_fun, mult_el_sizes)
442-
try_rich_all(case_data[1], [16, 32, 64], mes_fun, mult_el_sizes)
440+
try_rich_all(case_data[1], [4, 8, 16], mes_fun, stab_funs)
441+
try_rich_all(case_data[1], [8, 16, 32], mes_fun, stab_funs)
442+
try_rich_all(case_data[1], [16, 32, 64], mes_fun, stab_funs)
443443
return true
444444
end # function allrun
445445

0 commit comments

Comments
 (0)