유한요소법

위키백과 ― 우리 모두의 백과사전.

2D FEM solution for a magnetostatic configuration (lines denote the direction of calculated flux density and colour - its magnitude)
2D FEM solution for a magnetostatic configuration (lines denote the direction of calculated flux density and colour - its magnitude)
2D mesh for the image above (mesh is denser around the object of interest)
2D mesh for the image above (mesh is denser around the object of interest)

수학적으로, 유한요소법(Finite element method) FEM은 편미분방정식(PDE)이나 적분, 열전달방정식등의 근사해를 구하기 위해 사용되어져 왔다. 해석접근은 정적인 문제에서 미분방정식을 제거하거나, 편미분방정식을 상미분방정식으로 변환하는 것으로 접근을 한다. 접근법은 유한미분에서 사용되는 기법과 동일하다.

편미분방정식을 풀기위한 선행작업으로는 대상식을 예측할 수 있는 식을 만드는 것이다. 그러나 수치적안정(벡터합과 같이 서로 평형을 이루는 경우)의 경우에서 입력값에서 발생한 에러는 지속적으로 축적되어 결과값을 의미없게 만드는 경우가 발생한다. 장단점이 많이 있지만 문제를 해결하기 위한 방법은 다양하다. 유한요소법은 자동차나 송유관과같은 복잡한 분야에서 상당히 유용하다. 문제의 성격이 변화하거나 요구 정밀도가 바뀔때라도 쉽게 대처할 수가 있다. 예를 들어 날씨예측시뮬레이션의 경우 면적이 넓은 바다보다 육지에서의 날씨예측이 중요하며 이러한 경우 유한요소해석이 유용하게 사용될 수 있다.

목차

[편집] 역사

유한요소법은 복잡한 탄성, 구조해석등의 문제를 해결하기 위해 시작되었다. 초기개발은 Alexander Hrennikoff (1941)와 Richard Courant (1942)가 시작하였는데, 그들이 접근한 방식은 연속적인 범위를 가지는 문제를 메쉬라는 세분화된 범위로 나누었다. Hrennikoff는 범위를 격자로 세분화 하였으며 Courant는 타원적분을 위한 편미분방정식을 유한한 삼각형영역으로 나누어서 문제해결을 하였다. Courant는 실린더에서의 뒤틀림문제를 해결하기위해 위와 같은 방법을 사용하였다. 유한요소법의 발전은 1950년대 중후반에 시작되었고, 항공기와 구조해석에서 주로 사용되었다. 1960년대에는 도시공학에 사용되었으며 1973년에 출판된 An Analysis of The Finite Element Method에서 물리적시스템을 수치적으로 모델링하는 응용수학의 한분야로 자리잡게 되었다.

[편집] 기술적논의

여기서는 유한요소법을 2개의 샘플문제를 가지고 나타내도록 하겠다. 이글을 읽는 사람이 미적분학, 선형대수에 익숙하다는 것을 가정하고 기술적 논의를 진행할 것이다.

1차식을 살펴보면

\mbox{P1 }:\begin{cases}
u''=f \mbox{ in } (0,1), \\
u(0)=u(1)=0,
\end{cases}

f는 주어진 값이고 ux의 미지함수이다. u''x에 대한 u의 2차 미분식이다.

2차식은 Dirichlet problem이라고도 한다.

\mbox{P2 }:\begin{cases}
u_{xx}+u_{yy}=f & \mbox{ in } \Omega, \\
u=0 & \mbox{ on } \partial \Omega,
\end{cases}

Ω(x,y) 평면에 연결되어 있고 경계부\partial \Omega괜찮게표현되어 있다. uxxuyy는 각각 xy에 대한 2차 미분을 나타낸다.

P1문제는 부정적분을 계산하여 직접결과를 얻을 수 있으나 경계조건문제를 풀기위해 부정적분이 통용되는 경우는 고차원문제로 바뀌지 않는 경우에만 해당된다. 이러한 이유로 인해 P1에서의 유한요소법을 정의하고 그것을 통해 P2의 유한요소법을 정의하겠다.

2개의 단계를 거쳐 설명을 하게 될 것인데, 경계조건문제(Boundary Value Problem:BVP)를 FEM을 사용하여 해결하도록 하겠다. 첫번째 단계에서는 기존 BVP를 변분법형태로 바꾼다. 이 단계에서는 계산이 거의 필요없으며 변환형은 수작업도 가능하다. 두번쨰 단계는 미분화이다. 두번째 단계까지 거치고 나면 유한한 범위를 지니는 선형문제를 도출할 수 있고 컴퓨터 계산을 통해 대략적인 값을 알 수 있을 것이다.

