Next Article in Journal
Sixty Years of the Maximum Principle in Optimal Control: Historical Roots and Content Classification
Previous Article in Journal
Fractional Caputo Operator and Takagi–Sugeno Fuzzy Modeling to Diabetes Analysis
Previous Article in Special Issue
Invariant Sets, Global Dynamics, and the Neimark–Sacker Bifurcation in the Evolutionary Ricker Model
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Numerical Solution of External Boundary Conditions Inverse Multilayer Diffusion Problems

by
Miglena N. Koleva
1,* and
Lubin G. Vulkov
2
1
Department of Mathematics, Faculty of Natural Sciences and Education, “Angel Kanchev” University of Ruse, 8 Studentska Str., 7017 Ruse, Bulgaria
2
Department of Applied Mathematics and Statistics, Faculty of Natural Sciences and Education, “Angel Kanchev” University of Ruse, 8 Studentska Str., 7017 Ruse, Bulgaria
*
Author to whom correspondence should be addressed.
Symmetry 2024, 16(10), 1396; https://doi.org/10.3390/sym16101396
Submission received: 10 September 2024 / Revised: 14 October 2024 / Accepted: 18 October 2024 / Published: 20 October 2024
(This article belongs to the Special Issue Symmetry in Mathematical Models)

Abstract

:
The present study is concerned with the numerical solution of external boundary conditions in inverse problems for one-dimensional multilayer diffusion, using the difference method. First, we formulate multispecies parabolic problems with three types of Dirichlet–Neumann–Robin internal boundary conditions that apply at the interfaces between adjacent layers. Then, using the symmetry of the diffusion operator, we prove the well-posedness of the direct (forward) problem in which the coefficients, the right-hand side, and the initial and boundary conditions are given. In inverse problems, instead of external boundary conditions of the first and the last layers, point observations of the solution within the entire domain are posed. Rothe’s semi-discretization of differential problems combined with a symmetric exponential finite difference solution for elliptic problems on each time layer is proposed to develop an efficient semi-analytical approach. Next, using special solution decomposition techniques, we numerically solve the inverse problems for the identification of external boundary conditions. Numerical test examples are discussed.

1. Introduction

Many problems in industries, environmental science, biology, and applied mechanics are modeled by diffusion processes in layered materials. Examples include the transport of solutes, chemicals, and gases in porous media; heat and mass transfer in composite materials; geological profiles; oceanography; meteorology; drug-delivery effectiveness in living tissues; and the study of biological tissues using infrared light [1,2,3,4,5,6].
Analytical solutions to such problems are of significant interest, although their construction is challenging. Nonetheless, they are highly valuable as they offer insight into solution behavior and serve as a benchmark for numerical methods.
The method of separate solutions in each layer is frequently employed for constructing analytical solutions. This approach often results in finding eigenfunctions that are coupled through internal boundary conditions at the interfaces between adjacent layers. However, it proves to be ineffective for differential equations with variable coefficients, as discussed in [1,2,7].
The study in [5] provides an exact stability analysis of a multilayer diffusion–reaction problem, accommodating a potentially large number of layers. An analytical approach based on Laplace transforms for solving general 2D multilayer diffusion problems with different convection heat transfer coefficients in each layer is presented in [8]. The stability of the 2D multilayer diffusion–reaction system is investigated in [9].
In [10], the authors propose exact solutions for diffusive transport models in domains experiencing spatially nonuniform growth. An embedding method is developed in [11] to analytically solve multilayer diffusion problems with time-dependent inhomogeneous boundary conditions. Applying the Laplace transform, semi-analytical solutions for axisymmetric reaction–diffusion equations with a piecewise constant coefficient and continuous transient boundary conditions have been developed in [12]. Semi-analytical solutions for advection–dispersion equations in multilayer porous media with Robin boundary conditions, as well as continuous and general interface conditions, are presented in [1,2]. The exact representation of the solution on the interface is introduced in [3].
The finite difference method is widely recognized for solving diffusion problems in single-layer systems (for example, [13,14,15,16,17,18]). It has been effectively used to address parabolic problems on disjoint domains (for example, [19,20,21]) and interface time-fractional diffusion equations (see [22]). Additionally, it has been applied to multilayer diffusion problems with both continuous and jump conditions at interfaces [4]. A second-order finite difference scheme for elliptic systems with perfect and imperfect contact at interfaces has been developed in studies such as [23,24].
The finite volume-difference method is developed in [6] for solving multilayer diffusion problems with different interface conditions, namely perfect and imperfect contact, as well as continuous and more general diffusive flux across the interface.
In [25], the authors provide theoretical and numerical investigation for solving a stationary diffusion problem in a domain with two distinct material constituents and significant differences in conductivity.
One effective method for solving interface problems is the immersed interface method (IIM). This approach achieves second-order accuracy and does not necessitate that grid points be aligned with the interfaces [26]. A diffusion equation with nonlinear localized chemical reactions is solved numerically in [27] using IIM.
Exponential difference schemes are highly effective in resolving boundary and interior layers of small diffusion problems [28]. In [29], the authors construct exponential difference schemes for solving convection–diffusion boundary value problems in the multidimensional case. Exponential difference schemes have been developed and analyzed in [30] for addressing nonlinear problems arising in variably saturated flow with discontinuous absolute permeability.
Numerous researchers (see e.g., [14,18,31,32,33]) have investigated the inverse problems related to determining unknown boundary conditions in parabolic equations, because of their variety of applications, especially in heat equations on a single domain. From a mathematical perspective, these inverse problems are classified as ill-posed problems [13,16,31,34,35,36], meaning that small changes in the input data can result in significant errors in the output. Furthermore, deriving analytical solutions for inverse problems involving multiple layers is often infeasible. Therefore, developing effective numerical methods for addressing such inverse problems is crucial.
The existence and uniqueness of the solution of inverse problems for one-layer parabolic and fractional diffusion equations in which a boundary condition function is unknown upon fixed-point measurements were investigated in [20,32,33,37].
In [14], a semigroup method was developed to analyze inverse problems for reconstruction of the right boundary condition in parabolic problems on the base of point observation. Numerical methods for the determination of BCs in parabolic, time-fractional parabolic, and parabolic–hyperbolic problems on disjoint domains were developed and analyzed in [20,21,38].
In [7], the authors solved the inverse heat conduction problem in layered materials by representing the numerical solution as a series of exponential basis functions defined in space and time. A numerical approach utilizing the method of fundamental solutions is presented in [39] for determining a moving boundary from Cauchy data within a one-dimensional heat equation involving a multilayer domain.
In this work, we prove the well-posedness of the direct multilayer interface diffusion problem and propose a numerical method for solving both direct and inverse problems to identify external time-dependent boundary conditions based on additional observations within different layers. The exponential finite difference scheme, extended for layered problems, is employed (see [30]). Boundary conditions are discretized by developing a new, second-order approximation. Additionally, a decomposition technique is applied to transform the ill-posed problem into a series of well-posed problems. Correct formulas are proposed for the computation of the solution to the inverse problem. This summarizes our main scientific contribution and its practical significance.
The structure of the paper is as follows: Section 2 formulates the multilayer interface problem along with the interface conditions. Section 3 addresses the existence and uniqueness of the solution within specific Sobolev spaces. In Section 4, exponential difference schemes for multilayer initial boundary value problems are developed. Section 5 formulates and numerically solves inverse problems for unknown external boundary conditions. Section 6 discusses computational results, and the paper concludes with final remarks and future perspectives.

2. Multilayer Diffusion Problems

