You are on page 1of 21

Continuum Mech. Thermodyn.

4 (1992) 247-267

C0ntinuumMechanics
T h and
erm0uynamlcs
]

9 Springer-Verlag 1992

A stochastic approach to computational fluid dynamics


H. P. Breuer and E Petruccione

In this paper a new approach to computational fluid dynamics is introduced in which the fluid is regarded as a stochastic dynamical system. The
velocity of the fluid is related to a stochastic process governed by an appropriate master equation acting in a discrete phase space. The method is
explained by means of (1 + 1)-dimensional flow phenomena. It is shown
that the stochastic approach naturally leads to transparent numerical
algorithms for stochastic simulations of fluid motion. By simulating plane
Poiseuille flow it is demonstrated that the probabilistic approach yields a
correct description of laminar fluid motion. Furthermore, soliton-like and
shock wave solutions of Burgers' equation are generated by stochastic
simulations of the underlying stochastic process.
1 Introduction

The basic equations describing the dynamics of fluid motion, i.e. the NavierStokes equation, have been known for a long time. Nevertheless, the integration of these partial differential equations remains a challenging problem in
spite of the increasing computational capabilities available today. For this
reason, we suggest in this paper a new approach to fluid dynamics which treats
the fluid as a stochastic dynamical system governed by a discrete master equation. Thereby this approach avoids a mathematical formulation in terms of
deterministic partial differential equations for macroscopic fields.
One of the central ideas of our approach is to relate the velocity field of
the fluid to an appropriately chosen discrete stochastic process. Once a definition of the phase space, i.e. the space of states of the fluid, has been given,
a master equation governing the stochastic process can be formulated. On the
other hand, the velocity which appears as a field variable in the Navier-Stokes
equation is then interpreted as the expectation value of the stochastic process
defined by the master equation. This transition from random variables to expectation values provides the connection between the stochastic and the
macroscopic description and applies also to variables other than the velocity.

248

~" -

The great advantage of a r


space of states is the fact tht
efficient numerical implement
:
,or
the simulation of stochastic p
_~,~Llons [1]. These
methods are based on the num . . . . . . .
o~ realizations of the stochastic
process and the subsequent e,,~,uation of physical quantities as statistical
averages. It is important to note that by stochastic simulation we do n o t mean
the solution of the master equation as an ordinary differential equation but
rather the direct simulation of the underlying process. The stochastic simulation methods have already been successfully applied to the investigation of
complex polymerisation reactions [2, 3].
In this paper we introduce this program of formulating the dynamics of fluids
in terms of stochastic processes. We suggest to call this approach Hydrostochastics to stress the stochastic content of the theory. Here, in order to keep the presentation as simple as possible we only explain the (1+ 1)-dimensional version of our
theory. The generalization to (2 +1) and (3 +l)-dimensional flow phenomena is
straightforward and will be given elsewhere. In this work we consider typical flow
situations which can be reduced to (l+l)-dimensions by symmetry arguments.
Basically, these flow phenomena are characterized by the presence of a viscosity
term and of a constant pressure gradient. Furthermore, in order to show that also
nonlinear inertial terms can be handled within our theory we study the (1+1)dimensional Burgers equation. This equation may be regarded as the simplest version of the Navier-Stokes equation of a compressible fluid in one space dimension; however, it exhibits many characteristic features of real fluids, since it contains a nonlinear inertial term as well as a viscous diffusion term. A further
reason for choosing Burgers' equation is the fact that the initial and boundary
value problem can be solved analytically in closed form. Thus, this equation may
serve as a nonlinear test equation for numerical algorithms.
Our paper is organized as follows. In Sec. 2 we give a heuristic construction
of the master equation of our approach. Furthermore, we show how to impose
arbitrary initial and boundary conditions in the context of Hydrostochastics.
Finally, in this section we sketch how stochastic simulations are performed.
Sec. 3 is devoted to the stochastic simulation of processes governed by master
equations. As an example of fluid motion in (l+l)-dimensions we simulate
laminar plane Poiseuille flow. Furthermore, we show that a straightforward
simulation of the master equation replacing Burgers' equation naturally
generates, e.g., nonlinear soliton-like and shock wave solutions. Finally, in
Sec. 4 we draw our conclusions.

2 Hydrostochastics
In this section we first define the space of states of the fluid. Once the accessible states of the fluid are known it is possible to construct a master equation
governing the probabilistic time evolution of the system. Furthermore, we
demonstrate how the deterministic equations o f motion emerge from the
master equation as the equations governing the time evolution of the expectation value of the random velocity.

A stochastic approach to computational fluid dynamics

249

2.1 The definition of phase space


The first step of the construction of an appropriate phase space consists in
the division of physical space into a number of cells centered at the points
x;~ which we label by an integer-valued index 2 fi Z. For the purpose of
general (three dimensional) considerations it suffices to use cubic cells of size
6l 3; in practice, shape and size of the cells can be adapted to the confining
geometry of the flow. Note, that in this paper the cells are just one-dimensional intervals of length Ol since we are considering one space dimensional
examples only. Depending on the physical situation under study the number
of cells may be finite or infinite. In the stochastic simulation this number is,
of course, always finite and fluids of practically infinite size have to be modelled by imposing suitable boundary conditions (see below).
According to our general philosophy outlined in Sec. I we now interpret the
velocity field u (x, t) appearing in the Navier-Stokes equation as an expectation
value of a discrete stochastic process N~(t) ~ Z, i.e. we define

(1)

u(x z, t) = ~u(N~(t)).

The above equation provides the connection between the macroscopic and the
stochastic description of fluid motion. Within the stochastic description the
velocity is a time-dependent random variable N~, i.e. a stochastic process
governed by a master equation to be defined below. On the other hand, the
velocity on a macroscopic scale, that is on the scale accessible to standard experimental observation, is given by an expectation value, and therefore obeys
the deterministic Navier-Stokes equation. The velocity unit Ou has been introduced in order to obtain a discrete stochastic process N~. Thus it
represents the size of the smallest possible changes of the state of the fluid
in the discretized phase space. This means that within our description a
positive value Ou. N~ of the random velocity in the cell 2 can be interpreted
as the presence of N~ velocity particles each carrying the velocity Ou. Correspondingly, a negative value Ou. N~ is to be interpreted as the presence of
INk] antiparticles of velocity. Defining the positive and negative part of N~ as
N2u+::

[Nu~,

N~>0

O,

N~<O

)~

Nu-:=

f 0,

N~>0

~-N~,

N~<O

(2)

we write:
N~ = N~+ + N~_.

(3)

Thus we see that within our description the mesoscopic state of the fluid may
be viewed as a many velocity particle state and is completely fixed by specifying the number N~ of velocity particles in each cell 2. Formally, the resulting
phase space may be written as
~
r = {(N ~)~z
JN~ ~ z}.

(4)

250

H.P. Breuer, E Petruccione

2.2 The construction of the master equation

In order to obtain the master equation of Hydrostochastics we proceed as


follows: We show explicitly how stochastic processes can be constructed whose
expectation values obey the corresponding terms in the Navier-Stokes equation.
These stochastic processes are defined by a master equation which is a time
evolution equation for the joint probability distribution P = P(NX.; t) in the
phase space F. From this probability distribution the expectation value for an
arbitrary observable ~Y may be evaluated according to

(~) -'- E ~P([N~u}; t).

(5)

2.2.1 Deterministic terms as Poisson processes


To begin with let us consider the most simple situation, i.e. the Navier-Stokes
equation in one dimension for an ideal, incompressible fluid
Ou

Op
-

Ot

(6)

Ox

Since the continuity equation in one dimension reads


Ou
--

O,

(7)

Ox

neither u nor Op/Ox can depend on the spatial coordinate. Therefore, assuming
that Op/Ox does not depend on time equation (6) describes a uniform linear
growth of the velocity u with time.
In order to model this deterministic behaviour within our mesoscopic picture we regard u(t) as the expectation value of an integer valued Poisson random process [4] Nu(t), i.e. we define
u( t) = fiu(Nu( t) ).

(8)

The Poisson process underlying the partial differential equation (6) is defined
by the following master equation governing the time evolution of the probability distribution P ( N u, t)
OP
- - = k ( P ( N u - 1, t) - P ( N u, t)).
Ot

(9)

For the corresponding expectation value one easily obtains


u(t) = 6 u ( N u ( t ) ) = ~u kt.

(10)

The transition rate k has to be chosen such that this expectation value shows
the correct time dependence, i.e.
k =

aOp

6u Ox"

01)

A stochastic approach to computational fluid dynamics

251

The important fact to be noticed here is that the Poisson process has, in contradistinction to other stochastic processes, a deterministic limit. In fact, in the
limit
f u --+ 0

and

fuN, = const.,

(12)

we obtain

P(Nu't)~f(Nufu-kfut)=f(

Nufu+ Op

"

(13)

Obviously, the above reasoning can be generalized to the case of a space


dependent pressure gradient. In such a situation, having divided space into
cells one has to define in each cell an independent Poisson process N~.
Hence, the generalization of the master equation (9) for the joint probability
distribution

(14)

P = P(N~; t)
reads

OP
- E kZ(E~-I - 1 ) P ,
Ot
2

(15)

where, again, k ~ denotes the space dependent negative pressure gradient divided by flu. In the above equation we introduced the shift operators Ea
defined by
E~F( . . . . N~ . . . . ) = F( . . . . N~ + 1. . . . )
E ; 1 F ( . . . . N~ . . . . ) = F ( . . . . N~ - 1 , . . . ) ,

(16)

where F is an arbitrary function of the random variables. In the simplest cases


we are going to consider in this paper, the transition rates k ~ are independent
of 2.
Within our many-particle interpretation the stochastic process defined by
Eq. (15) may be understood as a creation of velocity particles independently
in each cell. Therefore, k ~ is the creation rate in the cell 2. Of course, we im=
plicitly assumed in Eq. (15) that the negative pressure gradient k~ is positive.
It should be clear how to deal with negative k~: the latter are to be interpreted as creation rates of antiparticles of velocity. Hence, the complete master
equation reads

OP
at - E k~ (Ex--1 - 1 ) P + ~
kx>0

- k X ( E a - 1 ) P = : dpP,

(17)

kx<0

where we defined the "pressure operator" d p


distribution.

acting on the probability

252

H. E Breuer, F. Petruccione

2.2.2 Viscosity as a many-particle diffusion process


In this section we are going to describe viscous fluids within our stochastic
approach. In the simplest cases, the Navier-Stokes equation containing only
viscous forces reads
Ou
1 02u
Ot - R Ox2"

(18)

As in the preceeding section we want to define a stochastic process NZ,(t) in


such a way that its expectation value
(19)

u ( x z, t) = ~u(N~u(t))

obeys the diffusion-like equation (18).


It is well-known that the probability distribution 4~z(t), )~ ~ Z, of a one
particle random walk fulfills in the continuous limit a diffusion equation.
More precisely, let us consider a continuous time random walk in one dimension. The probability distribution ~b~(t) obeys the following master equation
-