[편집] 변분법 공식화

첫번째 단계는 P1과 P2를 변분법평형상태로 변환하는 것이다. 만약 u가 P1에 대한 해이고, 어떤 smooth function v가 변위경계조건을 만족시킨다면 v = 0 at x = 0 이고 x = 1이므로 아래의 식을 얻을 수 있다.

(1) \int_0^1 f(x)v(x) \, dx = \int_0^1 u''(x)v(x) \, dx.

반대로 주어진 u가, (1) 모든 smooth function v(x)를 만족하면 u가 P1의 해가 될 것이다.(Sobolev space를 사용하면 증명은 자명하다.)

부분 적분을 사용하여 (1)의 우항을 정리하면 아래의 식을 얻을 수 있다.

(2)\begin{matrix}\int_0^1 f(x)v(x) \, dx & = & \int_0^1 u''(x)v(x) \, dx \\
 & = & u'(x)v(x)|_0^1-\int_0^1 u'(x)v'(x) \, dx \\
 & = & -\int_0^1 u'(x)v'(x) \, dx = -\phi (u,v).\end{matrix}

위 식은 v(0) = v(1) = 0이라는 것을 전제로 가정한 것이다.

[편집] 해의 존재성과 유일성의 증명

우리는 H_0^1(0,1)(0,1)x = 0x = 1에서 0 인 절대연속함수라고 정의할 수 있다. 그와 같은 함수는 1회만 미분가능하며 대칭구조인 양선형함수로 볼 수 있다.(\!\,\phi) 내적을 실시하면 H_0^1(0,1)는 Hilbert space로 변경할 수 있다. (자명하다.) 반대로 좌항 \int_0^1 f(x)v(x)역시 내적이며 이경우Lp space L2(0,1)에 존재한다. Riesz representation theorem을 Hilbert 공간에 적용시키면 P1에 대한 유일해u를 얻을 수 있다.

[편집] P2의 변분법

만약 Green's theorem을 사용하여 부분적분을 실시하면, 어떠한 v에 대해서라도 P2는 u라는 해를 가짐을 알 수 있을 것이다.

\int_{\Omega} fv\,ds = -\int_{\Omega} \nabla u \cdot \nabla v \, ds = -\phi(u,v),

\nabla는 gradient를 의미하고 \cdot 는 2차원공간에서의 외적을 의미한다. \,\!\phi는 적당한 공간 H_0^1(\Omega)에서 내적할 수 있고 Ω의 1차미분함수값은 0이된다.\partial \Omega.

여기서 v \in H_0^1(\Omega)라고 가정하였다. H_0^1(\Omega)공간은 절대연속함수로 더이상 정의 될수 없게된다.(Sobolev space를 참조.) 그러므로 존재성과 유일성이 증명되었다.

[편집] Discretization

A function in H10, with zero values at the endpoints (blue), and a piecewise linear approximation (red).
A function in H10, with zero values at the endpoints (blue), and a piecewise linear approximation (red).
A piecewise linear function in two dimensions.
A piecewise linear function in two dimensions.
Basis functions vk (blue) and a linear combination of them, which is piecewise linear (red).
Basis functions vk (blue) and a linear combination of them, which is piecewise linear (red).

The basic idea is to replace the infinite dimensional linear problem:

Find u \in  H_0^1 such that
\forall v \in H_0^1, \; -\phi(u,v)=\int fv

with a finite dimensional version:

(3) Find u \in V such that
\forall v \in V, \; -\phi(u,v)=\int fv

where V is a finite dimensional subspace of H_0^1. There are many possible choices for V (one possibility leads to the spectral method). However, for the finite element method we take V to be a space of piecewise linear functions.

For problem P1, we take the interval (0,1), choose n x values 0 = x0 < x1 < ... < xn < xn + 1 = 1 and we define V by

\begin{matrix} V=\{u:[0,1] \rightarrow \Bbb R\;: \mbox{u is continuous, }u|_{[x_k,x_{k+1}]} \mbox{ is linear, }\\
k=0,...,n \mbox{ and } u(0)=u(1)=0 \} \end{matrix}

where we define x0 = 0 and xn + 1 = 1. Observe that functions in V are not differentiable according to the elementary definition of calculus. Indeed, if v \in V then the derivative is typically not defined at any x = xk, k = 1,...,n. However, the derivative exists at every other value of x and one can use this derivative for the purpose of integration by parts.