This section provides a brief overview of the internal boundary conditions applied at the interfaces between adjacent layers.
We consider a diffusion process on the interval [ l 0 , L ] , divided into M subintervals, as seen in the studies such as [4,5,6]. The partitioning is defined by l 0 < l 1 < < l M 1 < l M = L . For each subinterval (layer), Ω m = ( l m 1 , l m ) , m = 1 , 2 , , M , the differential equation is given by [2,7]
u m t = d m 2 u m x 2 + f ( x , t ) , x ( l m 1 , l m ) , 0 < t < T ,
where u m ( x , t ) represents the solution (for instance, temperature or concentration [40]) at position x and time t in the m-th layer, and d m > 0 is the diffusion coefficient in that layer.
The initial conditions are given as follows:
u m ( x , 0 ) = u m 0 ( x ) , m = 1 , , M
and external BCs are defined as follows:
a 0 u 1 ( l 0 , t ) b 0 u 1 x ( l 0 , t ) = g 0 ( t ) , 0 < t < T ,
a L u M ( L , t ) + b L u M x ( L , t ) = g L ( t ) , 0 < t < T ,
where the coefficients a 0 , b 0 , a L , b L are non-negative constants satisfying a 0 + b 0 > 0 and a L + b L > 0 , and g 0 ( t ) and g L ( t ) are specified time-dependent functions.
The internal boundary conditions at the interfaces between adjacent layers depend on the physical processes being examined. A review of various interface conditions is provided in [2]. In this context, we focus on some common conditions typically encountered in physics and mechanics, particularly in heat and mass transfer applications (for example, see [3,41]).
Typically, the continuity of the solution and the diffusive flux is implicitly assumed at each interface, that is,
[ u m ] l m = u m + 1 ( l m , t ) u m ( l m , t ) = 0 ,
u m x l m = d m + 1 u m + 1 x ( l m , t ) d m u m x ( l m , t ) = 0 ,
for t ( 0 , T ] and for all m = 1 , , M 1 .
However, in fields such as mechanics, physics, and biology, many real processes require relations that differ from those in Equations (5) and (6).
Perfect contact conditions are
[ u m ] l m = u m + 1 ( l m , t ) u m ( l m , t ) = 0 , 0 < t T ,
u m x l m = γ m + 1 u m + 1 x ( l m , t ) γ m u m x ( l m , t ) = 0 , 0 < t T ,
for γ m > 0 . These interface conditions generalize Equations (5) and (6). For instance, in heat transfer, the thermal diffusivity is defined as d m : = k m / ( ρ m c p m ) , where k m is the thermal conductivity and ρ m c p m represents the volumetric capacity in layer m.
The concentrated reaction interface conditions, as described in studies such as [27], are utilized in modeling processes in chemistry, mechanics, physics, and other fields. These conditions are expressed as follows:
[ u m ] l m = u m + 1 ( l m , t ) u m ( l m , t ) = 0 ,
u m x l m = r m + 1 ( t ) u m + 1 x ( l m , t ) r m ( t ) u m x ( l m , t ) = u m ( l m , t ) + g m ( t ) ,
where t ( 0 , T ] and m = 1 , 2 , , M 1 .
It is important to note that the first two interface conditions (5)–(8) are homogeneous. However, in nonhomogeneous cases, a linear transformation can often be found that reduces the nonhomogeneous interface conditions to homogeneous ones. For instance, the nonhomogeneous boundary conditions (3) and (4) in conjunction with (5) and (6) for M = 2 are addressed in [42]. Our primary focus is on the problem involving the interface conditions (9) and (10). We will demonstrate this reduction for the problem defined by Equations (1)–(4), (9) and (10) in the stationary case.
For simplicity, we take l 0 = 1 , l 1 = 0 , l 2 = 1 and seek the solution in the form
u = ( u 1 , u 2 ) , v = ( v 1 , v 2 ) , w = ( w 1 , w 2 ) ,
where
v ( x ) = v 1 = g 0 + a x , x ( 1 , 0 ) , v 2 = g 2 + ( 1 x ) b , x ( 0 , 1 ) .
Using the interface relations, we find
a = r 2 ( g 2 g 0 ) g 1 1 + r 1 + r 2 , b = ( 1 + r 1 ) ( g 0 g 2 ) g 1 1 + r 1 + r 2 .
The constructed functions have the following properties:
v 1 ( 1 ) = g 0 , v 2 ( 1 ) = g 2 v 2 ( 0 ) = v 1 ( 0 ) = 0 , r 2 d v 2 d x ( 0 ) r 1 d v 1 d x ( 0 ) = u 1 ( 0 ) + g 1 , d d x d 1 d v 1 d x + e 1 ( x ) ( g 0 + a x ) = z 1 ( x ) , x ( 0 , 1 ) , d d x d 2 d v 2 d x + e 2 ( x ) ( g 2 + ( 1 x ) b ) = z 2 ( x ) , x ( 0 , 1 ) ,
where
z 1 ( x ) = a d d 1 d x e 1 ( x ) ( g 0 + a x ) , z 2 ( x ) = b d d 2 d x e 2 ( x ) ( g 2 + ( 1 x ) b ) .
We define the functions w 1 and w 2 with zero boundary conditions and homogeneous interface conditions as follows:
w 1 ( 1 ) = 0 , w 2 ( 1 ) = 0 , w 2 ( 0 ) = w 1 ( 0 ) , r 2 d w 2 d x ( 0 ) r 1 d w 1 d x ( 0 ) = 0 , d d x d 1 d w 1 d x + e 1 ( x ) w 1 = f 1 z 1 , d d x d 2 d w 2 d x + e 2 ( x ) w 2 = f 2 z 2 .

3. Existence and Uniqueness of Solutions to Forward Problems

We now analyze the existence and uniqueness of weak solutions to forward problems defined in the previous section.
For definiteness, we shall consider the case of M = 2 and the interface problem with relations (9) and (10), using the Dirac delta function as follows:
u t x d ( x ) u x + e ( x ) + P δ ( x ) u = g ( x , t ) , ( x , t ) Q T ,
where P > 0 is a real constant, Q T = Ω × ( 0 , T ) , Ω = Ω 1 Ω 2 , Ω 1 = ( 1 , 0 ) , Ω 2 = ( 0 , 1 ) and the initial boundary conditions are
u ( x , 0 ) = u 0 ( x ) , u ( 1 , t ) = u l ( t ) , u ( 1 , t ) = u r ( t ) .
A weak formulation is obtained by multiplying (11) by test functions v L 2 ( 0 , T ; H 1 ( Ω ) ) , integrating over Ω and using integration by parts.
In this formulation, we seek u L 2 ( 0 , T ; H 1 ( Ω ) ) with u t L 2 ( 0 , T ; H 1 ( Ω ) ) and g L 2 ( Q T ) , such that
0 T 1 1 u v t d x + 1 1 d u x v x + e ( x ) u v d x + P u ( 0 , t ) v ( 0 , t ) 1 1 g v d x d t = 1 1 u 0 ( x ) v ( x , 0 ) d x .
Suppose that such a weak solution exists and that u t L 2 ( ( 0 , T ) ; Ω ) . Taking v ( x , t ) = w ( x ) φ ( t ) , where w H 1 ( Ω ) , w ( 1 ) = u l , u ( 1 ) = u r , d φ d t L 2 ( 0 , T ) , φ ( T ) = 0 and performing integration by parts, we obtain
0 T 1 1 u t w d x + 1 1 d u x w x + e ( x ) u w d x + P u ( 0 ) w ( 0 ) 1 1 g w d x d t + φ ( 0 ) 1 1 ( u ( x , 0 ) u 0 ( x ) ) w d x = 0 .
Hence, taking into account the arbitrariness of the function φ ( t ) , it follows that
1 1 u t w d x + 1 1 d u x w x + e ( x ) u w d x + P u ( 0 ) w ( 0 ) = 1 1 g w d x ,
for almost t ( 0 , T ) and
1 1 u ( x , 0 ) w ( x ) d x = 1 1 u 0 ( x ) w ( x ) d x .
Further, we shall work with the weak solution of the problem in (11) and (12) satisfying the last two identities.
Theorem 1.
Suppose that a , e L ( Ω ) and the conditions
d 1 d ( x ) d 0 > 0 , e 1 e ( x ) e 0 > 0 f o r x Ω ¯ ,
are satisfied and g L 2 ( Q T ) , u 0 H 1 ( Ω ) . Then, the problem in (11) and (12) admits a weak solution u H 1 ( Q T ) .
Proof. 
We follow the scheme of [43] (Section 3.2).
  • Step 1. Construction of the difference scheme with respect to the time variable t to obtain the approximating solutions:
For any positive integer k and a function w ( x , t ) , denote w k , j ( x ) = w ( x , j h ) , 0 , 1 , , k , where τ = T / m .
Consider the approximation of Equation (11):
u m , j u m , j 1 τ x d ( x ) u m , j x + ( e ( x ) + P δ ( x ) ) u m , j = g m , j ( x ) .
Taking into account that u m , 0 = u 0 H 1 ( Ω ) and the symmetry of the elliptic operator, we can suppose that u m , j 1 H 1 ( Ω ) is known.
We will prove that Equation (14) admits a weak solution u m , j H 1 ( Ω ) in Step 2. Thus, by induction, we will obtain u m , 1 , u m , 2 , , u m , m in H 1 ( Ω ) , for which we have a uniform estimate.
Then, by employing a standard linear procedure to progress to the new time level and applying estimates to the approximating solutions similar to the approach in [43] (Section 3.2), we establish the proof.
  • Step 2. An auxiliary stationary problem with a prototype to Equation (14) is studied.
In more detail, we shall consider the symmetrized self-adjoint problem
( d ( x ) u ) + ( e ( x ) + P δ ( x ) ) u = g ( x ) + Q δ ( x ) , x Ω , P = const . > 0 ,
where Ω 1 = ( 1 , 0 ) , Ω 2 = ( 0 , 1 ) and
u ( 1 ) = u l , u ( 1 ) = u r .
In H 1 ( Ω ) , we introduce a scalar product equivalent to the standard symmetric one, ( u , v ) = Ω ( u v + u v ) d x , and define the new scalar product as follows:
( u , v ) H + 1 ( Ω ) = Ω ( d u v + e u v ) d x + P u ( 0 ) v ( 0 ) .
Lemma 1.
Let the conditions in (13) be satisfied. Then, for each g L 2 ( Ω ) , there exists a unique weak solution u H 1 ( Ω ) to the problem (15) and (16), and uniform estimates hold
u H + 1 ( Ω ) C ( g L 2 ( Ω ) + | u l | + | u r | ) ,
where the constant C is independent of g , u l and u r . Also, the interface jump conditions are satisfied
[ u ] x = 0 = u ( 0 + ) u ( 0 ) = 0 , [ d u ] x = 0 = P u ( 0 ) .
Moreover, let d , e L ( Ω ) C 1 ( Ω 1 ) C 1 ( Ω 2 ) , g L ( Ω ) C ( Ω 1 ) C ( Ω 2 ) . Then u C ( Ω ) C 2 ( Ω 1 ) C 2 ( Ω 2 ) , i.e., u is a classical solution of (15) and (16) and the estimate holds:
u max | u 1 | + | u 1 | , 1 e 0 g .
Proof. 
The generalized solution of (15) and (16) is defined by the identity as follows:
( u , w ) H + 1 ( Ω ) ( g , w ) L 2 ( Ω ) + ( u w ) ( 1 ) + ( u w ) ( 1 ) w H 1 ( Ω ) .
For fixed g L 2 ( Ω ) , ( g , w ) L 2 ( Ω ) is a linear functional, defined on H 1 ( Ω ) , w H 1 ( Ω ) .
Applying the Lax theorem [12,44], we obtain the inequality (17).
The left equality in (18) follows from the trace theorem [44].
With integration by parts of (15) and having in mind that w ( x ) is a continuous function, we find
[ d ( 0 + ) u ( 0 + ) d ( 0 ) u ( 0 ) P u ( 0 ) ] w ( 0 ) = 0 .
Since in general w ( 0 ) 0 , we obtain the right jump interface conditions in (13). □

