Next Article in Journal
MooFuzz: Many-Objective Optimization Seed Schedule for Fuzzer
Next Article in Special Issue
The Relativistic Harmonic Oscillator in a Uniform Gravitational Field
Previous Article in Journal / Special Issue
Approximating the Density of Random Differential Equations with Weak Nonlinearities via Perturbation Techniques
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Reliable Efficient Difference Methods for Random Heterogeneous Diffusion Reaction Models with a Finite Degree of Randomness

by
María Consuelo Casabán
,
Rafael Company
*,† and
Lucas Jódar
Instituto Universitario de Matemática Multidisciplinar, Building 8G, Access C, 2nd Floor, Universitat Politècnica de València, Camino de Vera s/n, 46022 Valencia, Spain
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Mathematics 2021, 9(3), 206; https://doi.org/10.3390/math9030206
Submission received: 21 December 2020 / Revised: 16 January 2021 / Accepted: 18 January 2021 / Published: 20 January 2021
(This article belongs to the Special Issue Mathematical Methods, Modelling and Applications)

Abstract

:
This paper deals with the search for reliable efficient finite difference methods for the numerical solution of random heterogeneous diffusion reaction models with a finite degree of randomness. Efficiency appeals to the computational challenge in the random framework that requires not only the approximating stochastic process solution but also its expectation and variance. After studying positivity and conditional random mean square stability, the computation of the expectation and variance of the approximating stochastic process is not performed directly but through using a set of sampling finite difference schemes coming out by taking realizations of the random scheme and using Monte Carlo technique. Thus, the storage accumulation of symbolic expressions collapsing the approach is avoided keeping reliability. Results are simulated and a procedure for the numerical computation is given.

1. Introduction

Dealing with deterministic partial differential equations (PDE), finite difference methods (FD) are probably the most used because they are easy to apply and fairly efficient,  [1,2]. Trying to capture real world problems, the models introduced uncertainty in several ways, basically assuming that both data, parameters, initial and or boundary conditions are stochastic processes instead of deterministic functions, [3,4]. The uncertainty appears not only because of error measurements, but also considering heterogeneity of the media, material impurities, or even the lack of access to measurements  [5,6]. Independently of the type of modelling the uncertainty, the consideration of partial differential equations models (PDEM) has particular challenges. In fact, it is necessary to compute not only the stochastic process solution or approximating stochastic process, but also their statistical moments, mainly the expectation and the variance. Integral transforms methods are efficient techniques to solve PDEM based on integration resources in fitting domains [7,8]. Another powerful technique suitable for models with complex geometries is the finite element method [9]. Iterative methods, for instance FD have particular troubles derived from the storage accumulation of intermediate levels when the computer manages symbolically the involved stochastic processes, [10,11,12]. This drawback of the iterative methods for solving PDEM occurs in both approaches, the one based on Itô calculus [13] the so-called stochastic differential approach (SDEA), as well as the one based on the mean square calculus  [14] also called random differential equations approach (RDEA). To face this computational challenge we take a set of realizations of the model, then we solve each sampled problem using FD method. Finally, we use Monte Carlo technique, [15,16] to average the results of the deterministic sampled problems to compute the expectation and the variance of the approximating solution stochastic process. In our model the involved stochastic processes (s.p.’s) are defined in a complete probability space ( Ω , F , P ) and have n degrees of randomness [14] (p. 37), i.e., they only depend on a finite number n of random variables (r.v.’s):
h ( s ) = F ( s , A 1 , A 2 , , A n ) ,
where
A i , i = 1 , , n , are mutually independent r . v . s ; F is a differentiable real function of the variable s ( being s the spatial variable x or the temporal one t ) .
In addition, under this hypothesis, the s.p. h ( s ) has sample differentiable trajectories (realizations), i.e., for a fixed event ω Ω , the real function h ( s , ω ) = F ( s , A 1 ( ω ) , A 2 ( ω ) , , A n ( ω ) ) is a differentiable function of the real variable s. For the sake of clarity in the presentation and to save notational complexity, we will assume that involved s.p.’s in the coefficients and initial or boundary conditions, have one degree of randomness, i.e., they have the form
h ( s ) = F ( s , A ) ,
with A a r.v. and F a differentiable real function of the variable s. Then the s.p. h ( s ) has sample differentiable trajectories, i.e., for a fixed event ω Ω , the real function h ( s , ω ) = F ( s , A ( ω ) ) is a differentiable function of the real variable s.
This paper deals with random parabolic partial differential models of the form
u ( x , t ) t = x p ( x ) u ( x , t ) x q ( x ) u ( x , t ) , 0 < x < 1 , t > 0 ,
u ( 0 , t ) = g 1 ( t ) , t > 0 ,
u ( 1 , t ) = g 2 ( t ) , t > 0 ,
u ( x , 0 ) = f ( x ) , 0 x 1 ,
where the diffusion coefficient p ( x ) , the reaction coefficient q ( x ) , the boundary conditions g i ( t ) , i = 1 , 2 , and the initial condition f ( x ) are s.p.’s with one degree of randomness in the sense as defined above. In addition we assume that p ( x ) , q ( x ) , f ( x ) and g i ( t ) , i = 1 , 2 are mean square continuous s.p.’s in variables x and t, respectively, p ( x ) is also a mean square differentiable s.p. and the sample realizations of the random inputs p ( x ) , q ( x ) , g i ( t ) , i = 1 , 2 and f ( x ) satisfy the following conditions denoting p ( x ) as the mean square derivative of p ( x ) :
0 < a 1 p ( x , ω ) a 2 < + , x [ 0 , 1 ] , for almost every ( a . e . ) ω Ω ,
| p ( x , ω ) | p ( x , ω ) b < + , x [ 0 , 1 ] , for a . e . ω Ω ,
q min q ( x , ω ) q max , x [ 0 , 1 ] , for a . e . ω Ω ,
g i ( t , ω ) 0 , i = 1 , 2 , t > 0 , for a . e . ω Ω ,
0 f ( x , ω ) f max , x [ 0 , 1 ] , for a . e . ω Ω ,
This model is frequent in chemical engineering sciences and in heat and mass transfer theory for reaction-diffusion problems with parameters depending on the spatial variables as it occurs in heterogeneous and anisotropic solids, [17] (p. 455), [18] (p. 388), [19,20].
The paper is organized as follows. Section 2 deals with some preliminaries, definitions and notations about the mean square calculus as well as the construction of the random mean square finite difference scheme (RMSFDS) resulting from the discretization of model (3)–(6). Section 3 is addressed to the study of properties of the RMSFDS such as positivity, stability and consistency. Throughout a sample approach, sufficient conditions for stability and positivity of the random numerical solution s.p. in terms of the data and discretization step-sizes are found. Consistency of the RMSFDS with Equation (3) is also treated throughout a sample approach and the consistency of the corresponding realized deterministic scheme for each fixed event ω Ω . In Section 4 we construct an algorithm to perform the efficient computation of the expectation and the variance of the numerical solution s.p. using Monte Carlo method and the solution of the sampled scheme. Numerical simulations for a problem where the exact solution is known are performed showing the efficiency of the proposed numerical method as well as the computations of the expectation and the variance of the numerical approximated s.p. A conclusion Section 5 ends the paper.

