|
|
Finite element program generated based on user’s formulas A finite element problem is mainly defined by two parts: that is, the physical model, which can be expressed by the differential equations in mathematics, and the computational domain and the boundary conditions, which are generally called as geometric modeling and are offered by pre- and post- processing system. Here only PDE expression and its finite element algorithm are discussed. Distinguished with general finite element softwares, the main aim of FEPG provides a finite element platform, by aid of which users can obtain the complete source code for solving their problems based on the differential equation expression and the given algorithm, in stead of offering a solution library for particular kinds of differential equations. In the following, we will separately describe how to write the differential equation expression and the given algorithm expression in FEPG.
It is well known that the finite element method is based on the variational principle or virtual displacement principle. In FEPG, it is required to write the differential equation expression in the form of virtual displacement. For example, the weak form of a Poisson equation given below
is written as follows: stif /stif/ section: write Laplace operator expression, where [·;·]denotes the scalar product of two functions. The function before the semicolon is the unknown function or its derivative (u/x denotes the derivative of u with respect to x), and the function behind the semicolon is the virtual displacement of the unknown function or its derivative. /load/ paragraph: write the terms at the right-hand side of the equation. As a finite element platform, FEPG can express various kinds of differential equation expressions, including nonlinear, time-dependent and coupled equations. So far we have not yet found any differential equations that can not be expressed by FEPG. Besides, FEPG allows users to adopt the tensor notation (i.e. the form of suffix summation) and the operator expression to express the weak form of the equation. Therefore, it is completely consistent with the writing form of finite element books and papers, and is therefore concise and clarified (interested readers may glance at the samples of various fields in the first page).
The algorithm mentioned here refers to the solution method of PDE, including how to linearize a nonlinear differential equation, how to discretize the time variable for a time-dependent problem, as well as how to control the size of the iteration step (i.e. the relaxation factor) and the solution precision for a nonlinear problem, etc. For a coupled multi-field problem, it also includes the iteration order and the coupling method of different fields. In FEPG, the algorithm is divided into two parts. The first part mainly describes the algorithm for solving single field, i.e. one set of PDEs. The second part describes the algorithm for solving coupled multi-field problems. In the following these two algorithms are described separately.
One of the keys of finite element discretization for a single physical field is how to derive its corresponding linear algebraic equations, i.e. its coefficient matrix and the terms at the right-hand side. The following two examples are used to illustrate the writing form of the expressions. Ex. 1. Use Crank-Nicholson scheme to solve parabolic equations. The expressions are written as: matrix=[S]*dt/2+[M] The first expression represents the coefficient matrix of the linear algebraic equations, and the second expression represents the terms at the right hand side. [S], [M] and [F] denote the stiffness matrix, the mass matrix and the terms at the right hand side, respectively. They are derived from the differential equation expressions. dt is the time step, [U1] denotes the initial value of [U], i.e. the value at the previous time step.
matrix=[S]*(dt/2)**2+[C]*dt/2+[M]
A coupled
multi-field problem generally consists of several differential equation
sets, in which the unknown field functions are interdependent. For this
kind of problems, a multi-field algorithm is needed that reflects the
interaction between different unknown fields and the control of the
calculation order in addition to a set of differential equation
expressions and its single-field algorithm expressions for each physical
field. defi The
expression has two sections. The first section begins with the keyword /defi/,
followed by the single field algorithms for each field and the
relationship among different fields. In this example, there are two
fields, i.e. field /a/ and field /b/. The first line behind /defi/ means
that the field adopts algorithm /ell/ for single field (here it is a
linear static algorithm which can be obtained from the algorithm library).
Field /b/ has effect on the calculation of field /a/. The calculation of
field /b/ also uses algorithm /ell/, but field /a/ has no effect on the
calculation of field /b/. The second section begins with an empty line followed by the command stream of finite element program. In this example, there are four commands in total. The first and the second commands are to initialize field /a/ and field /b/, respectively. The third and fourth commands are to solve field /a/ and /b/, respectively. The solution of field /b/ is set before the solution of field /a/. The reason is: the solution of field /a/ depends on field /b/, but the reverse is not true. All of the four commands include character string /sin/, which means symmetric solver are adopted with the element stiffness not stored. Please refer to the listed FEPG examples of various fields in the Home page for the detail.
Copyright
@1999-2003 by Beijing Fegensoft Co., Ltd. All rights
reserved.
|