@@ -8,7 +8,7 @@ hard test for locking behaviour as suggested in References (Chapelle and Bathe,
881998; Bathe, Iosilevich, and Chapelle, 2000).
99
1010Table 2 in Bathe, Iosilevich, and Chapelle, 2000 (computed with MITC16).
11- mult_el_size Strain energy Displacement
11+ stab_fun Strain energy Displacement
12121/100 1.6790e-3 9.3355e-5
13131/1000 1.1013e-2 6.3941e-3
14141/10,000 8.9867e-2 5.2988e-1
@@ -58,7 +58,7 @@ function (o::_CSEval)(csmatout, XYZ, tangents, feid, qpid)
5858end
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
144144end
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
276276end
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]) " ))
289289end
290290
291291function 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)
315315end
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
341341end
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
355355end
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]) " ))
368368end
369369
370370function display_case_result (objects, tL_ratio, mes_fun)
@@ -395,10 +395,10 @@ end
395395
396396using 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
404404end
@@ -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
420420end
@@ -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
444444end # function allrun
445445
0 commit comments