원시데이터 수집 시스템
선정목록으로

Vectfem: a generalized MATLAB-based vectorized algorithm for the computation of global matrix/force for finite elements of any type and approximation order in linear elasticity

간접 관련 엔지니어링 플라스틱 · (23) 컴파운드 (3) 자동차 인테리어 소재(9) 타이어코드(10) 아라미드

기본 정보

저자
  1. Baurice Sylvain Sadjiep Tchuigwa — Faculty of Transport Engineering, University of Pardubice, Studentská 95, 532 10, Pardubice, Czech Republic
  2. Ján Krmela — Faculty of Transport Engineering, University of Pardubice, Studentská 95, 532 10, Pardubice, Czech Republic
  3. Jan Pokorný — Faculty of Industrial Technologies in Púchov, Alexander Dubček University of Trenčín, Ivana Krasku 491/30, 02001, Púchov, Slovak Republic
  4. Vladimíra Krmelová — Faculty of Industrial Technologies in Púchov, Alexander Dubček University of Trenčín, Ivana Krasku 491/30, 02001, Púchov, Slovak Republic
  5. Petr Jílek — Faculty of Transport Engineering, University of Pardubice, Studentská 95, 532 10, Pardubice, Czech Republic
DOI
10.1007/s00033-024-02293-w
저널
Zeitschrift für angewandte Mathematik und Physik
발행년도
2024
발행기관
Birkhäuser
피인용수
0
라이선스
cc-by
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.1007/s00033-024-02293-w
토픽
Composite Structure Analysis and Optimization
OpenAlex ID
W4401063028

평가 내용

관련도
간접 관련
사업분야
엔지니어링 플라스틱 · (23) 컴파운드
부 분야
(3) 자동차 인테리어 소재, (9) 타이어코드, (10) 아라미드
R&D 측면
분석·모델링
확신도
0.70
근거 용어
finite element method (FEM), linear elasticity, functionally graded materials, stiffness matrix, MATLAB-based vectorized algorithm
판단 근거
이 논문은 선형 탄성학 및 기능 경사 재료(FGM)를 시뮬레이션하기 위한 유한요소법(FEM)의 수치 해석 알고리즘 효율화에 관한 연구입니다.
R&D 활용 포인트
코오롱인더스트리의 고강도 섬유(아라미드, 타이어코드)나 복합소재(컴파운드)의 구조적 강도, 변형, 내구성을 예측하는 CAE(Computer-Aided Engineering) 해석 모델의 계산 속도와 정확도를 높이는 데 활용 가능합니다.
평가 입력
섹션 본문 44,993자 중 30,032자 발췌

초록

Abstract In this paper, we introduce a new vectorized MATLAB-based algorithm for efficient serial computation of global matrix/force arising from finite element method (FEM) for meshes of any type and approximation order in linear elasticity. Because for-loops in MATLAB are very slow, we propose a modified process that takes advantage of vectorization and sparse assembly to achieve good performance while using the same memory as the standard algorithm. For this purpose, by using good programming practices, the implementation of this scheme is succinctly described and can be integrated into any MATLAB package dealing with FEM. Specifically, attention is paid to the calculation of the triplet (row index, column index, matrix components) as well as the assembly of the global stiffness matrix, mass matrix and force vector. Additionally, an extension of the proposed approach for Mindlin plate theory and functionally graded materials is outlined. Finally, the accuracy of this strategy is verified on selected numerical tests after comparing the obtained results with those of ABAQUS. In terms of performance, the study conducted on a set of meshes considering the standard algorithm and two other well-known MATLAB vectorized algorithms revealed that: (i) for a 2D beam problem meshed with $$P_{1}$$ <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:msub> <mml:mi>P</mml:mi> <mml:mn>1</mml:mn> </mml:msub> </mml:math> -triangle elements, a speedup of about 8 and 15 is achieved with and , respectively. (ii) for a 3D plate problem meshed with $$P_{1}$$ <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:msub> <mml:mi>P</mml:mi> <mml:mn>1</mml:mn> </mml:msub> </mml:math> -tetrahedral elements, a speedup of about 4 and 8 is achieved with and , respectively. When compared to ABAQUS performance, the proposed scheme results in a computational time that is about five times smaller.

본문 48,441자