2. Preliminaries and Construction of the Random Finite Difference Scheme

For the sake of clarity in the presentation, in this section we recall some definitions and concepts related to the L p -calculus, [14]. In a probability space Ω , F , P , we denote L p ( Ω ) the space of all real valued r.v.’s U : Ω R of order p, endowed with the norm
U p = E [ | U | p ] 1 / p = Ω | U ( ω ) | p f U ( ω ) d ω 1 / p < + ,
where E [ · ] denotes the expectation operator, f U the density function of the r.v. U and ω an event of sample space Ω .
Given T R , a family of t-indexed r.v.’s, say V ( t ) : t T , is called a stochastic process of order p (p-s.p.) if for each t T fixed, the r.v. V ( t ) L p ( Ω ) . We say that a p-s.p. V ( t ) : t T is p-th mean continuous at t T , if
V ( t + h ) V ( t ) p 0 as h 0 , t , t + h T .
Furthermore, if there exists a p-s.p. V ( t ) , such that
V ( t + h ) V ( t ) h V ( t ) p 0 as h 0 , t , t + h T ,
then we say that the s.p. V ( t ) : t T is p -th mean differentiable at t T and V ( t ) is the p-derivative of V ( t ) . In the particular case that p = 2 , L 2 ( Ω ) , definitions above leads to the corresponding concept of mean square (m.s.) continuity and m.s. differentiability, respectively.
In this section, we construct an explicit random finite difference scheme for solving problem (3)–(6). Firstly, let us write Equation (3) into the following form
u ( x , t ) t = p ( x ) 2 u ( x , t ) x 2 + p ( x ) u ( x , t ) x q ( x ) u ( x , t ) ,
where p ( x ) L p ( Ω ) is p-th mean continuous and differentiable, p ( x ) is the p-derivative of p ( t ) and q ( x ) L p ( Ω ) is p-th mean continuous.
Let us consider the uniform partition of the spatial interval [ 0 , 1 ] , of the form x i = i h , 0 i M , with M h = 1 . For a fixed time horizon, T, we consider N + 1 time levels t n = n k , 0 n N with N k = T . The numerical approximation of the solution s.p. of the random problem (3)–(6) is denoted by u i n , i.e.,
u i n u ( x i , t n ) , 0 i M , 0 n N .
By using a forward first-order approximation of the time partial derivative and centred second-order approximations for the spatial partial derivatives in Equation (13) one gets the following random numerical scheme for the spatial internal mesh points
u i n + 1 u i n k = p i u i 1 n 2 u i n + u i + 1 n h 2 + p i u i + 1 n u i 1 n 2 h q i u i n , 1 i M 1 , 0 n N 1 ,
where p i = p ( x i ) , p i = p ( x i ) and q i = q ( x i ) . The resulting random discretized problem (3)–(6) can be rewritten in the following form
u i n + 1 = k h 2 p i h 2 p i u i 1 n + 1 k q i 2 k h 2 p i u i n + k h 2 p i + h 2 p i u i + 1 n , 1 i M 1 , 1 n N 1 , u 0 n = g 1 n , u M n = g 2 n , 1 n N , u i 0 = f i , 0 i M ,
where g 1 n = g 1 ( t n ) , g 2 n = g 2 ( t n ) , and f i = f ( x i ) . Please note that all the inputs of the random problem (16) are s.p.’s depending on one finite degree of randomness and lie in  L p ( Ω ) .

3. Properties of the Random Numerical Scheme: Positivity, Stability and Consistency