4. Exponential Finite Difference Schemes

In this section, we consider the model multilayer parabolic initial boundary value problem with a self-adjoint (symmetric) elliptic part (1)–(4), (9) and (10). Introducing uniform temporal mesh
ω ¯ τ = { t n = n τ , n = 0 , 1 , , N , τ = T / N } ,
using the notation u m n = u m n ( x ) = u m ( x , t n ) , and applying the Rothe method to the problem (1)–(4), (9) and (10) yields
x d m ( x ) u m n + 1 x 2 u m n + 1 τ = u m n τ f m n + 1 ( x ) , x ( l m 1 , l m ) ,
[ u m n + 1 ] l m = u m + 1 n + 1 ( l m ) u m n + 1 ( l m ) = 0 ,
u m n + 1 x l m = r m + 1 n + 1 u m + 1 n + 1 x ( l m ) r m n + 1 u m n + 1 x ( l m ) = u m n + 1 ( l m ) + g m n + 1 ,
a 0 u 1 n + 1 ( 0 ) b 0 u 1 n + 1 x ( 0 ) = g 0 n + 1 ,
a L u M n + 1 ( L ) + b L u M n + 1 x ( L ) = g L n + 1 ,
u m ( x , 0 ) = u m 0 ( x ) .
We utilize and extend the approximation approach, proposed in [30] for a single layer, in order to obtain the full discretization of the multilayer problem (1)–(4), (9) and (10). Moreover, we develop different second-order approximations for Robin’s type boundary conditions (3) and (4).
Let us consider the nonuniform spatial mesh in the whole interval [ l 0 , L ]
ω ¯ h = { x i : x i = x i 1 + h i , i = 1 , 2 , , I , x 0 = l 0 , x I = L }
and denote h = max 1 i m h i , i = 0.5 ( h i + h i + 1 ) , i = 0 , 1 , , I 1 . The numerical solution at grid node ( x i , t n ) is denoted by u m , i n = u m n ( x i ) , i = 0 , 1 , , I .
Suppose that l m , m = 0 , 1 , , M are grid nodes of the spatial mesh ω ¯ h .
Let
u i n = u m , i n , if x i [ l m 1 , l m ] , u m , i n = u m + 1 , i n for x i = l m , taking into account ( 9 ) , u = ( u 1 , u 2 , , u M ) .
We introduce a discontinuous with respect to x function v ( x , t ) , with a finite number of discontinuities in [ l 0 , L ] and present the Steklov-type averaging
v i ( t ) = 1 h i x i 1 x i v ( x , t ) d x , v i + ( t ) = 1 h i + 1 x i x i + 1 v ( x , t ) d x .
From (19), in view of (20) and convention (25), we introduce the following problems:
d d x d i d u n + 1 d x u n + 1 τ = f ˜ i n + 1 , x ( x i 1 , x i ) ( l m 1 , l m + 1 ) , u n + 1 ( x i 1 ) = u i 1 , u n + 1 ( x i ) = u i n + 1 ,
d d x d i + d u n + 1 d x u n + 1 τ = f ˜ i n + 1 + , x ( x i , x i + 1 ) ( l m 1 , l m + 1 ) . u n + 1 ( x i ) = u i n + 1 , u n + 1 ( x i + 1 ) = u i + 1 n + 1 ,
where d i ± is determined as follows:
d i = d i + = d m , i , if ( x i 1 , x i + 1 ) ( l m 1 , l m ) , d i = d m , i , d i + = d m + 1 , i , if x i = l m , d i = d i + = d m + 1 , i , if ( x i 1 , x i + 1 ) ( l m , l m + 1 ) .
and similarly for functions f ˜ i n + 1 ± = u i n τ + f i n + 1 ± .
The coefficients d i ± and the right-hand sides f ˜ i n + 1 ± can be derived by the precise solving of the corresponding integrals (26) or by numerical integration.
We start with solving the problem (27), which can be written as a boundary value problem for a second-order ODE with constant coefficients as follows:
d i d 2 u n + 1 d x 2 u n + 1 τ = f ˜ i n + 1 , x ( x i 1 , x i ) , u n + 1 ( x i 1 ) = u i 1 n + 1 , u n + 1 ( x i ) = u i n + 1 .
The solution of the homogeneous ODE in (29) is u i h = C i , 1 e λ i , 1 x + C i , 1 e λ i , 2 x , where C i , 1 and C i , 1 are constants, and λ i , 1 , λ i , 2 are roots of the characteristic equation
λ i , 1 = D i 2 d i , λ i , 2 = D i 2 d i , λ i , 1 > 0 , λ i , 2 < 0 , D i = 4 τ d i > 0 .
In fact, C i , j = C i , j n + 1 , j = 1 , 2 , but for simplicity, we omit the superscript n + 1 . Taking into account that f ˜ i n + 1 is a constant, we obtain the particular solution of the nonhomogeneous ODE in (29), namely ( η i n + 1 ) = f ˜ i n + 1 d i λ i , 1 λ i , 2 1 = τ f ˜ i n + 1 . Therefore, the general solution is
u n + 1 ( x ) = C i , 1 e λ i , 1 x + C i , 1 e λ i , 2 x + τ f ˜ i n + 1 , x [ x i 1 , x i ] .
The constants C i , 1 and C i , 2 are determined using BCs in (29) as follows:
C i , 1 = ( u i 1 n + 1 η i ) e λ i , 2 x i ( u i n + 1 η i ) e λ i , 2 x i 1 e λ i , 1 x i 1 + λ i , 2 x i e λ i , 1 x i + λ i , 2 x i 1 , C i , 2 = ( u i n + 1 η i ) e λ i , 1 x i 1 ( u i 1 n + 1 η i ) e λ i , 1 x i e λ i , 1 x i 1 + λ i , 2 x i e λ i , 1 x i + λ i , 2 x i 1 .
Next, by substituting (31) in (30), differentiating u n + 1 ( x ) , taking the limit x x i 0 , and applying some evaluation and reductions, we obtain
d u n + 1 d x | x = x i 0 = ( λ i , 1 λ i , 2 ) e λ i , 2 h i 1 e ( λ i , 2 λ i , 1 ) h i u i 1 n + 1 + λ i , 1 λ i , 2 e ( λ i , 2 λ i , 1 ) h i 1 e ( λ i , 2 λ i , 1 ) h i u i n + 1 η i n + 1 λ i , 1 ( 1 e λ i , 2 h i ) + λ i , 2 e λ i , 2 h i ( 1 e λ i , 1 h i ) 1 e ( λ i , 2 λ i , 1 ) h i , i = 1 , 2 , , I 1 .
In the same way, we solve the problem (28), represented in an equivalent form as follows:
d i + d 2 u n + 1 d x 2 u n + 1 τ = f ˜ i n + 1 + , x ( x i , x i + 1 ) , u n + 1 ( x i ) = u i n + 1 , u n + 1 ( x i + 1 ) = u i + 1 n + 1 .
The corresponding solution is
u n + 1 ( x ) = C i , 1 + e λ i , 1 + x + C i , 1 + e λ i , 2 + x + η i + , η i + = τ ( f ˜ i n + 1 ) + , x [ x i , x i + 1 ] ,
where
C i , 1 + = ( u i η i + ) e λ i , 2 x i + 1 ( u i + 1 η i + ) e λ i , 2 + x i e λ i , 1 + x i + λ i , 2 + x i + 1 e λ i , 1 + x i + 1 + λ i , 2 + x i , C i , 2 + = ( u i + 1 η i + ) e λ i , 1 + x i ( u i η i ) e λ i , 1 + x i + 1 e λ i , 1 + x i + λ i , 2 + x i + 1 e λ i , 1 + x i + 1 + λ i , 2 + x i , λ i , 1 + = D i + 2 d i n + 1 + , λ i , 2 + = D i 2 d i n + 1 + , λ i , 1 + > 0 , λ i , 2 + < 0 , D i + = 4 τ d i + > 0 .
Differentiating u n + 1 ( x ) in (33) and taking the limit x x i + 0 , we obtain
d u n + 1 d x | x = x i + 0 = ( λ i , 1 + λ i , 2 + ) e λ i , 1 + h i + 1 1 e ( λ i , 2 + λ i , 1 + ) h i + 1 u i + 1 n + 1 λ i , 1 + e ( λ i , 2 + λ i , 1 + ) h i + 1 λ i , 2 + 1 e ( λ i , 2 + λ i , 1 + ) h i + 1 u i n + 1 η i n + 1 + λ i , 1 + e λ i , 1 + h i + 1 ( 1 e λ i , 2 + h i + 1 ) + λ i , 2 + ( 1 e λ i , 1 + h i + 1 ) 1 e ( λ i , 2 + λ i , 1 + ) h i + 1 .
At regular points x i l m , m = 1 , 2 , , M 1 , we have d ( x ) d u n + 1 ( x ) d x | x = x i 0 = d ( x ) d u n + 1 ( x ) d x | x = x i + 0 , while at interface nodes x i = l m , m = 1 , 2 , , M 1 the relation (10) holds. Therefore, from (21), (32) and (34), we obtain a symmetric system of algebraic equations
χ m + 1 n + 1 ( λ i , 1 + λ i , 2 + ) e λ i , 1 + h i + 1 1 e ( λ i , 2 + λ i , 1 + ) h i + 1 u i + 1 n + 1 + χ m + 1 n + 1 λ i , 1 + e ( λ i , 2 + λ i , 1 + ) h i + 1 λ i , 2 + 1 e ( λ i , 2 + λ i , 1 + ) h i + 1 + χ m n + 1 λ i , 1 λ i , 2 e ( λ i , 2 λ i , 1 ) h i 1 e ( λ i , 2 λ i , 1 ) h i + χ ˜ m u i n + 1 χ m n + 1 ( λ i , 1 λ i , 2 ) e λ i , 2 h i 1 e ( λ i , 2 λ i , 1 ) h i u i 1 n + 1 = F ¯ i n + 1 , F ¯ i n + 1 = χ m + 1 n + 1 η i n + 1 + λ i , 1 + e λ i , 1 + h i + 1 ( 1 e λ i , 2 + h i + 1 ) + λ i , 2 + ( 1 e λ i , 1 + h i + 1 ) 1 e ( λ i , 2 + λ i , 1 + ) h i + 1 + χ m n + 1 η i n + 1 λ i , 1 ( 1 e λ i , 2 h i ) + λ i , 2 e λ i , 2 h i ( 1 e λ i , 1 h i ) 1 e ( λ i , 2 λ i , 1 ) h i χ ˜ m g m n + 1 , i = 1 , , I 1 ,
where
χ m n + 1 = r m n + 1 , x i = l m , m = 1 , 2 . , M , d m , x i l m , m = 1 , 2 . , M
and
χ ˜ m = 1 , x i = l m , m = 1 , 2 . , M , 0 , x i l m , m = 1 , 2 , , M .
Next, we approximate the boundary conditions. For b 0 = 0 and b L = 0 , we obtain Dirichlet BCs, and the discretization is trivial. Let b 0 0 and b L 0 . To derive the discretization for (22), we proceed as follows: At each time layer, we consider the following boundary value ODE problem:
u n + 1 x ( x ) a 0 b 0 u n + 1 ( x ) = g 0 n + 1 b 0 , x ( 0 , h ) , u n + 1 ( x 0 ) = u 0 n + 1 , u n + 1 ( x 1 ) = u 1 n + 1 .
The general solution is
u n + 1 ( x ) = C e a 0 b 0 x + g 0 n + 1 a 0 .
Using boundary conditions in (36), we obtain
e a 0 b 0 h u 0 n + 1 u 1 n + 1 = g 0 n + 1 a 0 e a 0 b 0 h 1 .
We discretize the right boundary condition (23) in the same manner. Consider the following boundary value ODE problem:
u n + 1 x ( x ) + a L b L u n + 1 ( x ) = g L n + 1 b L , x ( L h , L ) , u n + 1 ( x I 1 ) = u I 1 n + 1 , u n + 1 ( x I ) = u I n + 1 .
The general solution is
u n + 1 ( x ) = C e a L b L x + g L n + 1 a L .
Using boundary conditions in (38), we obtain
e a L b L h u I n + 1 u I 1 n + 1 = g L n + 1 a L e a L b L h 1 .
The scheme is completed by the following initial condition:
u ( x , 0 ) = u 0 ( x ) .
Let us rewrite the discretization (35), (37), (39) and (40) in a more compact symmetric form:
D 0 n + 1 u 0 n + 1 + B 0 n + 1 u 1 n + 1 = F 0 n + 1 , A i n + 1 u i 1 n + 1 + D i n + 1 u i n + 1 + B i n + 1 u i + 1 n + 1 = F ¯ i n + 1 , i = 1 , 2 , , I 1 , A I n + 1 u I 1 n + 1 + D I n + 1 u I n + 1 = F I n + 1 , u i 0 = u 0 ( x i ) , i = 0 , 1 , , I .
where
D 0 n + 1 = e a 0 b 0 h , B 0 n + 1 = 1 , F 0 n + 1 = g 0 n + 1 a 0 e a 0 b 0 h 1 , A i n + 1 = χ m n + 1 ( λ i , 1 λ i , 2 ) e λ i , 2 h i 1 e ( λ i , 2 λ i , 1 ) h i , D i n + 1 = χ m + 1 n + 1 λ i , 1 + e ( λ i , 2 + λ i , 1 + ) h i + 1 λ i , 2 + 1 e ( λ i , 2 + λ i , 1 + ) h i + 1 + χ m n + 1 λ i , 1 λ i , 2 e ( λ i , 2 λ i , 1 ) h i 1 e ( λ i , 2 λ i , 1 ) h i + χ ˜ m , B i n + 1 = χ m + 1 n + 1 ( λ i , 1 + λ i , 2 + ) e λ i , 1 + h i + 1 1 e ( λ i , 2 + λ i , 1 + ) h i + 1 , A I n + 1 = 1 , D I n + 1 = e a L b L h , F I n + 1 = g L n + 1 a L e a L b L h 1 .
Similar to [30], from the discrete maximum principle [45], it follows that, for u ( x , 0 ) 0 , g 0 ( x ) 0 , g L ( x ) 0 , and g m ( x ) 0 , the numerical scheme (41) is positivity preserving, i.e., u i n 0 , i = 0 , 1 , , I , n = 1 , 2 , , N . Moreover, the positivity of the solution is preserved, and the scheme remains second-order accurate, even when there is a convection term in (1).