Ot

d. (~bx+l - 2~b~ + ~bx_l),

d = const..

(20)

It is easy to see from the above equation that in the limit of infinitesimal small
random steps,
~bz(t) -~ 6(x = Ol. 2, t),

(21)

the probability distribution q~(x, t) is a solution of the diffusion equation


0th _ D -02q5
Ot
Ox2 '

D : = lira (t~l2 d) .
~l~o

(22)

The formal analogy of the diffusion equation (22) with the one dimensional
Navier-Stokes equation (18) is obvious. However, there is a fundamental difference between these two equations. The diffusion equation (22) describes the
time evolution of a probability distribution which is normalized and positive
definite. In contrast, the one dimensional Navier-Stokes equation (18) is an
equation for an expectation value which might be negative and not normalizable. Thus, the stochastic process underlying (18) can not be described
by a one particle random walk.
Therefore, one has to leave the one particle picture. To this end, we consider a collection of independent velocity particles each of which is governed
by Eq. (20). The state of the resulting collective system [4] is characterized by
the set of numbers N~ of velocity particles in all cells ft. Thus, in this manyparticle picture one disregards the identity of the individual particles and is
merely interested in the occupation numbers N~ of particles in each cell.
(Note, that in the one-particle picture the state of the system is completely
specified by giving the location )~ of the particle.)
In the framework of the many particle picture the one-particle density
4z(t) is replaced by the many particle probability distribution P(N~; t). The

A stochastic approach to computational fluid dynamics

253

master equation defining the time evolution of P(N~.; t) can be obtained


from the one-particle master equation by multiplying the one-particle transition rates with the occupation number N~ of cell 2; hence we obtain:
OP

Ot -

1
ROl 2