We are going to prove the positivity of the random numerical solution u i n , 0 i M , 0 n N of the random scheme (16) and its · p -stability in the sense of fixed station respect to the time. We extend this type of stability to the random field.
Definition 1.
A random numerical scheme is said to be · p -stable in the fixed station sense in the domain [ 0 , 1 ] × [ 0 , T ] , if for every partition with k = Δ t , h = Δ x such that N k = T and M h = 1 ,
u i n p C , 0 i M , 0 n N ,
where C is independent of the step-sizes h, k and the time level n.
First, we are going to find sufficient conditions on the spatial step-size h and the temporal step-size k, so that the numerical solution { u i n ( ω ) } constructed by sampling random scheme (16) for a fixed ω Ω
u i n + 1 ( ω ) = k h 2 p i ( ω ) h 2 p i ( ω ) u i 1 n + 1 k q i ( ω ) 2 k h 2 p i ( ω ) u i n + k h 2 p i ( ω ) + h 2 p i ( ω ) u i + 1 n , 1 i M 1 , 1 n N 1 , u 0 n ( ω ) = g 1 n ( ω ) , u M n ( ω ) = g 2 n ( ω ) , 1 n N , u i 0 ( ω ) = f i ( ω ) , 0 i M ,
guarantee its positivity, i.e., u i n ( ω ) 0 for 0 i M and for each time level n, 0 n N . We denote
A i ( h , k ) ( ω ) = k h 2 p i ( ω ) h 2 p i ( ω ) , B i ( h , k ) ( ω ) = 1 k q i ( ω ) 2 k h 2 p i ( ω ) , C i ( h , k ) ( ω ) = p i ( ω ) + h 2 p i ( ω ) ,
then the sampling scheme (18) can be rewritten as follows
u i n + 1 ( ω ) = A i ( h , k ) ( ω ) u i 1 n ( ω ) + B i ( h , k ) ( ω ) u i n ( ω ) + C i ( h , k ) ( ω ) u i + 1 n ( ω ) .
To guarantee the positivity of the numerical approximation { u i n ( ω ) } it is sufficient to impose the positivity of coefficients defined in (19). Please note that the simultaneously positivity of coefficients A i ( h , k ) ( ω ) and C i ( h , k ) ( ω ) means that
p i ( ω ) h 2 p i ( ω ) p i ( ω ) ,
that is
h 2 p i ( ω ) | p i ( ω ) | .
Taking into account the bound condition (8) it follows that coefficients A i ( h , k ) ( ω ) and C i ( h , k ) ( ω ) , 1 i M 1 , are non-negative for a.e. ω Ω under condition
h 2 b .
Please note that for the particular case where p i ( ω ) is constant the positivity of coefficients A i ( h , k ) ( ω ) and C i ( h , k ) ( ω ) defined in (19), is established for h > 0 . To guarantee the positivity of coefficient B i ( h , k ) ( ω ) from (19) and bounds (7)–(9) note that
B i ( h , k ) ( ω ) = 1 k q i ( ω ) 2 k h 2 p i ( ω ) 1 k q max 2 k h 2 a 2 .
Thus, the positivity of B i ( h , k ) ( ω ) , 1 i M 1 , for a.e. ω Ω , is verified under the conditions
k h 2 2 a 2 , ( If q max < 0 ) ,
k h 2 2 a 2 + h 2 q max , ( If q max 0 ) .
Then taking into account the sufficient conditions (21), (23) and (24) over the discretization step-sizes h and k, the positivity of all the coefficients (19) of sampling scheme (18) for a.e. ω Ω is guaranteed and consequently the positivity of the numerical solution { u i n ( ω ) } , 0 i M , for each time level n, 0 n N , ( T = k N ) is established.
Let us prove now that random numerical scheme (16) is · p -stable in the sense of Definition 1. In this study we need to distinguish two cases for the sampling parameter q i ( ω ) for a fixed ω Ω .
Case 1.
q i ( ω ) 0 , 0 i M .
From (18) imposing conditions (21) and (24) one gets
u i n + 1 ( ω ) A i ( h , k ) ( ω ) + B i ( h , k ) ( ω ) + C i ( h , k ) ( ω ) u MAX i n ( ω ) 1 k q i ( ω ) u MAX i n ( ω ) u MAX i n ( ω ) , 1 i M 1 , 0 n N 1 ,
where
u MAX i n ( ω ) = max 0 i M { u i n ( ω ) } .
Using (11), the boundary conditions of (18) and (25) we have by recurrence
u i n + 1 ( ω ) max { g 1 n + 1 ( ω ) , g 2 n + 1 ( ω ) , u MAX i n ( ω ) } max { g 1 n + 1 ( ω ) , g 2 n + 1 ( ω ) , g 1 n ( ω ) , g 2 n ( ω ) , u MAX i n 1 ( ω ) } max 1 s n + 1 g 1 s ( ω ) , g 2 s ( ω ) , u MAX i 0 ( ω ) max 0 t ( n + 1 ) k g 1 ( t , ω ) , g 2 ( t , ω ) , max x [ 0 , 1 ] { f ( x , ω ) } .
We denote
G ( T ) = max 0 t T g 1 , max ( T ) , g 2 , max ( T ) , f max ,
where
g i , max ( T ) = max 0 t T { g i ( t , ω ) , for a . e . ω Ω } , i = 1 , 2 .
Thus, from (27) and (28) we obtain the following upper bound for the numerical solution of sampling scheme (18)
0 u i n ( ω ) G ( T ) , for a . e . ω Ω ,
for each level n, 0 n N = T k , and for each spatial point x i , 0 i M .
Case 2.
q min min 0 i M { q i ( ω ) } < 0
From (18) imposing conditions (21) and (23) and using (25) and (26) we obtain
u i n + 1 ( ω ) 1 k q i ( ω ) u MAX i n ( ω ) 1 + k | q min | u MAX i n ( ω ) , 1 i M 1 , 0 n N 1 .
Then using the boundary conditions of (18) and applying recurrently the bound exhibits in (31) one gets
u i n + 1 ( ω ) max { g 1 n + 1 ( ω ) , g 2 n + 1 ( ω ) , 1 + k | q min | u MAX i n ( ω ) } max { g 1 n + 1 ( ω ) , g 2 n + 1 ( ω ) , 1 + k | q min | max { g 1 n ( ω ) , g 2 n ( ω ) , 1 + k | q min | u MAX i n 1 ( ω ) } 1 + k | q min | 2 max { g 1 n + 1 ( ω ) , g 2 n + 1 ( ω ) , g 1 n ( ω ) , g 2 n ( ω ) , u MAX i n 1 ( ω ) } 1 + k | q min | n + 1 max 1 s n + 1 g 1 s ( ω ) , g 2 s ( ω ) , u MAX i 0 ( ω ) .
Taking into account the following inequality
1 + k | q min | s 1 + k | q min | N < e T | q min | , 0 s N ,
and the notation introduced in (28), we obtain this upper bound for the numerical solution of sample scheme (18)
0 u i n ( ω ) e T | q min | G ( T ) , for a . e . ω Ω ,
for each level n, 0 n N = T k , and for each spatial point x i , 0 i M .
Please note that both bounds (30) and (33) are independent of n, h and k.
Finally, under discretization step-size conditions (21), (23) and (24) and from the upper bounds (30) and (33) it follows that
u i n p = E u i n p 1 / p = Ω u i n ( ω ) p f u i n ( ω ) d ω 1 / p α ( T ) G ( T ) Ω f u i n ( ω ) d ω 1 / p 1 ,
where G ( T ) is defined in (28) and (29) and
α ( T ) = 1 if q min 0 , e T | q min | if q min < 0 .
Consequently, random numerical scheme (16) is · p -stable in the sense of Definition 1.
Summarizing, the following result was established.
Theorem 1.
With the previous notation under conditions (21), (23) and (24) on the discretized step-sizes h = Δ x and k = Δ t , the random numerical solution s.p. { u i n } of the RMSFDS (16) for the random partial differential model (3)–(11) is positive for 0 i M at each time-level 0 n N with T = k N . Furthermore the RMSFDS (16) is · p -stable in the fixed station sense taking the value
C = α ( T ) G ( T ) ,
where constants G ( T ) and α ( T ) are defined in (28) and (35), respectively.
To prove the consistency of the random finite difference scheme (16) with the random partial differential Equation (13) let us introduce the following definition inspired in the well-known concept of consistency for deterministic PDEs, see [2].
Definition 2.
Let us consider a RMSFDS F ( u i n ) = 0 for a random partial differential equation (RPDE) L ( u ) = 0 and let the local truncation error T i n ( U ( ω ) ) for a fixed event ω Ω be defined by
T i n ( U ( ω ) ) = F ( U i n ( ω ) ) L ( U i n ( ω ) ) ,
where U i n ( ω ) denotes the theoretical solution of L ( u ) ( ω ) = 0 evaluated at ( x i , t n ) . We call T i n ( U )  by
T i n ( U ) p = E T i n ( U ) p 1 / p = Ω | T i n ( U ( ω ) ) | p f T i n ( U ) ( ω ) d ω 1 / p .
With previous notation, the RMSFDS F ( u i n ) = 0 is said to be · p -consistent with the RPDE L ( u ) = 0 if
T i n ( U ) p 0 as h = x 0 , k = t 0 .
Next result shows the consistency in the p-norm of RFDS (16) with RPDE (13).
Theorem 2.
The RFDS (16) is · p - consistent with the RPDE (13).
Proof. 
Please note that for each fixed ω Ω the local truncation error using (13) and (15) is given by
T i n ( U ( ω ) ) = U i n + 1 ( ω ) U i n ( ω ) k U ( ω ) t ( x i , t n ) p i U i 1 n ( ω ) 2 U i n ( ω ) + U i + 1 n ( ω ) h 2 + p i 2 U ( ω ) x 2 ( x i , t n ) p i U i + 1 n ( ω ) U i 1 n ( ω ) 2 h + p i U ( ω ) x ( x i , t n ) .
Assuming that U ( x , t ) ( ω ) is four times continuously differentiable with respect to x and two times continuously differentiable with respect to t and using Taylor expansions of U ( x , t ) ( ω ) at ( x i , t n ) one gets
T i n ( U ( ω ) ) = k 2 2 U ( ω ) t 2 ( x i , δ ) p i h 2 12 4 U ( ω ) x 4 ( η 1 , t n ) p i h 2 6 3 U ( ω ) x 3 ( η 2 , t n ) ,
where t n < δ < t n + 1 , x i 1 < η j < x i + 1 , j = 1 , 2 .
Let us denote
E 1 ( i , n ) ( ω ) = max 2 U ( ω ) t 2 ( x i , t ) , t n < t < t n + 1 ,
E 2 ( i , n ) ( ω ) = max 4 U ( ω ) x 4 ( x , t n ) , x i 1 < x < x i + 1 ,
E 3 ( i , n ) ( ω ) = max 3 U ( ω ) x 3 ( x , t n ) , x i 1 < x < x i + 1 .
As we are in the scenario of finite degree of randomness and the involved variables have a truncated range, there exist D j ( i , n ) , j = 1 , 2 , 3 , positive constants such that
E j ( i , n ) ( ω ) D j ( i , n ) , 1 j 3 , a . e . ω Ω .
From Definition 2, condition (7) and (36)–(40) it follows that
T i n ( U ) p Ω D 1 ( i , n ) k 2 + h 2 12 p i D 2 ( i , n ) + 2 | p i | D 3 ( i , n ) p f T i n ( U ) ( ω ) d ω 1 / p = k 2 D 1 ( i , n ) + h 2 12 p i D 2 ( i , n ) + 2 | p i | D 3 ( i , n ) = O ( k ) + O ( h 2 ) .
   □

4. Algorithm

From a computational point of view, as it was commented on in the Introduction Section, the handling of the random scheme (16) in a direct way makes unavailable the computation of approximations beyond a few first temporal levels. This is because, throughout the iterative temporal levels, n = 1 , , N , it is necessary to store the symbolic expressions of all the previous levels of the iteration process collecting big and complex random expressions with which the expectation and the standard deviation must be computed. Furthermore, although the random expressions can be stored it does not guarantee that the two first statistical moments could be computed in a numerical way. For this reason, we propose using the random numerical scheme (16) together with the Monte Carlo technique avoiding the described computational drawbacks. The procedure is as follows: to take a number K of realizations of the random data involved in the random PDE (3)–(6) according to their probability distributions; to compute the numerical solution, u i n ( ω j ) , j = 1 , , K , of the sampling deterministic difference schemes (18); to obtain the mean and the standard deviation of these K numerical solutions evaluated in the mesh points i = 1 , , M 1 , at the last time-level N, denoted respectively by
E MC K [ u i N ] = μ u i N ( ω 1 ) , u i N ( ω 2 ) , , u i N ( ω K ) .
Var MC K [ u i N ] = σ u i N ( ω 1 ) , u i N ( ω 2 ) , , u i N ( ω K ) .
Algorithm 1 summarizes the steps to compute the stable approximations of the expectation and the standard deviation of the solution s.p., u i n , generated by means of the sampling difference scheme (18) and the MC method.
Algorithm 1 Procedure to compute the approximations to the expectation and the standard deviation of the numerical solution u i N of the problem (3)–(6).
1:
Consider random inputs p ( x ) , q ( x ) , g i ( t ) , i = 1 , 2 , and f ( x ) as s.p.’s taking the form described in conditions (1) and (2).
2:
Check that p ( x ) L p ( Ω ) is m.s. continuous and m.s. differentiable for 0 < x < 1 . Verify condition (7) and compute the bounds a 1 and a 2 .
3:
Compute the m.s. derivative of p ( x ) , p ( x ) , verify condition (8) and compute the bound b.
4:
Check that coefficient q ( x ) L p ( Ω ) being m.s. continuous s.p.’s for 0 < x < 1 and verifying condition (9).
5:
Check that boundary conditions g i ( t ) L p ( Ω ) , i = 1 , 2 , being m.s. continuous s.p.’s for t > 0 and verifying condition (10).
6:
Check that initial condition f ( x ) L p ( Ω ) being m.s. continuous s.p.’s for 0 x 1 and verifying condition (11).
7:
Select a spatial stepsize h = Δ x verifying condition (21).
8:
Consider a partition of the spatial domain [ 0 , 1 ] of the form x i = i h , i = 0 , , M , where the integer M = 1 h is the number of discrete points in [ 0 , 1 ] .
9:
Select a temporal step-size k = Δ t verifying condition (23) or (24).
10:
Choose a time horizon T.
11:
Consider a partition of the temporal interval [ 0 , T ] of the form t n = n k , n = 0 , , N , where the integer N = T k is the number of levels necessary to achieve the time T;
12:
Take and carry out a number K of MC realizations, ω i , 1 i K , over the r.v.’s involved in the random data of the problem (3)–(6).
13:
for each realization ω , 1 K do
14:
for i = 0 to M do
15:
  Evaluations of p ( x i ; ω ) , p ( x i ; ω ) , q ( x i ; ω ) , f ( x i , ω ) .
16:
end for
17:
end for
18:
for each realization ω , 1 K do
19:
for n = 0 to N do
20:
  Evaluations of g 1 ( t n ; ω ) , g 2 ( t n ; ω ) .
21:
end for
22:
end for
23:
for each realization ω , 1 K do
24:
for n = 0 to N do
25:
  Compute u i n ( ω ) using the sampling deterministic difference scheme (18).
26:
end for
27:
end for
28:
for i = 0 to M do
29:
 Compute the mean, μ , of the K-deterministic solutions obtained in the time level N using (42).
30:
 Compute the standard deviation, σ , of the K-deterministic solutions obtained in the time level N using (43).   
31:
end for

Numerical Example

To illustrate the efficiency of our proposed method in this subsection we present a test example where the exact solution s.p. is available. We consider the problem (3)–(6) with the random coefficients
p ( x ) = a e x , q ( x ) = c ,
and the following boundary and initial conditions
g 1 ( t ) = e c t 1 2 + a t , g 2 ( t ) = e c t e 2 2 + a e t , f ( x ) = e 2 x 2 ,
that is,
u ( x , t ) t = a e x 2 u ( x , t ) x 2 a e x u ( x , t ) x + c u ( x , t ) , 0 < x < 1 , t > 0 ,
u ( 0 , t ) = e c t 1 2 + a t , t > 0 ,
u ( 1 , t ) = e c t e 2 2 + a e t , t > 0 ,
u ( x , 0 ) = e 2 x 2 , 0 x 1 ,
where the r.v. a follows a Gaussian distribution of mean μ = 0.5 and standard deviation σ = 0.1 truncated on the interval [ 0.4 , 0.6 ] , that is a N [ 0.4 , 0.6 ] ( 0.5 ; 0.1 ) , and the r.v. c > 0 has a beta distribution of parameters ( 2 ; 4 ) truncated on the interval [ 0.45 ; 0.55 ] , that is c Beta [ 0.45 , 0.55 ] ( 2 ; 4 ) . Hereinafter, we will assume that a and c are independent r.v.’s. Please note that p ( x ) in (44) is a s.p. with one degree of randomness verifying condition (2) and g i ( t ) , i = 1 , 2 , in (45) are s.p.’s with two degree of randomness (because they involve both r.v.’s a and c) verifying condition (2). Furthermore all random input data p ( x ) , q ( x ) , g 1 ( t ) , g 2 ( t ) and f ( x ) lie in L 2 ( Ω ) and they are m.s. continuous and p ( x ) is m.s. differentiable too. In addition, conditions (7)–(11) are satisfied with
a 1 = 0.4 e 1 , a 2 = 0.6 e 0 , 0.55 q ( x , ω ) 0.45 , ω Ω , 0 f ( x , ω ) 3.69453 , ω Ω .
From [18] (Section 3.8.5.) the exact solution of problem (46)–(49) when both parameters a and c are deterministic, is given by
u ( x , t ) = e c t a e x t + e 2 x 2 .
In our context, both a and c are r.v.’s, and expression (50) must be interpreted as a s.p. Then, using the independence between r.v.’s a and c, the expectation and the standard deviation of s.p. (50) are given by
E [ u ( x , t ) ] = E e c t E a e x t + e 2 x 2 ,
Var [ u ( x , t ) ] = E [ u ( x , t ) 2 ] E [ u ( x , t ) ] 2 ,
being
E [ u ( x , t ) 2 ] = E e 2 c t E [ a 2 ] e 2 x t 2 + E [ a ] e 3 x t + e 4 x 4 .
Figure 1 shows the evolution of the expectation (51) and the standard deviation (52) and (53) of the exact solution s.p. (50) when both parameters a and c are considered as the r.v.’s described above.
Numerical convergence of the expectation and the standard deviation of the approximate solution s.p. generated by means the sampling difference scheme (18) using the Monte Carlo (MC) technique shown in Algorithm 1, is illustrated in the following way. In the first study, with a fixed time T, we have chosen both the spatial and temporal step-sizes h and k, respectively, according to the stability conditions (21) and (23) and we have varied the number of realizations, K, of the r.v.’s a and c involved in the random problem (46)–(49). Then, at the temporal level N where the time T is achieved, we have computed the expectation (mean), E MC K [ u i N ] , and the standard deviation, Var MC K [ u i N ] , of the K-deterministic solutions, u i N , obtained to solve the K-deterministic difference schemes (18). Table 1 collects the RMSEs (Root Mean Square Errors) computed at the time instant T = N k = 1 with the temporal step-size k = 0.0001 (N = 10,000) for M 1 = 79 internal spatial points x i = i h , 1 i 79 with h = Δ x = 0.0125 in the domain [ 0.0125 , 1 ] , using the following expressions
RMSE E MC K [ u i N ] = 1 M 1 i = 1 M 1 E [ u ( x i , t N ) ] E MC K [ u i N ] 2 ,
RMSE Var MC K [ u i N ] = 1 M 1 i = 1 M 1 Var [ u ( x i , t N ) ] Var MC K [ u i N ] 2 ,
where E [ u ( x i , t N ) ] and Var [ u ( x i , t N ) ] are given by (51)–(53), respectively.
The good behaviour of both approximations the expectation and the standard deviation as the K simulations increases was observed. That is, the accuracy of the approximations to both statistical moments increases when the number of MC simulations is growing. In this sense, Figure 2 reflects the improvement of the approximations considering the study of the relative errors computed by the expressions
RelErr E MC K [ u i N ] = E [ u ( x i , t N ) ] E MC K [ u i N ] E [ u ( x i , t N ) ] ,
RelErr Var MC K [ u i N ] = Var [ u ( x i , t N ) ] Var MC K [ u i N ] Var [ u ( x i , t N ) ] .
Table 2 shows the second complementary study, where we have fixed the number of MC simulations K, K = 1600 , and we have refined the step-sizes h and k attending to the stability conditions (21) and (23). It is observed the decrease of the RMSEs of the expectation (54) and an apparent stabilization in the RMSEs behaviour of the standard deviation (55). Computations have been carried out by Mathematica© software version 12.0.0.0, [21] for Windows 10Pro (64-bit) AMD Ryzen Threadripper 2990WX, 3.00 GHz 32 kernels. The CPU times (in seconds) spent in the Wolfram Language kernel to compute, in both experiments, the expectation (mean) and the standard deviation are included in Table 3 and Table 4. As a result, a good strategy to study the convergence of approximations consists of choosing step-sizes h and k verifying the stability conditions and take a big enough number of realizations K such that the error does not vary significantly when one increases the number of realizations. For problems with no available solution the error is changed by the deviation between two successive numerical solutions.
The use of MC method has allowed the obtainment of approximations to the expectation and the standard deviation of the solution s.p. u i N of the random difference scheme (16) at time horizon T = N k for N not necessarily small. However, if we use the random numerical scheme (16) directly in this example with the step-sizes h = 0.05 ( M = 20 ) and k = 0.002 verifying the stability conditions (21) and (23), troubles appear in the early time-level n = 3 , that corresponds to time t n = 0.006 . In this case the symbolic expressions for the random numerical solution u i n and ( u i n ) 2 , for n = 3 are available and their correspond expectations too. However, the Mathematica© software can not compute the numerical expectation of u i n 2 for 2 i 18 , n = 3 , in consequence it is not possible to compute the approximation of the standard deviation for these internal points at t n = 0.006 and hence at no other later time.

5. Conclusions

The main target of this paper is to solve the challenge of storage accumulation and further computational breakdown dealing with FD methods for solving random PDEM. Our approach is based on a combination of Monte Carlo method and the solution of sampled deterministic methods using explicit FD schemes. Explicitness is necessary to compute the statistical moments of the approximate solution what disregards the implicit FD methods. We here use the explicit classic difference method, but the Crank-Nicolson semi-implicit approach could be tried, making an ad hoc analysis. Numerical analysis provides sufficient conditions for positivity, stability and consistency for the proposed RMSFDS. Numerical experiments illustrate the reliability of the approach.

Author Contributions

M.C.C., R.C. and L.J. contributed equally to this work. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the Spanish Ministerio de Economía, Industria y Competitividad (MINECO), the Agencia Estatal de Investigación (AEI) and Fondo Europeo de Desarrollo Regional (FEDER UE) grant MTM2017-89664-P.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Hundsdorfer, W.; Verwer, J.G. Numerical Solution of Time-Dependent Advection-Diffusion-Reaction Equations; Springer: New York, NY, USA, 2003. [Google Scholar]
  2. Smith, G.D. Numerical Solution of Partial Differential Equations: Finite Difference Methods, 3rd ed.; Clarendon Press: Oxford, UK, 1985. [Google Scholar]
  3. Bharucha-Reid, A.T. On the Theory of Random Equations. In Stochastic Processes in Mathematical Physics and Engineering. Proceedings of Symposia in Applied Mathematics; American Mathematical Society: Providence, PI, USA, 1964; Volume XVI, pp. 40–69. [Google Scholar]
  4. Bharucha-Reid, A.T. Probabilistic Methods in Applied Mathematics; Academic Press, Inc.: New York, NY, USA, 1973. [Google Scholar]
  5. Torquato, S. Random Heterogeneous Materials: Microstructure and Macroscopic Properties; Springer: New York, NY, USA, 2002. [Google Scholar]
  6. Vanmarcke, E. Random Fields: Analysis and Synthesis; World Scientific Publishing Co. Inc.: London, UK, 2010. [Google Scholar]
  7. Farlow, S.J. Partial Differential Equations for Scientists and Engineers; Dover: New York, NY, USA, 1993. [Google Scholar]
  8. Casabán, M.-C.; Company, R.; Egorova, V.; Jódar, L. Integral transform solution of random coupled parabolic partial differential models. Math. Meth. Appl. Sci. 2020, 43, 8223–8236. [Google Scholar] [CrossRef]
  9. Gunzburger, M.D.; Webster, C.G.; Zhang, G. Stochastic finite element methods for partial differential equations with random input data. Acta Numer. 2014, 23, 521–650. [Google Scholar] [CrossRef]
  10. Casabán, M.-C.; Company, R.; Jódar, L. Numerical solutions of random mean square Fisher-KPP models with advection. Math. Meth. Appl. Sci. 2020, 43, 8015–8031. [Google Scholar] [CrossRef]
  11. Cortés, J.-C.; Romero, J.-V.; Roselló, M.-D.; Sohaly, M.A. Solving random boundary heat model using the finite difference method under mean square convergence. Comp. Math. Meth. 2019, 1, e1026. [Google Scholar] [CrossRef]
  12. Sohaly, M.A. Random difference scheme for diffusion advection model. Adv. Differ. Equ. 2019, 2019, 54. [Google Scholar] [CrossRef] [Green Version]
  13. Øksendal, B. Stochastic Differential Equations. An Introduction with Applications, 5th ed.; Springer: Berlin/Heidelberg, Germany, 2003. [Google Scholar]
  14. Soong, T.T. Random Differential Equations in Science and Engineering; Academic Press: New York, NY, USA, 1973. [Google Scholar]
  15. Kroese, D.P.; Taimre, T.; Botev, Z.I. Handbook of Monte Carlo Methods; Wiley Series in Probability and Statistics; John Wiley & Sons: New York, NY, USA, 2011. [Google Scholar]
  16. Asmussen, S.; Glynn, P.W. Stochastic Simulation: Algorithms and Analysis; Rozovskii, B., Grimmett, G., Eds.; Springer Science & Business Media, LLC: New York, NY, USA, 2007. [Google Scholar]
  17. Özişik, M.N. Boundary Value Problems of Heat Conduction; Dover Publications, Inc.: New York, NY, USA, 1968. [Google Scholar]
  18. Polyanin, A.D.; Nazaikinskii, V.E. Handbook of Linear Partial Differential Equations for Engineers and Scientists; Taylor & Francis Group: Boca Raton, FL, USA, 2016. [Google Scholar]
  19. Jódar, L.; Caudillo, L.A. A low computational cost numerical method for solving mixed diffusion problems. Appl. Math. Comput. 2005, 170, 673–685. [Google Scholar] [CrossRef]
  20. Coatléven, J. A virtual volume method for heterogeneous and anisotropic diffusion-reaction problems on general meshes. Esaim Math. Model. Numer. Anal. 2017, 51, 797–824. [Google Scholar] [CrossRef] [Green Version]
  21. Wolfram Research, Inc. Mathematica; Version 12.0; Mathematica Wolfram Research, Inc.: Champaign, IL, USA, 2020; Available online: https://www.wolfram.com/mathematica (accessed on 7 December 2020).
Figure 1. (Left): Surface of the expectation of the exact solution (50), E [ u ( x i , t n ) ] , computed according to (51). (Right): Surface of the standard deviation of the exact solution (50), Var [ u ( x i , t n ) ] , computed according to (52) and (53). For both statistical moments the parameters considered in (50) are a N [ 0.4 , 0.6 ] ( 0.5 ; 0.1 ) , c Beta [ 0.45 , 0.55 ] ( 2 ; 4 ) and the plotted domain corresponds to ( x i = i h , t n = n k ) [ 0 + h = 0.0125 , 1 h = 0.9875 ] × [ 0.05 , 1 ] with the step-sizes h = Δ x = 0.0125 , 1 i 79 , and k = Δ t = 0.05 , 1 n 20 .
Figure 1. (Left): Surface of the expectation of the exact solution (50), E [ u ( x i , t n ) ] , computed according to (51). (Right): Surface of the standard deviation of the exact solution (50), Var [ u ( x i , t n ) ] , computed according to (52) and (53). For both statistical moments the parameters considered in (50) are a N [ 0.4 , 0.6 ] ( 0.5 ; 0.1 ) , c Beta [ 0.45 , 0.55 ] ( 2 ; 4 ) and the plotted domain corresponds to ( x i = i h , t n = n k ) [ 0 + h = 0.0125 , 1 h = 0.9875 ] × [ 0.05 , 1 ] with the step-sizes h = Δ x = 0.0125 , 1 i 79 , and k = Δ t = 0.05 , 1 n 20 .
Mathematics 09 00206 g001
Figure 2. Plot (a): Relative errors of the approximations to the expectation (mean), E MC K [ u i N ] , (56). Plot (b): Relative errors of the approximations to the standard deviation, Var MC K [ u i N ] , (57). For both graphics the fixed time horizon is T = 1 = N k with the temporal step-size k = 0.0001 (N = 10,000), the spatial domain x i [ 0 + h , 1 h ] with x i = i h , h = 0.0125 , but varying the number of MC simulations K {50, 3200, 12,800}.
Figure 2. Plot (a): Relative errors of the approximations to the expectation (mean), E MC K [ u i N ] , (56). Plot (b): Relative errors of the approximations to the standard deviation, Var MC K [ u i N ] , (57). For both graphics the fixed time horizon is T = 1 = N k with the temporal step-size k = 0.0001 (N = 10,000), the spatial domain x i [ 0 + h , 1 h ] with x i = i h , h = 0.0125 , but varying the number of MC simulations K {50, 3200, 12,800}.
Mathematics 09 00206 g002aMathematics 09 00206 g002b
Table 1. Root mean square errors (RMSEs) at T = N k = 1 with k = 0.0001 ( N 0 = 1000) for the numerical expectation and the numerical standard deviation computed after solving the K-deterministic difference scheme (18) for several Monte Carlo (MC) realizations K {50, 200, 800, 3200, 12,800}. The spatial discretization have been considered on the domain [ 0 + h = 0.0125 , 1 h = 0.9875 ] with x i = i h , 1 i 79 , h = 0.0125 .
Table 1. Root mean square errors (RMSEs) at T = N k = 1 with k = 0.0001 ( N 0 = 1000) for the numerical expectation and the numerical standard deviation computed after solving the K-deterministic difference scheme (18) for several Monte Carlo (MC) realizations K {50, 200, 800, 3200, 12,800}. The spatial discretization have been considered on the domain [ 0 + h = 0.0125 , 1 h = 0.9875 ] with x i = i h , 1 i 79 , h = 0.0125 .
KRMSE E MC K [ u i N ] RMSE Var MC K [ u i N ]
50 1.45604 × 10 2 1.32856 × 10 2
200 1.11710 × 10 2 1.84435 × 10 3
800 1.08512 × 10 2 1.06139 × 10 3
3200 4.20138 × 10 3 6.01374 × 10 3
12,800 2.07183 × 10 4 1.69504 × 10 3
Table 2. RMSEs at T = 1 and K = 1600 (MC simulations) for the expectation (54) and the standard deviation (55). The considered step-sizes h and k verify stability conditions (21) and (23). T = N k = 1 , N { 125 , 500 , 2000 , 8000 } , the spatial domain is [ 0 + h , 1 h ] considering M 1 internal points x i = i h , 1 i M 1 with M = 1 / h .
Table 2. RMSEs at T = 1 and K = 1600 (MC simulations) for the expectation (54) and the standard deviation (55). The considered step-sizes h and k verify stability conditions (21) and (23). T = N k = 1 , N { 125 , 500 , 2000 , 8000 } , the spatial domain is [ 0 + h , 1 h ] considering M 1 internal points x i = i h , 1 i M 1 with M = 1 / h .
hkRMSE E MC K [ u i N ] RMSE Var MC K [ u i N ]
0.1 0.008 5.29465 × 10 2 2.36145 × 10 3
0.05 0.002 3.19431 × 10 3 2.49070 × 10 3
0.025 0.0005 2.72452 × 10 3 2.52301 × 10 3
0.0125 0.000125 2.61957 × 10 3 2.53168 × 10 3
Table 3. CPU time (in seconds) spent to compute the approximations to the expectation (mean), E MC K , and the standard deviation, Var MC K in Table 1, for a fixed time horizon T = 1 and the step-sizes h = 0.0125 and k = 0.0001 while the number of MC simulations, K, varies.
Table 3. CPU time (in seconds) spent to compute the approximations to the expectation (mean), E MC K , and the standard deviation, Var MC K in Table 1, for a fixed time horizon T = 1 and the step-sizes h = 0.0125 and k = 0.0001 while the number of MC simulations, K, varies.
KCPU,s E MC K / Var MC K
50 630.516
200 982.375
800 2052.330
3200 6209.480
12,80022,600.100
Table 4. CPU time (in seconds) spent to compute the approximations to the expectation (mean), E MC K , and the standard deviation, Var MC K in Table 2, for a fixed time horizon T = 1 and K = 1600 MC simulations but varying the temporal step-size k and the spatial step-size h in the domain [ 0 + h , 1 h ] .
Table 4. CPU time (in seconds) spent to compute the approximations to the expectation (mean), E MC K , and the standard deviation, Var MC K in Table 2, for a fixed time horizon T = 1 and K = 1600 MC simulations but varying the temporal step-size k and the spatial step-size h in the domain [ 0 + h , 1 h ] .
hkCPU,s E MC K / Var MC K
0.1 0.008 11.4688
0.05 0.002 56.2344
0.025 0.0005 341.6410
0.0125 0.000125 2438.70000
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Casabán, M.C.; Company, R.; Jódar, L. Reliable Efficient Difference Methods for Random Heterogeneous Diffusion Reaction Models with a Finite Degree of Randomness. Mathematics 2021, 9, 206. https://doi.org/10.3390/math9030206

AMA Style

Casabán MC, Company R, Jódar L. Reliable Efficient Difference Methods for Random Heterogeneous Diffusion Reaction Models with a Finite Degree of Randomness. Mathematics. 2021; 9(3):206. https://doi.org/10.3390/math9030206

Chicago/Turabian Style

Casabán, María Consuelo, Rafael Company, and Lucas Jódar. 2021. "Reliable Efficient Difference Methods for Random Heterogeneous Diffusion Reaction Models with a Finite Degree of Randomness" Mathematics 9, no. 3: 206. https://doi.org/10.3390/math9030206

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop