有限元分析,即有限元方法(冯康首次发现时称为基于变分原理的差分方法),是一种用于求解微分方程组或积分方程组数值解的数值技术。这一解法基于完全消除微分方程,即将微分方程转化为代数方程组(稳定情形);或将偏微分方程(组)改写为常微分方程(组)的逼近,这样可以用标准的数值技术(例如欧拉法,龙格-库塔法等)求解。
在解偏微分方程的过程中,主要的难点是如何构造一个方程来逼近原本研究的方程,并且该过程还需要保持数值稳定性。目前有许多处理的方法,他们各有利弊。当区域改变时(就像一个边界可变的固体),当需要的精确度在整个区域上变化,或者当解缺少光滑性时,有限元方法是在复杂区域(像汽车、船体结构、输油管道)上解偏微分方程的一个很好的选择。例如,在正面碰撞仿真时,有可能在"重要"区域(例如汽车的前部)增加预先设定的精确度并在车辆的末尾减少精度(如此可以减少仿真所需消耗);另一个例子是模拟地球的气候模式,预先设定陆地部分的精确度高于广阔海洋部分的精确度是非常重要的。
目录
历史[编辑]
有限元法最初起源于土木工程和航空工程中的弹性和结构分析问题的研究。它的发展可以追溯到Alexander Hrennikoff(1941)和Richard Courant (1942)的工作。这些先驱者使用的方法具有很大的差异,但是他们具有共同的本质特征:利用网格离散化将一个连续区域转化为一族离散的子区域,通常叫做元.Hrennikoff的工作离散用类似于格子的网格离散区域; Courant的方法将区域分解为有限个三角形的子区域,用于求解来源于圆柱体转矩问题的二阶橢圓偏微分方程. Courant的贡献推动了有限元的发展,绘制了早期偏微分方程的研究结果。
有限元方法的发展开始于五十年代中后期使用在机身框架和结构分析上,并于六十年代通过斯图加特大学的John Argyris和柏克萊加州大學的Ray W. Clough在土木工程中的应用工作中积累经验。
基于五十年代至六十年代大型水坝计算研究的实践经验,1965年,中国计算数学专家冯康发表了《基于变分原理的差分格式》一文,奠定了有限元计算方法的严格数学理论,为后世有限元计算方法的实际应用提供了理论保证。[1][2]
有限元概念[编辑]
单元[编辑]
单元(Element)是由节点组成的几何体,如三角形单元,四面体单元等。
节点[编辑]
节点(Node)是单元几何体的端点、顶点或特定点,单元的各物理量变化均体现在节点上,例如在弹性力学问题中,一个有两个节点的线单元的质量集中在两个节点上,受力也只能作用在节点上,变形也用节点的位移表示。
自由度[编辑]
节点自由度(Degree of Freedom,簡寫 DoF),是节点上变量的个数,例如用位移法解结构问题时节点自由度为3,表示单个节点上三个坐标方向上的位移,又例如热分析时节点自由度为1,表示某个节点处的温度值。
网格[编辑]
网格(Mesh)是由多个单元通过共用节点组成的单元网络,用以表示待解问题域。
分析方法[编辑]
以下用有限元分析解决两个简单问题,更一般的问题可以类似的推导出来。现假设读者已经熟悉微积分和线性代数。
P1是一个较简单的一维问题
其中{\displaystyle f}
是已知函数, {\displaystyle u}
是关于{\displaystyle x}
的未知函数, {\displaystyle u''}
是{\displaystyle u}
对{\displaystyle x}
的二阶导数。
二维比较简单的问题是狄利克雷问题
其中{\displaystyle \Omega }
是{\displaystyle (x,y)}
平面上的连通开区域,它的边界{\displaystyle \partial \Omega }
是良性的(例如,光滑流形或多边形), {\displaystyle u_{xx}}
和{\displaystyle u_{yy}}
分别表示{\displaystyle x}
和{\displaystyle y}
的二阶导数。问题P1能够通过计算不定积分而直接解决。然而,解决边值问题的这一方法只有在空间维数为1时才可用,并且不能推广到高维问题以及形如{\displaystyle u+u''=f}
的问题。出于这种考虑,我们将用有限元方法解决P1并将其推广至问题P2.
我们的描述分为两步,每步都反映了用有限元解决边值问题的本质。
这两步之后,我们可以构造一个大型有限维线性方程,线性方程的解就是原边值问题的逼近解。然后,这一有限维问题由计算机求解。
变分形式[编辑]
第一步是将问题P1和P2转化为他的等价变分形式,或弱解形式。如果{\displaystyle u}
是问题P1的解,那么对任何满足边界条件的光滑函数{\displaystyle v}
,有
(1){\displaystyle \int _{0}^{1}f(x)v(x)\,\mathrm {d} x=\int _{0}^{1}u''(x)v(x)\,\mathrm {d} x.}
相反如果 {\displaystyle u}
对任何光滑函数{\displaystyle v(x)}
满足{\displaystyle u(0)=u(1)=0}
和(1),那么{\displaystyle u}
是P1的解。对于二次可导函数{\displaystyle u}
证明这一点是非常容易的(利用中值定理)。
通过对(1)的右侧使用分部积分,可以得到
(2){\displaystyle {\begin{aligned}\int _{0}^{1}f(x)v(x)\,\mathrm {d} x&=\int _{0}^{1}u''(x)v(x)\,\mathrm {d} x\\&=u'(x)v(x)|_{0}^{1}-\int _{0}^{1}u'(x)v'(x)\,\mathrm {d} x\\&=-\int _{0}^{1}u'(x)v'(x)\,\mathrm {d} x=-\phi (u,v)\end{aligned}}}
其中使用了{\displaystyle v(0)=v(1)=0}
的假设。
参考文献[编辑]
外部链接[编辑]
The finite element method (FEM), is a numerical method for solving problems of engineering and mathematical physics. Typical problem areas of interest include structural analysis, heat transfer, fluid flow, mass transport, and electromagnetic potential. The analytical solution of these problems generally require the solution to boundary value problems for partial differential equations. The finite element method formulation of the problem results in a system of algebraic equations. The method yields approximate values of the unknowns at discrete number of points over the domain.[1] To solve the problem, it subdivides a large problem into smaller, simpler parts that are called finite elements. The simple equations that model these finite elements are then assembled into a larger system of equations that models the entire problem. FEM then uses variational methods from the calculus of variations to approximate a solution by minimizing an associated error function.
Studying or analyzing a phenomenon with FEM is often referred to as finite element analysis (FEA).
Contents
Basic concepts[edit source]
The subdivision of a whole domain into simpler parts has several advantages:[2]
A typical work out of the method involves (1) dividing the domain of the problem into a collection of subdomains, with each subdomain represented by a set of element equations to the original problem, followed by (2) systematically recombining all sets of element equations into a global system of equations for the final calculation. The global system of equations has known solution techniques, and can be calculated from the initial values of the original problem to obtain a numerical answer.
In the first step above, the element equations are simple equations that locally approximate the original complex equations to be studied, where the original equations are often partial differential equations (PDE). To explain the approximation in this process, FEM is commonly introduced as a special case of Galerkin method. The process, in mathematical language, is to construct an integral of the inner product of the residual and the weight functions and set the integral to zero. In simple terms, it is a procedure that minimizes the error of approximation by fitting trial functions into the PDE. The residual is the error caused by the trial functions, and the weight functions are polynomial approximation functions that project the residual. The process eliminates all the spatial derivatives from the PDE, thus approximating the PDE locally with
These equation sets are the element equations. They are linear if the underlying PDE is linear, and vice versa. Algebraic equation sets that arise in the steady state problems are solved using numerical linear algebra methods, while ordinary differential equation sets that arise in the transient problems are solved by numerical integration using standard techniques such as Euler's method or the Runge-Kutta method.
In step (2) above, a global system of equations is generated from the element equations through a transformation of coordinates from the subdomains' local nodes to the domain's global nodes. This spatial transformation includes appropriate orientation adjustments as applied in relation to the reference coordinate system. The process is often carried out by FEM software using coordinate data generated from the subdomains.
FEM is best understood from its practical application, known as finite element analysis (FEA). FEA as applied in engineering is a computational tool for performing engineering analysis. It includes the use of mesh generation techniques for dividing a complex problem into small elements, as well as the use of software program coded with FEM algorithm. In applying FEA, the complex problem is usually a physical system with the underlying physics such as the Euler-Bernoulli beam equation, the heat equation, or the Navier-Stokes equations expressed in either PDE or integral equations, while the divided small elements of the complex problem represent different areas in the physical system.
FEA is a good choice for analyzing problems over complicated domains (like cars and oil pipelines), when the domain changes (as during a solid state reaction with a moving boundary), when the desired precision varies over the entire domain, or when the solution lacks smoothness. FEA simulations provide a valuable resource as they remove multiple instances of creation and testing of hard prototypes for various high fidelity situations.[3] For instance, in a frontal crash simulation it is possible to increase prediction accuracy in "important" areas like the front of the car and reduce it in its rear (thus reducing cost of the simulation). Another example would be in numerical weather prediction, where it is more important to have accurate predictions over developing highly nonlinear phenomena (such as tropical cyclones in the atmosphere, or eddies in the ocean) rather than relatively calm areas.
FEM mesh created by an analyst prior to finding a solution to a magnetic problem using FEM software. Colours indicate that the analyst has set material properties for each zone, in this case a conducting wire coil in orange; a ferromagnetic component (perhaps iron) in light blue; and air in grey. Although the geometry may seem simple, it would be very challenging to calculate the magnetic field for this setup without FEM software, using equations alone.
FEM solution to the problem at left, involving a cylindrically shaped magnetic shield. The ferromagnetic cylindrical part is shielding the area inside the cylinder by diverting the magnetic field created by the coil (rectangular area on the right). The color represents the amplitude of the magnetic flux density, as indicated by the scale in the inset legend, red being high amplitude. The area inside the cylinder is low amplitude (dark blue, with widely spaced lines of magnetic flux), which suggests that the shield is performing as it was designed to.
History[edit source]
While it is difficult to quote a date of the invention of the finite element method, the method originated from the need to solve complex elasticity and structural analysis problems in civil and aeronautical engineering. Its development can be traced back to the work by A. Hrennikoff[4] and R. Courant[5] in the early 1940s. Another pioneer was Ioannis Argyris. In the USSR, the introduction of the practical application of the method is usually connected with name of Leonard Oganesyan.[6]In China, in the later 1950s and early 1960s, based on the computations of dam constructions, K. Feng proposed a systematic numerical method for solving partial differential equations. The method was called the finite difference method based on variation principle, which was another independent invention of the finite element method. Although the approaches used by these pioneers are different, they share one essential characteristic: mesh discretization of a continuous domain into a set of discrete sub-domains, usually called elements.
Hrennikoff's work discretizes the domain by using a lattice analogy, while Courant's approach divides the domain into finite triangular subregions to solve second order elliptic partial differential equations (PDEs) that arise from the problem of torsion of a cylinder. Courant's contribution was evolutionary, drawing on a large body of earlier results for PDEs developed by Rayleigh, Ritz, and Galerkin.
The finite element method obtained its real impetus in the 1960s and 1970s by the developments of J. H. Argyris with co-workers at the University of Stuttgart, R. W. Clough with co-workers at UC Berkeley, O. C. Zienkiewicz with co-workers Ernest Hinton, Bruce Irons[7] and others at the University of Swansea, Philippe G. Ciarlet at the University of Paris 6 and Richard Gallagher with co-workers at Cornell University. Further impetus was provided in these years by available open source finite element software programs. NASA sponsored the original version of NASTRAN, and UC Berkeley made the finite element program SAP IV[8] widely available. In Norway the ship classification society Det Norske Veritas (now DNV GL) developed Sesam in 1969 for use in analysis of ships.[9] A rigorous mathematical basis to the finite element method was provided in 1973 with the publication by Strang and Fix.[10] The method has since been generalized for the numerical modeling of physical systems in a wide variety of engineering disciplines, e.g., electromagnetism, heat transfer, and fluid dynamics.[11][12]
Technical discussion[edit source]
The structure of finite element methods[edit source]
Finite element methods are numerical methods for approximating the solutions of mathematical problems that are usually formulated so as to precisely state an idea of some aspect of physical reality.
A finite element method is characterized by a variational formulation, a discretization strategy, one or more solution algorithms and post-processing procedures.
Examples of variational formulation are the Galerkin method, the discontinuous Galerkin method, mixed methods, etc.
A discretization strategy is understood to mean a clearly defined set of procedures that cover (a) the creation of finite element meshes, (b) the definition of basis function on reference elements (also called shape functions) and (c) the mapping of reference elements onto the elements of the mesh. Examples of discretization strategies are the h-version, p-version, hp-version, x-FEM, isogeometric analysis, etc. Each discretization strategy has certain advantages and disadvantages. A reasonable criterion in selecting a discretization strategy is to realize nearly optimal performance for the broadest set of mathematical models in a particular model class.
There are various numerical solution algorithms that can be classified into two broad categories; direct and iterative solvers. These algorithms are designed to exploit the sparsity of matrices that depend on the choices of variational formulation and discretization strategy.
Postprocessing procedures are designed for the extraction of the data of interest from a finite element solution. In order to meet the requirements of solution verification, postprocessors need to provide for a posteriori error estimation in terms of the quantities of interest. When the errors of approximation are larger than what is considered acceptable then the discretization has to be changed either by an automated adaptive process or by action of the analyst. There are some very efficient postprocessors that provide for the realization of superconvergence.
Illustrative problems P1 and P2[edit source]
We will demonstrate the finite element method using two sample problems from which the general method can be extrapolated. It is assumed that the reader is familiar with calculus and linear algebra.
P1 is a one-dimensional problem
where {\displaystyle f}
is given, {\displaystyle u}
is an unknown function of {\displaystyle x}
, and {\displaystyle u''}
is the second derivative of {\displaystyle u}
with respect to {\displaystyle x}
.
P2 is a two-dimensional problem (Dirichlet problem)
where {\displaystyle \Omega }
is a connected open region in the {\displaystyle (x,y)}
plane whose boundary {\displaystyle \partial \Omega }
is "nice" (e.g., a smooth manifold or a polygon), and {\displaystyle u_{xx}}
and {\displaystyle u_{yy}}
denote the second derivatives with respect to {\displaystyle x}
and {\displaystyle y}
, respectively.
The problem P1 can be solved "directly" by computing antiderivatives. However, this method of solving the boundary value problem (BVP) works only when there is one spatial dimension and does not generalize to higher-dimensional problems or to problems like {\displaystyle u+u''=f}
. For this reason, we will develop the finite element method for P1 and outline its generalization to P2.
Our explanation will proceed in two steps, which mirror two essential steps one must take to solve a boundary value problem (BVP) using the FEM.
After this second step, we have concrete formulae for a large but finite-dimensional linear problem whose solution will approximately solve the original BVP. This finite-dimensional problem is then implemented on a computer.
Weak formulation[edit source]
The first step is to convert P1 and P2 into their equivalent weak formulations.
The weak form of P1[edit source]
If {\displaystyle u}
solves P1, then for any smooth function {\displaystyle v}
that satisfies the displacement boundary conditions, i.e. {\displaystyle v=0}
at {\displaystyle x=0}
and {\displaystyle x=1}
, we have
(1) {\displaystyle \int _{0}^{1}f(x)v(x)\,dx=\int _{0}^{1}u''(x)v(x)\,dx.}
Conversely, if {\displaystyle u}
with {\displaystyle u(0)=u(1)=0}
satisfies (1) for every smooth function {\displaystyle v(x)}
then one may show that this {\displaystyle u}
will solve P1. The proof is easier for twice continuously differentiable {\displaystyle u}
(mean value theorem), but may be proved in a distributional sense as well.
We define a new function {\displaystyle \phi (u,v)}
by using integration by parts on the right-hand-side of (1):
(2){\displaystyle {\begin{aligned}\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\equiv -\phi (u,v),\end{aligned}}}
where we have used the assumption that {\displaystyle v(0)=v(1)=0}
.
The weak form of P2[edit source]
If we integrate by parts using a form of Green's identities, we see that if {\displaystyle u}
solves P2, then we may define {\displaystyle \phi (u,v)}
for any {\displaystyle v}
by
where {\displaystyle \nabla }
denotes the gradient and {\displaystyle \cdot }
denotes the dot product in the two-dimensional plane. Once more {\displaystyle \,\!\phi }
can be turned into an inner product on a suitable space {\displaystyle H_{0}^{1}(\Omega )}
of "once differentiable" functions of {\displaystyle \Omega }
that are zero on {\displaystyle \partial \Omega }
. We have also assumed that {\displaystyle v\in H_{0}^{1}(\Omega )}
(see Sobolev spaces). Existence and uniqueness of the solution can also be shown.
A proof outline of existence and uniqueness of the solution[edit source]
We can loosely think of {\displaystyle H_{0}^{1}(0,1)}
to be the absolutely continuous functions of {\displaystyle (0,1)}
that are {\displaystyle 0}
at {\displaystyle x=0}
and {\displaystyle x=1}
(see Sobolev spaces). Such functions are (weakly) "once differentiable" and it turns out that the symmetric bilinear map {\displaystyle \!\,\phi }
then defines an inner product which turns {\displaystyle H_{0}^{1}(0,1)}
into a Hilbert space (a detailed proof is nontrivial). On the other hand, the left-hand-side {\displaystyle \int _{0}^{1}f(x)v(x)dx}
is also an inner product, this time on the Lp space {\displaystyle L^{2}(0,1)}
. An application of the Riesz representation theorem for Hilbert spaces shows that there is a unique {\displaystyle u}
solving (2) and therefore P1. This solution is a-priori only a member of {\displaystyle H_{0}^{1}(0,1)}
, but using elliptic regularity, will be smooth if {\displaystyle f}
is.
Discretization[edit source]
A function in {\displaystyle H_{0}^{1},}
with zero values at the endpoints (blue), and a piecewise linear approximation (red)
P1 and P2 are ready to be discretized which leads to a common sub-problem (3). The basic idea is to replace the infinite-dimensional linear problem:
with a finite-dimensional version:
where {\displaystyle V}
is a finite-dimensional subspace of {\displaystyle H_{0}^{1}}
. There are many possible choices for {\displaystyle V}
(one possibility leads to the spectral method). However, for the finite element method we take {\displaystyle V}
to be a space of piecewise polynomial functions.
For problem P1[edit source]
We take the interval {\displaystyle (0,1)}
, choose {\displaystyle n}
values of {\displaystyle x}
with {\displaystyle 0=x_{0}<x_{1}<\cdots <x_{n}<x_{n+1}=1}
and we define {\displaystyle V}
by:
where we define {\displaystyle x_{0}=0}
and {\displaystyle x_{n+1}=1}
. Observe that functions in {\displaystyle V}
are not differentiable according to the elementary definition of calculus. Indeed, if {\displaystyle v\in V}
then the derivative is typically not defined at any {\displaystyle x=x_{k}}
, {\displaystyle k=1,\ldots ,n}
. However, the derivative exists at every other value of {\displaystyle x}
and one can use this derivative for the purpose of integration by parts.
https://en.wikipedia.org/wiki/Finite_element_method