You are on page 1of 16

A general numerical solution method for Fokker-Planck equations with applications to structural reliability

H. P. Langtangen Departnlent of Mathenlatics, Universi O' of Oslo, P.O. Box 1053, 0316 Oslo 3, Norway The probability density of a Markov process modeling stationary nonlinear random vibrations can be found from a Fokker-Planck equation. The paper presents a general numerical solution method for obtaining this probability density. A Galerkin-type finite element method is used to solve the partial differential equation in combination with a generalized Lagrange multiplier method to handle the associated integral constraint. As the domain is usually infinite, various approaches to handle this aspect of the problem are presented and tested. Several Fokker-Planck equations are solved and the method gives good results, also for solutions that deviate significantly from the normal density. Quantities of particular interest for structural reliability are discussed.

1. I N T R O D U C T I O N AND P R O B L E M FORMULATION Dynamic response analysis of engineering structures frequently involve a system of differential equations on the form M~ + f(z, 2) = q(t) (I)

where z(t) = (zl(t) . . . . . zk(t))r is the response of the system, M is a mass matrix, f is some nonlinear function representing damping and restoring forces, and q(t) is an external excitation. Realistic modeling of environmental loads, such as road-, wave-, current- and wind-induced forces, requires the excitation to be described as a stochastic process. The response of the system (1) will then, of course, also be a stochastic vector process. In the case of a linear system with Gaussian loading, the response is known to be Gaussian and its statistics can be obtained by standard methods. However, if the dynamic system is nonlinear and/or the excitation is non-Gaussian, no simple computational scheme is available for calculating the response statistics beyond second order moments. As the mai0 purpose of dynamic response analysis of engineering structures is to evaluate the reliability of the structure, extreme values and the probability distribution of the response process are of great importance. A widely used approach for analysing nonlinear systems with non-Gaussian excitation is to estimate the first few moments of the response and then use methods for fitting a probability density to these moments. As the number of moments tends to infinity an exact density can be obtained. Estimation of moments is most easily carried out by direct Monte Carlo simulation of the dynamic system. The main deficiency of direct simulation is the
Paper accepled Oclober 1990. Discussion closes August 1991.

extremely long execution time required to accurately calculate moments of higher order than four. More analytical methods include for example equivalent (or stochastic) linearization ~~ and solution of the moment equations ~7"x9. Equivalent linearization, where only the mean and variance of the response process are taken into account, cannot give any information on non-Gaussian aspects of probability distributions, upcrossing rates, etc. Inclusion of the skewness and kurtosis in the analysis may yield significant improvements over equivalent linearization ~6,~7. Determination of the probability density on the basis of the first few moments can be varied out by e.g. approximate transformations z6 or by the method of maximum entropy distributions xs. An alternative to fitting probability densities to moments is to solve deterministic partial differential equations directly for the probability density. If the response of the dynamic system can be modelled by a continuous vector Markov process, a Fokker-Planck equation governing the probability density of the response can be derived. In this paper the author aims to solve Fokker-Planck equations numerically. To apply the theory of Markov processes to a dynamic system governed by equation (1), one must rewrite (I) as a system of ordinary, first-order, stochastic differential equations with Gaussian white noise excitation:
d d

.,77 X,(t) = ai + Z B,iNs{t),


j=l

i = 1. . . . , d.

(2)

Here a~ and B~j are functions of Xx . . . . . X a and t, while N~(t) is a stationary Gaussian white noise process, defined as the generalized derivative of a standardized Wiener (Brownian motion) process, and with the properties E[Ni(t)] = 0 , i = 1. . . . . d,

E[Ni(t)N,(t + 3)] = 6(~), i = 1. . . . . d. Probabilislic Engineering Mechanics, 1991, Vol. 6, No. 1 33

A general mtmerical solution method for Fokker-Planck equations: H. P. Langtangen


Here E[-] is the expectation operator and 6(z) denotes the delta function. Furthermore, Ni(t) and Nil) are independent processes when i :r In this paper the author applies the Ito interpretation of (2). One can show that X(t) = (Xl(t) . . . . , Xa(t)) r is a vector Markov process 5. Let x--(x~ . . . . . xn)r be a realization of X, and define the transition probability density function /~(x, t lx o, to), x o = X(to), by freedom stochastic dynamic system ,2 + 2(COo2 + o92o(Z+ eZ 3) - Q(t)
171

(7)

Pr{X ~ A I X(to) = Xo} = f/5(x, t I x0, to)dxl ... dxa,


A

where m is the mass of the system, ( is the damping ratio, and o9o is the natural frequency. Assume that the excitation Q(t) is a stationary Gaussian process with zero mean and unit variance. To write (7) on the form (2) one must introduce auxiliary variables to reduce the order of the equation and to filter white noise to the desired 'colored' noise Q(t). Let X 1 = Z , X2 =Z,, and Xa= Q. Suppose a suitable filter for the excitation is

A being some event, A c R a. If f~ c R a is the set of admissible values of the realizations x of X, it can be shown 5 that p(x, t I Xo, to) is governed by the deterministic partial differential Fokker-Planck equation
o-7 = - , = , x n R

f(3 = - ~PX3 + x/-~N3(t)

(8)

where ~, is a constant related to the spectral content of Q (the spectrum for Q, according to (8), is proportional to 1/o92, where o9 denotes the circular frequency). The governing equations can now be rewritten as

(3)
where C,~ = Z~= 1 B,qBsq. The term with first derivatives is called the drift term while the term containing the C,~ matrix is called the diffusion term. Since Pr{X~f~} = I, one must have "

)(1 = X2

(9)
(10) (11)

X2 = X3hn - 2(o90X2 - o902(X1 + eX~)


"~3 = - ~ X 3 + x/'~-N3(t)

f p(x, t lxo, to)dxt


fl

... dxa = 1.

(4)

which is on the form (2). Thus X = (X~, X2, X3) T is a vector Markov process. The associated Fokker-Planck equation for the probability density p(x~, x2, x3) reads Op+ 0 _x3

The equation (3) is also called the forward Kolmogorov equation or the Fokker-Planck-Kolmogorov equation. In many problems one is mainly interested in the statistics of the response when X(t) is a stationary vector process. Assuming a i and B,j to be independent of t one seeks the stationary probability distribution p(x) = lim /~(x, t l Xo, to). It follows that p(x) is governed by the time independent Fokker-Planck equation

0 +O x [ x p+
in the domain

=0,

(12)

= {(xl, xz, x3); Ix, I < 00, Ix 21 < c~, Ixal < c~}, and with the constraint

i
--o0 ~

i
oD

i P(X,,Xz, x3)dx,dx2dx3=l."
--r

(13)

(5)
with the constraint

f p(x)dx I ... dx a =
t)

1.

(6)

One can notice that the statistics of a single degree of freedom system in this case are governed by a three-dimensional partial differential equation. In many engineering applications it may be interesting to have an excitation Q(t) with a more general spectrum than implied by (8). For example, one can use a second order filter (~ + ~',0 + ~P2Q = ~ N 4 ( t ) . (14)

A Markov process for which there exists a stationary probability density satis]'ying (5) and (6), with time independent a i and Bij, is said to be homogeneous 5. T h e present paper deals with ,'t general numerical solution method for the boundary value problem defined by (5) and (6). An example is now given to demonstrate the application of the theory. This example is later used in numerical calculations. Consider the single degree of 34

The spectrum of Q(t) now becomes SQ(Og)= 1T(o9) l 2So where T(o9) is the transfer function associated with the linear differential equation (14). Rewriting (14) as a system of two first-order equation gives, in combination with the equation of motion (7), rise to a four-dimensional Fokker-Planck equation. However, its numerical solution is currently difficult to obtain for reasons to be explained later in the paper.

Probabilistic Engineering Mechanics, 1991, Vol. 6, No. I

A general mtmerical sohaion method for Fokker-Planck equations: H. P. Langtangen


Previous work on numerical solution of FokkerPlanck equations has mainly utilized Galerkin methods with Hermite polynomial expansion. Examples of important contributions are Refs 1, 13, and 15. The main deficiency of Hermite polynomial expansions is the slow convergence when p(x) deviates significantly from a Gaussian density. More general solution schemes, such as finite differences, have been employed by Larsen et al. ~2. However, only one dimensional problems were considered, and the Fokker-Planck operator was chosen on a particular form to achieve positive definiteness. Langley ~1 presented a general method based on finite elements and concluded that the finite element method showed superiority even when Hermite moment expansion methods are applicable. The methods to be presented in this article are related to that of Langley. However, the author's methods have a stronger mathematical foundation, and investigate the methods in more detail to clarify advantages and current limitations. Problems related to the boundary conditions are also exposed and resolved. The author especially investigates the sensitivity of the solution to changes in various parameters entering the numerical procedures. Fokker-Planck equations. With Hermite polynomial expansions t both problems are eliminated.

2.2 Variational formulation


Variational inequalities are often used for formulating problems containing partial differential equations with constraints. Let

II

Hl(f~) denotes the relevant Hilbert space. Define the nonsymmetric bilinear form

d OCP a,p---~
g(p, i~) =
11

r=~l ~

--~1 ~Xs (crsp)

dXl'"dxn"

The boundary value problem to be solved in this paper can then be formulated as a standard variational inequality:find p ~ V such that

2. N U M E R I C A L S O L U T I O N M E T H O D The author's aim is to compute the solution of the homogeneous partial differential equation (5) under the constraint (6). A uniqueness theorem for this problem (assuming existence of a solution) is provided by Caughey and P~.yne 6.

L(p, 49)>~0, O = v - p ,

VveV.

(18)

2.1 Boundary conditions


To apply general standard methods, such as finite differences or finite elements, to equation (5), some kind of boundary conditions are needed. The most obvious condition is

Integration by parts shows that the solution of (5) and (6) with the boundary condition (17) is also a solution of the weak formulation (18). One has q ~ I V where IV = {v~Hl(f~); Snrdxt ... dXd =0}. Thus, if q ~ W then -~be IV, and consequently the inequality in (18) can be replaced by an equality. A discrete version of (18) is obtained by restricting the unknown function to lie in a finite dimensional space. One writes p(x) ~ ph(x) = Z Hj(x)p;
j=l

p=0

(15)

at boundaries located at infinity since this condition is implied if the integral (6) exists. Integrating (5) over f~ yields a condition for conservation of probability:

where Hj(x) are standard finite element trial functions and Pi are constants to be determined. It is convenient to introduce a discrete version of the integral constraint (6):

f['
r=l

a,p-g

s=l

Z, JS = 0.

(i6)

f ph(x)dxx 9 9 dxa= I,
l'l

(19)

Here 7.., is the component of the:outward unit normal vector to the surface 6f~ in the x,-direction. When f~ is an infinite domain, (16) should be taken in the limiting sense. Equation (16) also holds in the transient case since g(SnPdx)/cgt = O. On the basis of (16) one may take

which alternatively can be written


cTp = 1,

(20)

where c = (ct, c2. . . . . c,) r, 0 = (Pl . . . . . p,)r, and

r=l

a,p -- -~

1=1

(C,sp) Z, = 0
9

(l 7)

ci = f Hi(x)dxt ... dxa.


fl

as a boundary condition. If one straightforwardly appliesfinite difference or finite element methods to (5) together with the conditions (15) or (17) one simply obtains the trivial solution p = 0. In addition, one must deal with infinite domains. These are the two main problems with the numerical solution of

A discrete variational formulation can then be formulated as: find ph ~ V h $11ch that
Lp h, dph)mO, (~h=ph--ph, Vuh~Vh.

(21)
o
35

Probabilistic Engineerin 9 Mechanics, 1991, Vol. 6, No. 1

A general mtmerical sohttion method for Fokker-Planck equations: H. P. Langtangen


Here we have 4' e IV h and form (22)-(23), however with a slightly different K matrix:

V h .~_II) = ~ Hj(x)vj, vj~R, H i e Hl(f~),j = 1. . . . . n;


j=l

,= 1 ~

(a,Hj)

fl
j=l

c~vi = 1.} +~

z5,

ex,...
(25)

tV h =

v = jr1 H~(x)vi' v~6R, H./a Hl(f~), j = I, . . . , n;

Observe now that the natural boundary condition is

j~=l CjVj= 0.}


When using the Bubnov-Galerkin finite element method one chooses the weighting functions to equal the trial functions, i.e. H~, i = 1. . . . . n. However, this is not possible here since H~(~ W h. Define the vector space U = {q = (q~, . . . . qn)Tu R"; crq = 0.}. Then one can construct 4'he tVh: 4'h = ~ q/Hi(x), q E U.

r=l

~ -~x (Crop)Zr=0, 5=1

X~Sf2.

(26)

i=l

Equation (21) then results in the following system of algebraic equations for p: ": qTKp = 0, crp = 1. Vqe U (22) (23)

Some of the early attempts to construct upwind finite elements for equations with significant first-order derivative terms applied modified (upwind) weighting functions on the convection terms only. In the author's context this corresponds to using H / a s weight on the diffusion term and the term pZ~=lOa,/Ox,, while the convection term Ear=larop/Ox r is weighted by /4i- However, such an approach is inconsistent in the sense that the analytical solution of the problem is not a solution of the weak formulation. For a discussion of different upwinding techniques see Ref. 4. Based on the previous finite element formulations the author lists five methods to be tested in the next section: 1. BGI: the formulation in (25) with ~'= 0 and essential boundary condition p = 0 at dO, 2. BG2: the formulation in (25) with k'= 0 and natural boundary condition (26) at ~f~, 3. BG3: the formulation in (24) with natural boundary condition (17) at ~f~, 4. PGI: the formulation in (25) with k"~0 (from Ref. 4) and essential boundary condition, p = 0 at ~f~. 5. PG2: same as PGI except that the upwind weighting functions are applied to the convection term only.

K is here an n x n matrix to be precisely defined below. The author remarks that a straightforward BubnovGalerkin finite element formulation of (5)with weighting functions H~ would result in the system K p = 0 and eTp = 1 which obviously has no solution if K is invertible. The author will refer to the formulation (22)-(23) as a Bubnov-Galerkin method later in the paper. The specific form of K~i in case of this BurbnovGalerkin formulation becomes

2.3 A generalized Lagrange nndtiplier method


The system (22)-(23) for p is not expressed in a form directly applicable for solution by computer. If K had been a symmetric and positive definite matrix eq/aation (22) and (23) would have been equivalent to the minimization problem :find p ~ 0 = {q ~ R"; crq = 1} such

giJ~f[ r=~O'i~trl-~j-2s=|~ (C's'J)}]dXl"'" 'xn" ~' 1~


(24) Since the Fokker-Planck equation has significant first derivatives (in some space directions the second derivatives may be absent) one may suggest to use upwinding techniques to stabilize the solution 4. Therefore the author has also tested a streamline-upwind/Petrov-Galerkin method where 4' = ~7= 1 q~/~i, with/~i chosen according to Ref. 4, that is,

that
1

prKp = m q O qrKq" m ~ -2

Such a constrained minimization problem can be solved by the method of Lagrange multipliers, resulting in the system Kp = 2e (27) (28)

FIi = Hi + E = aq Oxq "


The value of k- can be found in Ref. 4. When k-= 0 a Bubnov-Galerkin formulation is obtained. Application of these discontinuous weighting functions prohibit the drift term in (5) from being integrated by parts. The method results in a system of algebraic equations on the 36

crp = 1.

where 2 ~ R is the (unknown) Lagrange multiplier. The system (27)-(28) yields 11+1 coupled linear algebraic equations for determining p and 2. Unfortunately, the Fokker-Planck equation gives rise to a non-symmetric matrix K and the above approach cannot be directly applied. However, in the following paragraph the author

Probabilistic Engineerin9 Mechanics, 1991, Vol. 6, No. 1

A general mmwrical sohttion method for Fokker-Planck equations: H. P. Langtangen


will show that also in the case where K is non-symmetric there exists a real constant 2 such that (22)-(23) are equivalent to (27)-(28). Therefore, a generalization of the Lagrange multiplier method can be used to enforce the integral constraint (6) when solving the Fokker-Planck equation (5) numerically. The author first shows that (22)-(23) imply (27)-(28). The condition (22) implies that Kp is orthogonal to U, that is, Kp e U The space U can be expressed as U { q e R ; q = p e , peR}. probably prevents solutions for d>~4 on t o d a y ' s computers. In this paper Fokker-Planck equations w i t h d < 4 are studied. Many Fokker-Planck equations possess symmetry. For example, in the equation (12) one has p(x~, x2, x3) = p(-x~, - x z , -x3). Assume in general that pj = Pk where J~Jo and k~Jl, and k=q(j),j=fl(k). Jo and J l are set of integers, representing node numbers, such that Jo w J1 = {1, 2 . . . . . n}. Then only the unknowns P~,JeJo, need to enter the system of algebraic equations. The original system

( I f q e U and we U one sees that qrw = pqre = 0 for any peR.) Thus there exists a 2 e R such that K p = 2 e . Conversely, assume that (27)-(28) hold. Then qrKp = qr(2e) for all q e U . But since q r c = 0 for all q e U one gets qrKp = 0 for all q e U. The author remarks that it is also possible to introduce a Lagrange multiplier in the continuous problem (5)-(6). This will result in a term 2 on the right hand side of(5). Straightworward B u b o n o v Galerkin formulation with H~ as weighting functions then gives the system (27)-(28). Elimination of p from (27}-{28) leads to 2 = J e r K - Ic3 - 1, and p = 2K- le. This scheme requires the solution of two matrix systems with K as coefficient matrix. A more efficient method is described next. Assume that one solves
K p = e,

./=1

Kopi=c~, i = l , . . . , n

is modified to

(Ko+ Ki.qti))Pj=Ci, ieJo.


jEJo

9 Let 0(e, k) be the mapping of local node number k in element number e to the global node no. j = 0(e, k), and let Mr~ be the (r, s) entry in the element matrix of element no. e. Then the assembling procedure becomes as follows. First set i = 0(e, r) and j = 0(e, s). If i :~ Jo then i: = tT(i). Similarly, ifj :~ Jo then j : = ~(j). Finally, K'ii: = K o + M,~. The resulting coefficient matrix K = {K'~./} has dimension m x m, where m is the number of integers in the set do. Using this procedure one can reduce the size of the matrix systems considerably. For example, when solving (12) the reduction is 50% since only the nodes with e.g. positive x2 and x 3 values enter J0. One should pay attention to the numbering of the nodes entering Jo in order to minimize the matrix bandwidth in R.

that is, 2 is kept fixed at 1. Comparing the expressions

O=K-tc
and

2.4 Handling of the h~nite domahl


In most engineering applications of Fokker-Planck equations the domain f~ can be defined as

I P erK-~cK-lc
shows that ~ = 2p. To evaluate 2 one simply applies crp = 1, i.e. cro = 1/2. The computational algorithm becomes 1. Solve Kp = c with respect to p. 2. Compute ~ = crp. 3. Set p : = p/r For d > 2 the main effort of the finite element solution method will be spent on solving the system K p = e . Therefore, effective iterative methods should be employed since K is a sparse matrix. Unfortunately, K is nonsymmetric and indefinite, regardless of the discretization method being utilized. No iterative method has been found to converge for the present K matrix. In particular the author has tested a family ot generalized Conjugate Gradient methods with various incomplete LU factorization preconditioners, without success. As a consequence one currently applies direct methods, such as banded Gaussian elimination, to the system Kp =e. This fact

0~176
~<xr < co,

r = l . . . . ,d.

The author has considered two methods for dealing with an infinite domain. The first method employs a finite truncated domain in the physical coordinate system {x,}. That is, one prescribes finite x~ i" and x~ ~x such that x mln~<xr~<x,~ax, r = l , . . . , d . The other method transforms the infinite domain ~ onto a finite domain fi by the transformation s = tanh[fl,(x, - ~,)], r = 1. . . . . d,

where fl, and ~r are parameters to be prescribed. Observe that - m < xr < m is mapped into - 1 < ~,. < 1. Usually % and j~,.ml, + x~,~) can be taken equal to 2~--, E[Xr]. The difference x,~ x - x mi" and the parameter fir depend on the standard deviation of X,, denoted by D[Xr].

Probabilistic Engineering Mechanics, 1991, Vol. 6, No. 1

37

A general numerical solution method for Fokker-Planck equations: H. P. Langtangen

The Fokker-Planck equation (5) in ~,-coordinates reads

-,=,~ A, ~-.,.
where
'~,(~- ~. . . . . 0,~(~ .....
~(~ .....

-2 s=l

~ ((~,A~) = 0 (29)

G) = a,(xl(r

.....

xa(G)) x~(G)) x~(G))

coefficients C,s in the diffusion term in the Fokker-Planck equation. Suitable analytical solutions when B o is non-constant have not been found, and consequently only constant Bij (additive noise) is tested in this section. It is expected that a spatially varying diffusion coefficient should not cause more numerical difficulties than a spatially varying drift coefficient. The examples to be presented include different degrees of variable coefficients in the drift coefficients.

G ) = C,~(x,(~.O . . . . .

G) =

p(x,(~,) .....

d~,
A, = ,ix = fl,( l -

The author remarks that ,b is not a probability distribution in the ~,-coordinates. The nodal values /~ equal the nodal values of p~, only the coordinates of the nodes are different. The integral constraint is written as
-1

3.1 One dinwnsional problems Most of the numerical problems with the solution of Fokker-Planck equations are apparent for any value of d. Therefore the author has studied the case d = 1 extensively. In the following one skips indices when d = 1, that is, one introduces X = XI, x = xa, ~ = r fl =/71, a x m i n _ = x r1i n , x m a x - = x lmax , a=-al, c = C l l , N ( t ) = N l ( t ) . With d = 1 the Fokker-Planck equation (5) becomes

d 1 d2 dx (a(x)p) + ~ ~ (c(x)p) -- O.

(33)

d~l ..-dc.'a = 1.
fl

(30)

The entries in the K matrix and the c vector are slightly altered. For example, the BG3 formulation leads to

We let F(x) denote the cumulative distribution corresponding to p(x), p = dF]dx. The analytical solution of (33) is straightforwardly obtained: (34)

Kij: ; [r=~(Ar~Hi'~r-HlAr),'~ "i


{
c,= f H,
fl

=~

J ~(x)

,+.

)71 1

-1

where C o is a normalizing constant. The corresponding stochastic differential equation reads


= a(X) + x / ~ N ( t )

(35)

x d~l ... dG

(31)

A,]',,r
Ar= (-~.r
, dAr

(32)

Here one has

2flr~-r"

For example when c(x)= 2~zSo, where So is a constant, (35) can be interpreted as an equation for the velocity X of a particle subjected to a viscous force a(X) and a white noise excitation with constant spectral density equal to So. Such models are relevant for studying one-dimensional Brownian motion in gases and liquids. By allowing e to vary with x the Fokker-Planck equation (33) also has important applications in the description of energy envelopes of stochastic oscillators. Different choices of a(x) give rise to several common probability densities. For example, if c = 2, one has
a(x) = x-

3. N U M E R I C A L E V A L U A T I O N O F T H E SOLUTION METHOD The objective of this section is to investigate the behaviour and current limitations of the proposed numerical solution schemes for the Fokker-Planck equation. The author is especially concerned with how the choice of variational formulations, boundary conditions, clement types, element sizes and handling of infinite domains influence the accuracy in the solution. To measure the accuracy precisely the author.presents only test problems where suitable exact solutions of the Fokker-Planck equation (5) are available. The formulation and implementation of the numerical procedures allow Bij to be function of X 1. . . . . X a amultiplicative noise), which only leads to variable 38

a2 l' ,

m <x<

m, Gaussian density

(36)

a(x) = --tltx 3 -q- tl2x , t/1 , 112> 0, -- 09 < x < oo,

Bimodal density a(x)=-x ~ p- 1,0<x<co,


X

(37) (38)

Weibull density

Unlike most other solution methods for Fokker-Planck equations the present method is not expected to exhibit slow convergence when p deviates significantly from a normal density. However, it turns out that the author's method has its best performance when p is Gaussian, a fact probably due to the linear coefficient in the

Probabilistic Engineering Mechanics, 1991, Vol. 6, No. 1

A general mmterical solution method for Fokker-Planck equations: H. P. Langtangen


1.0
1.6
0

/ /
0.B

1.4

0 0

1.2

1.0 ~0.6 E 0.4


r

0.8 Z"

?
/.
'~

0.6
0.4

0.2
I

0.2

0.0

o
13
I

~
~
I

o
I I
I

0.0
0 U
l

?
1.0

-0.2
i

O
tU U

o I I I
I

-1.5

-I.0

-0.5

0.0

0.5

1.5

0.0

0.5

1.0

1.5

2.0

2.,5

3.0

3.5

Fig. 1. Plot of the bimodal density function (37) with tl~ = 40 and q2 = 10 attd lhzear elements in the ph)'sical domahl. BG3 formulation. Solid lhle: analytical density; dashed lhze: analytical cumulative distribution. Numerically computed densities are represented by O (40 elements) and [] (14 elements). Numerically computed cumulative distributions are shown by @ (40 elements) and 0 (14 elements)
Fokker-Planck equation for a normal density (higher order polynomials lead to large values of the coefficient as Ix I-, oo while singular terms like l/x may cause difficulties in the vicinity of the origin). Figure 1 shows a comparison of analytical and numerical solutions in case ofa bimodal density function. The numerical computation was carried out using the formulation BG3 in the physical domain with 14 and with 40 linear elements. It seems likely that this bimodal 9 density is hard to reproduce with Hermite polynomial expansion methods. The agreement between the finite element solution and the analytical solution is excellent when 40 elements are used. With only 14 elements oscillations are apparent in the tails. Figure 2 displays the errors in p(x) and F(x). It is seen that the accuracy in the cumulative distribution is higher than the accuracy

F i g . 3. Plot of the Weibull density fimction (38) with p = 3 hl the physical domahl. Solidline: analytical density; R : density computed by 20 linear elements and BG3 9 formulation with p(O)= O, 0 : density computed by 20 linear elements attd BG3 formulation with weak condition (17) at x = O; + : density computed by 10 linear elements and BG3 formulation with weak condition (17) at x = 0

in the density. This is due to the integral constraint. Any errors in p(x) must be equally positively or negatively distributed throughout the domain, and when calculating F(x), errors are cancelled. The fact that F(x) can be accurately computed by the proposed method is encouraging for reliability applications. The results of computations ofa Weibull density, p = 3 in (38), are presented in Figs 3 and 4. This is the only case detected where an essential boundary condition, here p(0)=0, leads to a significantly inaccurate solution. Increasing the number of nodes made She errors smaller, but the convergence rate seemed to be extremely slow. A weak boundary condition of the type (17), i.e. a(0)p(0)p'(0) = 0, led to excellent results for 40 elements, while with only 10 elements the computed p(0) became slightly less than zero. In structural reliability calculations the tails of the distribution are of particular interest. Table 1

0.010 0.006

0.015

0.010 0.006 0.004


o

0.005
// %~.

0.002 0.000 0.000 -0.002


I

-0.005
| ,I i I i 1 l I

-0.004 !
l I f l i l I

0.0
-1.$ --1.0 --0.5 0.0 0.5 1.0 1.5

0.5

1.0

1.5

2,0

2.5

3.0

3 .$

Fig, 2. Plot of the error hi the mmzerically, computed densiO' (solid line) aml cumulative distribution (dashed lhle). Same problem as in Fig. 1 with 40 linear elements

Fig. 4. Plot of the errors. Same problem as in Fig. 3. Density (solid line) and cumulative distribution errors (dashed lhle) corresponding to the method represented by 0 in Fig. 3
39

Probabilislic Engineerin9 Mechanics, 199I, Vol. 6, No. 1

A general numerical sohttion method for Fokker-Planck equations: H. P. Langtangell Table 1. Comparisoll of analytical alld mtmerical vahtes of the cttmulative lVeibtdl distribution (p = 3) relevant for reliabilit)" calculations. BG3 formulation, Ihtear elements attd x max = 2.8
x analytical F(x) numerical F(x) 20 elements 0.925120 0.991796 0.999648 0.999999 numerical F(x) 40 elements 0.935551 0.991400 0.999508 09 numerical F(x) 80 elements 0.935654 0.991306 09 0.999988

1.400 1.680 1.960 2.240

0.935688 0.991276 0.999463 0~99987

shows a comparison of analytical and numerical values of the cumulative distribution function in the tail for different partitions9 The choice of x m~ influences the accuracy, and a more detailed investigation of the accuracy as a function of element size and domain size is presented later. When a(x) contains singular terms like l/x the drift term is significantly larger than the diffusion terms for small x values. It is of interest to investigate whether upwind methods may improve the solution in cases where the drift term dominates the equation. In general the author has found that the Bubnov-Galerkin formulation gives results that are superior to those o b t a i n e d by Petrov-Galerkin formulations. An example is shown in 9 Fig. 5 where the errors in a Rayleigh density computed by the BG3, PGI and PG2 formulations are compared 9 It appears that upwind weighting of the convection term only "(PG2) gives inferior results compared to the consistent Petrov-Galerkin formulation (PGI) where the modified weighting functions are applied to all terms in the equation 9 The author has also checked if the Petrov-Galerkin method could remove the oscillations in the coarse grid solution in Fig. 1, but the upwind 9formulation decreased the accuracy further. Also enforcing the boundary condition p = 0 in the BG3 formulation gave results which were inferior to those presented in Fig. 1.

When an analytical solution /5 is available it is convenient to study some error measures to gain insight into the numerical behaviour of the solution method. Let F(x) be the analytical cumulative distribution function, and let the subscript, denote the value of a quantity at 9 node number i. One defines the following error measures:

E1 = k / n i=1 (t5,- p,)Z ~ E2 = max


I <<.i<~n

(39) (40)

I/5i - p,l

E3=J~

,=xL (F,-- F,) ~

(41)

E4 = max I F , - F,I
l <~i<~n

(42)

E 5 = F(xcrit ) - -

F(xc,i,)

(43) (44)

E6=J~L (/5'-P')"
,=lk P, /

0.25 0.20 0.15 0.I0


Q

Og Q Q

0.05
0.00
e 9

-9.05
-o,lo
9 9149 ! I i

-0.~5 0,0 0.5

1 .o
z.

,A.5

2.0

2.5

5. Plot of the errors ht the mtmericall)' computed IVeibttll density with p = 2. 40 lhlear elements. Densities are computed b)' the BG3 formulation (solid lhle), the PG1 formulation (dashed Ihte) and the PG2 formtdatiolt ( , ) Fig.

El and E2 are obvious measures of the quality of the numerical solution of the Fokker-Planck equation. Engineering applications of Fokker-Planck solutions are often related to reliability calculations. In this context the cumulative distribution is often of more interest than the density function. Therefore it may be appropriate to study the errors E3, E4 and E5. For structural reliability applications it is especially important to have high accuracy in the tails of the distribution, and the measures E5 and E6 reflect errors in the tails. However, the measure E6 puts very large weights on the density errors close to the boundaries of the domain. In many cases the errors here are large, but the density values are so small that their contribution to calculation of relevant failure probability levels is negligible. To improve the quality of the information provided by the E6 measure one has simply omitted terms in the sum where/5, < 10 - 6 . The measure will then reflect relative errors in the density in the part of the tails where p(x) is of magnitude 10 -5. In standard elliptic problems on a given finite interval it is known that most error measures vary with the clement length h as h -k- 1, where k is the degree of the shape function polynomial. In the present problem the errors will vary both with the element size and the parameters//, or x m'", x,~ . To study this behaviour and

40

Probabilislic Engineering Mechanics, 1991, Vol. 6, No. 1

A general mtmerical solution method for Fokker-Planck equations: H. P. Langtangen


to indicate convergence of the proposed methods, the author has performed extensive numerical experiments in the case d = 1. Uniform mesh refinements are used in both x and ~ coordinates. Note that a uniform mesh in the transformed domain ~ corresponds to a non-uniform mesh in the physical domain x where the smallest elements are situated around the expectation point (where also the gradients are largest). Towards the tails the element size increases. One is therefore in a sense able to test both uniform and non-uniform refinements. Since the solution of the Fokker-Planck equation is smooth one does not expect large differences between uniform or non-uniform refinements. The six error measures El . . . . . E6 have been plotted as functions of the number of elements and either/~ or L = x max- x mi". Several different Fokker-Planck equations with the formulations BG1, BG2, and BG3 have been run in the physical domain x, in the transformed domain {, and with both linear and quadratic elements. Some selected results appear in Figs 6-9. The error measures El . . . . . E5 were multiplied by a factor of 104, while the measure E6 was multiplied by I00 to directly reflect the relative errors in percent. Contour lines corresponding to the numerical values 0.1, 0.2, 0.5, I, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 2000, and 5000, were plotted. Figures 6-7 show some results of the error measures when p is a Weibull density with p = 2 (Rayleigh density). Here one has x mi" = 0 and the length of the domain equals x max. One sees that the BG3 formulation is in general superior to BG1 in that fewer elements are needed to

O0

00

6O

60

.q
E 40

i-o
2O

=: 20

I0

10
I~ I~00 J

IO

length of domain

5 8 l~ngLh of

10

domain

~0

6O

" 20

iii
10
0.2 0.4 . 0.6 b~ta 0.8 1.0

10

0.2

0.4

0.8 beta

0.8

1.0

Fig. 6. Contour plot of error measures. IVeibull density (38) with p = 2. Linear elements. Top left: BGI formulation itl x-space, E1 error. Top right: BG3 fornndation in x-space, E1 error. Bottom left: BGI fornntlation in i-space, E1 error. Bottom right: BG3 formulation ht ~-space, E1 error Probabilislie Engineering Mechanics, 1991, Vol. 6, No. I
41

A general mnnerical solution method for Fokker-Planck equations: H. P. Langtangen


obtain a given level of accuracy. In the transformed domain the BG3 formulation shows less sensitivity to the choice of /7 than does BGI. Of course, BG2 is not applicable here since the natural condition p'(0)= 0 in BG2 is clearly wrong. The results in Fig. 6 indicate that computation in the physical domain is to be preferred. The optimal choice of the length of the physical domain is about 5 standard deviations. The corresponding optimal choice of/3 is 0.5-0.6. It seems easier to give general guidelines on the choice of the length x m~"- x mi", e.g. in terms of standard deviations, than to recommend a value of the less intuitively interpreted parameter /3. Investigations of the case when p is a normal density gave qualitatively the same results as for the Weibull density, except that the length of the domain should be about 7 standard deviations (i.e. the boundaries should be located about _+3.5 standard deviations away from the mean value x = 0), and/7 should be chosen in the range 0.3-0.5, It turned out that the error measures El . . . . . E4 gave qualitatively the same contour plots. The local error measure E5 indicated better accuracy than the global error measures E1 . . . . . E4. The largest errors usually occur around the peak(s) of the distribution, and these errors are not reflected in the measures E5 and E6. Although the errors in the tails are of particular importance in structural reliability, the global error measures E1 . . . . . E4 reflect the largest errors, give more readable contour plots and differentiate the numerical methods better. Most of the comparison of the different numerical approaches herein are therefore based on the measure El. Figures 8-9 contain plots of the error measure El when

~0

,50

5O

40

i~o III

.~oo
= zd

: //" IV
oo

20
io

/t ~

I0

,.i:
2
2 3 4 5 8 7 ~ 8 g I0

length of domain

6o
~0

f
3 4 5 6 *?
B 9

50

.~oo E
= 2o
10
I0

" k /il

l,-ngtla or domMn

5 8 7 lengLh of dorn~n

IO

Fig. 7. Contour plot of error measures. IVeibull density (38) with p = 2. Linear elements and BG3 formulation in x-space. Top left: E3 error. Top right: E4 error. Bottom left: E5 error. Bottom right: E6 error
42

Probabilislic Engineerin 9 Mechanics, 1991, Vol. 6, No. 1

A general mtmerical solution method for Fokket~Planck equations: H. P. Langtangen

|00

8o

,ool/ I,o IIII/, I!llll


A 9

"6

eo

,-"

40

20

I
length

or

domain

length or domnin

IO0

E
tp 0 L

9 -

40

20

0.2

0-4 ~ta

0.8

0.8

1.0

l e n g t h o[ d o m a i n

Fig. 8. Contour plot of E1 error. Bhnodal density (37) with qx = 40, q2 = 10. Top left: BGl formulation, lhtear elements ht x-space. Top right: BG2 formulation, lhlear elements in x-space. Bottom left: BG3 formulation, linear elements in x-space. Bottom right: BG3 formulation, Ihlear elements ht ~-space

p is a bimodal density (37) with ql = 4 0 , ql = I0 and xmi, = -xm~,. It can be seen that the differences between BG1 and BG3 are smaller here than in Fig. 6. The formulation BG2 is in general inferior to B G I and BG3, but comparable accuracy is obtained when n > 35 and the length of the domain is optimal: It is of interest to study the gain in using piecewise quadratic shape functions. Figure 9 displays BG3 with quadratic elements in the physical and the transformed domains. It is seen that second order elements are superior to linear elements in that a certain level of accuracy can be obtained at lower cost. As expected from theory, also the convergence rate is better. Notice that the number of elements is given

in the plots, and for quadratic elements the number of unknowns is twice as large. If one studies El for a small number of unknowns, errors associated with the linear elements are only a factor of two larger than the errors arising from quadratic elements. Taking into account the much larger bandwidth (and generally decreased sparsity) of K for quadratic elements when d > l, it appears that linear elements are a good choice in higher dimensions where computer resources significantly limit the number of elements in the mesh. The optimal location of the (finite) boundaries in this example was + 3 standard deviations away from the mean value x = 0. The main results from the investigations of the case 43

Probabilistic Engineerin# Mechanics, 1991, Vol. 6, No. 1

A general numerical solution method for Fokker-Planck equations: H. P. Langtangen


,, .

,oo

8O

i
1

IlllF '

100

..~ 80

"3

eo |

4O

4o

"! \,
0..2 0.4 0.8 O.B 1.0

2O

20
2 3 4 5 6 7 8 9

l e n g t h or d o m a i n

beta

Fig. 9. Contour plot of E1 error. Bhnodal density (37) with !h = 40, q2 = 10. Quadratic elements and BG3 formulation. Left: computations in x-space. Right: computations in {-space
d = 1 can be summarized as follows. 9 The reported numerical experiments indicate that the natural condition (17) is the boundary condition that gives the most accurate results in general. Imposing the essential condition p = 0 is better only in a very few-cases. Also recall that the author has found examples where the essential condition p = 0 yielded completely wrong results although p = 0 is in accordance with the analytical solution. 9 Computations in the physical domain with finite boundaries proved to be the best approach for dealing with infinite boundaries. The convergence rate of the method was better in the physical domain than in the transformed domain, but more important, it seems to be considerably easier to estimate x =i" and x =~x than to find a proper value of ft. We remark that only one particular transformation of the domain has been investigated. 9 The optimal length of the domain was 5-7 standard deviations (about 5 for one-sided densities, and 6-7 for two-sided densities). The method does not guarantee that p(x)> 0 for all x. Oscillations in the tails occasionally appear, but these are negligible if the mesh is sufficiently fine. In more complicated problems, e.g.;with bimodal densities, significant oscillations in p(x) occur on coarse grids. elements have been tested. Let nr be the number of elements in x,-direction in the mesh. In all examples the author has used 121 = - - - = r i d and uniform element partition. The locations of the boundaries were based on the formulas
I (x,
min

+ x,

max

) = ELK,],

x~T M - x p ~" =

sD[XJ

where s is typically 6-7 for two-sided densities. E[X,] and D[X,] have in this work been computed by direct time domain simulation of the vector 'Markov process since first and second order moments are fairly cheaply calculated by Monte Carlo simulation. For d > 1 we have studied the accuracy in the solution p(x), the density function for X1(t ), and the crossing statistics ofXl(t ). The density function pt(xt) for the Xt(t ) process is defined as

pl(xt)= i "" i p(x)dx2""dxa.


--o0 --o0

Let Ux,(X) be the number of up- and down-crossings per unit time of the level X~ = x by the process Xl(t ). The expected crossing rate r(x) is then
oo

3.2 Two and three dimensional problems


Some selected problems where d = 2 or d = 3 have been investigated in order to check if the hypothesis from the tests with d = 1 still holds and if additional numerical problems appear in high dimensions. Very few analytical solutions of time independent Fokker-Planck equations where d > 1 are known, primary.Refs being 7, 8 and the references therein. The author will not present results from computations in the transformed ~.,-coordinates since these were, as in the one dimensional case, inferior to computations in the physical domain. Only bilinear (d = 2} or trilinear (d = 3) 44

v(x) =---E[Ux,(X)] = f Ixzlpx2(x , xz)dx 2.


In this formula one requires that X 2 ( t ) -----~ ' l ( t ) , and that

p12(xl, x2) is the joint density of Xl(t) and Xz(t ). Both


Pl and P~2 arc computed by numerical integration with the trapezoidal rule.

3.3 Linear oscillator with Gaussian e.vcitation


Consider the problem (7) from Section 1. If ~ = 0 the system is linear with Gaussian excitation. An analytical

Probabilistic Engineering Mechanics, 1991, Vol. 6, No. 1

A general numerical solution method for Fokker-Planck equations: H. P. Langtangen

solution of the associated Fokker-Planck equation can be easily found since the density is known to be Gaussian. In the special case for which results are presented here, one has ( = 1/2, COo= 1, m = 1, D = 1, and the density reads
p(xl, x2, x3) = (2n)- 3/2(detCx)- 1/2 exp - ~ xrCx ix

0.2.5

0,20

{l

}
.

0.15

"~ 0.~0 with

Cx=.,I

(20i)0 (2 it)
, Cx 1= 1 5 -2
1 1 -1 -2 2

0.05

0.00
i i l I I i

r
t

-6

-4

-2

Excellent results from numerical solution of the FokkerPlanck equation were obtained with n, >1-14. Even with n~ = 8 the results are quite satisfactory. Figure 10 shows a comparison of the crossing rate statistics for different element sizes.
3.4 Nonlhwar oscillator with white noise excitation From Ref. 6 one may derive an analytical solution for the probability density p(z, ~) of the following dynamic system:

Fig. 11. Pl ( x l ) for a white noise excited oscillator with cubic spring and I#lear damphtg. Solid line: analytical solution; dashedline: n~ = 14; I-1: i1, = 8; + : n, = 20; 0 : n r = 40

The analytical solution reads


p,(xl, x2) = Co exp

2~~1762 O7+1} r:So(),+ 1)

2 + 2C~00| where
0

+ to~(e,Z + ~2Z3) = -x/2nS~ N2(t) (45)


Ill

where C o is a normalizing constant. The parameters y and ~2 are used to control the nonlinearities in damping and restoring forces.
3.4.1 Cubic sprfllg, /#tear damphlg Consider the problem with "i = 0, e~ = c 2 = 1, ~ = 0.05, COo= 1, m = I, and So = 1/re. The results achieved for p(xt, xz), pl(xl), and v(x), were about as accurate as in the Gaussian d = 3 case above. An example of the pl(xa) curve for different mesh partitions is displayed in Fig. 11. 3.4.2 Cubic sprhlg, nonlhlear damphlg This problem is more difficult than the two previous examples. The parameters were chosen as in the ease with cubic spring and linear damping, except that "~,was set equal to unity. Figure 12 shows the density p~(xl) for

1~, l =~ 2 +~ oJ2oZ2( + ~ e z Z 2) ~

is the mechanical energy of the oscillator. Let X = (X~, X2) r and let Xa = Z, X2 = Z,. The drift and diffusion terms become at = X2, a2 = -2~(0o| - (Oo2(atxt + e2X~)
Bij=O ,

B22-~,
I1|
0.20

i,j~2.

t~

0.35 0.30

'

.~ 0.15

0.25

0
-

0.10,i

0.20

"~ 0 . 1 5 0.10

~o 0 . 0 5

0.05 0.00
l i I 9 I I

0.00
-2 -] 0
It

.
t

.
I

.
I

.
i I t I

"
1 2 3

-3

-2

-1

0
It

Fig. 10. v(x) for a Gaussian Markov process with d = 3. Solid Ibw: analytical sohttion; dashed Ihle: i1r = 14; [] :
11r ~

Fig. 12. l h ( X l ) for a white noise excited oscillator with cubic spring and nonlinear damping. SolM line: analytical sohaion; dashed line: i1, = 14; [] : nr = 8; + : I1, = 20

Probabilislic Engineerin 9 Mechanics, 1991, Vol. 6, No. 1

45

A general mtmerical solution method for Fokker-Planck equations: H. P. Langtangen various element sizes. Oscillations in the density curve are apparent. The amplitude of the oscillations decreases with decreasing element size. Results for v(x) were somewhat more accurate than those shown for p~(xt). As in the d = 1 case the cumulative distribution of X z had higher accuracy than the density function. 3.4.3 Bimodal displacement response The author's aim is to investigate both possibly accurate applications of the solution method as well as current numerical difficulties and limitations. The paper by Langley ~ and the test examples presented so far indicate that finite element solution of Fokker-Planck equations may provide an accurate method for determining statistics ofnonlinear random vibrations. To demonstrate potential difficulties one considers a fairly complicated vibration problem where ), = 1, e~ = - 1/2, e2 = 2, ( = 0.05, wo =200, and S o = l/n. The restoring force changes 3 direction at I z[ = 0.5. Therefore there are two equilibrium states and consequently a bimodal density for the displacement process Xx(t). The top plot in Fig. 13 shows some v(x) curves, and oscillations are present even with 40 x 40 bilinear elements. The boundaries of the mesh used in this plot were x'~. . .-.I x , i . I = l . 5 , x T ~* = I x~i, I = 3.75. Time domain simulations gave D [ X I ] = 0.45 and D[X2] = 1.2. The solutions of the previous test problems were not particularly sensitive to the location of the boundaries x mi" and x m~*. However, the present, more difficult, problem exhibits high sensitivity to the boundary locations. Increasing the x~-interval slightly such that rain x~'~*=lx~ I = 1.7, had a significant impact on the accfiracy of the solution as is demonstrated in the middle plot in Fig. 13. To demonstrate that the presented numerical method seems to be convergent in this difficult example, the bottom plot in Fig. 13 shows that excellent results can be obtained with a mesh consisting of 60 x 60 bilinear elements, also on the grid where xT ~ = I x~ ~"I 1.7. A comparison with Fig. 1 shows that the bimodal density is more easily captured in a one dimensional problem than in this two dimensional case. The author remarks that the results presented in all test examples are for X~. The densities and crossing rates of X~ can be computed with higher accuracy than shown for X~. 3.5 Comparison with moment based methods It is of interest to compare the numerical errors in the proposed procedure with the errors encountered in other approximate methods. The problem from Section 3.4.2 has also been solved by moment based schemes t6 and by the method of equivaleht linearization. Direct simulation of the Markov process yields a standard deviation of 0.96 and a kurtosis of 2.08 for Xa(t). The first and third moment were zero. Formulas from Ref. 16 can then be applied to estimate the marginal distribution F(x) = [=_ ~ pl(()d~ and the expected number of crossings of the level X t = x, previously denoted by v(x). Table I shows a comparison of analytical results with those achieved by numerical solution of the Fokker-Planck equation (FP sol.), approximate formulas from Ref. 16 based on the first four moments (4 mom.), and assumption of a Gaussian response process Xz(t ) (eq. lin.). In the formula for v(x) based on moments one has applied a simulated estimate of v(0) and not the common (Gaussian) approximation v(0) = D[Xz]/2rtD[XI]. 46
1.2
s.O
o~
9 t

0.6

~ 0.2
0.0 -0.2
i

-t~

-I.0

-0,5

0.0

0.5

1.0

l.b

I.Z 1.0 ~" 0,8


_
o |l

t
it

~-~
|

~.t

I ~
,

i t

0.6

t It II * tl s

~ C,.,t ~ 0.2
0.0 -0.2

i - t .5

t 0.5

- 1.0

-0.5

0.0

1.0

1.5

0-15

0.8
o v

i 0.4 " 0.2

- 1 ",

- 1.0

- 0.$

0.0

0.5

1.0

1.5

Fig. 13. v(x) for a white noise excited oscillator with nonlinear sprhlg and damphlg and a bhnodal displacement density. The grid ht xl-direction covers the htterval Ix, I ~< 1.5 (top) aml Ix~l ~< 1.7 (michtle and bottonO. Solid lines: analytical sohttion; dashed lines: numerical sohttions with ttt = 14; []: n, = 8, + : n~ = 20; 0 "n, = 40 (top atul middle) ; 0 : n, = 60 (bottom)

It is clear from Table 2 that the agreement between the methods is poor, especially for large displacement values. In reliability calculations, where the main interest concerns large displacement values, numerical solution of Fokker-Planck equations seems to be a valuable tool.

Probabilistic Engineerin9 Mechanics, 1991, Vol. 6, No. 1

A general numerical sohttion method for Fokker-Planck equations: H. P. Langtangen Table 2. Comparison of different methods for calculathlg crosshzg rates and marghlal distribution of the response process ht the example hz Section 3.4.2. All results are reported with 3 significant digits
Quantity v(x) v(x) v(x) v(x) method analyt. FP sol. 4 mom. eq. fin. analyt. FP sol. 4 mom. eq. lin. x= - 2 0.0288 0.0277 0.0111 0.0611 0.00386 0.00366 0.00302 0.0183 x= - 1 0.394 0.394 0.281 0.309 0.179 0.179 0.150 0.145 of efficient interative methods for linear systems with nonsymmetric and indefinite coefficient matrices. Reference 3 may be a starting point. The proposed solution procedure for the Fokker-Planck equation has been tested in various examples with d ~<3. In general the method works well, also when the solution deviates significantly from a Gaussian density. This is considered to be the main advantage of finite element solution of Fokker-Planck equations. In more demanding problems the method may give oscillations on coarse grids, but it seems that the method is always convergent. Infinite domains are most conveniently and accurately handled by placing the boundaries at finite locations. For a given number of elements there is an optimal value of the boundary location. This is usually about 3 4 standard deviations away from the expectation point. The requirement of a fine grid in some situations would not necessarily be a limitation on the general applications of the method in higher dimensions if efficient iterative equation solvers could be adopted. Comparison of Fokker-Planek solutions with simpler, approximate methods shows that the latter may give considerably less accurate results, especially in reliability calculations. Finally the author mentions that besides the density of the response process it may be of interest for structural reliability calculations to have information on the probability distribution of the time to first passage (exit) of a safety region for the response process. Such probability distributions are governed by the formal adjoint of the Fokker-Planck equation, commonly called the backward Kolmogorov equation. The author will refer to a boundary value problem where the backward Kolmogorov equation is used for calculating first passage time statistics as a first passage problem. Bergman and Spencer T M have solved first passage problems by Petrov-Galerkin finite element methods in the cases d = 2 and d = 3. The solutions of the Fokker-Planck equation are in general smooth and the author~'s results indicate that a standard Bubnov-Galerkin formulation is most adequate. First passage problems usually have solutions with strong singularities, and upwinding techniques are a necessity. The solution in the center part of the domain is usually of greatest interest when solving first passage problems. No integral constraint need to be imposed, and the boundary conditions are usually well defined. The backward Kolmogorov operator gives rise to matrix systems which can be efficiently treated by iterative methods, thus allowing problems with d > 3 to be solved on today's computers. One sees that many of the difficulties associated with the numerical solution of Fokker-Planek equations are not encountered when solving first passage problems. The author has work in progress for efficient solution of first passage problems.

F(x) F(x) F(x) F(x)

As expected, excellent agreement is obtained for all three methods when x = 0. In the problem from Section 3.4.3, with bimodal v(x) and px(x), it is obvious that equivalent linearization and methods from Ref. 16 based on the first four moments give unimodal displacement density and crossing rates.

4. DISCUSSION AND C O N C L U S I O N The mathematical form of Fokker-Plank equations is similar to scalar transport equations occurring in hydrodynamics. This latter type of equations have been solved with success by various numerical methods, see e.g. Ref. 9. However, there Care some features of Fokker-Planck equations which make certain demands to the numerical schemes: 1. Boundary conditions suitable for finite element/ difference methods are not well defined. 2. The solution must fulfil the integral constraint

f p(x)dxl "'" dxa = 1.


f~

3. The domain is infinite. 4. Applications to reliability computations require high accuracy in the tails of the probability density p(x). 5. The number of "space" dimensions (d) is large in engineering applications. 6. The discrete Fokker-Planck operator is nonsymmetric and indefinite. In this paper the author has tried to deal with the above mentioned problems. The first four points are considered to be satisfactorily handled by the proposed finite element method. The author has only tested (and developed programs) for methods where d ~<3. If problems where d > 3 are to be treated, finite elements in an arbitrary number of space dimensions must be constructed and implemented. Due to point 6 o~e currently uses banded Gaussian elimination to solve systems of linear equations, and for d > 3 this method is inapplicable owing to its enormous storage requirements and long execution time. Solution of problems with d > 3 demands the development

ACKNOWLEDGEMENTS The research reported herein is a part of the Reliability of Marine Structures project which is sponsored by A. S. Veritas Research, Sage Petroleum a.s., Statoil, and Conoeo Norway Ltd. The opinions expressed herein are those of the author and should not bc construed as reflecting the views of these companies. The support and helpful advice from Dr. Jan Mathisen 47

Probabilistic Igngineerin 9 Mechanics, 1991, Vol. 6, No. 1

A general mmterical sohttion method for Fokker-Planck eqttations: H. P. Langtangen


h a v e b e e n m o s t v a l u a b l e . T h e a u t h o r w o u l d also like to t h a n k Prof. Bill S p e n c e r a n d Dr. T o m M a r t h i n s e n for s t i m u l a t i n g discussions. 8 9 10 11 REFERENCES 1 2 Bhandari, R. G. and Sherrer, R. E. Random vibrations in discrete nonlinear dynamic systems. J. Mech. Eng. Sei., 1968, 10(2), 168-174 Bergman, L. A. and Heinrich, J. C. Petrov-Galerkin finite element solution for the first passage time of the randomly accelerated free particle. Comp. Meth. Appl. Afech. Eng., 1981, 27, 345-362 Bramble, J. H., Pasciak, J. E. and Xu, J. The analysis of multigrid algorithms for nonsymmetric and indefinite elliptic problems. Math. Comp., 1988, 51(184), 389-414 Brooks, A. and Hughes, T. J. R. A streamline-upwind/PetrovGalerkin finite element formulation for advection dominated flows with particular emphasis on the incompressible NavierStokes equations. Comp. Afeth. Appl. Mech. Eng., 1982. Gardiner, C. W. llandbook of Stochastic Methods, 2nd ed. Springer-Verlag, 1985 Caughey, T. K. and Payne, H. J. On the response of a class of self-excited oscillators to stochastic excitation. Int. J. Non-lin. Mech., 1967, 2, 125-151 Caughey, T. K. Nonlinear theory of random vibrations. Adr. Appl. Mech., 1971, 2, 000-000 12 13 i4 15 16 17 Caughey, T. K. On the response of non-linear oscillators to stochastic excitation. Prob. Eng. Mech., 1986, 1,000-O00 , Fletcher, C. A. J. Computational Techniquesfor Fluid Dynamics, vol I and II, Springer-Verlag, 1988 Iwan, W. D. and Mason, Jr, A. B. Equivalent linearization for systems subjected to non-stationary random excitation. Int. J. Nonl. Mech., 1980, 71-82 Langley, R. S. A finite element method for the statistics of non-linear random vibration. J. Sound Vibr., 1985, IOI(1), 41-54 Larsen, E. W., Levermore, C. D., Pomraning, G. C. and Sanderson, J. G. Discretization methods for one-dimensional Fokker-Planck operators. J. Comp. Phys., I985, 61,359-390 Soize, C. Steady-state solution of the Fokker-Planck equation in higher dimension. Prob. Eng. Mech., 1988, 3(4), 196-206 Spencer, Jr, B. Reliability of randomly excited hysteretic structures. Lecture Notes in Engineering, no. 21, Springer-Verlag, 1986 Wen, Y.-K. Method for random vibration of hysteretic systems. J. Eng. Mech. Dit,., ASCE, 1976, 102, 349-263 Winterstein, S. Nonlinear vibration models for extremes and fatigue. J. Eng. Mech., 1988, 114(I0), 1772-1790 Winterstein, S. and Ness, O. B. Itermite Aloment Analysis of Nonlinear Random Vibration. In W. K. Liu and T. Belytschko, eds: Computational Mechanics of Reliability Analysis, Elme Press, 1989 Wragg, A. and Dowson, D. C. Fitting continuous probability density functions over [0, oo) Using information theory. Trans. h~ Theory, IEEE, 1970, IT-16, 226-230 Wu, W . F . and Lin, Y. K. Cumulant-neglect closure for non-linear oscillators under random parametric and external excitation. Int. J. Nonl. Afech., 1984, 19, 349-362

3 4

5 6 7

18 19

48

Probabilistic Engineerin 9 Mechanics, 1991, Vol. 6, No. 1

You might also like