5. Inverse Problems with Unknown External Boundary Conditions

In this section, we formulate and solve numerically inverse problems for recovering functions g 0 and/or g 0 for given measurements in different layers.

5.1. Formulation of the Inverse Problems

The inverse problems are formulated considering the functions g 0 ( t ) and/or g L ( t ) to be unknown and must be identified using some overspecified data.
  • Depending on the observed data, the inverse problems IP for the determination of the boundary functions g 0 ( t ) and/or g L ( t ) in (3) and (4) can be formulated as follows:
  • IP1: For given observation u 1 ( x 1 * , t ) = ψ 1 ( t ) , x 1 * Ω 1 or u M ( x M * , t ) = ψ M ( t ) , x M * Ω M , find u 1 , , u M , g 0 ( t ) or u 1 , , u M , g L ( t ) , respectively.
  • IP2: For given observation u s ( x s * , t ) = ψ s ( t ) , x s * Ω s , s 1 and s M , find u 1 , u M , g L ( t ) or u 1 , u M , g 0 ( t ) .
  • IP3: For given observations u 1 ( x 1 * , t ) = ψ 1 ( t ) , x 1 * Ω 1 and u M ( x M * , t ) = ψ M ( t ) , x M * Ω M , find u 1 , , u M , g 0 ( t ) , g L ( t ) .
  • IP4: For given observations u 1 ( x 1 * , t ) = ψ 1 ( t ) , x 1 * Ω 1 and u i ( x s * , t ) = ψ s ( t ) , x s * Ω s , s M , find u 1 , , u M , g 0 ( t ) , g L ( t ) .
  • IP5: For given observations u s ( x s * , t ) = ψ s ( t ) , x s * Ω s and u M ( x s * , t ) = ψ M ( t ) , x M * Ω M , s n o t = 1 , find u 1 , , u M , g 0 ( t ) , g L ( t ) .
  • IP6: For given observations u s 1 ( x s 1 * , t ) = ψ s 1 ( t ) , x s 1 * Ω s 1 and u s 2 ( x s 2 * , t ) = ψ s 2 ( t ) , x s 2 * Ω s 2 , s 1 , s 2 { 1 , M } , find u 1 , , u M , g 0 ( t ) , g L ( t ) .

5.2. Numerical Solution

In this section, we discuss numerically solving IP1–IP6. Because of the unified discretization of the direct problem, which is valid at each space grid node, independent of the region Ω m , we can classify these IPs into two groups.
  • IPa: Find u 1 , , u M , g 0 ( t ) or u 1 , , u M , g L ( t ) , if measurements at one space point x s * ω ¯ h , x s * { x 0 , l m , x L } , m = 1 , 2 , , M is given, i.e., u ( x s * , t ) = ψ s ( t ) , x s * Ω s .
  • IPb: Find u 1 , , u M , g 0 ( t ) , g L ( t ) , if measurements at two space points x s 1 * ω ¯ h , x s 2 * ω ¯ h , x s 1 * , x s 2 * { x 0 , l m , x L } , m = 1 , 2 , , M are given, i.e., u ( x s 1 * , t ) = ψ s 1 ( t ) , x s 1 * Ω s 1 and u ( x s 2 * , t ) = ψ s 2 ( t ) , x s 2 * Ω s 2 .
Since we deal with nonuniform spatial mesh, the measurement can always be chosen to be grid nodes.
Consider IPa. In order to find u 1 , , u M , g 0 ( t ) , we introduce the symmetric with respect to g 0 ( t ) decomposition
u i n + 1 = U i n + 1 + g 0 ( t ) V i n + 1 .
Substituting in (41), we obtain the following problems:
D 0 n + 1 U 0 n + 1 + B 0 n + 1 U 1 n + 1 = F ˜ 0 n + 1 , A i n + 1 U i 1 n + 1 + D i n + 1 U i n + 1 + B i n + 1 U i + 1 n + 1 = F ¯ i n + 1 , i 1 , 2 , , I 1 , A I n + 1 U I 1 n + 1 + D I n + 1 U I n + 1 = F I n + 1 ,
where
F ˜ 0 n + 1 = 1 a 0 e a 0 b 0 h 1 ,
and
D 0 n + 1 V 0 n + 1 + B 0 n + 1 V 1 n + 1 = 1 , A i n + 1 V i 1 n + 1 + D i n + 1 V i n + 1 + B i n + 1 V i + 1 n + 1 = 0 , i 1 , 2 , , I 1 , A I n + 1 V I 1 n + 1 + D I n + 1 V I n + 1 = 0 .
After solving the problems in (43) and (44), we use the measurement and (42) to obtain
g 0 n + 1 = ψ s n + 1 U n + 1 ( x s * ) V ( x s * ) n + 1 , n = 0 , 1 , , N 1 .
In the same manner, we find u 1 , , u M , g L ( t ) . Consider the symmetric form with respect to g L ( t ) ; decomposition is
u i n + 1 = U i n + 1 + g L ( t ) V i n + 1 .
Substituting in (41), we obtain the following problems:
D 0 n + 1 U 0 n + 1 + B 0 n + 1 U 1 n + 1 = F 0 n + 1 , A i n + 1 U i 1 n + 1 + D i n + 1 U i n + 1 + B i n + 1 U i + 1 n + 1 = F ¯ i n + 1 , i 1 , 2 , , I 1 , A I n + 1 U I 1 n + 1 + D I n + 1 U I n + 1 = F ˜ I n + 1 ,
where
F ˜ I n + 1 = 1 a L e a L b L h 1 ,
and
D 0 n + 1 V 0 n + 1 + B 0 n + 1 V 1 n + 1 = 0 , A i n + 1 V i 1 n + 1 + D i n + 1 V i n + 1 + B i n + 1 V i + 1 n + 1 = 0 , i 1 , 2 , , I 1 , A I n + 1 V I 1 n + 1 + D I n + 1 V I n + 1 = 1 .
Using the solutions of (47) and (48), the measurement, and (46), we find
g L n + 1 = ψ s n + 1 U n + 1 ( x s * ) V ( x s * ) n + 1 , n = 0 , 1 , , N 1 .
Further, we will focus on IPb. In order to find u 1 , , u M , g 0 ( t ) , g L ( t ) , we consider the decomposition
u i n + 1 = U i n + 1 + g 0 ( t ) V i n + 1 + g L ( t ) W i n + 1 .
Substituting in (41), we obtain three problems as follows:
D 0 n + 1 U 0 n + 1 + B 0 n + 1 U 1 n + 1 = F ˜ 0 n + 1 , A i n + 1 U i 1 n + 1 + D i n + 1 U i n + 1 + B i n + 1 U i + 1 n + 1 = F ¯ i n + 1 , i 1 , 2 , , I 1 , A I n + 1 U I 1 n + 1 + D I n + 1 U I n + 1 = F ˜ I n + 1 ,
D 0 n + 1 V 0 n + 1 + B 0 n + 1 V 1 n + 1 = 1 , A i n + 1 V i 1 n + 1 + D i n + 1 V i n + 1 + B i n + 1 V i + 1 n + 1 = 0 , i 1 , 2 , , I 1 , A I n + 1 V I 1 n + 1 + D I n + 1 V I n + 1 = 0 .
D 0 n + 1 W 0 n + 1 + B 0 n + 1 W 1 n + 1 = 0 , A i n + 1 W i 1 n + 1 + D i n + 1 W i n + 1 + B i n + 1 W i + 1 n + 1 = 0 , i 1 , 2 , , I 1 , A I n + 1 W I 1 n + 1 + D I n + 1 W I n + 1 = 1 .
Once we find the solutions of (50)–(52), we use the measurements and decomposition (49) to determine g 0 n + 1 and g L n + 1 , n = 0 , 1 , , N 1 , solving the system as follows:
ψ s 1 n + 1 = U n + 1 ( x s 1 * ) + g 0 n + 1 V n + 1 ( x s 1 * ) + g L ( t ) W n + 1 ( x s 1 * ) , ψ s 2 n + 1 = U n + 1 ( x s 1 * ) + g 0 n + 1 V n + 1 ( x s 2 * ) + g L ( t ) W n + 1 ( x s 2 * ) .
Therefore, we derive
g 0 n + 1 = W n + 1 ( x s 2 * ) ψ s 1 n + 1 U ( x s 1 * ) n + 1 W n + 1 ( x s 1 * ) ψ s 2 n + 1 U x s 2 * n + 1 V n + 1 ( x s 1 * ) W n + 1 ( x s 2 * ) V n + 1 ( x s 2 * ) W n + 1 ( x s 1 * ) , g L n + 1 = V n + 1 ( x s 1 * ) ψ s 2 n + 1 U ( x s 2 * ) n + 1 V n + 1 ( x s 2 * ) ψ s 1 n + 1 U ( x s 1 * ) n + 1 V n + 1 ( x s 1 * ) W n + 1 ( x s 2 * ) V n + 1 ( x s 2 * ) W n + 1 ( x s 1 * ) .

6. Numerical Results

In this section, we illustrate the accuracy of the proposed numerical method for solving direct and inverse problems IPa and IPb. Additionally, we show the influence of the location of the point(s) (in which region(s) Ω 1 , Ω 2 , or Ω 3 belong) of measurement(s) on the precision of the solution, i.e., we study IP1–IP6. We take a test example with Robin’s BC at x = l 0 and Dirichlet BC at x = L , namely a 0 = b 0 = a L = 1 , b L = 0 . We let M = 3 and l 0 = 0 , l 1 = 1 , l 2 = 2 , L = l 3 = 3 . All computations are performed on uniform spatial mesh with step size h.
Example 1
(Direct problem: convergence test). First, we examine the order of convergence of the difference scheme (41) for solving the direct problem. We consider a test example with the following coefficients, right-hand sides, and initial conditions:
d 1 ( x ) = 3 x + 1 , f 1 ( x , t ) = e t 38 x 3 12 x 2 , x [ l 0 , l 1 ] , d 2 ( x ) = 5 , f 2 ( x , t ) = e t π 2 16 cos π x 2 , x [ l 1 , l 2 ] , d 3 ( x ) = x 2 + 2 , f 3 ( x , t ) = e t x 2 , x [ l 2 , l 3 ] , g 0 ( t ) = e t , g L ( t ) = 3 4 + 1 + e t , r 1 = 1 4 , r 2 = 4 t 3 , g 1 ( t ) = e t + t 2 , r 3 = 7 t 12 , g 2 ( t ) = π t 6 5 2 e t ,
u 0 ( x ) = u 1 0 ( x ) = x 4 + 1 , x [ l 0 , l 1 ] , u 2 0 ( x ) = 1 4 sin π x 2 + 3 x 4 + 1 , x [ l 1 , l 2 ] , u 3 0 ( x ) = x 4 + 2 , x [ l 2 , l 3 ] .
Therefore, the solution of the problem (1)–(4), (9) and (10) is
u ( x , t ) = u 1 ( x , t ) = x 4 + e t , x [ l 0 , l 1 ] , u 2 ( x , t ) = 1 4 sin π x 2 + 3 x 4 + e t , x [ l 1 , l 2 ] , u 3 ( x , t ) = x 4 + 1 + e t , x [ l 2 , l 3 ] .
Denote by u ˜ i n the numerical solution, obtained by (41) at time layer t n and spatial grid node x i and let E i n = u ˜ i n u ( x i , t n ) . The computational results are estimated by [15,46]
E = E I = max 1 n N max 0 i I | E i n | , E 2 = E 2 I = h τ i = 0 I n = 1 N ( E i n ) 2 , C R = log 2 E I E 2 I , C R 2 = log 2 E 2 I E 2 2 I .
In Table 1, we present the errors and convergence rates of the numerical solution of the direct problem, computed for fixed ratio τ h 2 , while the results in Table 2 are obtained for τ = h . The final time is T = 0.5 . We observe that the order of convergence in space is second, while in time, it is first. Therefore, the accuracy of the discrete scheme (41) is O ( τ + h 2 ) .
For comparison, only in this test, we consider layers with different lengths, i.e., l 0 = 0 , l 1 = 1.5 , l 2 = 2 , l 3 = 3 . For the computations, we use the same coefficients d m and r m as before. The initial functions; right-hand sides; functions g 0 , g 2 , and g L ; and solutions in [ l 1 , l 2 ] and [ l 2 , l 3 ] are the same as in the previous example. The only modification is the initial solution at the first layer, which reflects the solution, the function g 1 , and the corresponding right-hand side f 1 . Now, we take u 0 ( x ) = 2 9 x 4 + 1 + 2 8 , u ( x , t ) = e t + 2 9 x 4 + 2 8 , x [ l 0 , l 1 ] . The results from computations for τ h 2 , T = 0.5 are given in Table 3. We observe that the results in Table 1 and Table 3 are close, and the spatial order of convergence is one and the same. The different lengths of the layers (position of the interface points) do not significantly influence the accuracy.
Note that the discretization (41) is derived semi-analytically, and in the stationary case for piecewise constant diffusion, it is exact; see [30]. Therefore, if each diffusion coefficient, d m , m = 1 , 2 , , M is a constant, potentially different for each layer, and the numerical scheme (41) is very precise. Moreover, it is exact and meshless in space and only involves error from the time discretization. We will compare the precision of the numerical scheme (41) with the second-order problem in space, i.e., the implicit finite difference scheme proposed in [6], in the case of spatially dependent coefficients d m . The results from computations with the method proposed in [6] for T = 0.5 and τ = h are presented in Table 4. We observe that for space-dependent diffusion, the scheme in (41) is a little bit more precise in comparison with the one in [6]; see Table 2 and Table 4. However, the scheme in (41) is not only second-order accurate but also preserves the non-negativity of the solution, regardless of whether a convection term is present in (1) or not [30].
Example 2
(Inverse problems: discrete measurements). We consider the same test example as in Example 1 and recover the functions g 0 or/and g L . We take measurements from the numerical solution of the direct problem at each time layer of the mesh and at fixed spatial grid node(s). Since in our test example, the exact functions g 0 and g L are known, we may compute the error between the exact and recovered ones, computed by (42)–(45) or (49)–(53). Denote by g 0 r and g L r the numerically recovered functions g 0 and g L , respectively, and introduce the errors e 0 n = g 0 ( t n ) g 0 r ( t n ) , e L n = g L ( t n ) g L r ( t n ) . To verify the efficiency of the developed numerical methods for solving IP1–IP6, we define
ϵ ( g 0 ) = max 1 n N | e 0 n | , ϵ 2 ( g 0 ) = τ n = 1 N ( e 0 n ) 2 , ϵ ( g L ) = max 1 n N | e L n | , ϵ 2 ( g L ) = τ n = 1 N ( e L n ) 2 .
To estimate the numerical solution, we use the same formulas as in (55), but now E i n = u i n u ˜ i n , where u i n is the solution of the inverse problem (42)–(45) or (49)–(53) at grid node ( x i , t n ) .
First, we consider IP1 and IP2 for recovering the function g 0 in the left (Robin’s) BC. The computations are performed for I = 480 , τ = 2 h , and T = 1 . In Table 5, we present errors of the function determined by (42)–(45), function g 0 , and solution u , using the measurements at spatial point x * located in some of the regions Ω s , s = 1 , 2 , 3 . The results show that the solution of the numerical approach (42)–(45) recovers the function g 0 and the numerical solution of the direct problem almost exactly. Better precision is obtained in the case in which the measurements are in the adjacent region Ω 1 to the left BC.
Next, we examine IP3–IP6. We take measurements at two spatial grid nodes x 1 * , x 2 * . In Table 6, we present the errors of the recovered function by (49)–(53), functions g 0 , g L , and solution u for different locations of the points of measurement. We observe that the numerical method (49)–(53) recovers the function g 0 , g L and the numerical solution of the direct problem almost exactly. Better precision of the solution is obtained when one of the measurement points is in the region Ω 1 and the other is in Ω 3 .
Therefore, the order of convergence of the solution of the numerical methods (42)–(45) and (49)–(53) is the same as the one of the numerical solution of the direct problem. Note that, taking the measurements close to the interface nodes, the recovery is not successful. The closer the measurement point(s) are to the boundary or boundaries where the boundary condition(s) are being recovered, the higher the accuracy of the restored boundary function(s) and solution.
Example 3
(Inverse problem: noisy measurements). We compute the solution of the inverse problems for the same test example as in Example 2 (left Robin’s BC and right Dirichlet BC) to restore the functions g 0 and g L , but now we add noise to the discrete observations as follows:
ψ 0 n = u n ( x 1 * , t n ) + 2 ρ 1 ( σ 1 n 0.5 ) u n ( x 1 * , t n ) , ψ M n = u n ( x 2 * , t n ) + 2 ρ 2 ( σ 2 n 0.5 ) u n ( x 2 * , t n ) ,
where u n ( x i * , t n ) , i = 1 , 2 are numerical solutions of the direct problem at time layers t n and at spatial nodes x i * , ρ i are noise levels and σ i n are random values, uniformly distributed on the interval [ 0 , 1 ] . We use polynomial curve fitting of degree 5 to smooth the data. The computations are performed for I = 480 and τ = 2 h for T = 1 .
In Figure 1, we present the exact and recovered functions g 0 , g L for x 1 * = 0.5 and x 2 * = 2.5 and ρ 1 = ρ 2 = 0.01 . In this case, the errors of the solution obtained by numerically solving IP3, compared with the discrete solution of the direct problem, are E = 2.7983 × 10 2 and E 2 = 2.6706 × 10 3 . In Figure 2 we present determined boundary functions for ρ 1 = 0.03 and ρ 2 = 0.05 . Now, the corresponding errors are E = 8.3858 × 10 2 and E 2 = 1.0642 × 10 2
In Figure 3, we depict the exact and recovered functions g 0 , g L for x 1 * = 0.5 , x 2 * = 1.9 and ρ 1 = 0.03 , ρ 2 = 0.05 , obtained by numerically solving IP4. The corresponding errors of the solution are E = 1.3969 × 10 1 and E 2 = 1.4772 × 10 2 .
Next, we examine the efficiency of the numerical method for recovering nonsmooth function g 0 ( t ) and discontinuous function g L ( t ) . In the above test problem, we take
g 0 ( t ) = 3 t + 1 , 0 t 0.5 , 5 ( T t ) , t 0.5 1 , g L ( t ) = 1 , 0 t < 0.25 , 5 t , 0.25 < t < 0.75 , 4 , 0.75 < t 1 .
In Figure 4, we provide t the exact and recovered functions g 0 , g L for x 1 * = 0.5 and x 2 * = 1.9 and ρ 1 = 0.03 , ρ 2 = 0.05 , obtained by numerically solving IP4. In Figure 5, we present the solution and error of the solution. In this case, E = 5.3997 × 10 1 and E 2 = 5.8574 × 10 2 .
The experiments with noisy measurements illustrate that the numerical method for solving inverse problems recovers the smooth, nonsmooth, and discontinuous functions g 0 , g L , and the corresponding solution u with optimal accuracy, but the Dirichlet BC (namely the function g L ) is recovered more precisely in comparison with Robin’s BC (namely the function g 0 ).

7. Conclusions and Perspectives

In this study, we investigated heat conduction problems involving layered materials. We formulated multilayer parabolic problems incorporating typical interface relations from physics, mechanics, and heat-mass transfer. We established well-posedness in appropriate Sobolev spaces for direct (forward) symmetric (self-adjoint) initial boundary value problems. Additionally, we presented several inverse problems related to unknown external boundary conditions based on different point observations. We constructed a second-order exponential difference scheme for the direct problem and employed special solution decomposition techniques to numerically address the inverse problems. Simulations of test examples demonstrate that the proposed method achieves a second-order convergence in space and a first-order convergence in time for the direct problem. The numerical method for solving the inverse problem effectively recovers functions g 0 and g L and provides high-accuracy numerical solutions for the direct problem, nearly exact in the cases of exact measurements, located at points close to the corresponding boundary. The position of measurement points significantly affects the precision of the method, with better results obtained when measurements are taken in domains adjacent to the boundary. Simulations with perturbed measurements show that the solution achieves optimal accuracy, particularly in recovering Dirichlet boundary conditions. The limitation of the method is related to the complications that arise in the extension of the method to problems with curvilinear interfaces, especially in higher-dimensional cases. In future work, we aim to develop approaches for solving higher-dimensional multilayer nonsymmetric diffusion–convection problems with nonlinear reaction terms. Additionally, we plan to extend the inverse problem solution methods to incorporate other types of measurements, such as integral observations.

Author Contributions

Conceptualization, L.G.V. and M.N.K.; methodology, M.N.K. and L.G.V.; investigation, M.N.K. and L.G.V.; resources, M.N.K. and L.G.V.; writing—original draft preparation, M.N.K. and L.G.V.; writing—review and editing, L.G.V.; validation, M.N.K. All authors have read and agreed to the published version of the manuscript.

Funding

This study is financed by the European Union-NextGenerationEU, through the National Recovery and Resilience Plan of the Republic of Bulgaria, project № BG-RRP-2.013-0001-C01.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data are contained within the article.

