1. Introduction
We consider a multidimensional bounded domain
whose regular boundary
consists of three disjoint portions
with
for
. We define two stationary heat conduction problems
and
with mixed boundary conditions which are given by (
1) and (2), and by (
1) and (3), respectively:
where
g is the internal energy of the system in
,
the environmental temperature on
,
q is the heat flux on
and,
is the convective heat coefficient on
We assume that
,
and
These problems correspond to stationary Stefan problems [
1,
2]. Notice that mixed boundary conditions play an important role in several applications, e.g., heat conduction and electric potential problems [
3].
The variational formulation of the elliptic problems
and
, corresponding to (
1), (2) and (
1), (3), respectively, can be found in [
2,
4,
5]. In general, solutions of mixed elliptic boundary value problems are not very regular [
6], but there are cases in which they are regular [
7,
8,
9]. Other theoretical optimization problems on the subject have been studied in [
10,
11].
We define the optimization problems
and
, associated to the systems
and
, respectively (see [
4,
12,
13,
14,
15]).
The distributed optimization problems
and
on the constant internal energy
g are formulated as:
where
and
are given by
with
and
. For each
,
and
denote the unique solutions to the systems
and
, respectively, for given data
and
. Here and throughout this section,
denotes the standard
norm.
The boundary optimization problems
and
on the constant heat flux
q on
are defined as:
where
and
are given by
with
and
. For each
, we denote with
and
the unique solutions to the systems
and
respectively, for data
and
. Here and throughout this section,
denotes the standard
norm.
The boundary optimization problems
and
on the constant temperature
b in an external neighborhood of
are set as
where
and
, given by
with
and
. For every
, the functions
and
are the unique solutions of systems
and
respectively, for data
and
. Here and throughout this section,
denotes the standard norm in
.
In [
16], explicit solutions to the continuous systems
and
were derived, together with the associated optimization problems
and
for
, in the particular case where the domain is a rectangle. These explicit solutions serve as a rigorous benchmark for assessing the accuracy and reliability of numerical methods.
The aim of this paper is three-fold: (i) to obtain explicit solutions to the systems and in a rectangular domain; (ii) to derive explicit discrete solutions for the optimization problems and , , using finite difference methods; and (iii) to estimate the order of convergence of the discrete solutions by comparison with the exact explicit ones.
It is worth mentioning that there are several articles available in the literature that obtain explicit discrete solutions of some optimization problems [
17,
18]. For example, in [
19], exact formulas are derived for the solution of an optimal boundary control problem governed by the one-dimensional heat equation where the control function measures the distance of the final state from the target. In [
20] a finite element approximation is applied for some kind of parabolic optimal control problems with Neumann boundary conditions. Some numerical experiments are carried out setting a rectangular domain.
This paper is organized as follows: in
Section 2 we obtain the discrete explicit solution to the systems
and
by the finite difference method. In
Section 3, we obtain explicit discrete solutions to the discrete distributed optimization problems associated with
and
, respectively, where the variable is the internal energy
g. In
Section 4, we define discrete boundary optimization problems where the variable is the heat flux
q, associated with
and
, respectively, obtaining the discrete explicit solutions. In the same manner, in
Section 5, we derive explicit discrete solutions to the discrete boundary optimal control problems associated with
and
, respectively, where the optimization variable is
b. In all cases, when the step discretization goes to zero, convergence results are obtained by also estimating the order of convergence of the approximate solutions. In
Section 6, we carry out some numerical simulations in order to illustrate the theoretical convergence results obtained in the previous sections. Finally, in
Section 7, we analyze the order of convergence of the discrete systems associated with
and
by considering a modified approximation of the Neumann boundary condition on
, which leads to an improved convergence order.
The explicit continuous solutions of the systems and the associated optimal control problems in a rectangular domain are already available in the literature; in particular, they are given in [
16].
The novelty of the present work can be summarized as follows: (i) the derivation of explicit discrete solutions for the state and the control variables; (ii) a rigorous analysis of the convergence of the discrete solutions, including the estimation of their orders of convergence; and (iii) an improved approximation of the boundary conditions in the discrete framework.
2. Discrete Systems for and
In this section we obtain the discrete explicit solutions to the systems
and
in a rectangular domain in the plane
with
and
. Its boundaries
for
are defined by:
and
According to [
16], the continuous solutions, in
, for the systems
and
defined by (
1), (2) and (
1), (3) are given by:
As a consequence of the symmetry of domain and the boundary conditions, the solutions u and of systems and are independent of variable y, and therefore, we work with one-dimensional problems.
Here, n is the number of subintervals of , h is the uniform mesh size, , and denotes the discrete approximation of the temperature at the node , . Since the temperature is constant along the y-direction, approximates for any .
We apply the classical finite-difference method to the system
described by Equations (
1) and (2). Since the boundary condition on
prescribes
, we immediately obtain
.
For the interior nodes, we use the classical centered second-order finite-difference approximation:
and from the differential Equation (
1), we impose that
To incorporate the Neumann boundary condition on
, we use a backward finite difference for the first derivative:
which, using the boundary condition
, leads to assuming that
Taking into account (
16) and (
18), the resulting discretization leads to the discrete linear system
where
denotes the vector of unknowns,
A is the associated tridiagonal coefficient matrix:
and
is the vector of independent terms:
The square matrix
A is invertible and its inverse matrix is given by
Then, the linear system
has a unique solution:
As
and
, it follows that:
Then, the continuous solution
of system
can be approximated by the piecewise linear interpolant
obtained from the nodal values computed by the finite difference scheme. More precisely, we define
with
The following lemma shows that the discrete solution provides a first-order accurate approximation of the exact solution u and its derivative with respect to x.
Lemma 1. - (a)
For every grid point with , , the following comparison holds:
- (i)
if then .
- (ii)
if then .
- (b)
The approximation error satisfies first-order estimates in the H-norm, namely,where the constants and , which do not depend on h, are given by and
Proof. - (a)
From the functions
u and
, given by (
13) and (
22), respectively, we have
- (b)
From the definition of the norm in space
H and Formulas (
13) and (
22) for functions
u and
, respectively, it follows that:
The norm can be computed analogously. □
We next apply the classical finite-difference method to the system
defined by Equations (
1) and (3). For each
, we set
and denote by
the approximate value of
at
for
.
The Robin boundary condition on
is approximated by a classical forward finite-difference scheme, namely,
Taking into account that
, we impose that
Moreover, at the interior nodes we use the approximation given in (
16), while the Neumann boundary condition at
is discretized according to (
17).
Then, we obtain the linear system
:
where the vector of unknowns
is given by
, the tridiagonal coefficient matrix
of order
is defined as:
and
It can be seen that the square matrix
is invertible and its inverse matrix is given by
Then, the linear system
has a unique solution:
As a consequence, the continuous solution
of system
given by (
13) can be approximated in
by the discrete function
, defined as the piecewise linear interpolation of the nodal values obtained from the finite-difference system
.
for
,
Notice that when for every .
Lemma 2. Let be the solution of problem , where is the convective heat transfer coefficient appearing in the Robin boundary condition, and let denote its piecewise linear discrete approximation defined in (27). Then, for each mesh size h, the following error estimates hold:where and are positive constants independent of h. Proof. Taking into account that
and
are given by (
13) and (
27), respectively, we have
In addition, the partial derivatives with respect to
x of functions
and
are given by:
and
Then, the bound for
coincides with the bound for
, obtained in Lemma 1. □
Remark 1. Notice that when , where is the constant appearing in Lemma 1. This shows that the error bound associated with the convective boundary condition converges to the one obtained for the Dirichlet problem as .
6. Numerical Results
We carried out some numerical simulations in order to illustrate the theoretical results obtained in the previous sections for the optimal control problems and for .
Throughout this section we consider the domain , i.e, .
Before analyzing the optimal control problems we illustrate the behavior of the continuous state of the systems and and the discrete state of the systems and .
In
Figure 1a we plotted the state of system
u given by (
13) and the approximate discrete function
defined by (
22) against the position
x for
. As we saw in Lemma 1 for each fixed
x, the functions
increase and get closer to the limit
as
h decreases. In a similar manner, in
Figure 1b, for
, we obtained system
given by (
13) and the approximate discrete function
defined by (
27) against the position
x for
. Notice that as
h decreases, the functions
increase and get closer to the limit
as it was proved in Lemma 2.
In addition in order to visualize the double convergence of
when
, in
Figure 2 we plotted
u and
for
and
.
Table 1 illustrates that the
errors exhibit a linear rate of convergence. Indeed, each refinement step in which the mesh size
h is divided by two produces an error that is approximately halved, confirming the expected first-order behavior.
6.1. Control Variable g
In this subsection we obtain some computational examples for the optimal distributed control problems , , and . For each plot, we set and .
In
Figure 3 we plotted the continuous quadratic cost function
given by (
28) and the discrete cost function
obtained in (
32) against
g for
,
and
. Notice that as
h decreases, the function
also decreases to the limit function
in agreement with Lemma 3. In a similar manner in
Figure 4, for
, we obtain the continuous function
and the discrete functions
for
and
observing the convergence of
as
h decreases to zero. Moreover,
Figure 5 shows the double convergence of
when
. We illustrate how
gets closer to
as the value of
h decreases and the value of
increases.
In
Figure 6 we plotted the continuous optimal control
for problem
given by (
29) and optimal control
given by (
40) for
. Notice that as
increases,
decreases to the limit
. In addition, we set different values of
n between
and
. Recalling that
, for each
h, we obtained the optimal discrete control
to problem
defined by (4) and the optimal discrete control
to problem
given by (
40) for
. For each
fixed, we observe the discrete solution
when
, i.e.,
.
6.2. Control Variable q
In this subsection we ran some computational examples for the optimal boundary control problems , , and . For each plot, we set and .
In
Figure 7 we plotted the continuous quadratic cost function
given by (
49) and the discrete cost function
obtained in (
51) against
q for
,
and
. Observe that as
h decreases, function
also decreases to the limit function
. In a similar way, in
Figure 8, for
, we obtained the continuous function
and the discrete functions
for
and
. The convergences
and
when
are in agreement with Lemmas 9 and 12, respectively.
Moreover,
Figure 9 shows the double convergence of
when
. We illustrate how
gets closer to
as the value of
h decreases and the value of
increases.
In
Figure 10 we plotted the continuous optimal control
for problem
given by (
50) and optimal control
given by (
62) for
. Notice that as
increases,
decreases to the limit
. In addition, we set different values of
n between
and
. Recalling that
, for each
h, we obtained the optimal discrete control
to problem
defined by (
53) and the optimal discrete control
to problem
given by (
66) for
. For each
fixed, we observe the discrete solution
when
, i.e.,
.
6.3. Control Variable b
In this section we obtain some computational examples for the optimal distributed control problems , , and . For each plot, we set and .
In
Figure 11 we plotted the continuous quadratic cost function
given by (
72) and the discrete cost function
obtained in (
74) against
g for
,
and
. Notice that as
h decreases, function
also decreases to the limit function
in agreement with Lemma 15. In a similar manner, in
Figure 12, for
, we obtained the continuous function
and the discrete functions
for
and
. Observe the convergence of
as
. Moreover,
Figure 13 shows the double convergence of
when
. We illustrate how
gets closer to
as the value of
h decreases and the value of
increases.
In
Figure 14 we plotted the continuous optimal control
for problem
given by (
73) and optimal control
given by (
82) for
. Notice that as
increases,
decreases to the limit
. In addition, we set different values of
n between
and
. Recalling that
, for each
h, we obtained the optimal discrete control
to problem
defined by (
76) and the optimal discrete control
to problem
given by (
87) for
. For each
fixed, we observe the discrete solution
decreases to
when
.
7. Improvement of the Order of Convergence
In this section, we introduce alternative discrete solutions and associated with systems and , respectively, and analyze the order of convergence of to u and of to as . The Neumann boundary condition on is approximated by a three-point backward finite-difference scheme. Moreover, for the discrete solution , the Robin boundary condition on is approximated by a three-point forward finite-difference scheme. These higher-order boundary approximations lead to an improved order of accuracy.
We consider the system
defined by Equations (
1) and (2). From this system, we define the discrete problem
, where for a fixed
,
approximates
, for
. Notice that from the Dirichlet condition on
, it follows immediately that
.
For the interior nodes, we employ the classical centered second-order finite-difference approximation given in (
15), which leads to the discrete system (
16) for
,
.
For the Neumann boundary condition on
, we use the three-point backward approximation
Thus, the discrete Neumann condition can be written as
In addition, from (
16) for
, we obtain
Subtracting the two previous equations, it follows that
Therefore, the system given by (
16) together with (
94) can be written as
where
is the vector of unknowns,
A is the matrix given by (
20) and
is the vector of independent terms:
Notice that system (
95) differs from (
19) in the last component of the vector of independent terms. Solving the linear system gives
Taking into account that for
and
the linear approximation is given by
, i.e.,
In the following lemma, we give some bounds for the approximate function
Lemma 21. The following bounds hold:where and . Proof. From the definition of the norm in space
H and using the expressions (
13) and (
100) for functions
u and
, respectively, it follows that
where
Note that, within each subinterval,
depends only on
x and the index
i, but not on
y, since both
u and
are constant along the
y-direction.
A direct computation yields
Then,
As a consequence, from (
101), it follows that
and then
In addition,
where
for
. Then,
Therefore, from (
104), we have
and finally
□
Remark 11. We emphasize that by improving the approximation of the Neumann boundary condition on , the convergence order of the error is increased to second order, namely, . The improvement is entirely due to the modification in the last component of vectors and in systems and , respectively, where a term of order appears. This enhancement leads to a more accurate numerical approximation while remaining fully consistent with the theoretical convergence results established in [10,22]. Remark 12. The linear system (95) obtained by using the three-point backward finite-difference approximation for the Neumann boundary condition on can be equivalently interpreted by introducing a ghost point outside the computational domain and assuming that the discrete differential equation holds at the boundary node . Indeed, assuming that the equation is satisfied at , we havewhile the Neumann boundary condition is approximated byEliminating the ghost value from these two expressions yieldswhich coincides with the boundary equation obtained in (94). Hence, the three-point backward finite-difference approximation of the Neumann condition is consistent with the ghost-point formulation and leads to the same discrete system. Analogously to the analysis of system , we propose a new discrete approximation for system and study the order of convergence of to as . The associated discrete system employs a three-point backward finite-difference approximation for the Neumann boundary condition on and a three-point forward finite-difference approximation for the Robin boundary condition on , leading to improved accuracy.
We consider system
defined by Equations (
1) and (3) and define
.
For the interior nodes,
, we employ the classical centered second-order finite-difference approximation given in (
15):
For the Robin boundary at
, we use the three-point forward approximation:
Combining this expression with the interior equation at
yields the simplified discrete condition
For the Neumann boundary at
we use the three-point backward approximation:
Combining with the interior equation for
gives
The system given by (
105), (
107) and (
109) can be rewritten as
where
is the vector of unknowns,
is the matrix given by (
25) and
is the vector of independent terms:
It should be noted that only the first and last components of
differ from those in
given by (
26).
The solution of system (
110) is given by
We define the linear interpolation on each subinterval
by
where
From the previous expressions, we derive the following lemma.
Lemma 22. The following bounds hold:where and . Proof. By the definition of the
H-norm, and using the expression for
in (
13) as well as the definition of
in (
113), it follows that
where
We can notice that
where
is given by (
102). Therefore, from (
103), it follows immediately that
In addition,
□
8. Conclusions
Applying the finite difference method, we derived discrete systems and and discrete optimization problems and , , where is a parameter that represents the heat transfer coefficient on a portion of the boundary of the domain. Explicit discrete solutions were obtained, and convergence results as discretization step and parameter were proved. Error estimations were also obtained as a function of step h. Some numerical computations were provided in order to illustrate the theoretical results.
The obtained results showed that the proposed numerical approach provided first-order accurate approximations for both state systems and and associated optimal control problems and , , and that the discrete solutions converged to the corresponding continuous ones as discretization step .
Finally, for systems and , an alternative discretization of the Neumann boundary condition on and of the Robin boundary condition on for was considered. By modifying the approximation of these boundary conditions, the order of convergence of the numerical solution was improved, leading to a more accurate approximation.
A main limitation of the present work is that the analysis is restricted to rectangular domains, which allows the derivation of explicit solutions and simplifies the numerical implementation. As a future development, the proposed methodology is expected to be extended to more general domains, including polar and spherical coordinate systems.