For problem P2, we need V to be a set of functions of Ω. In the figure on the right, we have illustrated a triangulation of a 15 sided polygonal region Ω in the plane (below), and a piecewise linear function (above, in color) of this polygon which is linear on each triangle of the triangulation; the space V would consist of functions that are linear on each triangle of the chosen triangulation.

One often reads Vh instead of V in the literature. The reason is that one hopes that as the underlying triangular grid becomes finer and finer, the solution of the discrete problem (3) will in some sense converge to the solution of the original boundary value problem P2. The triangulation is then indexed by a real valued parameter h > 0 which one takes to be very small. This parameter will be related to the size of the largest or average triangle in the triangulation. As we refine the triangulation, the space of piecewise linear functions V must also change with h, hence the notation Vh. Since we do not perform such an analysis, we will not use this notation.

[편집] Choosing a basis

To complete the discretization, we must select a basis of V. In the one-dimensional case, for each control point xk we will choose the piecewise linear function vk in V whose value is 1 at xk and zero at every x_j,\;j \neq k, i.e.,

v_{k}(x)=\begin{cases} {x-x_{k-1} \over x_k-x_{k-1}} & \mbox{ if } x \in [x_{k-1},x_k], \\
{x_{k+1}-x \over x_{k+1}-x_k} & \mbox{ if } x \in [x_k,x_{k+1}], \\
0 & \mbox{ otherwise},\end{cases}

for k = 1,...,n. For the two-dimensional case, we choose again one basis function vk per vertex xk of the triangulation of the planar region Ω. The function vk is the unique function of V whose value is 1 at xk and zero at every x_j,\;j \neq k.

Depending on the author, the word "element" in "finite element method" refers either to the triangles in the domain, the piecewise linear basis function, or both. So for instance, an author interested in curved domains might replace the triangles with curved primitives, in which case he might describe his elements as being curvilinear. On the other hand, some authors replace "piecewise linear" by "piecewise quadratic" or even "piecewise polynomial". The author might then say "higher order element" instead of "higher degree polynomial." Finite element method is not restricted to triangles (or tetrahedra in 3-d, or higher order simplexes in multidimensional spaces), but can be defined on quadrilateral subdomains (hexahedra, prisms, or pyramids in 3-d, and so on). Higher order shapes (curvilinear elements) can be defined with polynomial and even non-polynomial shapes (e.g. ellipse or circle).

Methods that use higher degree piecewise polynomial basis functions are often called spectral element methods, especially if the degree of the polynomials increases as the triangulation size h goes to zero.

More advanced implementations (adaptive finite element methods) utilize a method to assess the quality of the results (based on error estimation theory) and modify the mesh during the solution aiming to achieve approximate solution within some bounds from the 'exact' solution of the continuum problem. Mesh adaptivity may utilize various techniques, the most popular are:

  • moving nodes (r-adaptivity)
  • refining (and unrefining) elements (h-adaptivity)
  • changing order of base functions (p-adaptivity)
  • combinations of the above (e.g. hp-adaptivity)

[편집] Small support of the basis

Solving the two-dimensional problem uxx + uyy =  − 4 in the disk centered at the origin and radius 1, with zero boundary conditions. (a) The triangulation.
Solving the two-dimensional problem uxx + uyy = − 4 in the disk centered at the origin and radius 1, with zero boundary conditions.
(a) The triangulation.
(b) The sparse matrix L of the discretized linear system.
(b) The sparse matrix L of the discretized linear system.
(c) The computed solution, u(x,y) = 1 − x2 − y2.
(c) The computed solution, u(x,y) = 1 − x2y2.

The primary advantage of this choice of basis is that the inner products

\langle v_j,v_k \rangle=\int_0^1 v_j v_k\,dx

and

\phi(v_j,v_k)=\int_0^1 v_j' v_k'\,dx

will be zero for almost all j,k. In the one dimensional case, the support of vk is the interval [xk − 1,xk + 1]. Hence, the integrands of \langle v_j,v_k \rangle and φ(vj,vk) are identically zero whenever | jk | > 1.

Similarly, in the planar case, if xj and xk do not share an edge of the triangulation, then the integrals

\int_{\Omega} v_j v_k\,ds

and

\int_{\Omega} \nabla v_j \cdot \nabla v_k\,ds

are both zero.

[편집] Matrix form of the problem

If we write u(x)=\sum_{k=1}^n u_k v_k(x) and f(x)=\sum_{k=1}^n f_k v_k(x) then problem (3) becomes

(4) -\sum_{k=1}^n u_k \phi (v_k,v_j) = \sum_{k=1}^n f_k \int v_k v_j for j = 1,...,n.