Acknowledgments

The authors are very grateful to the anonymous reviewers whose valuable comments and suggestions improved the quality of the paper.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Carr, E.J. Mew semi-analytical solutions for advection-dispersion equations in multilayer porous media. Transp. Porous Media 2020, 135, 39–58. [Google Scholar] [CrossRef]
  2. Carr, E.J.; March, N.G. Semi-analytical solution of multilayer diffusion problems with time-varying boundary conditions and general interface conditions. Appl. Math. Comput. 2018, 333, 286–303. [Google Scholar] [CrossRef]
  3. Givoli, D. Exact representation on artificial interfaces and applications in mechanics. Appl. Mech. Rev. 1999, 52, 333–349. [Google Scholar] [CrossRef]
  4. Hikson, R.I.; Barry, S.I.; Barry, S.I.; Mercer, G.N.; Sidliu, H.S. Finite differnce schemes for multilayer diffusion. Math. Model. 2011, 54, 210–220. [Google Scholar] [CrossRef]
  5. Jain, A.; Krishnan, G. Stability analysis of a multilayer diffusion-reaction heat transfer problem with a very large number of layers. Int. J. Heat Mass Transf. 2024, 231, 125769. [Google Scholar] [CrossRef]
  6. March, N.G.; Carr, E.J. Finite volume schemes for multilayer diffusion. J. Comp. Appl. Math. 2015, 345, 206–223. [Google Scholar] [CrossRef]
  7. Movahendian, B.; Boroomand, B. The solution of direct inverse transient heat conduction problems with layered materials using exponential basis functions. Int. J. Therm. Sci. 2014, 77, 186–198. [Google Scholar] [CrossRef]
  8. Krishnan, G.; Jain, A. Theoretical analysis of a two-dimensional multilayer diffusion problem with general convective boundary conditions normal to the layered direction. Int. J. Heat Mass Transf. 2023, 202, 123723. [Google Scholar] [CrossRef]
  9. Jain, A.; Krishnan, G. Thermal stability of a two-dimensional multilayer diffusion-reaction problem. Int. J. Heat Mass Transf. 2024, 221, 125038. [Google Scholar] [CrossRef]
  10. Johnston, S.T.; Simpson, M.J. Exact solutions for diffusive transport on heterogeneous growing domains. Proc. R. Soc. A 2023, 479, 20230263. [Google Scholar] [CrossRef]
  11. Rodrigo, M. An embedding approach to multilayer diffusion problems with time-dependent boundaries on bounded and unbounded domains. Appl. Math. Model. 2024, 129, 275–296. [Google Scholar] [CrossRef]
  12. Zimmerman, R.A.; Jankowski, T.A.; Tartakovsky, D.M. Analytical models of axisymmetric reaction–diffusion phenomena in composite media. Int. J. Heat Mass Transf. 2016, 99, 425–431. [Google Scholar] [CrossRef]
  13. Lesnic, D. Inverse Problems with Applications in Science and Engineering; CRC Press: Abingdon, UK, 2021; p. 349. [Google Scholar]
  14. Ozbilge, E. Determination of the unknown boundary condition of the inverse parabolic problems via semigroup method. Bound Value Probl. 2013, 2013, 2. [Google Scholar] [CrossRef]
  15. Samarskii, A. The Theory of Difference Schemes; Marcel Dekker: New York, NY, USA, 2001. [Google Scholar]
  16. Samarskii, A.A.; Vabishchevich, P.N. Numerical Methods for Solving Inverse Problems in Mathematical Physics; de Gruyter: Berlin, Germany, 2007; 438p. [Google Scholar]
  17. Smith, G. Numerical Solution of Partial Differential Equations: Finite Difference Methods, 2nd ed.; Oxford Unversity Press: Oxford, UK, 1978. [Google Scholar]
  18. Yang, L.; Yu, J.-N.; Luo, G.-W.; Deng, Z.-C. Numerical identification of source terms for a two dimensional heat conduction problem in polar coordinate system. Appl. Math. Model. 2013, 37, 939–957. [Google Scholar] [CrossRef]
  19. Jovanović, B.S.; Milovanović, Z.D. Numerical approximation of a 2D parabolic transmission problem in disjoint domains. Appl. Math. Comput. 2014, 228, 508–519. [Google Scholar] [CrossRef]
  20. Koleva, M.N.; Vulkov, L.G. Numerical identification of external boundary conditions for time fractional parabolic equations on disjoint domains. Fractal Fract. 2023, 7, 326. [Google Scholar] [CrossRef]
  21. Koleva, M.N.; Vulkov, L.G. Numerical reconstruction of time-dependent boundary conditions to 2D heat equation on disjoint rectangles at integral observations. Mathematics 2024, 12, 1499. [Google Scholar] [CrossRef]
  22. Delić, A.; Jovanović, B.S. Numerical approximation of an interface problem for fractional in time diffusion equation. Appl. Math. Comput. 2014, 229, 467–479. [Google Scholar] [CrossRef]
  23. Chernogorova, T.P.; Ewing, R.E.; Iliev, O.; Lazarov, R. On the discretization of interface problems with perfect and imperfect contact. In Conference Numerical Treatment of Multiphase Flows in Porous Media: Proceedings of the International Workshop, Beijing, China, 2–6 August 1999; Springer: Berlin/Heidelberg, Germany, 2000; pp. 93–103. [Google Scholar]
  24. Iliev, O.P. A finite-difference scheme of second-order accuracy for elliptic equations with discontinuous coefficients. Differ. Equ. 2000, 36, 928–930. [Google Scholar] [CrossRef]
  25. Ewing, R.; Iliev, O.; Lazarov, R.; Rybak, I.; Willems, J. A simplified method for upscaling composite materials with high contrast of the conductivity. SIAM J. Sci. Comput. 2009, 31, 2568–2586. [Google Scholar] [CrossRef]
  26. Leveque, R.J.; Li, Z. The immersed interface method for elliptic equations with discontinuous coefficients and singular sources. SIAM J. Numer. Anal. 1994, 31, 1019–1044. [Google Scholar] [CrossRef]
  27. Kandilarov, J.D.; Vulkov, L.G. The immersed interface method for a nonlinear chemical diffusion equation with local sites of reactions. Numer. Algorithms 2004, 36, 285–307. [Google Scholar] [CrossRef]
  28. Farrell, P.A.; Hegarty, A.F.; Miller, J.J.H.; ORiordan, E.; Shishkin, G.I. Robust Computational Techniques for Boundary Layers; Chapman & Hall/CRC Press: Boca Raton, FL, USA, 2000. [Google Scholar]
  29. Polyakov, S.V.; Karamzin, Y.N.; Kudryashova, T.A.; Tsybulin, I.V. Exponential difference schemes for solution of boundary problems for diffusion-convection equations. Math. Models Comput. Simul. 2017, 9, 71–82. [Google Scholar] [CrossRef]
  30. Chernogorova, T.P.; Koleva, M.N.; Vulkov, L.G. Exponential finite difference scheme for transport equations with discontinuous coefficients in porous media. Appl. Math. Comput. 2021, 392, 125691. [Google Scholar]
  31. Kabanikhin, S.I. Inverse and Ill-Posed Problems; DeGruyer: Berlin, Germany, 2011. [Google Scholar]
  32. Rundell, W.; Yin, H.-M. A parabolic inverse problem with an unknown boundary condition. J. Differ. Equ. 1990, 86, 234–242. [Google Scholar] [CrossRef]
  33. Rundell, W.; Xub, X.; Zuo, L. The determination of an unknown boundary condition in a fractional diffusion equation. Appl. Anal. 2013, 92, 1511–1526. [Google Scholar] [CrossRef]
  34. Alifanov, O.M. Inverse Heat Transfer Problems, 1st ed.; Springer: Berlin/Heidelberg, Germany, 1994; 348p. [Google Scholar]
  35. Hasanov, A.H.; Romanov, V.G. Introduction to Inverse Problems for Differential Equations, 1st ed.; Springer: Cham, Switzerland, 2017; 261p. [Google Scholar]
  36. Isakov, V. Inverse Problems for Partial Differential Equations, 3rd ed.; Springer: Cham, Switzerland, 2017; p. 406. [Google Scholar]
  37. Xiong, X.; Guo, H.; Liu, H. An inverse problem for a fractional diffusion equation. J. Comput. Appl. Math. 2012, 236, 4474–4484. [Google Scholar] [CrossRef]
  38. Koleva, M.N.; Vulkov, L.G. Reconstruction of boundary conditions of a parabolic-hyperbolic transmission problem. In New Trends in the Applications of Differential Equations in Sciences; Slavova, A., Ed.; Springer Proceedings in Mathematics & Statistics; Springer: Cham, Switzerland, 2024; Volume 449. [Google Scholar]
  39. Wei, T.; Li, Y.S. An inverse boundary problem for one-dimensional heat equation with a multilayer domain. Eng. Anal. Bound. Elem. 2009, 33, 225–232. [Google Scholar] [CrossRef]
  40. Lykov, A.V. Heat-Mass Transfer; Energia: Moscow, Russia, 1978. (In Russian) [Google Scholar]
  41. Datta, A.K. Biological and Bioenvironmental Heat and Mass Transfe, 1st ed.; Marcel Dekker: New York, NY, USA, 2002; 424p. [Google Scholar]
  42. Marchuk, G.I.; Shaidurov, V.V. Difference Methods and Their Extrapolations; Springer: New York, NY, USA, 1983; 334p. [Google Scholar]
  43. Wu, Z.; Yin, J.; Wang, C. Elliptic and Parabolic Equations; World Scientific Publishing Co. Pte. Ltd.: Singapore, 2006. [Google Scholar]
  44. Ladyženskaja, O.A.; Solonnikov, V.A.; Ural’cev, N.N. Linear and Quasilinear Equations of Parabolic Type. Transl. Math. Monogr. 1968, 23, 648. [Google Scholar]
  45. Faragó, I.; Horváth, R. Discrete maximum principle and adequate discretizations of linear parabolic problems. SIAM J. Sci. Comput. 2006, 28, 2313–2336. [Google Scholar] [CrossRef]
  46. Thomas, L.H. Elliptic Problems in Linear Differential Equations over a Network; Watson Science Computer Laboratory Report; Columbia University: New York, NY, USA, 1949. [Google Scholar]