~ [(E;11E~ -

1) N~ + (E;+11 E2 - 1) Null P.

(23)

where fil denotes the cell size. Since the expectation value of N~ is a statistical
guess of the one-particle density at the point 2 the velocity field (19) obeys
the diffusion equation (18) as required.
Until now we implicitly restricted our attention to the collective random
walk of positive velocity particles. Obviously, to be consistent with our general
picture of particles and antiparticles of velocity we have to generalize the
master equation describing viscous fluids in order to allow for the correct
treatment of antiparticles of velocity. Since a one-particle jump to the right
is equivalent to a one-antiparticle jump to the left and vice versa, the master
equation (23) has to be modified in the following way: In order to describe
the diffusion of antiparticles the numbers N~ = N~_ are replaced by their absolute values tN~[ = -N~_ and the shift operators EZ.11Ea by E2 1EF 1. Consequently, if both particles and antiparticles of velocity are present the master
equation can be written:
OP

1
--

Ot

[ (EJ_IE
-1 2 - 1) Nu~+ + (EZ+11E~ - 1) N~u+]P

RSI 2 ~
1

Rill 2 E

[(E'~-IE~-I - 1) Nu~_ + (Ez+ 1E~-1 - 1) N~u_]P

Z
=:

ddP,

(24)

where we introduced the "diffusion operator" S d.


2.2.3 The nonlinear convection term
Up to now, we have shown how Hydrostochastics deals with a pressure gradient and viscous diffusion. However, it is of great importance to include
within the stochastic theory nonlinear interactions which, for example, enter
the Navier-Stokes equation through the nonlinear inertial term (ft. ~) ft. It is
a remarkable fact that interpreting the inertial term as a nonlinear convection
term a stochastic interpretation in terms of one-particle jumps can be found.
As will be shown here, again, the many-particle picture is absolutely necessary.
It is a well known fact that the most simple one-dimensional equation
describing both nonlinear propagation and viscous diffusion is Burgers' equation [5],
Ou
Ou
1 02u
--

at

+ u

Ox

R Oxz"

(25)

Burgers' equation has been used as a simple model of turbulent motion. Furthermore, it admits solutions representing nonlinear wave motion [6]. Note that

254

H.P. Breuer, F. Petruccione

the term uOu/Ox can be considered to be the one-dimensional version of the


inertial term ( i f - ~ ) a in the Navier-Stokes equation.
As before we are looking for the stochastic process Nau(t) the expectation
value of which obeys Burgers' equation. Obviously, the stochastic process
underlying the nonlinear convection term is fundamentally different from the
previously introduced stochastic processes: It is neither a random walk of a
collection of independent particles nor a Poisson creation process. The construction of the Hydrostochastic form of the convection term will now be given
heuristically within the many particle picture.
Let us consider what happens in a specific cell 2 occupied by N~ __>0
velocity particles. Within the stochastic approach convection may be modelled
as a jump process from cell 2 to cell (2 + 1). Thus, the stochastic process
is completely specified by giving the transition rates for these elementary
jumps. The probability for the jump of a specific particle situated in cell 2
is proportional to the velocity at 2 and, hence, proportional to the number
of velocity particles in cell 2. Consequently, the total transition rate is proportional to the number of pairs of velocity particles in the cell 2, i.e. to
Nuz. ( N ~ - 1)/2. On dimensional grounds the proportionality factor is found
to be J u / J l (note that transition rates have the dimension of an inverse time)
and we obtain the following master equation for the convection of velocity
particles:
OP
Ju
Ot - Jl E

1 ~
(E~-+11Ez- l) 2 Nu(Nu - 1)P.

(26)

In Sec. II.C we demonstrate how Burgers' equation emerges from the master
equation formulation as an equation for the expectation values. It can be
shown that the above form of the master equation for the convection term
leads to a discretization of the differential operator uO/Ox which is of order
Jl. In order to obtain a discretization of this differential operator which is of
order Jl 2 the following symmetrized form of the master equation will be used:
OP
Ot

_ 1 Ju
2 Jl

(E~-+11E~- 1) 2 N~u(N~ - 1) P

p~

q- E (E~-I Ez-1 -- 1) ~- N u ( N u - 1)
)
).
= : ~r

(27)

where we abbreviated the effect of the right hand side by defining the "convection operator" 5r c.
Constructing Eq. (27) we assumed that N~u _>_0. The general master equation describing both the presence of velocity particles and antiparticles can
now easily be derived. Let us assume, that cell 2 contains ]NuZl =-NZu_ antiparticles of velocity. The elementary jumps of the antiparticles can be obtained
from those of the particles of velocity by simply reversing the directions of
the jumps, i.e. all antiparticles jump to the left. However, since the process

A stochastic approach to computational fluid dynamics

255

of an antiparticle jumping to the left is identical to the process of a particle


jumping to the right, the above master equation describes the combined convection of particles and antiparticles of velocity if N,~ is replaced by [N~ [.

2.3 The master equation o f Hydrostochastics

Having discussed how to interpret the various terms occuring in the equations
of fluid dynamics as stochastic processes let us now combine these processes
to obtain the unified master equation formulation of Hydrostochastics. Obviously, the combined effect of different terms can be obtained by just adding
the corresponding operators. For example, the master equation describing a
pressure driven viscous fluid in one space dimension reads
OP

ot = I @ +

e,

(28)

where the pressure and diffusion operators @ and J d have been defined in
Eqs. (15) and (24). As another example let us construct the master equation
corresponding to Burgers' equation (25); we obtain from Eqs. (24) and (27):
OP

Ot
1
-- Rt~l 2 E

[ (E~_1-1Ex - 1) Nu+X + (E~-+I1E;~ - 1) N,z+] P

Rgl 2 E

+2
+ E

[(Ej'-I E;1 - 1) Nu~_ + (Ej~+I Ex--1 - 1) N u;~- ] P

(E;11E

- 1) 2 IN I(IN I- 1)P

1 [N~I (IN.~I - 1) PI .

(E;1E;~-I - 1) 2

(29)

),

Although the above equation may look rather complicated it allows for a
transparent physical interpretation within the many-particle picture. Recall,
that the system is characterized by giving the numbers N~ of velocity particles
in each cell of the discretized space. The above master equation defines the
possible transitions between the states in the phase space F and the corresponding transition rates. These transitions solely consist of one particle jumps to
neighbouring cells each particle carrying the amount gu of velocity. The latter
fact turns out to be of fundamental importance as it makes possible the construction of efficient numerical schemes which simulate the stochastic process
underlying the master equation (see Sec. 2.5). Furthermore, the nonlinear convection term in the master equation is responsible for the fact that in the
many-velocity particle system a nonlinear self-interaction is present,

256

H.P. Breuer, E Petruccione

Let us now demonstrate in some detail how the macroscopic equations may
be derived from the corresponding master equations. As an example we consider the master equation (29) corresponding to Burgers' equation (25).
Generally, the time derivative of the expectation value ua = (OuN~) may be
written as the expectation value of a commutator
(30)

Ot

From the properties of the shift operators Ez it follows that (recall that

Nu =Nu+ +N~_)
t~bt ,,h12+1 __2Nu~+ +Nu~+l 4_ jVz+1 - 2 N ~ _ +N~_ )
([6uN~u, del ) = R 6l 2 v, u+
---. u-

t~U

,~N2 + 1

- R M 2 ,~.,

-2Nu+Nu

2-1

).

Evaluating the commutator of the operators N~ and ~


terms of order 1/N~

(31)
we obtain neglecting

~u 2
([6uNZu, d c l ) -

((N.u2+l) 2 - (Nu~-l)2).

(32)

4dl

Since for sufficiently small 0u the number of velocity particles N~ becomes


large one expects that fluctuations are small and, therefore, that the approximation
((N~) 2) = (N~u)2

(33)

holds to a sufficient degree of accuracy. Eq. (30) may then be written as an


equation for u~,
0U 2
- -

Ot

1 U2+l -+

U]_ 1
-

2(5l

1 U,~+I -- 2U,~ + R;t_ 1


6l 2

(34)

Obviously, this equation is nothing but the discretized version of the Burgers
equation (25) which emerges in the continuum limit ~l-~ 0.
As has been mentioned in Sec. 2.2.3 the form (27) of the convection term
leads - in the equation for the expectation value (Su(N~) - to an approximation of the differential operator uO/Ox which is of order (~/)2.
In deriving the above macroscopic equation for the expectation value ux
we neglected, of course, all higher moments of the stochastic process N~. As
is well-known the above master equation, defining a nonlinear stochastic process, leads to an infinite dimensional system of coupled differential equations
for the moments. Thus, in order to derive more rigorously from our master
equation the macroscopic equation and to investigate the dynamics and influence of fluctuations one has to employ a more systematic method. Such
a method is provided by the well-known O-expansion [4]. Applying this expansion to the master equations of Hydrostochastics reveals that, in fact, the

A stochastic approach to computational fluid dynamics

257

macroscopic equations are equivalent to the equations of fluid dynamics. Furthermore, it can be shown that within the linear noise approximation the fluctuations superimposed on the macroscopic dynamics can be identified with
those fluctuations derived from the theory of fluctuating hydrodynamics [7].
Thus, the stochastic dynamics implied by our master equation formulation
can, indeed, be given a clear physical interpretation. However, these considerations are beyond the scope of this paper and will be presented elsewhere [8].
In this work, we confine ourselves to the treatment of (1 + 1)-dimensional
fluid dynamical problems. The generalization of the master equation to two
and three space dimensions can be performed within the same framework of
the theory presented above.
2.4 Boundary and initial conditions
In the preceeding sections we have derived the fundamental master equations
of our theory. As one might expect the correct implementation of boundary
conditions is decisive for the description of fluid motion within the context
of Hydrostochastics as it is within the formulation of fluid dynamics with the
help of partial differential equations. In Hydrostochastics the correct boundary
conditions have to be imposed on the master equation, e.g. eq. (29), describing
fluid motion.
In this section we want to describe how to take care of a boundary
separating a viscous fluid and a solid surface. Typically, there exist two types
of boundary conditions. Firstly, at fixed solid surfaces the no-slip boundary
conditions require that the velocity vanishes. Secondly, for moving boundaries
the no-slip condition requires the velocity of the fluid at the solid surface to
be equal to that of the boundary.
The boundary condition at fixed solid surfaces
/~[ Boundary = 0

(35)

results from the fact that adhesion forces create an infinitesimal fluid layer of
zero velocity along the solid surface. As we already described in detail one of
the fundamental steps in the formulation of Hydrostochastics is the parametrization of the fluid bulk in cells 2. The infinitesimal zero velocity fluid layer
can thus be modelled by introducing a corresponding layer of cells. The cells
within this layer act as sinks of diffusing velocity particles. In practice, this
means that velocity particles jumping into the layer cells disappear. On the
other hand, this implies that no velocity particle can leave the layer cells since
the velocity of the boundary layer is zero.
In the case moving solid surfaces the boundary condition reads
b~j Boundary = /Q,

(36)

where 0 is the velocity of the moving solid surface. As in the case of the solid
surface at rest we again introduce a layer of boundary cells. Now, the layer
cells are supposed to move with the constant velocity U.. In other words, this
means that in each layer cell the number of velocity particles is kept constant.
If for example the solid surface moves with constant velocity U in the x direc-

258

H.P. Breuer, E Petruccione

tion, the number of velocity particles Nu in each layer cells has to be chosen
such that U = 6u(Nu)= 0uN,. There is thus a fundamental difference to the
case of a fixed boundary: Now velocity particles may leave the layer cells.
However, in the latter case the velocity of the layer ceils or equivalently the
number of velocity particles in these cells is kept constant. As for the fixed
boundary, particles diffusing from the neighboring cells into the layer ceils
disappear.
For the investigation of the properties of the fluid bulk it might be
necessary to use periodic boundary conditions. Also the implementation of
these boundary conditions does not cause any problem within our approach,
since all transitions have been reduced to one-step processes (see Sec. 3).
As far as initial conditions are concerned, let us assume that the initial
velocity in cell X is u0. This initial condition can be realized by fixing in an
appropriate way the number of velocity particles in the cell under consideration. In our example it is sufficient to put at the beginning of the simulation
N O = Uo/OU velocity particles in cell )~.

2.5 Stochastic Simulation


That the master equation formulation within a discretized phase space naturally leads to efficient numerical algorithms is one of the major advantages of
our approach. In this section we present a brief description of the method of
simulation of stochastic processes governed by master equations [1]. The
method of stochastic simulation is particularly well suited for the numerical
investigation of high dimensional systems [2, 3]. This method is applied in the
next section to simulate the stochastic processes of our theory.
Basically, the method of stochastic simulation produces realizations NZu(t)
of the underlying stochastic process. From a sufficiently large number of these
realizations one then can obtain physical quantities as statistical averages.
The generation of a realization proceeds along the following lines: Assuming that the system is in a specific state N~u(to) at time to one can infer from
the master equation the rate for the next transition to occur. This total transition rate W(NZ~(to)) is, of course, the sum of the rates of all possible jumps
of velocity particles and antiparticles. From the total transition rate W one can
evaluate the waiting time distribution, i.e. the probability distribution of the
time interval dt the system remains in the state N~u(to). According to this
distribution the random number dt can be obtained from a uniformly distributed random number t/E [0, 1] by the following relation
1

dt-

W(N~(to) ) lnr/.

(37)

Thus, having determined the transition time to +dt one chooses a specific
transition with a relative probability which is given by the ratio of the corresponding one-particle transition rate to the total rate W(N~(to)). In this
way a new state N~(to +dt) is found. Repeating this procedure yields a trajectory N~u(t), i.e. a realization of the stochastic process.

A stochastic approach to computational fluid dynamics

259

Having thus determined a sufficiently large number M of trajectories

(N~(t))j, j = 1,..., M, interesting observables can be evaluated as statistical


averages; for example the velocity is computed as
0u M

u(x~, t) = Ou(N~u(t))= ~ E

(N~(t))j.

(38)

j=l

3 Examples

in t w o s p a c e - t i m e

dimensions

In this section we are going to apply Hydrostochastics to some typical ( l + l ) dimensional flow situations. We compare the results of the simulations with
well-known analytical results of Hydrodynamics.

3.1 Plane Poiseuille Flow


In this subsection we consider the laminar flow between two parallel plates
subjected to a constant pressure gradient. We define the Reynolds number R
with respect to the parameters
L = distance between the plates
U = maximal velocity of the stationary flow field
v = viscosity of the fluid,

(39)

i.e.,
R -

U.L

(40)

We choose coordinates in such a way that the plates are located at x = 0 and
x = 1. The flow is directed along the positive y-axis and we denote the y-component of the velocity by u = u(x, t).
The hydrodynamic description of this flow is given by the following form
of the Navier-Stokes equation in two space-time dimensions:

Ou
3t

dp
dy

1 02u
R OX2"

+ -

(41)

In the case under study we assume the fluid to be initially at rest

u(x, 0) = 0,

(42)

and according to the coordinates chosen we have the boundary conditions


u(0, t) = u(1, t) = 0.

(43)

This initial and boundary value problem can be solved by standard means and
yields for the time-dependent velocity field:

u(x, t) = 4x(I - x) -

Z
n = 1,3,5 ....

32
~
793n

sin(~znx) exp

( - l r 2Rn 2 t ) .

(44)

260

H. R Breuer, E Petruccione

Let us now demonstrate how Hydrostochastics treats the above flow


phenomenon. To this end we first have to implement the initial and the boundary conditions in our simulation. The initial condition (42) means that we
have to start our simulation with the configuration
N~(0) --- 0.

(45)

The boundary condition of fixed solid planes is implemented in the following


way. The planes are modeled by two additional cells. In these cells one keeps
the number of velocity particles equal to zero. This means that no velocity
particles can leave the boundary cells and enter the fluid bulk. On the other
hand, if a bulk velocity particle diffuses into a boundary cell it disappears.
Having imposed these boundary and initial conditions the stochastic simulation proceeds along the lines sketched in Sec. 2.5.
The results of such a simulation are presented in the next figures. Figure 1
displays the result of a stochastic simulation of plane Poiseuille flow with the
initial value (42) and compares it with the analytical result (44). We plot the
scaled velocity field u ( x , t) for three different values of the time (t = 0.2 tr,
t = 1.0 tr, and t = 5.0 tr) measured in units of the relaxation time t r = R/zr 2.
Fig. i illustrates the way the velocity profile changes its shape and, finally,
reaches the stationary solution.

1,25

1.00

0.75-

0,50 -

0.25 -

0
0

0.1

0.2

0.3

0.4-

0.5
0.6
X .------',--

0,7

0.8

0.9

1.0

1. The result of a stochastic simulation of plane Poiseuille flow corresponding to


the initial and boundary conditions Eqs. (42) and (43). We display the velocity as a
function of x for the three different times t 1 = 0 . 2 , t 2 = 1 . 0 , and t3 = 5.0 measured in
units of the relaxation time.
Smooth curves: The analytical result according to Eq. (44).
Symbols: The stochastic simulation employing 100 realizations and 20 cells. 6u was
chosen to be 0.001
Fig.

A stochastic approach to computational fluid dynamics

261

This example demonstrates that it is indeed possible to incorporate the effects of the deterministic pressure gradient as well as that of the viscosity term
in a unified stochastic interpretation of the Navier-Stokes equation. Furthermore, we see that the zero boundary conditions can be implemented quite
simply by regarding the solid walls at x = 0 and x = 1 as sinks for the diffusing velocity particles. Finally, the agreement between the simulation and the
analytical curve is remarkably good during the whole time evolution. This
reflects the fact that we are simulating a stochastic process and not merely a
stationary or equilibrium state.
3.2 Nonlinear waves
Originally Burgers proposed the Eq. (25) as a simple one-dimensional model
of homogeneous turbulence. The main features of the Navier-Stokes equations
are retained in the above equation. The nonlinearity has the same structure
as in the Navier-Stokes equation, and the dissipative term is also of the same
type. Only the pressure term is missing, so that one has to expect a relaxation
of turbulence with time. The model also lacks an equation of continuity, so
that it describes in practice a one-dimensional compressible flow. The Burgers
equation is particularly appealing because the analytical solutions of the initial
value problem is known [6]. These solutions represent, for example, nonlinear
wave solutions like shock waves and "humps". Thus, Burgers' equation is interesting as it makes possible the study of the interplay of nonlinear propagation and viscous diffusion.
3.2.1 Shock waves
The first example we are going to treat is the shock wave solution of Burgers'
equation. The shock wave solution is obtained for the following initial condition
I1, x < 0
(46)
u(x,O)=uo(x)=
O, x > 0 "
The diffusion and the convection of this initial step are described by the
following time-dependent solution
u(x, t) =

1 + h(x, t) exp [R(x - t/2)/21

(47)

where the function h(x, t) is defined by


h(x, t) =

erfc ( - x / ~ x )
erfc ( x/-R/ 4t (x - t ) )

(48)

The function erfc(x) is known as the conjugated error function, and is given

by
erfc(x) -

] dy e x p ( - y 2 ) .

(49)

262

H. P. Breuer, F. Petruccione

1.25 -

c n ~

1.00

0.75 -

0.50 -

0.25 -

\
0

-1.00

- 01.75

-01.50

-01,25

0.25

o:5o

0'.75

1:oo

X:

Fig. 2. T h e s t o c h a s t i c s i m u l a t i o n o f t h e s h o c k wave s o l u t i o n o f B u r g e r s ' e q u a t i o n corr e s p o n d i n g to the initial condition Eq. (46) for the three different times tl = 0.1,

t2 = 0.3, and % = 0.9. Reynolds number: R = 100


Smooth curves: The analytical result according to Eq. (47).
Symbols: The stochastic simulation using 10 realizations and 100 cells. 6u was chosen
to be 0.001
To generate shock waves within the master equation approach we have to
implement the initial conditions properly. In this case it is sufficient to choose
the number of velocity particles in the cells at the beginning of the simulation
in the following way. No velocity particles have to be in the cells with x > 0.
In the cells with x < 0 one has to put N, = 1/6u velocity particles. The
boundary conditions are realized by keeping fixed the number N, of particles
in one boundary cell and by keeping the number of particles in the other
boundary cell equal to zero.
In Figure 2 we show the time development of the shock wave as it is otained from the simulation at three different times ta = 0.1, t2 = 0.3, and % = 0.9,
and compare it with the analytical solution (47) (solid line). The Reynolds
number was chosen to be 100. As one can see in this figure the agreement
is overwhelming. It might be important to notice that the simulation results
are particularly good on the front of the shock wave.

3.2.2 Single hump


Another interesting solution of Burgers' equation is the single hump solution. This solution may be obtained by considering the following initial
condition
u(x, O) = Uo(X) = A ~ ( x ) .

(50)

A stochastic approach to computational fluid dynamics

263

The propagation of the single hump is described by the following exact solution
[exp (RA/2) _ 1] exp ( _ R 2)

u(x, t) =

(51)

1 [exp(RA/2'-1]erfc(~tx

In the simulation the initial condition was realized by setting initially N~ = 0 for
all but one cell ,1. = 0 for which N o was chosen such that A = 2, i.e. we have at
t=0:
0(fi~u2~/)
for / l . 0,
=
(52)
N"x(0)
int
, for /l = 0,
where int (y) denotes the integer part of y. In Figure 3 we show the result of the
stochastic simulation together with the analytical result (51) (solid line) for three
different times t = 0.01, t = 0.05, and t = 0.10. The Reynolds number was chosen
to be R = 10. Keeping in mind that a singular initial condition is studied here, the
agreement between the stochastic simulation and the analytical result is striking
although only 201 cells have been used. Furthermore, it should be emphasized
that we did not employ any special technique to obtain Fig. 3, nor did we perform
any analytical pre-integration in order to smooth the singular initial condition,
nor did we use any analytical a priori guess of the solution.
17.5 -

15.0 -

12.5 -

I 10.0-

7.5-

5.0-

2.5-

0
-1.00

'0'.75

-0'.50

-o'.25

0.25

0.50

075

1.~0

Fig. 3. The stochastic simulation of the single hump solution of Burgers' equation corresponding to the initial condition Eq. (50). The velocity is plotted for the three different
times t 1 = 0.01, t2 = 0.05, and t3 = 0.1. Reynolds number: R = 10.
Smooth curves: The analytical result according to Eq. (51).
Symbols: The stochastic simulation using 10 realizations and 201 cells. 5u was chosen to
be 0.01

264

H.P. Breuer, F. Petruccione

3.2.3 Periodic Waves


Finally, we discuss another important class of solutions of Burgers' equation:
Imposing periodic boundary conditions for the velocity field,
(53)

u ( x + 2, t) = u ( x , t ) ,

the following solution of Burgers' equation is obtained [6]


1
u ( x , t) = - -

Ennexp[-4(t+
- ct .

t+l

1) ( x - c t - n )

R
4(t+l)

E nexp

2]

+ c,

(54)

2]
(x-ct-n)

where the sums are extended over the even integers n = 0, 2, 4 . . . . . This
solution represents a periodic array of shocks separated by smooth ramps moving to the right with mean velocity
2

1 ~ dr u ( x , t) = c = const..

(55)

20
From the examples shown above it shuld be clear how to realize the initial
conditions corresponding to the exact solution (54) at t = 0 in a stochastic
simulation. We therefore only explain how to impose the periodic boundary
1.5-

1.0-

0 . 5 "~

T
0-

-0.5

-1.0-

o'.2s

o'.so

o%

.'oo
X"

1 25

.'so

1.'75

2%

i.

Fig. 4. The stochastic simulation of a periodic wave solution of Burgers' equation with
boundary condition (53), mean velocity c = 0.5, and Reynolds number R = 100. The
velocity is plotted for the three different times t 1 = 0.0 (initial condition), t2 = 0.5,
and t3 = 1.0.
Smooth curves: The analytical result according to Eq. (54).
Symbols: The stochastic simulation employing 10 realizations and 100 cells; 5u = 12001

A stochastic approach to computational fluid dynamics

265

conditions. Recall that having divided the period ranging from x = 0 to x = 2


into a number of cells the whole time evolution according to the master equation has been reduced to a succession of one particle jumps to neighbouring
cells. Hence, periodic boundary conditions are nothing but the following rule:
A particle in the first cell (at x = 0) which jumps to the left ends up in the
last cell (at x = 2), likewise, a particle in the last cell which jumps to the right
ends up in the first cell.
In Figure 4 we display the results of our stochastic simulation. We show
the velocity for the three different times t~ = 0, t2 = 0.5, and t~ -- 1.0, where
the first time tl corresponds to the initial condition. The Reynolds number
was chosen to be R - - 100 and the mean velocity c = 0.5. The lesson to be
learned from the excellent agreement between the simulation and the analytical
result (note, that only 100 cells have been used!) is twofold: Firstly, the implementation of the periodic boundary conditions is obviously correct. Secondly, note that the parameters have been fixed in such a way that the initial state
contains particles as well as antiparticles of velocity. Thus, the figure proves
our stochastic interpretation of positive and negative velocities to be correct.
4 Conclusions
In the present work we presented a new approach to fluid dynamical computations. The basic idea behind our approach is that we are not concerned with
deterministic time evolution equations, i.e. partial differential equations, but
rather with stochastic processes governed by master equations. The interesting
physical quantities are then evaluated by statistical means from a stochastic
simulation.
O f course, statistical methods have previously been applied to the solution
of boundary value problems of partial differential or integral equations.
However, these Monte Carlo methods [9] are concerned with stationary solutions, whereas in our approach we describe and simulate stochastic processes,
i.e. time-dependent probabilistic evolution. Other stochastic approaches to the
stationary solution of nonlinear problems, e.g. to Burgers' equation [10], are
- contrary to our approach - not working in a many-particle picture and
therefore have to rely on a priori guesses of the solution.
The starting point of our reasoning was the interpretation of the NavierStokes equation as an equation for the mean value of a stochastic process.
This stochastic process is defined by fixing an appropriate phase space F which
contains all possible states of the fluid and by specifying the rates of the transitions between the states. In our investigation it turns out that the stochastic
state of the fluid is defined by giving the set of numbers (N~)z of velocity
particles in each cell 2 of discretized space.
In order to find the stochastic process N~ we combine different stochastic
processes the expectation values i~f which represent the different terms of the
Navier-Stokes equation. It turns out, that this can be done in a consistent way only if the state of the system is regarded as a collective system, i.e. as a many-velocity particle state. In particular, in order to find the stochastic analogon of the
nonlinear convection term this many-particle interpretation is indespensable.

266

H.P. Breuer, F. Petruccione

The practicability and efficiency of our approach has been demonstrated


with the help of some typical two space-time dimensional flow situations. We
demonstrated that our probabilistic theory indeed yields a correct description
of laminar fluid motion paradigmatic for deterministic time evolution. The
stochastic simulation of nonlinear convection was illustrated by means of the
one-dimensional Burgers equation. As we have seen it is quite easy to obtain
localized soliton like and shock wave solutions of this equation from a
stochastic simulation. Thus, Hydrostochastics leads to a stochastic interpretation of the time evolution of nonlinear waves.
It is central importance that the formulation of the dynamics in terms of
a master equation acting on a discretized phase space naturally leads to
simulation algorithms which are well-suited for numerical (parallel) implementation. Let us briefly sketch the main advantages of our method:
1. The numerical algorithms are easy to implement and very transparent. For
example, the FORTRAN-code for the simulation of the shock wave solution
of Burgers' equation consists of 120 statements.
2. The method of stochastic simulation is particularly well-suited for the integration of dynamical systems with many degrees of freedom [2, 3]. This
fact may be decisive for the study of fluid dynamical phenomena in higher
dimensions.
3. Main parts of our simulation algorithms operate with arrays of integer
variables thereby avoiding roundoff errors. For example, conservation laws
which are known from the equations of motion can be fulfilled exactly.
4. The stochastic simulation algorithm was tested with the help of the shock
wave solution of Burgers' equation at very large (R = 10 l~ Reynolds
numbers: It turns out that within our stochastic approach numerical
artefacts such as the Gibbs-phenomenon [11] or numerical viscosity [12] can
easily be avoided.
The generalization to two and three space dimensions is straightforward but
beyond the scope of the present work. The corresponding generalized master
equations and their application will be published elsewhere. Concluding, we
believe that both the conceptual transparency and the numerical simplicity and
flexibility constitute a very powerful tool which might allow the treatment of
real practical problems.

References

1. Honerkamp, J.: Stochastische Dynamische Systeme. VCH, Weinheim, 1990


2. Breuer, H. P.; Honerkamp, J.; Petruccione, F.: Chem. Phys. Lett. 190 (1992) 199
3. Breuer, H.P.; Honerkamp, J.; Petruccione, F.: Computational Polymer Science
1 (1991) 233
4. van Kampen, N.G.: Stochastic Processes in Physics and Chemistry. NorthHolland, Amsterdam. 1981
5. Burgers, J.M.: in Statistical Models and Turbulence, edited by Ehlers, J.;
Hepp, K.; Weidenmiiller,H.A. Lecture Notes in Physics 12, Springer-Verlag,
Berlin, 1972 p. 41

A stochastic approach to computational fluid dynamics

267

6. Whitham, G. B. : Linear and Nonlinear Waves. John Wiley & Sons, New York, 1974
7. Landau, L.D. ; Lifshitz, E.M. : Fluid Mechanics, Volume 6 of Course of Theoretical
Physics. Pergamon Press, London, 1959
8. Breuer, H.P.; Petruccione, E: Hydrostochastics and Hydrodynamic Fluctuations,
preprint THEP 11/92, University of Freiburg (1992)
9. Sabelfeld, K. K.: Monte Carlo Methods in Boundary Value Problems. Springer,
Berlin 1991
10. Marshall, G.: Computer Physics Communications 56 (1989) 51
11. Canuto, C. ; Hussaini, M. Y.; Quarteroni, A. ; Zeng, T. A. : Spectral Methods in
Fluid Dynamics. Springer-Verlag, New York 1987.
12. Smoller, J.: Shock Waves and Reaction-Diffusion Equations. Springer-Verlag
New York 1983
H. P. Breuer
E Petruccione
Alber t-Ludwigs-Universit~t
Fakult~it for Physik
Hermann-Herder-Str. 3
W-7800 Freiburg i. Br.
FRG
Received June 12, 1992

You might also like