If we denote by \mathbf{u} and \mathbf{f} the column vectors (u1,...,un)t and (f1,...,fn)t, and if let L = (Lij) and M = (Mij) be matrices whose entries are Lij = φ(vi,vj) and M_{ij}=\int v_i v_j then we may rephrase (4) as

(5) -L \mathbf{u} = M \mathbf{f}.

As we have discussed before, most of the entries of L and M are zero because the basis functions vk have small support. So we now have to solve a linear system in the unknown \mathbf{u} where most of the entries of the matrix L, which we need to invert, are zero.

Such matrices are known as sparse matrices, and there are efficient solvers for such problems (much more efficient than actually inverting the matrix.) In addition, L is symmetric and positive definite, so a technique such as the conjugate gradient method is favored. For problems that are not too large, sparse LU decompositions and Cholesky decompositions still work well. For instance, Matlab's backslash operator (which is based on sparse LU) can be sufficient for meshes with a hundred thousand vertices.

The matrix L is usually referred to as the stiffness matrix, while the matrix M is dubbed the mass matrix.

[편집] General form of the finite element method

In general, the finite element method is characterized by the following process.

  • One chooses a grid for Ω. In the preceding treatment, the grid consisted of triangles, but one can also use squares or curvilinear polygons.
  • Then, one chooses basis functions. In our discussion, we used piecewise linear basis functions, but it is also common to use piecewise polynomial basis functions.

A separate consideration is the smoothness of the basis functions. For second order elliptic boundary value problems, piecewise polynomial basis function that are merely continuous suffice (i.e., the derivatives are discontinuous.) For higher order partial differential equations, one must use smoother basis functions. For instance, for a fourth order problem such as uxxxx + uyyyy = f, one may use piecewise quadratic basis functions that are C1.

Typically, one has an algorithm for taking a given mesh and subdividing it. If the main method for increasing precision is to subdivide the mesh, one has an h-method (h is customarily the diameter of the largest element in the mesh.) In this manner, if one shows that the error with a grid h is bounded above by Chp, for some C<\infty and p > 0, then one has an order p method. Under certain hypotheses (for instance, if the domain is convex), a piecewise polynomial of order d method will have an error of order p = d + 1.

If instead of making h smaller, one increases the degree of the polynomials used in the basis function, one has a p-method. If one simultaneously makes h smaller while making p larger, one has an hp-method. High order method (with large p) are called spectral element methods, which are not to be confused with spectral methods.

For vector partial differential equations, the basis functions may take values in \mathbb{R}^n.

[편집] Comparison to the finite difference method

The finite difference method (FDM) is an alternative way for solving PDEs. The differences between FEM and FDM are:

  • The finite difference method is an approximation to the differential equation; the finite element method is an approximation to its solution.
  • The most attractive feature of the FEM is its ability to handle complex geometries (and boundaries) with relative ease. While FDM in its basic form is restricted to handle rectangular shapes and simple alterations thereof, the handling of geometries in FEM is theoretically straightforward.
  • The most attractive feature of finite differences is that it can be very easy to implement.
  • There are several ways one could consider the FDM a special case of the FEM approach. One might choose basis functions as either piecewise constant functions or Dirac delta functions. In both approaches, the approximations are defined on the entire domain, but need not be continuous. Alternatively, one might define the function on a discrete domain, with the result that the continuous differential operator no longer makes sense, however this approach is not FEM.
  • There are reasons to consider the mathematical foundation of the finite element approximation more sound, for instance, because the quality of the approximation between grid points is poor in FDM.
  • The quality of a FEM approximation is often higher than in the corresponding FDM approach, but this is extremely problem dependent and several examples to the contrary can be provided.

Generally, FEM is the method of choice in all types of analysis in structural mechanics (i.e. solving for deformation and stresses in solid bodies or dynamics of structures) while computational fluid dynamics (CFD) tends to use FDM or other methods (e.g., finite volume method). CFD problems usually require discretization of the problem into a large number of cells/gridpoints (millions and more), therefore cost of the solution favors simpler, lower order approximation within each cell. This is especially true for 'external flow' problems, like air flow around the car or airplane, or weather simulation in a large area.

There are many finite element software packages, some free and some proprietary.

[편집] See also

  • Galerkin method
  • Finite element method in structural mechanics
  • Finite element analysis
  • Rayleigh-Ritz method
  • Discrete element method
  • Spectral method
  • Meshfree methods
  • Boundary element method
  • Electromagnetic modeling

[편집] External links