Figure 1. Exact (solid red line) and recovered (line with circles) functions g 0 (left) and g L (right), x 1 * = 0.5 , x 2 * = 2.5 , ρ 1 = ρ 2 = 0.01 ; Example 3.
Figure 1. Exact (solid red line) and recovered (line with circles) functions g 0 (left) and g L (right), x 1 * = 0.5 , x 2 * = 2.5 , ρ 1 = ρ 2 = 0.01 ; Example 3.
Symmetry 16 01396 g001
Figure 2. Exact (solid red line) and recovered (line with circles) functions g 0 (left) and g L (right), x 1 * = 0.5 , x 2 * = 2.5 , ρ 1 = 0.03 , ρ 2 = 0.05 ; Example 3.
Figure 2. Exact (solid red line) and recovered (line with circles) functions g 0 (left) and g L (right), x 1 * = 0.5 , x 2 * = 2.5 , ρ 1 = 0.03 , ρ 2 = 0.05 ; Example 3.
Symmetry 16 01396 g002
Figure 3. Exact (solid red line) and recovered (line with circles) functions g 0 (left) and g L (right), x 1 * = 0.5 , x 2 * = 1.9 , ρ 1 = 0.03 , ρ 2 = 0.05 ; Example 3.
Figure 3. Exact (solid red line) and recovered (line with circles) functions g 0 (left) and g L (right), x 1 * = 0.5 , x 2 * = 1.9 , ρ 1 = 0.03 , ρ 2 = 0.05 ; Example 3.
Symmetry 16 01396 g003
Figure 4. Exact (solid red line) and recovered (line with circles) functions g 0 (left) and g L (right), x 1 * = 0.5 , x 2 * = 1.9 , ρ 1 = 0.03 , ρ 2 = 0.05 ; Example 3.
Figure 4. Exact (solid red line) and recovered (line with circles) functions g 0 (left) and g L (right), x 1 * = 0.5 , x 2 * = 1.9 , ρ 1 = 0.03 , ρ 2 = 0.05 ; Example 3.
Symmetry 16 01396 g004
Figure 5. Solution u i n of the IP4 (left) and absolute error | E i n | (right), i = 0 , 1 , , I , n = 0 , 1 , , N , x 1 * = 0.5 , x 2 * = 1.9 , ρ 1 = 0.03 , ρ 2 = 0.05 ; Example 3.
Figure 5. Solution u i n of the IP4 (left) and absolute error | E i n | (right), i = 0 , 1 , , I , n = 0 , 1 , , N , x 1 * = 0.5 , x 2 * = 1.9 , ρ 1 = 0.03 , ρ 2 = 0.05 ; Example 3.
Symmetry 16 01396 g005
Table 1. Errors and convergence rates of the numerical solution of the direct problem, τ h 2 ; Example 1.
Table 1. Errors and convergence rates of the numerical solution of the direct problem, τ h 2 ; Example 1.
I E CR E 2 CR 2
1202.1992   ×   10 2 1.0855   ×   10 2
2401.5012   ×   10 2 0.55097.3008   ×   10 3 0.5723
4807.2866   ×   10 3 1.04283.5299   ×   10 3 1.0484
9602.5956   ×   10 3 1.48921.2671   ×   10 3 1.4781
19206.7216   ×   10 4 1.94923.5650   ×   10 4 1.8295
Table 2. Errors and convergence rates of the numerical solution of the direct problem, τ = h ; Example 1.
Table 2. Errors and convergence rates of the numerical solution of the direct problem, τ = h ; Example 1.
I E CR E 2 CR 2
1207.7520   ×   10 3 3.9829   ×   10 3
2403.7614   ×   10 3 1.04331.8154   ×   10 3 1.1335
4801.8516   ×   10 3 1.02258.6736   ×   10 4 1.0656
9609.1846   ×   10 4 1.01154.2413   ×   10 4 1.0321
19204.5739   ×   10 4 1.00582.0975   ×   10 4 1.0158
Table 3. Errors and convergence rates of the numerical solution of the direct problem, τ h 2 ; Example 1.
Table 3. Errors and convergence rates of the numerical solution of the direct problem, τ h 2 ; Example 1.
I E CR E 2 CR 2
1201.8200   ×   10 2 1.0099   ×   10 2
2401.1761   ×   10 2 0.62996.4996   ×   10 3 0.6358
4805.6813   ×   10 3 1.04973.1291   ×   10 3 1.0546
9602.0976   ×   10 3 1.43751.1520   ×   10 3 1.4416
19206.0960   ×   10 4 1.78283.3755   ×   10 4 1.7710
Table 4. Errors and convergence rates of the numerical solution of the direct problem, [6], τ = h ; Example 1.
Table 4. Errors and convergence rates of the numerical solution of the direct problem, [6], τ = h ; Example 1.
I E CR E 2 CR 2
1208.0572   ×   10 3 3.9049   ×   10 3
2403.9901   ×   10 3 1.01391.9440   ×   10 3 1.0063
4801.9855   ×   10 3 1.00699.7031   ×   10 4 1.0025
9609.9040   ×   10 4 1.00344.8479   ×   10 4 1.0011
19204.9461   ×   10 4 1.00172.4231   ×   10 4 1.0005
Table 5. Errors of the numerical solution of the IP1, IP2; Example 2.
Table 5. Errors of the numerical solution of the IP1, IP2; Example 2.
x * E E 2 ϵ ( g 0 ) ϵ 2 ( g 0 )
0.501.4040   ×   10 12 1.4735   ×   10 13 1.5858   ×   10 10 5.1343   ×   10 11
1.251.2267   ×   10 9 1.0814   ×   10 10 1.5917   ×   10 8 6.9252   ×   10 9
2.504.7723   ×   10 8 4.4621   ×   10 9 6.5239   ×   10 7 2.8830   ×   10 7
Table 6. Errors of the numerical solutions of the IP3–IP6; Example 2.
Table 6. Errors of the numerical solutions of the IP3–IP6; Example 2.
x 1 * x 2 * E E 2 ϵ ( g 0 ) ϵ 2 ( g 0 ) ϵ ( g L ) ϵ 2 ( g L )
0.501.751.5197   ×   10 12 2.9015   ×   10 13 1.9315   ×   10 10 5.7772   ×   10 11 1.5197   ×   10 12 6.6679   ×   10 13
1.252.501.3183   ×   10 9 1.1228   ×   10 10 1.8044   ×   10 8 7.2189   ×   10 9 1.5099   ×   10 14 5.4342   ×   10 15
1.251.751.4452   ×   10 9 1.1143   ×   10 10 1.9445   ×   10 8 7.0999   ×   10 9 1.4988   ×   10 12 5.4161   ×   10 13
0.502.501.4908   ×   10 12 1.7105   ×   10 13 1.6941   ×   10 10 6.5879   ×   10 11 3.1086   ×   10 14 1.1447   ×   10 14
0.500.809.9528   ×   10 10 1.6202   ×   10 10 1.8100   ×   10 10 6.0038   ×   10 11 9.9528   ×   10 10 4.4503   ×   10 10
2.152.801.7992   ×   10 8 1.7575   ×   10 9 2.4744   ×   10 7 1.1331   ×   10 7 3.5527   ×   10 15 1.4183   ×   10 15
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Koleva, M.N.; Vulkov, L.G. Numerical Solution of External Boundary Conditions Inverse Multilayer Diffusion Problems. Symmetry 2024, 16, 1396. https://doi.org/10.3390/sym16101396

AMA Style

Koleva MN, Vulkov LG. Numerical Solution of External Boundary Conditions Inverse Multilayer Diffusion Problems. Symmetry. 2024; 16(10):1396. https://doi.org/10.3390/sym16101396

Chicago/Turabian Style

Koleva, Miglena N., and Lubin G. Vulkov. 2024. "Numerical Solution of External Boundary Conditions Inverse Multilayer Diffusion Problems" Symmetry 16, no. 10: 1396. https://doi.org/10.3390/sym16101396

APA Style

Koleva, M. N., & Vulkov, L. G. (2024). Numerical Solution of External Boundary Conditions Inverse Multilayer Diffusion Problems. Symmetry, 16(10), 1396. https://doi.org/10.3390/sym16101396

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