본문 펼치기
In this paper, we introduce a new vectorized MATLAB-based algorithm for efficient serial computation of global matrix/force arising from finite element method (FEM) for meshes of any type and approximation order in linear elasticity.Because for-loops in MATLAB are very slow, we propose a modified process that takes advantage of vectorization and sparse assembly to achieve good performance while using the same memory as the standard algorithm.For this purpose, by using good programming practices, the implementation of this scheme is succinctly described and can be integrated into any MATLAB package dealing with FEM.Specifically, attention is paid to the calculation of the triplet (row index, column index, matrix components) as well as the assembly of the global stiffness matrix, mass matrix and force vector.Additionally, an extension of the proposed approach for Mindlin plate theory and functionally graded materials is outlined.Finally, the accuracy of this strategy is verified on selected numerical tests after comparing the obtained results with those of ABAQUS.In terms of performance, the study conducted on a set of meshes considering the standard algorithm and two other well-known MATLAB vectorized algorithms revealed that: (i) for a 2D beam problem meshed with P 1 -triangle elements, a speedup of about 8 and 15 is achieved with sparse and fsparse, respectively.(ii) for a 3D plate problem meshed with P 1 -tetrahedral elements, a speedup of about 4 and 8 is achieved with sparse and fsparse, respectively.When compared to ABAQUS performance, the proposed scheme results in a computational time that is about five times smaller. Introduction Over the decades since the finite element method (FEM) was introduced initially by A. Hrennikoff in the work [1], in which he discretized the domain as lattice structure, then treated using a variational method by R. Courant [2], significant advancements have been achieved so far thanks to several discoveries in mathematics, particularly in variational methods [4,6], numerical analysis [5] and the development of computers [3].Thereby, the simulation of more complex problems, which was yesterday a dream, is progressively coming true today.However, despite these major strides observed in FEM [4], new challenges have emerged, such as sustainability [7] and integrative design [8], which imply multi-physics simulations [9,10,18], primordial for the optimal and rational use of natural resources.The concepts of sustainability and integrative design impose the development of new models capable of bringing together all the physical phenomena and driving forces behind the behavior of materials or systems, leading to more realistic results.Of course, this comes with a wide range of bottlenecks, like the complexity of the model [14,16].Failing to lighten models without depriving them of all their consistency and accuracy, one can improve their implementation by easing their interpretability and execution on computing resources. Introduction At the early stage of the development of simulation tools in university research centers, MATLAB [11] has become one of the most widely used programming languages, not only for teaching purposes in STEM fields, but also for the deep-end research industry since MATLAB is a high-level vector-based programming language that enables to operate on vectors or matrices instead of basic elements.More concretely, this feature makes it possible to get rid of for-loops by transforming the intervening expressions so as to execute operations in fewer instructions.Thus, using this vector feature in the context of FEM implementation [17,19] is a tremendous asset for developing more advanced packages designed for engineers dealing with simulations or researchers/lecturers to introduce students to the programmatic aspects of FEM in a practical way. Introduction In this regard, one of the first attempts to vectorize FEM codes in MATLAB is due to work by Koko [12], in which the author presented a strategy on how to vectorize the computation global matrix/forces for the discretized weak form deriving from the strong equation in linear elasticity.However, this strategy is restricted to finite elements in 2D.Aside from that, Dabrowski et al. [13] introduced an optimized implementation of FEM in MATLAB called MILAMIN for large problems.Although vectorization strategy is not particularly explored in this work, the authors developed a new scheme to ease the construction of the triplet (column index, row index, matrix or vector components) and assembly of global matrix/force.Unlike what is commonly believed, authors demonstrated that in linear elasticity, the scheme outperforms many C++ or Fortran-based packages like OOFEM or FEAPpv. Introduction A few years later, Cecka et al. [20] came out with an efficient strategy for the implementation on GPUs with an optimal use of memory.The authors in [22] proposed a vectorized scheme limited to problems meshed with P 1 triangle elements (in 2D) and P 1 -tetrahedral elements (in 3D) in linear elasticity.Although this strategy is free from the for-loop over elements, its scheme is computationally expensive since many smaller for-loops are introduced in the functions.Based on this work, [23] extended it to elasticity problems meshed with linear quadrilateral elements.Later on, [15] introduced the first MATLAB-based vectorized algorithm for triangular and tetrahedral elements of any order in linear elasticity.Besides its performance over the standard assembly method, this approach requires less than a quarter of the memory (RAM) needed by the former. Introduction Marcinkowski et al. in [21] investigated the issue by taking advantage of multidimensional arrays to compute and store element matrices (stiffness and mass) at once and then use an iterative process to solve the global equation without assembling.However, when it comes to dealing with topologies with a high number of elements, the iterative feature of this approach turns out to be a big drawback and limiting factor. Introduction In the work [24], the author paid particular attention to good programming styles in MATLAB to vectorize matrix/vector computation for the Poisson equation in a domain discretized with P 1 triangle elements with one nodal degree freedom.Notwithstanding the fact that invoking sparse representation [25][26][27] with vectorization technique represents a fantastic asset, it is essential to have a good balance between the gained speed and memory needed for the computation since an optimal performance demands a good memory allocation extensively discussed in [28,29]. Introduction In the recent version of MATLAB, starting from R2020b, new built-in functions such as pagetimes, mtimes, pagemldivide, and pagetranspose make it possible to efficiently multiply or transpose multidimensional matrices. Introduction After underlining all these points, in this paper we present a generalized MATLAB-based vectorized algorithm for the computation of global matrix/force for finite element of any type and any order in linear elasticity.In this scheme, the following new features are addressed: Introduction • With help of MATLAB built-in functions operating on multidimensional matrices, the for-loop over elements is removed ; • At each integration point, all element matrix/vector of the mesh are computed at once and then summed up to get the contribution of all integration points; • For any type of elements and nodal degree of freedom, the computation of column indices and row indices is obtained from degrees of freedom connectivity matrix using only basic operations and a single for-loop; • Generalization to elements of any types in 2D (triangle and quadrilateral) and 3D (tetrahedral, hexahedral, pentahedral, etc.) and for any approximation order (linear, quadratic, cubic, etc.); • Extension to Mindlin plate theory problem and functionally graded materials.The structure of this paper is as follows: First, a brief classical and discretized variational formulation for general boundary value problems in elastodynamics is provided in Sect.2, along with the standard algorithm for computing the global stiffness/mass matrix and force vector.After examining the shortcomings of the standard scheme, the methodology used to develop and implement in MATLAB the present algorithm is then succinctly described in the next section (Sect.3).In the final section (Sect.4), an L-shaped elastic structure is simulated using the proposed algorithm and the results validated after comparison with ABAQUS results of the same structure.Subsequently, a performance analysis is carried on a set of meshes for a 2D beam problem and a 3D plate problem to validate the computational cost and memory utilization of the proposed scheme over the standard algorithm and the vectorized algorithms by Anjam et al. [29] and Cuvelier et al. [15]. Problem formulation For the sake of clarity, three types of notations are purposely used in the remainder to differentiate MAT-LAB's commands and syntax from variables and expression defined in this study.Words in monospace typewriter font (pagetimes, zeros, transpose, none, etc.) refer to MATLAB's built-in functions or syntax.Bold camel-case words are name of defined functions (GaussQuadrature, ShapeFunctions,etc.), while italic characters and words are variables or operators (n, u,etc.). Problem formulation Let us consider a continuum body (see Fig. 1) that initially (at t = 0) occupies the domain Ω 0 ⊂ R d |d∈ (1,2,3) in the reference configuration and Ω t ⊂ R d |d∈ (1,2,3) in the current configuration and is subjected to body forces f v per unit mass and a stress vector t applied on the surface ∂Ω 1 . Problem formulation At any time in the Cartesian coordinates, any point X of the body is described according to the repeated indices rule by u = u i E i where i ∈< 1, 2, 3 > and E i are unit orthogonal vectors of the basis.Let also the boundary of the bounded set Ω (see Fig. 1) be defined by the union of three nonoverlapping partitions: Problem formulation Wherein ∂Ω 1 is the boundary part where traction vector t = σn is acting, Γ is the set of points where boundary conditions are enforced (u = u p ) and ∂Ω 2 the remaining subset of ∂Ω.For completeness, we precise that n is the outward normal unit vector to the surface ∂Ω 1 , σ is Cauchy stress tensor and u p are prescribed or known displacement values.Meanwhile, we precise that in the scope of the present work, Dirichlet boundary condition is sufficient to lay down the aim of this paper, and we emphasize that other types of boundary conditions (Newmann, Robin or mixed) can be enforced as well since the enforcement of boundary conditions is posterior to the assembly of global matrices/Vectors.Under all the above conditions, the equilibrium of the body is governed by the boundary value problem of the form (strong form): Problem formulation We assume for simplicity to be in small strain (ε) and in linear elasticity, such a way that the constitutive law reads as Problem formulation where C is a fourth-order tensor called elasticity tensor and ε is the small strain tensor given by the expression Variational formulation and discretization of the problem: Before going any further, we define the space of kinematically admissible displacements as Variational formulation and discretization of the problem: where H 1 (Ω) is the Sobolev space of functions whose first-order derivatives are bounded in the energy norm.Considering a virtual displacement δu, we multiply both sides of the first line of Eq.(2.2) and then integrate over the volume δu Variational formulation and discretization of the problem: In the previous equation, we precise that the symbol (•) is the scalar product.Now focusing our attention on the first expression on the left-hand side of Eq.(2.6) and making use of the Stokes-Green-Ostrogradski formula, we rewrite it into Variational formulation and discretization of the problem: where ∇ denotes the gradient operator.Owing to the symmetricity of the strain tensor ε = 1 2 ∇u + T ∇u and after transformation, the variational formulation of the boundary value reads as follows: Variational formulation and discretization of the problem: h be the discretized domain in the discretized space and described with data in Table 1.In MATLAB language, we make use of the function struct to create a structure array that groups mesh parameters and their values into a single variable called F E model of type structure, each of whose fields can be retrieved using dot notation syntax (e.g., nel = FE model.nel)Let also V h be the space of kinematically admissible displacements associated with Ω h .The variational formulation of the problem is defined in the discretized space by Variational formulation and discretization of the problem: where the shape function N e of the element e is given by Variational formulation and discretization of the problem: and Variational formulation and discretization of the problem: With the definition of u in Eq.(2.10), it is convenient for implementation purposes to use Voigt notation to reduce the order of tensors involved by one order.As such, σ and ε are respectively Cauchy stress vector and strain vector associated with σ and ε Variational formulation and discretization of the problem: Under this notation, the strain vector of each element e can be written in terms of the nodal displacement vector as follows: Variational formulation and discretization of the problem: where B e is the strain matrix of the element and has for components the following Variational formulation and discretization of the problem: and Variational formulation and discretization of the problem: where A is the assembly operator and is preferred over the union operator since it makes more sense in regards to the fact that the assembly is done at nodal level.Subsequently, Eq.(2.15) can be recast in matrix form as Variational formulation and discretization of the problem: where the expressions M e , K e , f e and t e are the element mass matrix, stiffness matrix, body force vector and applied force vector, respectively.It should also be noted that in Eq.(2.14), integrals over elements are usually approximated numerically using the Gauss quadrature rule based on the transformation between parent space and the isoparametric space as illustrated in Fig. 2 for linear quadrilateral elements, for instance. Variational formulation and discretization of the problem: Let U be the global nodal displacement vector of all the nodes (nn) of the mesh such that Variational formulation and discretization of the problem: After rearranging and assembling contributions of all elements of the mesh, we end up with the resulting global algebraic system of equations of the boundary value problem as follows: Variational formulation and discretization of the problem: where F ext is the global external force vector (sum of body force and traction force), while K g and M g are, respectively, the global stiffness matrix and mass matrix of the body.For further details about this type of variational formulation, the reader is referred to works in [30,31].In the conventional computerbased calculation [17,[32][33][34][35], K g , M g or F ext are obtained by sequentially computing element matrices or vectors for each element and storing their row indices IndexI, column indices IndexJ and values K values .Once all the elements have been calculated, global matrices or vectors are assembled using MATLAB's built-in function sparse as shown in the workflow in Fig. 3.The standard algorithm for computing the stiffness matrix according to the workflow shown in Fig. is outlined in algorithm 1 and called StandardGlobalStiffness Taking a look at the structure of algorithm 1, two main limitations emerge: is outlined in algorithm 1 and called StandardGlobalStiffness Algorithm 1 standard algorithm for computing Kg is outlined in algorithm 1 and called StandardGlobalStiffness for e ← 1 to nel do 6: is outlined in algorithm 1 and called StandardGlobalStiffness K e ← LocalM atrices(F E model, . . . ) element stiffness matrix 7: is outlined in algorithm 1 and called StandardGlobalStiffness me ← F E model.connect(e,:) 8: is outlined in algorithm 1 and called StandardGlobalStiffness for j ← 1 to n do 9: is outlined in algorithm 1 and called StandardGlobalStiffness for α ← 1 to m do 10: is outlined in algorithm 1 and called StandardGlobalStiffness for i ← 1 to n do 11: is outlined in algorithm 1 and called StandardGlobalStiffness for β ← 1 to m do 12: • The non-vectorized for-loop over elements of the mesh: The elementwise-based computation of element stiffness matrices and their indices (IndexI and IndexJ) is computationally inefficient since it does not make optimal use of MATLAB's vector operation capabilities; • Apart from the outermost for-loop, four nested for-loops are needed to compute row and column indices. is outlined in algorithm 1 and called StandardGlobalStiffness Several assembly procedures have been proposed like those in [15,17,29] to get rid of at least one of the above-mentioned limitations.Precisely, while authors in the former use matrix rearrangements to reduce memory usage and achieve a better performance, the authors in the latter take advantage of affine transformations to formulate their algorithm. Formulation First and foremost, it is important to keep in mind that serial calculation of finite element terms can be classified into two categories: non-vectorized serial calculation and vectorized serial calculation.Due to integrals involved in the calculation of finite element terms, each method can be performed either implicitly, by means of numerical integration schemes like Gauss quadrature rule, or explicitly (exact integration) as shown in Fig. 4.However, the latter approach is tedious and irrelevant for finite elements with approximation order higher than 1 (p > 1).Now, we are going to introduce an implicit vectorized algorithm based on the branch highlighted in orange in Fig. 4. The workflow of this algorithm in linear elasticity is depicted in Fig. 5. Formulation In the following, we describe the whole procedure and the steps it comprises.(a) Firstly, we need to gather values of nodal shape functions and their derivatives in the isoparametric space so that they are computed only once.Hence in the subroutine GaussQuadrature, Gauss quadrature data (number of Gauss points, their respective coordinates and weights) are respectively calculated in the isoparametric space and stored in the expressions nP oint, weight and Gq,with Formulation where Gq is of size d×q.When it comes to 1D elements, Gq is reduced to only the first line, whereas only the first two lines are relevant for 2D elements.(b) With Gauss quadrature data at hand, we proceed with the computation of values of shape functions and their derivatives at each integration point, then store them as NI and dN dθ, respectively.In the subroutine ShapeFunction, basis functions of some basic 2D and 3D isoparametric elements are defined with help of symbolic operations in MATLAB, which enables to play around with derivatives as well as corresponding values at any given integration point without much effort.Outputs read as Formulation where q is the number of Gauss quadrature points, dim (NI) = d×q and θ i ∈ <1,2,..., q> are the coordinates of quadrature points in the isoparametric space Formulation Similarly, dN dθ is a multidimensional matrix that stores values of derivative of basis functions (with respect to the isoparametric space) at all quadrature points in such a way that values at each integration point i are stored in the slice i of the multidimensional matrix dN dθ and are calculated from the expression (for 3D problems) below dN dθ(:, Formulation So dim(dN dθ)= n×d×q, wherein n is the number of basis functions at each finite element and d the dimension of the problem.From the above form, one can deduce dN dθ in 1D and 2D.(c) The next step is to get rid of the for-loop over elements.To this end, we define the multidimensional strain matrix B that contains strain matrices of every single element stored in a specific slice or page with index i.Since dN dθ is the derivative of the nodal basis functions in the isoparametric space, we have to compute the Jacobian J of the transformation. Formulation For every integration point, the following steps are defined to compute B and the corresponding multidimensional element stiffness matrix K e : Formulation (i) From dN dθ, we extract the derivative of the shape function at the current Gauss point and call MATLAB built-in function pagetimes to calculate the Jacobian of the transformation J by the formula J = pagetimes(dN dθ(:, :, i), 'none', P ts, 'transpose') Formulation where J is of dimension d×d×nel.(ii) Afterward, the derivative of the basis function matrix dN dX in the element space is computed Formulation where dN dX is of dimension d×n×nel.(iii) Then after pre-allocating memory for storing B, its values are computed and filled in only one for-loop of length n such that at the node s ∈ < 1, 2, . . ., n > of all elements, the component The matrix B is fully constructed in a single for-loop by calling the function Bs written Algorithm 4. (iv) Now let detJ be the determinant of the Jacobian matrix J.In order to avoid elementwise computation of detJ, we introduce the following vectorized form defined in the function Det-Jacobian of Algorithm 2. (v) Update the multidimensional element stiffness matrix K e given in 3D K e = K e + pagemtimes(B, 'transpose', pagemtimes(C, B). * detJ * weight(i), 'transpose') (3.9)where the determinant of the Jacobian detJ is of size 1×1×nel and K e is of size (m * n)×(m * n)×nel.The row vector weight of size 1×q, is the vector of Gauss quadrature weights.In 2D, the second expression on the right-hand side of Eq.(3.9) will be multiplied by the thickness of the elements.d) Once we obtain stiffness matrix of all elements K e for all integration points, the next step is to construct row and column indices (IndexI and IndexJ). Formulation While the row and column indices in Algorithm 1 and others existing in the literature are computed concurrently with the element stiffness values, we propose a scheme in Algorithm 3, wherein IndexI and IndexJ are calculated from the degrees of freedom connectivity matrix Matrix dof , obtained in a single for-loop over m.For memory sake, Matrix dof , IndexI and IndexJ are defined as 32-bit integers. Formulation It should be noted that in algorithm 3, the operations Matrix dof (:) and Matrix dof (:) convert the matrix Matrix dof into a column vector and a row vector, respectively. Remark 3.1. For any element e with domain Ω (e) h ⊂ Ω h ⊂ R d , row and column indices (IndexI e and IndexJ e ) of its stiffness components can be straightforwardly obtained from its degrees of freedom connectivity matrix after a single for − loop over the number of degrees of freedom per node.e) As a final step, after constructing IndexI, IndexJ, and K e , the global stiffness matrix is assembled using MATLAB's built-in function sparse through the command below Remark 3.1. For any element e with domain Ω (e) h To wrap it all up, the summary of the proposed method is outlined in Algorithm 4 under the function PropGlobalStiffness.In order to reduce as much as possible memory usage, some variables are emptied at certain points throughout the execution (see lines 13, 15, 18, 26 and 27).For sake of simplicity, some lines in the above algorithm have intentionally been omitted particularly those related to the retrieval of mesh data (nel, n, d, m, etc.) from the structure array F E model using dot notation syntax (e.g., nel = FE model.nel). For functionally graded materials. Recalling that in the case of functionally graded materials, there is a spatial variation of material properties due to spatial changes in the material's composition and/or microstructure.Basically, Young's modulus E and/or Poisson's ratio can be described as a function of the position of the observation point M ∈ Ω.So, is the elasticity tensor C (M ) such that the constitutive behavior reads as For functionally graded materials. The numerical calculation of the element stiffness matrix within such materials is quite straightforward after computing the element elasticity tensor at the current Gauss quadrature point g.Knowing that the spatial position of each Gauss quadrature point can be computed from element nodal coordinates using shape functions as given in Eq. (3.12) For functionally graded materials. = N e z e (3.12) For functionally graded materials. Owing to the fact that the spatial expression of E and/or ν is a known parameter of the problem, E and/or ν at the current Gauss point g can be computed in 3D as per Eq.(3.13) For functionally graded materials. For a basic illustration of the current vectorized algorithm, let us assume a case with ν constant, E (M ) varying with respect to x and considering a state of plane stress, the elasticity tensor is given in 3D by the expression For functionally graded materials. or simply For functionally graded materials. where C b is the material tensor for a unit Young's modulus.E (x) at the Gauss point g for all elements of the model is computed using a single command For functionally graded materials. In the previous expression, the user defines the analytical expression of E (x) using MATLAB function handle.Ng is a column vector of the element nodal shape function at the current integration point. For functionally graded materials. Following this same token, the material tensor of any functionally graded material can be calculated in a vectorized manner without much effort.Provided the analytical expression of E (x) and/or ν (x) is known in advance. For plate problems with Mindlin formulation. Mindlin plate formulation proposes an improvement to Kirchhoff-Love plate theory to take into account shear deformations through the thickness of the thick plates.In this formulation, the section initially perpendicular to the middle surface before the deformation does not remain perpendicular to the middle plane after the deformation, such that the displacement field can be defined as follows: For plate problems with Mindlin formulation. Mindlin plate formulation proposes an improvement where θ x and θ y are the rotations with respect to x and y axes, respectively.Similar to Kirchhoff-Love's plate theory, the study of the problem is described from the middle surface as illustrated in Fig. 6.With this approximation, bending component f of the strain tensor reads as In the hypothesis of small strains and homogeneous material, the bending part of Cauchy stress σ reads as For plate problems with Mindlin formulation. Mindlin plate formulation proposes an improvement where C f is defined as For plate problems with Mindlin formulation. Mindlin plate formulation proposes an improvement Shear stress components are given by For plate problems with Mindlin formulation. Mindlin plate formulation proposes an improvement where C c is defined as For plate problems with Mindlin formulation. Mindlin plate formulation proposes an improvement where κ is the shear correction factor.Now, since the vector field U = (u, v, w) can be fully characterized for given d T = (θ x , θ y , w) thanks to Eq. (3.17), we assume in the discretized space, the following interpolation For plate problems with Mindlin formulation. Mindlin plate formulation proposes an improvement In virtue of this general approximation, the bending B f and shear B c strain matrices can be readily written out. For plate problems with Mindlin formulation. Mindlin plate formulation proposes an improvement After replacing Eqs.(3.25), (3.24), (3.22) and Eq.(3.20) into Eq.(2.9) and simplifying everything, we end up with Eq.(3.26 For plate problems with Mindlin formulation. Mindlin plate formulation proposes an improvement where M reads as For plate problems with Mindlin formulation. Mindlin plate formulation proposes an improvement After assembling, we end up with the system of partial differential equations below For plate problems with Mindlin formulation. Mindlin plate formulation proposes an improvement It is important to bear in mind that in Eq.(3.28), the shear-related component of the stiffness matrix is calculated using reduced integration.This prevents shear-locking problems from occurring.The vectorization of Eq. (3.28) is conducted similarly, as outlined in the general formulation of the proposed algorithm in the previous section, in particular, B f and B c .Here, the functions getBplate, PropStiffnessPlate, PropGlobalForce were created to implement Mindlin plate theory.The detailed structure of these functions is provided in the Appendix. Numerical experiments: This section is devoted to the verification and validation of the proposed vectorized algorithm for linear elastic boundary value problems. Numerical experiments: • For verification and performance analysis, the commercial software Simulia ABAQUS [38] is used to model and analyze a linear elastic L-shaped domain (see Sect. 4.1), a clamped plate based on Mindlin theory(see Sect.4.3), a functionally graded membrane in tension(see Sect.4.4) and a functionally graded 3D beam (see Sect. 4.5) and compare the results and performances with those obtained by the proposed method.• In order to numerically demonstrate the novelty of the proposed algorithm over two other existing MATLAB-based vectorized algorithms [15,29], a computational time and memory usage-based performance test is conducted in Sect.4.2.In each method, the global stiffness matrix of a 2D beam then a 3D plate problem is calculated on a set of meshes (from coarse to fine), and the associated execution time and memory usage are recorded and compared. Example 1: Elastic L-shaped structure We consider the 5 -cm-thick linear elastic L-shaped structure with the geometry shown in Fig. 7 and whose material properties are Young's modulus E= 210 GPa, Poisson's ratio ν= 0.3 and density ρ = 7850 kg/m 3 , respectively.This structure is loaded with a concentric force of intensity 200KN oriented toward the negative y-axis as represented in Fig. 7.For simplicity, we restrict the problem to a planestress analysis.The computing resource used for this simulation is a gaming desktop equipped with an AMD Ryzen 3 1200 processor (running at a clock frequency of 3.1GHz), a total RAM of 24GB, and a Windows 10 Pro 64-bit operating system.On this machine are installed Simulia ABAQUS/CAE 2020 [38] and MATLAB 2024a, which we used to carry out performance comparisons. Example 1: Elastic L-shaped structure First, ABAQUS was used to create the geometry, define material properties and load, enforce boundary condition on the edge y=0, and generate the set of P 1 -triangle meshes (linear triangles) with data reported in Table 2. Subsequently, the meshes created in Simulia ABAQUS were imported into MATLAB as topology inputs.Afterward, the simulations using ABAQUS and the proposed algorithm in MATLAB were carried out, and the result of the vertical displacement U z based on the first mesh is displayed in Fig. 8. Example 1: Elastic L-shaped structure In both simulations, we note that the vertical displacement is the same.Having verified the accuracy of the proposed method, we move on with the comparison of the computational time in ABAQUS to that of the proposed algorithm based on the set of meshed listed in Table 2. Example 1: Elastic L-shaped structure The results show that by reducing the global matrix construction time by 10 times using the proposed method (see Fig. 9a), the total runtime needed for the FEM analysis is reduced by 5 times (see Fig. 9b). Example 2: Comparison with the existing vectorized algorithms In this part, we have only reported information related to the objective of measuring and comparing the execution times for calculating the global stiffness matrix using the algorithms under consideration for a selection of 2D and 3D problems.For both examples, the simulations were conducted on a computer with specifications listed in Table 3 below Case 1: 2D beam problem. In order to make an assessment of the performance of the proposed vectorized algorithm, we considered two other vectorized algorithms together with the algorithm 1 as comparison basis.For this purpose, a set of 6 P 1 triangle element meshes was considered as topology inputs.The corresponding data are reported in Table 4.We precise that here the number of degrees of freedom per node is m = 2; so ndof = m * nn for each mesh ID in Table 4. Case 1: 2D beam problem. The codes for implementing the two other vectorized algorithms [15,29] considered in this study are obtained from authors' platforms [39,40].Hereafter, these algorithms are referred to respectively as Cuvelier et al and Anjam et al.Along with that we also used the external function fsparse provided with the package FAST in [41] and available on the first author's github repository [42].With this function, a sparse matrix can be constructed from the triplet IndexI, IndexJ, Kvalues more quickly than with MATLAB's built-in sparse. Case 1: 2D beam problem. After running the programs using the standard algorithm, the proposed method (first with sparse then fsparse), Cuvelier et al and Anjam et al algorithms on the aforementioned set of 2D meshes, the recorded computational times are depicted in Fig. 10. Case 1: 2D beam problem. It is worth noting that the assembly with sparse, named proposed, is represented by the cyan dashed line with a star marker. Case 1: 2D beam problem. It can be seen in Fig. 10b that the slope of the line joining the cloud of points for each algorithm is nearly the same.However, it is much more convenient to compare them on the basis of the speedup ratio (see Fig. 11) with respect to the standard algorithm. Case 1: 2D beam problem. In view of the boxplot in Fig. 11b, we find out that the dispersion with the proposed algorithm using the assembly functions sparse and fsparse is nearly the same.While the proposed scheme with sparse is about 9x faster than the standard algorithm, Cuvelier et al's approach is circa 6x faster and Anjan et al's method is about 4x faster.On the other hand, when the present algorithm is executed with fsparse instead, the program performance turns out to be 15x faster.Besides that, the analysis of memory usage in MATLAB profiler reveals that Cuvelier et al's approach is the least RAM-intensive compared to the present method, standard method and Anjam et al's approach as illustrated in Fig. 12. Case 2: 3D beam problem. Similarly, as we proceeded in section 4.2.1, we consider a simply supported plate discretized with a set of 6 P 1 tetrahedral element meshes whose information are reported in Table 5 We precise that here the number of degrees of freedom per node is m = 3; so ndof = m * nn for each mesh ID in Table 5.After execution with each algorithm as proceeded for the 2D case, we obtained the runtime depicted in Fig. 13. Case 2: 3D beam problem. We note in Fig. 14a that the performance of the proposed algorithm used with sparse decreases from mesh 1 to 3 but stabilizes with a speedup of circa 3.8 for larger meshes.Although this behavior is observed, the speedup is at least 1.5x higher than that of Cuvelier et al and 2x higher than that of Anjam et al, whereas the use of fsparse enables to maintain an approximately constant speedup of 8 regardless of mesh size.A more comprehensive visualization of the speedup with respect to the standard algorithm is illustrated with the boxplot in Fig. 14b. Case 2: 3D beam problem. On the memory front, it can be seen in Fig. 15 that the proposed method uses almost as much memory as the standard method. Example 3: clamped thick plate Let us assume the isotropic and homogeneous thick plate depicted Fig. 16 and with mechanical properties E = 10920 MPa and ν = 0.3.This plate is subjected to a uniformly distributed transverse pressure of intensity 1MN applied on its top surface.The plate is clamped at its four edges.This example was drawn out from the reference work by Ferreira in [43]. Example 3: clamped thick plate In order to carry out a comprehensive comparison between the performance of the proposed algorithm and that of ABAQUS based on Mindlin plate theory, a group of six meshes of type 4-node elements(QUA4 6. Example 3: clamped thick plate Firstly, mesh 1 was selected for verification of the vectorized algorithm in Appendix 1 based on the results obtained in ABAQUS.Then, simulations were conducted on the same computer specified in Sect.4.1.Figure 17 1%.Furthermore, the displacement U z = −1.503mm at the center of the plate is consistent with the one obtained by Ferreira in [43] for the same value of k. Example 3: clamped thick plate Under the same boundary conditions, we have conducted a modal analysis of the plate (with mesh 2) based on the vectorized form of the Mindlin plate formulation outlined in Eq. (3.26).Table 7 provides a comparison of the six smallest natural frequencies obtained using ABAQUS and our MATLAB algorithm, respectively. Example 3: clamped thick plate As of the result of the comparison of data in Table 7, it is obvious that the error is still less than 1%.In order to perform modal analysis, the parameter AnalysisType is set to ''modal'' using the command line FE model.AnalysisType=''modal'' under the "Material parameters, analysis parameters and applied load" in the main file MainProgram.Focusing our attention on the six smallest modes, we obtained the mode shapes depicted in Fig. 18 and generated using ModeShape.mfile created for this specific task.As in the previous example, we have analyzed the performance of the static problem with the meshes shown in Table 6. Figure 19 depicts the comparison of the computational cost.In view of Fig. 19, it also turns out that in this example, matrix/force construction time is reduced by at least 10 times using the proposed method.Thus, the whole FEM process is accelerated by about 5 times compared to ABAQUS. Example 4: functionally graded membrane In this example, we assess the performance of the proposed method for solving a functionally graded membrane problem.For simplicity, we consider the example investigated by Martínez-Pañeda [44], with dimension sketched in Fig. 20.The material's Poisson ratio is set as a constant value ν = 0.30.Meanwhile, Young's modulus E changes in the x-direction as per the function defined in Eq. (4.3). Example 4: functionally graded membrane where β = ln (8) and E 0 = 1.Also, this membrane is 1 m thick and loaded with a uniform tensile stress of σ 0 = 2 MPa applied on the top surface of the membrane.The analytical solution for this problem is given by where A and B read as Example 4: functionally graded membrane A set of 6 P − 1 quadrangle meshes were created in ABAQUS as topological inputs for this analysis.Table 8 presents the size of these meshes. Example 4: functionally graded membrane In order to verify the accuracy of our algorithm, mesh 1 was selected and used for static analysis under the definition provided above.In ABAQUS, we utilized the so-called nodal/temperature-based definition of the young modulus following the x-axis.Using such an approach implies that the value of E at each Gauss integration point is calculated by numerical interpolation from the values of E at the element's nodes.Whereas in the exact method, E g at each Gauss point is directly computed from the analytical expression of E using the spatial position obtained in Eq. (3.12).The result of the performance analysis conducted on the set of meshes above is depicted in Fig. 23.We observe that this example demonstrates a similar performance to the previous ones.The proposed algorithm continues to be at least ten times quicker, and its application for finite element problem analysis results in a fivefold decrease in CPU time compared with ABAQUS performance.This functionally graded beam is non-symmetrically loaded with a complex pressure f s = (0, f y , f z ) with components f y = −1.32xand f z = 1.2xz 2 depicted in Fig. 25. Example 4: functionally graded membrane Simulations were conducted on the same computer specified in Sect.4.1.After the analysis, we obtained the deformation depicted in Fig. 26. Example 4: functionally graded membrane We have also performed the modal analysis of the beam and obtained mode shapes associated with the six smallest natural frequencies of the beam as shown in Fig. 27.Finally, we focused our attention on the CPU time (see Fig. 28) for performing the static and modal analysis It should be noted that in the proposed function in the appendix, only the stiffness matrix is computed in the case of static analysis.In modal analysis, both the stiffness matrix and mass matrix are calculated.We can see here that combining both enables us to reduce the computational cost, though it might not be a good idea when the available memory is a limiting factor. Conclusion We have proposed in this work, an efficient MATLAB-based vectorized algorithm for computing global matrix/force deriving from the discretized weak form of boundary value problems in linear elasticity.This scheme introduces a set of new features, which are detailed in section 3.By leveraging the power of vectorization and other optimizations, the algorithm can efficiently handle large-scale problems and deliver accurate results as verified in the numerical experiments in sections 4.1, 4.3, 4.4 and 4.5.Additionally, the performance analysis has revealed that the proposed method is at least ten times faster than the standard approach, and its utilization leads to a decrease of the runtime by at least five times compared to ABAQUS.This is because the approach presented builds on existing vectorized methods in the literature and improves on them in several important ways, including the use of advanced programming techniques, the integration of the latest MATLAB built-in functions to improve computational performance, generalization to meshes with elements of any order and type, and full vectorization of the construction of row indices, column indices and matrix/vector components.Moreover, an extension of the vectorized algorithm to special problems, such as Mindlin plate theory and functionally graded materials, was derived.Alongside its improved performance, it has been shown that this algorithm requires almost the same amount of memory as the standard algorithm, as shown by the performance analysis carried out in sections 4.2.1 and 4.2.2.Even though the proposed scheme requires more memory than that of Cuvelier et al. [15], a reference in the literature, it is at least 1.5x (with sparse) and 2.5x (with fsparse) faster than the latter, making it a game-changer in a massive simulation. Conclusion Overall, this work represents a significant contribution to the field of linear computational mechanics and has important implications for the design of structures and materials in various engineering and scientific applications. Conclusion Using the findings of this work, the following aspects will be investigated in forthcoming research: Conclusion • Enhancement of memory usage; • Extension to nonlinear elasticity, J2 plasticity and contact problems; • Implementation on graphics processing units (GPU). Conclusion • Development of an all-in-one fully vectorized MATLAB package intended for practical teaching of FEM to undergraduate and graduate students. Fig. 1 . Fig. 1.Schematic drawing of the continuum body Fig. 2 . Fig. 2. Isoparametric mapping for a quadrilateral element Fig. 3 . Fig. 3. Standard workflow for computing the stiffness matrix Fig. 4 . Fig. 4. Types of serial computation in FEM Fig. 5 . Fig. 5. Workflow of the proposed algorithm Algorithm 2 2 :Algorithm 3 Determinant of the Jacobian J Require: J, nel, d 1: function [detJ] = DetJacobian(J, nel, d) Mat ← reshape(J, [ ], nel) 3: if d == 2 then in 2D 4: detJ ← Mat(1, :).* Mat(4, :) − Mat(2, :).* Mat(3, :) 5: else if d == 3 then in 3D 6: detJ ← Mat(1, :).* (Mat(5, :).* Mat(9, :) − Mat(6, :).* Mat(8, :)) − Mat(4, :).* (Mat(2, :).* Mat(9, :) − Mat(3, : ).* Mat(8, :)) + Mat(7, :).* (Mat(2, :).* Mat(6, :) − Mat(3, :).* Mat(5, Computation of Matrix dof Require: F E model, model data structure 1: M atrix dof ← int32(zeros(nel, n * m) ) Initilization of M atrix dof 2: k ← (1 : n) 3: for a ← 1 to m do 4: M atrix dof (m * (k − 1) + a, :) ← (m * (F E model.connect(:,k) − 1) + a) 5: end for 6: IndexJ ← int32(repmat(Matrix dof (:) , m * n, 1)) 7: IndexI ← int32(repmat(Matrix dof, m * n, 1)) Fig. 6 . Fig. 6.Illustration of Mindlin plate formulation Fig. 7 . Fig. 7. Schematic drawing of the L-shaped stucture Page 17 of 37 150 Fig. 8 .Fig. 9 . Fig. 8. Visualization of the displacement along y-axis: a in ABAQUS/CAE; b with proposed algorithm in MATLAB Fig. 10 .Fig. 11 . Fig. 10.Visualizaton of Kg computational time for a set of 2D meshes with P 1 triangle elements: a runtime versus the number of degrees of freedom; b runtime versus ndof in log-log scale Fig. 12 . Fig. 12. Memory usage for computing Kg per algorithm with respect to mesh ID for the selected 2D problem Fig. 13 .Fig. 14 . Fig. 13.Visualizaton of computational time for a set of 3D meshes with P 1 tetrahedral elements: a runtime versus the number of degrees of freedom; b runtime versus ndof in log-log scale Fig. 15 .Fig. 16 . Fig. 15.Memory usage for computing Kg per algorithm with respect to mesh ID for the selected 3D plate problem Fig. 17 . Fig. 17.Static result of the deformation of the plate: in ABAQUS/CAE (on the left-hand side) and in MATLAB with proposed algorithm (on the right-hand side) Fig. 19 .Fig. 20 . Fig. 19.Runtime performance analysis of the thick square plate: a CPU time for assembling Kg as per the Standard and proposed algorithm; b Total CPU time of the analysis (global matrix/force construction + solving the system of the equations) Fig. 21 . Fig. 21.Exponential variation of Young's modulus E along x-axis: a Plotting of E versus x; b Distribution of the E within the functionally graded membrane Fig. 22 . Fig. 22. Visualization of FG membrane deformation for a scaling factor of 0.0428 according to the analytical equation (left column), the proposed algorithm (middle column) and ABAQUS (right column) Fig. 23 .Fig. 24 . Fig. 23.Runtime performance analysis of the thick square plate: a CPU time for assembling Kg as per the Standard and proposed algorithm; b Total CPU time of the analysis (global matrix/force construction + solving the system of the equations) Fig. 25 .Fig. 26 . Fig. 25.Components of the applied pressure fs: a representation of the function fy (x, y); b representation of the function fz (x, y) Fig. 27 . Fig. 27.Visualization of the six smallest mode shapes of the square plate Fig. 28 . Fig. 28.Performance analysis for static and modal analysis; a CPU time taken to compute the matrix; b CPU time taken to compute the matrix and solve the system of equations Table 1 . Mesh data structure 4 Proposed algorithm for computing the stiffness matrix K g 4 Input: F E modelFE model is a structure array 1:function [Kg] = PropGlobalStiffness(F E model) 2: [Gq, weight, q] ← GaussQuadrature(F E model) Get Gauss quadrature data 3: [NI, dN dθ] ← ShapeFunction(F E model) Get shapefunctions and their derivatives 4: Ke ← zeros(m * n, m * n, nel) Initilization of Ke 5: CoordI ← @(x)[F E model.Coord((F E model.connect(x,:)),:)]6: P ts ← reshape(CoordI(1 : nel), ndof, nn, [ ]) Coordinates of elements' nodes 7:for i ← 1 to q do loop over integration points 8:J ← pagetimes(dN dθ(:, :, i), 'none', P ts, 'transpose') 9:dN dX ← pagemldivide(J, dN dθ(:, :, i)) 10: for s ← 1 to n do 11: Compute B(:, d * (s − 1) + 1 : d * s, :) * (k − 1) + β, :) ← (m * (connect(:, k) − 1) + β) 4 .18a) Table 2 . Set of linear triangle element meshes Table 2 . *nel and nn are the number of elements and nodes, respectively Table 3 . Computer specifications Table 4 . Set of linear triangle element meshes Table 4 . *nel and nn are the number of elements and nodes, respectively Table 5 . Set of linear tetrahedral element meshes Table 6 . Set of 4-node quadrilateral element meshes Table 7 . Comparison of obtained frequencies Table 7 . Fig. 18.Visualization of the six smallest mode shapes of the square plate Table 8 . Set of 4-node quadrilateral element meshes

섹션 본문 143문단 · 43,543자

(제목 없음)

1In this paper, we introduce a new vectorized MATLAB-based algorithm for efficient serial computation of global matrix/force arising from finite element method (FEM) for meshes of any type and approximation order in linear elasticity.Because for-loops in MATLAB are very slow, we propose a modified process that takes advantage of vectorization and sparse assembly to achieve good performance while using the same memory as the standard algorithm.For this purpose, by using good programming practices, the implementation of this scheme is succinctly described and can be integrated into any MATLAB package dealing with FEM.Specifically, attention is paid to the calculation of the triplet (row index, column index, matrix components) as well as the assembly of the global stiffness matrix, mass matrix and force vector.Additionally, an extension of the proposed approach for Mindlin plate theory and functionally graded materials is outlined.Finally, the accuracy of this strategy is verified on selected numerical tests after comparing the obtained results with those of ABAQUS.In terms of performance, the study conducted on a set of meshes considering the standard algorithm and two other well-known MATLAB vectorized algorithms revealed that: (i) for a 2D beam problem meshed with P 1 -triangle elements, a speedup of about 8 and 15 is achieved with sparse and fsparse, respectively.(ii) for a 3D plate problem meshed with P 1 -tetrahedral elements, a speedup of about 4 and 8 is achieved with sparse and fsparse, respectively.When compared to ABAQUS performance, the proposed scheme results in a computational time that is about five times smaller.

Introduction

2Over the decades since the finite element method (FEM) was introduced initially by A. Hrennikoff in the work [1], in which he discretized the domain as lattice structure, then treated using a variational method by R. Courant [2], significant advancements have been achieved so far thanks to several discoveries in mathematics, particularly in variational methods [4,6], numerical analysis [5] and the development of computers [3].Thereby, the simulation of more complex problems, which was yesterday a dream, is progressively coming true today.However, despite these major strides observed in FEM [4], new challenges have emerged, such as sustainability [7] and integrative design [8], which imply multi-physics simulations [9,10,18], primordial for the optimal and rational use of natural resources.The concepts of sustainability and integrative design impose the development of new models capable of bringing together all the physical phenomena and driving forces behind the behavior of materials or systems, leading to more realistic results.Of course, this comes with a wide range of bottlenecks, like the complexity of the model [14,16].Failing to lighten models without depriving them of all their consistency and accuracy, one can improve their implementation by easing their interpretability and execution on computing resources.

3At the early stage of the development of simulation tools in university research centers, MATLAB [11] has become one of the most widely used programming languages, not only for teaching purposes in STEM fields, but also for the deep-end research industry since MATLAB is a high-level vector-based programming language that enables to operate on vectors or matrices instead of basic elements.More concretely, this feature makes it possible to get rid of for-loops by transforming the intervening expressions so as to execute operations in fewer instructions.Thus, using this vector feature in the context of FEM implementation [17,19] is a tremendous asset for developing more advanced packages designed for engineers dealing with simulations or researchers/lecturers to introduce students to the programmatic aspects of FEM in a practical way.

4In this regard, one of the first attempts to vectorize FEM codes in MATLAB is due to work by Koko [12], in which the author presented a strategy on how to vectorize the computation global matrix/forces for the discretized weak form deriving from the strong equation in linear elasticity.However, this strategy is restricted to finite elements in 2D.Aside from that, Dabrowski et al. [13] introduced an optimized implementation of FEM in MATLAB called MILAMIN for large problems.Although vectorization strategy is not particularly explored in this work, the authors developed a new scheme to ease the construction of the triplet (column index, row index, matrix or vector components) and assembly of global matrix/force.Unlike what is commonly believed, authors demonstrated that in linear elasticity, the scheme outperforms many C++ or Fortran-based packages like OOFEM or FEAPpv.

5A few years later, Cecka et al. [20] came out with an efficient strategy for the implementation on GPUs with an optimal use of memory.The authors in [22] proposed a vectorized scheme limited to problems meshed with P 1 triangle elements (in 2D) and P 1 -tetrahedral elements (in 3D) in linear elasticity.Although this strategy is free from the for-loop over elements, its scheme is computationally expensive since many smaller for-loops are introduced in the functions.Based on this work, [23] extended it to elasticity problems meshed with linear quadrilateral elements.Later on, [15] introduced the first MATLAB-based vectorized algorithm for triangular and tetrahedral elements of any order in linear elasticity.Besides its performance over the standard assembly method, this approach requires less than a quarter of the memory (RAM) needed by the former.

6Marcinkowski et al. in [21] investigated the issue by taking advantage of multidimensional arrays to compute and store element matrices (stiffness and mass) at once and then use an iterative process to solve the global equation without assembling.However, when it comes to dealing with topologies with a high number of elements, the iterative feature of this approach turns out to be a big drawback and limiting factor.

7In the work [24], the author paid particular attention to good programming styles in MATLAB to vectorize matrix/vector computation for the Poisson equation in a domain discretized with P 1 triangle elements with one nodal degree freedom.Notwithstanding the fact that invoking sparse representation [25][26][27] with vectorization technique represents a fantastic asset, it is essential to have a good balance between the gained speed and memory needed for the computation since an optimal performance demands a good memory allocation extensively discussed in [28,29].

8In the recent version of MATLAB, starting from R2020b, new built-in functions such as pagetimes, mtimes, pagemldivide, and pagetranspose make it possible to efficiently multiply or transpose multidimensional matrices.

9After underlining all these points, in this paper we present a generalized MATLAB-based vectorized algorithm for the computation of global matrix/force for finite element of any type and any order in linear elasticity.In this scheme, the following new features are addressed:

10• With help of MATLAB built-in functions operating on multidimensional matrices, the for-loop over elements is removed ; • At each integration point, all element matrix/vector of the mesh are computed at once and then summed up to get the contribution of all integration points; • For any type of elements and nodal degree of freedom, the computation of column indices and row indices is obtained from degrees of freedom connectivity matrix using only basic operations and a single for-loop; • Generalization to elements of any types in 2D (triangle and quadrilateral) and 3D (tetrahedral, hexahedral, pentahedral, etc.) and for any approximation order (linear, quadratic, cubic, etc.); • Extension to Mindlin plate theory problem and functionally graded materials.The structure of this paper is as follows: First, a brief classical and discretized variational formulation for general boundary value problems in elastodynamics is provided in Sect.2, along with the standard algorithm for computing the global stiffness/mass matrix and force vector.After examining the shortcomings of the standard scheme, the methodology used to develop and implement in MATLAB the present algorithm is then succinctly described in the next section (Sect.3).In the final section (Sect.4), an L-shaped elastic structure is simulated using the proposed algorithm and the results validated after comparison with ABAQUS results of the same structure.Subsequently, a performance analysis is carried on a set of meshes for a 2D beam problem and a 3D plate problem to validate the computational cost and memory utilization of the proposed scheme over the standard algorithm and the vectorized algorithms by Anjam et al. [29] and Cuvelier et al. [15].

Problem formulation

11For the sake of clarity, three types of notations are purposely used in the remainder to differentiate MAT-LAB's commands and syntax from variables and expression defined in this study.Words in monospace typewriter font (pagetimes, zeros, transpose, none, etc.) refer to MATLAB's built-in functions or syntax.Bold camel-case words are name of defined functions (GaussQuadrature, ShapeFunctions,etc.), while italic characters and words are variables or operators (n, u,etc.).

12Let us consider a continuum body (see Fig. 1) that initially (at t = 0) occupies the domain Ω 0 ⊂ R d |d∈ (1,2,3) in the reference configuration and Ω t ⊂ R d |d∈ (1,2,3) in the current configuration and is subjected to body forces f v per unit mass and a stress vector t applied on the surface ∂Ω 1 .

13At any time in the Cartesian coordinates, any point X of the body is described according to the repeated indices rule by u = u i E i where i ∈< 1, 2, 3 > and E i are unit orthogonal vectors of the basis.Let also the boundary of the bounded set Ω (see Fig. 1) be defined by the union of three nonoverlapping partitions:

14Wherein ∂Ω 1 is the boundary part where traction vector t = σn is acting, Γ is the set of points where boundary conditions are enforced (u = u p ) and ∂Ω 2 the remaining subset of ∂Ω.For completeness, we precise that n is the outward normal unit vector to the surface ∂Ω 1 , σ is Cauchy stress tensor and u p are prescribed or known displacement values.Meanwhile, we precise that in the scope of the present work, Dirichlet boundary condition is sufficient to lay down the aim of this paper, and we emphasize that other types of boundary conditions (Newmann, Robin or mixed) can be enforced as well since the enforcement of boundary conditions is posterior to the assembly of global matrices/Vectors.Under all the above conditions, the equilibrium of the body is governed by the boundary value problem of the form (strong form):

15We assume for simplicity to be in small strain (ε) and in linear elasticity, such a way that the constitutive law reads as

16where C is a fourth-order tensor called elasticity tensor and ε is the small strain tensor given by the expression

Variational formulation and discretization of the problem:

17Before going any further, we define the space of kinematically admissible displacements as

18where H 1 (Ω) is the Sobolev space of functions whose first-order derivatives are bounded in the energy norm.Considering a virtual displacement δu, we multiply both sides of the first line of Eq.(2.2) and then integrate over the volume δu

19In the previous equation, we precise that the symbol (•) is the scalar product.Now focusing our attention on the first expression on the left-hand side of Eq.(2.6) and making use of the Stokes-Green-Ostrogradski formula, we rewrite it into

20where ∇ denotes the gradient operator.Owing to the symmetricity of the strain tensor ε = 1 2 ∇u + T ∇u and after transformation, the variational formulation of the boundary value reads as follows:

21h be the discretized domain in the discretized space and described with data in Table 1.In MATLAB language, we make use of the function struct to create a structure array that groups mesh parameters and their values into a single variable called F E model of type structure, each of whose fields can be retrieved using dot notation syntax (e.g., nel = FE model.nel)Let also V h be the space of kinematically admissible displacements associated with Ω h .The variational formulation of the problem is defined in the discretized space by

22where the shape function N e of the element e is given by

23and

24With the definition of u in Eq.(2.10), it is convenient for implementation purposes to use Voigt notation to reduce the order of tensors involved by one order.As such, σ and ε are respectively Cauchy stress vector and strain vector associated with σ and ε

25Under this notation, the strain vector of each element e can be written in terms of the nodal displacement vector as follows:

26where B e is the strain matrix of the element and has for components the following

27and

28where A is the assembly operator and is preferred over the union operator since it makes more sense in regards to the fact that the assembly is done at nodal level.Subsequently, Eq.(2.15) can be recast in matrix form as

29where the expressions M e , K e , f e and t e are the element mass matrix, stiffness matrix, body force vector and applied force vector, respectively.It should also be noted that in Eq.(2.14), integrals over elements are usually approximated numerically using the Gauss quadrature rule based on the transformation between parent space and the isoparametric space as illustrated in Fig. 2 for linear quadrilateral elements, for instance.

30Let U be the global nodal displacement vector of all the nodes (nn) of the mesh such that

31After rearranging and assembling contributions of all elements of the mesh, we end up with the resulting global algebraic system of equations of the boundary value problem as follows:

32where F ext is the global external force vector (sum of body force and traction force), while K g and M g are, respectively, the global stiffness matrix and mass matrix of the body.For further details about this type of variational formulation, the reader is referred to works in [30,31].In the conventional computerbased calculation [17,[32][33][34][35], K g , M g or F ext are obtained by sequentially computing element matrices or vectors for each element and storing their row indices IndexI, column indices IndexJ and values K values .Once all the elements have been calculated, global matrices or vectors are assembled using MATLAB's built-in function sparse as shown in the workflow in Fig. 3.The standard algorithm for computing the stiffness matrix according to the workflow shown in Fig.

is outlined in algorithm 1 and called StandardGlobalStiffness

33Taking a look at the structure of algorithm 1, two main limitations emerge:

34Algorithm 1 standard algorithm for computing Kg

35for e ← 1 to nel do 6:

36K e ← LocalM atrices(F E model, . . . ) element stiffness matrix 7:

37me ← F E model.connect(e,:) 8:

38for j ← 1 to n do 9:

39for α ← 1 to m do 10:

40for i ← 1 to n do 11:

41for β ← 1 to m do 12: • The non-vectorized for-loop over elements of the mesh: The elementwise-based computation of element stiffness matrices and their indices (IndexI and IndexJ) is computationally inefficient since it does not make optimal use of MATLAB's vector operation capabilities; • Apart from the outermost for-loop, four nested for-loops are needed to compute row and column indices.

42Several assembly procedures have been proposed like those in [15,17,29] to get rid of at least one of the above-mentioned limitations.Precisely, while authors in the former use matrix rearrangements to reduce memory usage and achieve a better performance, the authors in the latter take advantage of affine transformations to formulate their algorithm.

Formulation

43First and foremost, it is important to keep in mind that serial calculation of finite element terms can be classified into two categories: non-vectorized serial calculation and vectorized serial calculation.Due to integrals involved in the calculation of finite element terms, each method can be performed either implicitly, by means of numerical integration schemes like Gauss quadrature rule, or explicitly (exact integration) as shown in Fig. 4.However, the latter approach is tedious and irrelevant for finite elements with approximation order higher than 1 (p > 1).Now, we are going to introduce an implicit vectorized algorithm based on the branch highlighted in orange in Fig. 4. The workflow of this algorithm in linear elasticity is depicted in Fig. 5.

44In the following, we describe the whole procedure and the steps it comprises.(a) Firstly, we need to gather values of nodal shape functions and their derivatives in the isoparametric space so that they are computed only once.Hence in the subroutine GaussQuadrature, Gauss quadrature data (number of Gauss points, their respective coordinates and weights) are respectively calculated in the isoparametric space and stored in the expressions nP oint, weight and Gq,with

45where Gq is of size d×q.When it comes to 1D elements, Gq is reduced to only the first line, whereas only the first two lines are relevant for 2D elements.(b) With Gauss quadrature data at hand, we proceed with the computation of values of shape functions and their derivatives at each integration point, then store them as NI and dN dθ, respectively.In the subroutine ShapeFunction, basis functions of some basic 2D and 3D isoparametric elements are defined with help of symbolic operations in MATLAB, which enables to play around with derivatives as well as corresponding values at any given integration point without much effort.Outputs read as

46where q is the number of Gauss quadrature points, dim (NI) = d×q and θ i ∈ <1,2,..., q> are the coordinates of quadrature points in the isoparametric space

47Similarly, dN dθ is a multidimensional matrix that stores values of derivative of basis functions (with respect to the isoparametric space) at all quadrature points in such a way that values at each integration point i are stored in the slice i of the multidimensional matrix dN dθ and are calculated from the expression (for 3D problems) below dN dθ(:,

48So dim(dN dθ)= n×d×q, wherein n is the number of basis functions at each finite element and d the dimension of the problem.From the above form, one can deduce dN dθ in 1D and 2D.(c) The next step is to get rid of the for-loop over elements.To this end, we define the multidimensional strain matrix B that contains strain matrices of every single element stored in a specific slice or page with index i.Since dN dθ is the derivative of the nodal basis functions in the isoparametric space, we have to compute the Jacobian J of the transformation.

49For every integration point, the following steps are defined to compute B and the corresponding multidimensional element stiffness matrix K e :

50(i) From dN dθ, we extract the derivative of the shape function at the current Gauss point and call MATLAB built-in function pagetimes to calculate the Jacobian of the transformation J by the formula J = pagetimes(dN dθ(:, :, i), 'none', P ts, 'transpose')

51where J is of dimension d×d×nel.(ii) Afterward, the derivative of the basis function matrix dN dX in the element space is computed

52where dN dX is of dimension d×n×nel.(iii) Then after pre-allocating memory for storing B, its values are computed and filled in only one for-loop of length n such that at the node s ∈ < 1, 2, . . ., n > of all elements, the component The matrix B is fully constructed in a single for-loop by calling the function Bs written Algorithm 4. (iv) Now let detJ be the determinant of the Jacobian matrix J.In order to avoid elementwise computation of detJ, we introduce the following vectorized form defined in the function Det-Jacobian of Algorithm 2. (v) Update the multidimensional element stiffness matrix K e given in 3D K e = K e + pagemtimes(B, 'transpose', pagemtimes(C, B). * detJ * weight(i), 'transpose') (3.9)where the determinant of the Jacobian detJ is of size 1×1×nel and K e is of size (m * n)×(m * n)×nel.The row vector weight of size 1×q, is the vector of Gauss quadrature weights.In 2D, the second expression on the right-hand side of Eq.(3.9) will be multiplied by the thickness of the elements.d) Once we obtain stiffness matrix of all elements K e for all integration points, the next step is to construct row and column indices (IndexI and IndexJ).

53While the row and column indices in Algorithm 1 and others existing in the literature are computed concurrently with the element stiffness values, we propose a scheme in Algorithm 3, wherein IndexI and IndexJ are calculated from the degrees of freedom connectivity matrix Matrix dof , obtained in a single for-loop over m.For memory sake, Matrix dof , IndexI and IndexJ are defined as 32-bit integers.

54It should be noted that in algorithm 3, the operations Matrix dof (:) and Matrix dof (:) convert the matrix Matrix dof into a column vector and a row vector, respectively.

Remark 3.1. For any element e with domain Ω (e) h

55⊂ Ω h ⊂ R d , row and column indices (IndexI e and IndexJ e ) of its stiffness components can be straightforwardly obtained from its degrees of freedom connectivity matrix after a single for − loop over the number of degrees of freedom per node.e) As a final step, after constructing IndexI, IndexJ, and K e , the global stiffness matrix is assembled using MATLAB's built-in function sparse through the command below

56To wrap it all up, the summary of the proposed method is outlined in Algorithm 4 under the function PropGlobalStiffness.In order to reduce as much as possible memory usage, some variables are emptied at certain points throughout the execution (see lines 13, 15, 18, 26 and 27).For sake of simplicity, some lines in the above algorithm have intentionally been omitted particularly those related to the retrieval of mesh data (nel, n, d, m, etc.) from the structure array F E model using dot notation syntax (e.g., nel = FE model.nel).

For functionally graded materials.

57Recalling that in the case of functionally graded materials, there is a spatial variation of material properties due to spatial changes in the material's composition and/or microstructure.Basically, Young's modulus E and/or Poisson's ratio can be described as a function of the position of the observation point M ∈ Ω.So, is the elasticity tensor C (M ) such that the constitutive behavior reads as

58The numerical calculation of the element stiffness matrix within such materials is quite straightforward after computing the element elasticity tensor at the current Gauss quadrature point g.Knowing that the spatial position of each Gauss quadrature point can be computed from element nodal coordinates using shape functions as given in Eq. (3.12)

59= N e z e (3.12)

60Owing to the fact that the spatial expression of E and/or ν is a known parameter of the problem, E and/or ν at the current Gauss point g can be computed in 3D as per Eq.(3.13)

61For a basic illustration of the current vectorized algorithm, let us assume a case with ν constant, E (M ) varying with respect to x and considering a state of plane stress, the elasticity tensor is given in 3D by the expression

62or simply

63where C b is the material tensor for a unit Young's modulus.E (x) at the Gauss point g for all elements of the model is computed using a single command

64In the previous expression, the user defines the analytical expression of E (x) using MATLAB function handle.Ng is a column vector of the element nodal shape function at the current integration point.

65Following this same token, the material tensor of any functionally graded material can be calculated in a vectorized manner without much effort.Provided the analytical expression of E (x) and/or ν (x) is known in advance.

For plate problems with Mindlin formulation. Mindlin plate formulation proposes an improvement

66to Kirchhoff-Love plate theory to take into account shear deformations through the thickness of the thick plates.In this formulation, the section initially perpendicular to the middle surface before the deformation does not remain perpendicular to the middle plane after the deformation, such that the displacement field can be defined as follows:

67where θ x and θ y are the rotations with respect to x and y axes, respectively.Similar to Kirchhoff-Love's plate theory, the study of the problem is described from the middle surface as illustrated in Fig. 6.With this approximation, bending component f of the strain tensor reads as In the hypothesis of small strains and homogeneous material, the bending part of Cauchy stress σ reads as

68where C f is defined as

69Shear stress components are given by

70where C c is defined as

71where κ is the shear correction factor.Now, since the vector field U = (u, v, w) can be fully characterized for given d T = (θ x , θ y , w) thanks to Eq. (3.17), we assume in the discretized space, the following interpolation

72In virtue of this general approximation, the bending B f and shear B c strain matrices can be readily written out.

73After replacing Eqs.(3.25), (3.24), (3.22) and Eq.(3.20) into Eq.(2.9) and simplifying everything, we end up with Eq.(3.26

74where M reads as

75After assembling, we end up with the system of partial differential equations below

76It is important to bear in mind that in Eq.(3.28), the shear-related component of the stiffness matrix is calculated using reduced integration.This prevents shear-locking problems from occurring.The vectorization of Eq. (3.28) is conducted similarly, as outlined in the general formulation of the proposed algorithm in the previous section, in particular, B f and B c .Here, the functions getBplate, PropStiffnessPlate, PropGlobalForce were created to implement Mindlin plate theory.The detailed structure of these functions is provided in the Appendix.

Numerical experiments:

77This section is devoted to the verification and validation of the proposed vectorized algorithm for linear elastic boundary value problems.

78• For verification and performance analysis, the commercial software Simulia ABAQUS [38] is used to model and analyze a linear elastic L-shaped domain (see Sect. 4.1), a clamped plate based on Mindlin theory(see Sect.4.3), a functionally graded membrane in tension(see Sect.4.4) and a functionally graded 3D beam (see Sect. 4.5) and compare the results and performances with those obtained by the proposed method.• In order to numerically demonstrate the novelty of the proposed algorithm over two other existing MATLAB-based vectorized algorithms [15,29], a computational time and memory usage-based performance test is conducted in Sect.4.2.In each method, the global stiffness matrix of a 2D beam then a 3D plate problem is calculated on a set of meshes (from coarse to fine), and the associated execution time and memory usage are recorded and compared.

Example 1: Elastic L-shaped structure

79We consider the 5 -cm-thick linear elastic L-shaped structure with the geometry shown in Fig. 7 and whose material properties are Young's modulus E= 210 GPa, Poisson's ratio ν= 0.3 and density ρ = 7850 kg/m 3 , respectively.This structure is loaded with a concentric force of intensity 200KN oriented toward the negative y-axis as represented in Fig. 7.For simplicity, we restrict the problem to a planestress analysis.The computing resource used for this simulation is a gaming desktop equipped with an AMD Ryzen 3 1200 processor (running at a clock frequency of 3.1GHz), a total RAM of 24GB, and a Windows 10 Pro 64-bit operating system.On this machine are installed Simulia ABAQUS/CAE 2020 [38] and MATLAB 2024a, which we used to carry out performance comparisons.

80First, ABAQUS was used to create the geometry, define material properties and load, enforce boundary condition on the edge y=0, and generate the set of P 1 -triangle meshes (linear triangles) with data reported in Table 2. Subsequently, the meshes created in Simulia ABAQUS were imported into MATLAB as topology inputs.Afterward, the simulations using ABAQUS and the proposed algorithm in MATLAB were carried out, and the result of the vertical displacement U z based on the first mesh is displayed in Fig. 8.

81In both simulations, we note that the vertical displacement is the same.Having verified the accuracy of the proposed method, we move on with the comparison of the computational time in ABAQUS to that of the proposed algorithm based on the set of meshed listed in Table 2.

82The results show that by reducing the global matrix construction time by 10 times using the proposed method (see Fig. 9a), the total runtime needed for the FEM analysis is reduced by 5 times (see Fig. 9b).

Example 2: Comparison with the existing vectorized algorithms

83In this part, we have only reported information related to the objective of measuring and comparing the execution times for calculating the global stiffness matrix using the algorithms under consideration for a selection of 2D and 3D problems.For both examples, the simulations were conducted on a computer with specifications listed in Table 3 below

Case 1: 2D beam problem.

84In order to make an assessment of the performance of the proposed vectorized algorithm, we considered two other vectorized algorithms together with the algorithm 1 as comparison basis.For this purpose, a set of 6 P 1 triangle element meshes was considered as topology inputs.The corresponding data are reported in Table 4.We precise that here the number of degrees of freedom per node is m = 2; so ndof = m * nn for each mesh ID in Table 4.

85The codes for implementing the two other vectorized algorithms [15,29] considered in this study are obtained from authors' platforms [39,40].Hereafter, these algorithms are referred to respectively as Cuvelier et al and Anjam et al.Along with that we also used the external function fsparse provided with the package FAST in [41] and available on the first author's github repository [42].With this function, a sparse matrix can be constructed from the triplet IndexI, IndexJ, Kvalues more quickly than with MATLAB's built-in sparse.

86After running the programs using the standard algorithm, the proposed method (first with sparse then fsparse), Cuvelier et al and Anjam et al algorithms on the aforementioned set of 2D meshes, the recorded computational times are depicted in Fig. 10.

87It is worth noting that the assembly with sparse, named proposed, is represented by the cyan dashed line with a star marker.

88It can be seen in Fig. 10b that the slope of the line joining the cloud of points for each algorithm is nearly the same.However, it is much more convenient to compare them on the basis of the speedup ratio (see Fig. 11) with respect to the standard algorithm.

89In view of the boxplot in Fig. 11b, we find out that the dispersion with the proposed algorithm using the assembly functions sparse and fsparse is nearly the same.While the proposed scheme with sparse is about 9x faster than the standard algorithm, Cuvelier et al's approach is circa 6x faster and Anjan et al's method is about 4x faster.On the other hand, when the present algorithm is executed with fsparse instead, the program performance turns out to be 15x faster.Besides that, the analysis of memory usage in MATLAB profiler reveals that Cuvelier et al's approach is the least RAM-intensive compared to the present method, standard method and Anjam et al's approach as illustrated in Fig. 12.

Case 2: 3D beam problem.

90Similarly, as we proceeded in section 4.2.1, we consider a simply supported plate discretized with a set of 6 P 1 tetrahedral element meshes whose information are reported in Table 5 We precise that here the number of degrees of freedom per node is m = 3; so ndof = m * nn for each mesh ID in Table 5.After execution with each algorithm as proceeded for the 2D case, we obtained the runtime depicted in Fig. 13.

91We note in Fig. 14a that the performance of the proposed algorithm used with sparse decreases from mesh 1 to 3 but stabilizes with a speedup of circa 3.8 for larger meshes.Although this behavior is observed, the speedup is at least 1.5x higher than that of Cuvelier et al and 2x higher than that of Anjam et al, whereas the use of fsparse enables to maintain an approximately constant speedup of 8 regardless of mesh size.A more comprehensive visualization of the speedup with respect to the standard algorithm is illustrated with the boxplot in Fig. 14b.

92On the memory front, it can be seen in Fig. 15 that the proposed method uses almost as much memory as the standard method.

Example 3: clamped thick plate

93Let us assume the isotropic and homogeneous thick plate depicted Fig. 16 and with mechanical properties E = 10920 MPa and ν = 0.3.This plate is subjected to a uniformly distributed transverse pressure of intensity 1MN applied on its top surface.The plate is clamped at its four edges.This example was drawn out from the reference work by Ferreira in [43].

94In order to carry out a comprehensive comparison between the performance of the proposed algorithm and that of ABAQUS based on Mindlin plate theory, a group of six meshes of type 4-node elements(QUA4 6.

95Firstly, mesh 1 was selected for verification of the vectorized algorithm in Appendix 1 based on the results obtained in ABAQUS.Then, simulations were conducted on the same computer specified in Sect.4.1.Figure 17 1%.Furthermore, the displacement U z = −1.503mm at the center of the plate is consistent with the one obtained by Ferreira in [43] for the same value of k.

96Under the same boundary conditions, we have conducted a modal analysis of the plate (with mesh 2) based on the vectorized form of the Mindlin plate formulation outlined in Eq. (3.26).Table 7 provides a comparison of the six smallest natural frequencies obtained using ABAQUS and our MATLAB algorithm, respectively.

97As of the result of the comparison of data in Table 7, it is obvious that the error is still less than 1%.In order to perform modal analysis, the parameter AnalysisType is set to ''modal'' using the command line FE model.AnalysisType=''modal'' under the "Material parameters, analysis parameters and applied load" in the main file MainProgram.Focusing our attention on the six smallest modes, we obtained the mode shapes depicted in Fig. 18 and generated using ModeShape.mfile created for this specific task.As in the previous example, we have analyzed the performance of the static problem with the meshes shown in Table 6. Figure 19 depicts the comparison of the computational cost.In view of Fig. 19, it also turns out that in this example, matrix/force construction time is reduced by at least 10 times using the proposed method.Thus, the whole FEM process is accelerated by about 5 times compared to ABAQUS.

Example 4: functionally graded membrane

98In this example, we assess the performance of the proposed method for solving a functionally graded membrane problem.For simplicity, we consider the example investigated by Martínez-Pañeda [44], with dimension sketched in Fig. 20.The material's Poisson ratio is set as a constant value ν = 0.30.Meanwhile, Young's modulus E changes in the x-direction as per the function defined in Eq. (4.3).

99where β = ln (8) and E 0 = 1.Also, this membrane is 1 m thick and loaded with a uniform tensile stress of σ 0 = 2 MPa applied on the top surface of the membrane.The analytical solution for this problem is given by where A and B read as

100A set of 6 P − 1 quadrangle meshes were created in ABAQUS as topological inputs for this analysis.Table 8 presents the size of these meshes.

101In order to verify the accuracy of our algorithm, mesh 1 was selected and used for static analysis under the definition provided above.In ABAQUS, we utilized the so-called nodal/temperature-based definition of the young modulus following the x-axis.Using such an approach implies that the value of E at each Gauss integration point is calculated by numerical interpolation from the values of E at the element's nodes.Whereas in the exact method, E g at each Gauss point is directly computed from the analytical expression of E using the spatial position obtained in Eq. (3.12).The result of the performance analysis conducted on the set of meshes above is depicted in Fig. 23.We observe that this example demonstrates a similar performance to the previous ones.The proposed algorithm continues to be at least ten times quicker, and its application for finite element problem analysis results in a fivefold decrease in CPU time compared with ABAQUS performance.This functionally graded beam is non-symmetrically loaded with a complex pressure f s = (0, f y , f z ) with components f y = −1.32xand f z = 1.2xz 2 depicted in Fig. 25.

102Simulations were conducted on the same computer specified in Sect.4.1.After the analysis, we obtained the deformation depicted in Fig. 26.

103We have also performed the modal analysis of the beam and obtained mode shapes associated with the six smallest natural frequencies of the beam as shown in Fig. 27.Finally, we focused our attention on the CPU time (see Fig. 28) for performing the static and modal analysis It should be noted that in the proposed function in the appendix, only the stiffness matrix is computed in the case of static analysis.In modal analysis, both the stiffness matrix and mass matrix are calculated.We can see here that combining both enables us to reduce the computational cost, though it might not be a good idea when the available memory is a limiting factor.

Conclusion

104We have proposed in this work, an efficient MATLAB-based vectorized algorithm for computing global matrix/force deriving from the discretized weak form of boundary value problems in linear elasticity.This scheme introduces a set of new features, which are detailed in section 3.By leveraging the power of vectorization and other optimizations, the algorithm can efficiently handle large-scale problems and deliver accurate results as verified in the numerical experiments in sections 4.1, 4.3, 4.4 and 4.5.Additionally, the performance analysis has revealed that the proposed method is at least ten times faster than the standard approach, and its utilization leads to a decrease of the runtime by at least five times compared to ABAQUS.This is because the approach presented builds on existing vectorized methods in the literature and improves on them in several important ways, including the use of advanced programming techniques, the integration of the latest MATLAB built-in functions to improve computational performance, generalization to meshes with elements of any order and type, and full vectorization of the construction of row indices, column indices and matrix/vector components.Moreover, an extension of the vectorized algorithm to special problems, such as Mindlin plate theory and functionally graded materials, was derived.Alongside its improved performance, it has been shown that this algorithm requires almost the same amount of memory as the standard algorithm, as shown by the performance analysis carried out in sections 4.2.1 and 4.2.2.Even though the proposed scheme requires more memory than that of Cuvelier et al. [15], a reference in the literature, it is at least 1.5x (with sparse) and 2.5x (with fsparse) faster than the latter, making it a game-changer in a massive simulation.

105Overall, this work represents a significant contribution to the field of linear computational mechanics and has important implications for the design of structures and materials in various engineering and scientific applications.

106Using the findings of this work, the following aspects will be investigated in forthcoming research:

107• Enhancement of memory usage; • Extension to nonlinear elasticity, J2 plasticity and contact problems; • Implementation on graphics processing units (GPU).

108• Development of an all-in-one fully vectorized MATLAB package intended for practical teaching of FEM to undergraduate and graduate students.

Fig. 1 .

109Fig. 1.Schematic drawing of the continuum body

Fig. 2 .

110Fig. 2. Isoparametric mapping for a quadrilateral element

Fig. 3 .

111Fig. 3. Standard workflow for computing the stiffness matrix

Fig. 4 .

112Fig. 4. Types of serial computation in FEM

Fig. 5 .

113Fig. 5. Workflow of the proposed algorithm

Algorithm 2 2 :Algorithm 3

114Determinant of the Jacobian J Require: J, nel, d 1: function [detJ] = DetJacobian(J, nel, d) Mat ← reshape(J, [ ], nel) 3: if d == 2 then in 2D 4: detJ ← Mat(1, :).* Mat(4, :) − Mat(2, :).* Mat(3, :) 5: else if d == 3 then in 3D 6: detJ ← Mat(1, :).* (Mat(5, :).* Mat(9, :) − Mat(6, :).* Mat(8, :)) − Mat(4, :).* (Mat(2, :).* Mat(9, :) − Mat(3, : ).* Mat(8, :)) + Mat(7, :).* (Mat(2, :).* Mat(6, :) − Mat(3, :).* Mat(5, Computation of Matrix dof Require: F E model, model data structure 1: M atrix dof ← int32(zeros(nel, n * m) ) Initilization of M atrix dof 2: k ← (1 : n) 3: for a ← 1 to m do 4: M atrix dof (m * (k − 1) + a, :) ← (m * (F E model.connect(:,k) − 1) + a) 5: end for 6: IndexJ ← int32(repmat(Matrix dof (:) , m * n, 1)) 7: IndexI ← int32(repmat(Matrix dof, m * n, 1))

Fig. 6 .

115Fig. 6.Illustration of Mindlin plate formulation

Fig. 7 .

116Fig. 7. Schematic drawing of the L-shaped stucture

Page 17 of 37 150 Fig. 8 .Fig. 9 .

117Fig. 8. Visualization of the displacement along y-axis: a in ABAQUS/CAE; b with proposed algorithm in MATLAB

Fig. 10 .Fig. 11 .

118Fig. 10.Visualizaton of Kg computational time for a set of 2D meshes with P 1 triangle elements: a runtime versus the number of degrees of freedom; b runtime versus ndof in log-log scale

Fig. 12 .

119Fig. 12. Memory usage for computing Kg per algorithm with respect to mesh ID for the selected 2D problem

Fig. 13 .Fig. 14 .

120Fig. 13.Visualizaton of computational time for a set of 3D meshes with P 1 tetrahedral elements: a runtime versus the number of degrees of freedom; b runtime versus ndof in log-log scale

Fig. 15 .Fig. 16 .

121Fig. 15.Memory usage for computing Kg per algorithm with respect to mesh ID for the selected 3D plate problem

Fig. 17 .

122Fig. 17.Static result of the deformation of the plate: in ABAQUS/CAE (on the left-hand side) and in MATLAB with proposed algorithm (on the right-hand side)

Fig. 19 .Fig. 20 .

123Fig. 19.Runtime performance analysis of the thick square plate: a CPU time for assembling Kg as per the Standard and proposed algorithm; b Total CPU time of the analysis (global matrix/force construction + solving the system of the equations)

Fig. 21 .

124Fig. 21.Exponential variation of Young's modulus E along x-axis: a Plotting of E versus x; b Distribution of the E within the functionally graded membrane

Fig. 22 .

125Fig. 22. Visualization of FG membrane deformation for a scaling factor of 0.0428 according to the analytical equation (left column), the proposed algorithm (middle column) and ABAQUS (right column)

Fig. 23 .Fig. 24 .

126Fig. 23.Runtime performance analysis of the thick square plate: a CPU time for assembling Kg as per the Standard and proposed algorithm; b Total CPU time of the analysis (global matrix/force construction + solving the system of the equations)

Fig. 25 .Fig. 26 .

127Fig. 25.Components of the applied pressure fs: a representation of the function fy (x, y); b representation of the function fz (x, y)

Fig. 27 .

128Fig. 27.Visualization of the six smallest mode shapes of the square plate

Fig. 28 .

129Fig. 28.Performance analysis for static and modal analysis; a CPU time taken to compute the matrix; b CPU time taken to compute the matrix and solve the system of equations

Table 1 .

130Mesh data structure

4

131Proposed algorithm for computing the stiffness matrix K g

132Input: F E modelFE model is a structure array 1:function [Kg] = PropGlobalStiffness(F E model) 2: [Gq, weight, q] ← GaussQuadrature(F E model) Get Gauss quadrature data 3: [NI, dN dθ] ← ShapeFunction(F E model) Get shapefunctions and their derivatives 4: Ke ← zeros(m * n, m * n, nel) Initilization of Ke 5: CoordI ← @(x)[F E model.Coord((F E model.connect(x,:)),:)]6: P ts ← reshape(CoordI(1 : nel), ndof, nn, [ ]) Coordinates of elements' nodes 7:for i ← 1 to q do loop over integration points 8:J ← pagetimes(dN dθ(:, :, i), 'none', P ts, 'transpose') 9:dN dX ← pagemldivide(J, dN dθ(:, :, i)) 10: for s ← 1 to n do 11: Compute B(:, d * (s − 1) + 1 : d * s, :) * (k − 1) + β, :) ← (m * (connect(:, k) − 1) + β)

133.18a)

Table 2 .

134Set of linear triangle element meshes

135*nel and nn are the number of elements and nodes, respectively

Table 3 .

136Computer specifications

Table 4 .

137Set of linear triangle element meshes

138*nel and nn are the number of elements and nodes, respectively

Table 5 .

139Set of linear tetrahedral element meshes

Table 6 .

140Set of 4-node quadrilateral element meshes

Table 7 .

141Comparison of obtained frequencies

142Fig. 18.Visualization of the six smallest mode shapes of the square plate

Table 8 .

143Set of 4-node quadrilateral element meshes

참고문헌 35건

  1. MATLAB and C Programming for Trefftz Finite Element Methods 2008 10.1201/9781420072761
  2. Fast Matlab compatible sparse assembly on multicore computers Parallel Computing · Elsevier BV · 2016 10.1016/j.parco.2016.04.001
  3. MILAMIN: MATLAB‐based finite element method solver for large problems Geochemistry Geophysics Geosystems · Wiley · 2008 10.1029/2007gc001719
  4. The Finite Element Method: its Basis and Fundamentals Elsevier eBooks · Elsevier BV · 2013 10.1016/c2009-0-24909-9
  5. (제목 없음) Computing · Springer Science+Business Media · 2002 10.1007/s00607-002-1459-8
  6. The Babuška-Brezzi condition and the patch test: an example Computer Methods in Applied Mechanics and Engineering · Elsevier BV · 1997 10.1016/s0045-7825(96)01058-4
  7. Variational methods for the solution of problems of equilibrium and vibrations Bulletin of the American Mathematical Society · American Mathematical Society · 1943 10.1090/s0002-9904-1943-07818-4
  8. Computational complexity and memory usage for multi-frontal direct solvers used in p finite element analysis Procedia Computer Science · Elsevier BV · 2011 10.1016/j.procs.2011.04.201
  9. Introduction to assembly of finite element methods on graphics processors IOP Conference Series Materials Science and Engineering · IOP Publishing · 2010 10.1088/1757-899x/10/1/012009
  10. Vectorized Matlab Codes for Linear Two-Dimensional Elasticity Scientific Programming · Hindawi Publishing Corporation · 2007 10.1155/2007/838942
  11. Sparse Matrix Computations Elsevier eBooks · Elsevier BV · 1976 10.1016/c2013-0-10439-4
  12. Assembling sparse matrices in MATLAB International Journal for Numerical Methods in Biomedical Engineering · Wiley · 2008 10.1002/cnm.1174
  13. An historical note on the finite element method International Journal for Numerical Methods in Engineering · Wiley · 1980 10.1002/nme.1620150611
  14. The second generation FETI methods and their application to the parallel solution of large-scale linear and geometrically non-linear structural analysis problems Computer Methods in Applied Mechanics and Engineering · Elsevier BV · 2000 10.1016/s0045-7825(99)00234-0
  15. Key computational modeling issues in Integrated Computational Materials Engineering Computer-Aided Design · Elsevier BV · 2012 10.1016/j.cad.2012.06.006
  16. Fast MATLAB assembly of FEM matrices in 2D and 3D: Nodal elements Applied Mathematics and Computation · Elsevier BV · 2011 10.1016/j.amc.2011.08.043
  17. Multiphysics Modeling of a Permanent Magnet Synchronous Machine by Using Lumped Models IEEE Transactions on Industrial Electronics · Institute of Electrical and Electronics Engineers · 2011 10.1109/tie.2011.2169640
  18. Multiphysics simulations The International Journal of High Performance Computing Applications · SAGE Publishing · 2013 10.1177/1094342012468181
  19. Fast MATLAB assembly of FEM matrices in 2D and 3D: Edge elements Applied Mathematics and Computation · Elsevier BV · 2015 10.1016/j.amc.2015.03.105
  20. Programming of Finite Element Methods in MATLAB arXiv (Cornell University) · Cornell University · 2018 10.48550/arxiv.1804.05156
  21. On the Finite Element Implementation of Functionally Graded Materials Materials · Multidisciplinary Digital Publishing Institute · 2019 10.3390/ma12020287
  22. A study of vectorization for matrix-free finite element methods The International Journal of High Performance Computing Applications · SAGE Publishing · 2020 10.1177/1094342020945005
  23. An efficient way to assemble finite element matrices in vector languages BIT Numerical Mathematics · Springer Science+Business Media · 2015 10.1007/s10543-015-0587-4
  24. MATLAB Implementation of Element-Based Solvers Lecture notes in computer science · Springer Science+Business Media · 2020 10.1007/978-3-030-41032-2_69
  25. A study of vectorization for matrix-free finite element methods The International Journal of High Performance Computing Applications · SAGE Publishing · 2020 10.1177/1094342020945005
  26. Advancing mechanical recycling of multilayer plastics through finite element modelling and environmental policy Resources Conservation and Recycling · Elsevier BV · 2020 10.1016/j.resconrec.2020.105371
  27. Solution of Problems of Elasticity by the Framework Method Journal of Applied Mechanics · ASM International · 1941 10.1115/1.4009129
  28. Eighty Years of the Finite Element Method: Birth, Evolution, and Future Archives of Computational Methods in Engineering · Springer Science+Business Media · 2022 10.1007/s11831-022-09740-9
  29. General problems in solid mechanics and non-linearity Elsevier eBooks · Elsevier BV · 2005 10.1016/b978-075066431-8/50188-0
  30. Multiphysics Simulation Simulation foundations, methods and applications · 2014 10.1007/978-1-4471-5640-6
  31. Mechanics of Structures 2002 10.1201/9781420041835
  32. Computational Framework for the Finite Element Method in MATLAB® and Python 2022 10.1201/9781003265979
  33. Parallel Processing, 1980 to 2020 Synthesis lectures on computer architecture · Morgan & Claypool Publishers · 2021 10.1007/978-3-031-01768-1
  34. MATLAB Codes for Finite Element Analysis Solid mechanics and its applications · Springer Nature (Netherlands) · 2008 10.1007/978-1-4020-9200-8
  35. Reduction in the Computational Complexity of Calculating Losses on Eddy Currents in a Hydrogen Fuel Cell Using the Finite Element Analysis Inventions · Multidisciplinary Digital Publishing Institute · 2023 10.3390/inventions8010038