Topological Optimization of a Generalized Model of Pollution in Porous Media without Density Assumptions ()
1. Introduction
Understanding pollutant transfer in porous media is a major challenge in environmental modeling, with applications in soil decontamination, groundwater management, and filtration processes. Classical models of pollutant transport often assume that key physical parameters, such as density and conductivity, remain constant [1] [2]. Although these assumptions simplify theoretical and numerical analyses, they fail to capture the complexity of heterogeneous porous media observed in real-world environments.
In our previous work [3] [4], we extended these classical models by incorporating spatial variability in density and conductivity, distinguishing between cases in which their divergence is zero or not. This approach provided a more realistic representation of pollutant transport but still imposed structural constraints on the physical properties of the medium.
This study further generalizes our previous approach by removing all restrictive assumptions regarding density and conductivity. Unlike previous studies that treated these parameters as constant or variable in some assumptions [1] [2], our model fully accounted for their spatial variability with no restriction, offering a more flexible and comprehensive framework. In this model, we applied topological optimization techniques, specifically the topological gradient method, to identify optimal configurations that minimize pollutant dispersion in porous structures.
First, we formulate a generalized mathematical model for pollutant transport, highlighting its flexibility and applicability to a wide range of scenarios. Next, we define the least-squares function as the target for minimization, ensuring a rigorous optimization framework. We then present the theory and implementation of the topological gradient method and demonstrate its effectiveness in exploring complex solution spaces. Finally, we provide numerical simulations in both 2D and 3D settings, illustrating the efficiency of our approach for optimizing pollutant transport structures.
This study highlights the potential of topological optimization for tackling complex environmental challenges by seamlessly integrating mathematical modeling, computational optimization, and numerical simulation.
The work proceeds as follows: In Section 2, we first present the model of pollutant transportation in porous media without any assumptions made on key parameters such as density and conductivity. Section 3 summarizes the topological optimization method and its application to the model of pollutant transportation in porous media. Section 4 describes the proposed numerical method and numerical simulations in both 2D and 3D. Section 5 provides some concluding remarks and possible extensions.
2. Modelization of Pollutant Transfer in Porous Media
Without any Assumption on Density
The pollution model in porous media is commonly described by several laws governing the interaction of fluid motion through porous media. For more details, see [1] [5]-[10].
2.1. Equations Governing Pollutant Transfer
The transfer of pollutants in porous media can be described [1] [3] by the following system of equations:
There were several important variables and parameters in the model. The flow density
is a function of the temperature
, pressure
and the mass pollutant ratio transported
. The porosity of the porous medium,
, is a dimensionless value from 0 to 1, which is the ratio of the void volume to the medium volume. The fluid vector indicates
and indicates the Darcys’ velocity, which is a function of the pressure of the fluid
. The pollutant mass transport is diffusive owing to the diffusion coefficient
and is expressed in the diffusive flux
, that follows Fick’s law. Time
as the execution of the system continues. Some reference values for temperature
and pressure
and sensitivity coefficients
, and
for the temperature, pressure and
, affect the fluid density
. The permeability of the porous medium
represents the medium’s ability to allow fluid transmission, and
fluid dynamic viscosity (it’s value is in (Pa∙s)) means the degree of the fluid flow resistance. Gravitational effects are introduced by means of gravitational acceleration
and unit vector
that indicates how gravity acts in the model.
2.2. Generalized Model of Pollution in Porous Media
In this approach, we avoid making assumptions about density d. Instead, which is treated as a variable influenced by external factors such as pressure, temperature, and pollutant concentration. This generalization allowed the model to remain applicable to a wider range of porous media and scenarios.
The system of Equations (2.1) can be rewritten according to [1]-[3] as:
(2.2)
REMARK 1 The porosity ε of the medium can be modeled using Garner’s law:
where
represents the pressure relative to the atmospheric pressure.
By developing the second equation in (2.2), we have
(2.3)
According to the first equation of (2.2), we have:
Due to (2.1d) and the temperature does not vary, one gets
(2.4)
It follows that:
By rearranging, we have
we have
Setting , and
,
one has
We aim to fix the boundary and initial conditions to guarantee the good posedness of the pollution model [11] [12]. Thus
(2.5)
REMARK 2 The pollution model we obtain is a generalization of the models obtained in [1]-[3]. In fact, assuming the same hypotheses used in [3] of our generalized model, we obtain the same pollution model.
3. Topological Optimization
We applied the topological optimization tools to the model of pollution in porous media that we obtained. Among several methods used to compute the topological derivative [13]-[20], we adopted the generalized adjoint method developed in [13] [21].
3.1. A Generalized Adjoint Method
More details of the generalized adjoint method can be found in [22] [23].
Let
be a fixed Hilbert space and
denotes the spaces of linear (resp bilinear) forms on
. Let us assume the following hypotheses.
HYPOTHESIS 1: There exists a real function
, a bilinear form
and a linear form
such that
(3.1)
(3.2)
(3.3)
where
resp (
) denotes the bilinear resp (linear) form.
HYPOTHESIS 2: The bilinear form
is coercive. There exists a constant
such that
(3.4)
According to (3.2) the bilinear form
depends continuously on
, hence there exists
and
such that for
the following uniform coercive holds
. Moreover, according to Lax-Milligram’s theorem, for
, the problem finds
, such that
(3.5)
has a unique solution and the following result holds.
LEMMA 1 If Hypotheses 1 and 2 are satisfied, there exists a unique solution
to (3.5). Furthermore, the following estimate holds:
(3.6)
where
is the solution of:
.
Proof. Because of the ellipticity of
we obtain
From
Thus
.
Thus,
.
which implies that
,
this confirms the proof. ■ We also assume the following hypothesis.
HYPOTHESIS 3: Let
be a functional such that
where
is differentiable. For any
, there exists a linear and continuous form
and
such that:
(3.7)
The Lagrangian
is given by
(3.8)
Its variation is given by
(3.9)
We also have the following generic theorem.
THEOREM 1 Under hypotheses (1), (2) and (3), we have the following asymptotic expansion of
:
(3.10)
where
is the solution of (3.5) with
is the solution to the adjoint problem, and
is such that
(3.11)
and
, denotes the topological derivative.
Proof. For the proof of this theorem, see [23]. ■
3.2. Application of Topological Optimization to the Generalized
Model of Pollution in Porous Media
To optimize the configuration of the porous media for pollution control, we employed topological optimization methods. This approach aims to minimize the function representing the pollutant mass ratio while satisfying physical constraints.
For a real number
, we define the perturbed domain , where
and
, with
or 3.
We consider the sets
, and
.
The optimization process involves minimizing the objective functional
, defined as

where
is the solution to the perturbed problem (3.12):
(3.12)
Here,
is an operator defined as
, mapping
to either
or
, and
is the desired pollutant mass reference.
To simplify the problem, we introduce a change of variable:
This leads to the transformed system (3.13):
(3.13)
The optimization problem then becomes solving:

where
is the solution of (3.13) which weak formulation is to find
such that:

for all
and
The bilinear and linear forms associated with (3.15) are
(3.14)
and

and
For
, the objective functional simplifies to:

where
is the solution to the following problem (3.15):
(3.15)
The weak formulation of (3.15) is to find
such that:

for all
and
.
The bilinear and linear forms associated with (3.15) are
(3.16)
and

Under these conditions, we obtain the following results.
LEMMA 1 If
and
are the respective solutions to problems (3.16) and (3.14), then there exists
, with
, such that
(3.17)
Proof. See [3] ■
Thus, we have the following result:
THEOREM 2 (Main Result) Under the conditions of Lemma 1, the topological derivative of functional (3.2), where
denotes the unit ball centered at
, is given by
(3.18)
for Neumann boundary conditions
, for Dirichlet boundary conditions.
State
solves the direct problem (3.13) and
is the solution of the corresponding adjoint problem.
Proof. To prove this theorem we determine the variation of the bilinear form, objective function and linear form. Subsequently Theorem 2 is applied.
Variation of the bilinear form
The variation of the bilinear form
associated with problem (3.14) and (3.16) is given by

However, from Lemma 1, the following estimate holds
.
Thus,
(3.19)
in the case of a Neumann condition, since
or 3, we take
.
It follows by applying the change of variables (3.2) that we have

Using the mean value theorem, we obtain the following result:

Since
,
it follows that
.
In the case of a Dirichlet condition at the boundary of the hole, a similar reasoning applies.
Variation of the functional form
We have

Let us denote:
(3.20)
and
(3.21)
We then have:
(3.22)
It follows that:
(3.23)
From Lemma 1, we know that
. Hence:
since
is a bijective and continuous function.
Thus:
(3.24)
We therefore have:
(3.25)
To complete the proof, it suffices to show that:
(3.26)
(3.27)
we get:
(3.28)
Rearranging gives:
By setting
and applying the mean value theorem, we obtain:

Since

the variation of the functional is

Therefore, when
represents the unit ball centered at
, we have:


For the Dirichlet condition, it is well known that
in three dimensions. Thus,
, and the variation becomes:
According to Theorem 2, the expression for the topological derivative is:
(3.29)
for Neumann boundary conditions, or:

for Dirichlet boundary conditions.
4. Numerical Results
The simulation of the pollutant dynamics was performed with FreeFem++ [24], which allows the handling of different types of boundary conditions (Neumann and Dirichlet). The states
and
represent the solutions of the direct and adjoint problems, respectively. The time step
and the time
were used.
The topological gradient descent algorithm seems to be a powerful tool for the analysis of several physical problems such as pollution [4] [25]. Therefore, we can write Algorithm (1) for the optimal design minimizing the least-squares functional.
Algorithm 1 (Topological Optimization Algorithm)
1) Initialization:
Choose an initial domain
,
Set a small threshold value
and a radius
,
Initialize the iteration index:
.
2) Iterations: Repeat
Solve the direct and adjoint problems to compute
and
in the domain
.
Compute the topological gradient
for all
.
Identify the minimum of
, denoted
, and its corresponding location
within
.
While
, perform:
Update domain
, where
is the ball centered at
and radius
.
Solve the updated direct and adjoint problems in
to compute
and
.
Recompute the topological gradient:
for all
.
Increment the iteration index:
.
3) Finalization: Print the obtained optimal design.
In this section, we numerically apply topological gradient descent to the general pollution model. To discretize this partial differential equation with an implicit scheme (backward Euler), we use the relation:
(4.1)
where
is the bilinear operator given by:
(4.2)
The weak formulation at the time step
becomes:
(4.3)
The problem is solved iteratively over the time steps, where
represents the solution at step n.
The topological gradient
is given by:
(4.4)
in the Neumann condition and

for Dirichlet boundary conditions.
4.1. Numerical Results in Two Dimensions Case with a Dirichlet
Boundary Condition on the Hole
In two dimensions, we consider the computational domain
with
and
. The simulations were performed using the following parameters: the permeability is given by
, while the solid density is
. The diffusion coefficient is defined as
, and the drift velocity is defined
. Additionally, we set
, the initial condition as
, and the boundary condition as
.
According to these data we obtain Figure 1 that represents the direct and adjoin states, and the topological derivative in the Domain.
Figure 1. 2D pollution problem (Dirichlet condition) at initial step. After 35 iterations, the topological derivative is almost null everywhere in the perforated domain. Then we achieve the following optimal domain in Figure 2.
Figure 2. 2D pollution problem (Dirichlet condition) after 35 iterations.
4.2. Numerical Results in Three Dimensions with Neumann Condition
In 3-dimensional cases, we consider the initial domain
. The simulations were performed under the following parameter values: the permeability is given by
, while the density is
. The diffusion coefficient is given as
, and the desired state is
. In addition, we set the initial condition as
, and the homogen boundary condition as
.
Figure 3. 3D pollution transportation at the first iteration.
Figure 4. 3D pollution transportation after 25 iterations.
Based on these data, Figure 3 shows the distributions of pollutant mass fraction and topological gradient in the perforated domain by inserting the spherical hole
centered at the minimum of
. We notice that creating a spherical hole, at the negative minimum of the topological derivative, decreases the objective function.
Thus, after 25 iterations, the topological gradient is almost null throughout the perforated domain (see Figure 4). The gradient descent algorithm converges, achieving the optimal domain.
5. Conclusions
This study presents a generalized framework for modeling and optimizing pollutant transfer in porous media without imposing restrictive assumptions on density or other physical parameters. By leveraging an optimization-based approach, we demonstrated that pollutant dispersion can be effectively controlled while maintaining flexibility in the governing equations. The key contributions of this study is the successful application of our methodology to both two-dimensional and three-dimensional domains, showcasing its robustness and adaptability to real-world scenarios.
Through three-dimensional simulations, we validated the effectiveness of the proposed approach in capturing the complex behavior of pollutant transfer in porous media. These simulations highlight how topological optimization techniques can identify optimal pollutant diffusion patterns and improve environmental management strategies. The numerical results confirm that our model can handle intricate spatial variations and provide valuable insights into the pollution control in heterogeneous porous structures.
Future work will involve further optimization of the numerical scheme, to improve the computational efficiency and address large-scale 3D problems. In addition, we sought to integrate real data with our models to enhance their utility in real-world applications, such as industrial-waste processing, groundwater contamination and soil bioremediation scenarios. We will also combine field measurements with established experimental data to quantitatively test these theoretical predictions and to develop the best control strategies.
Furthermore, future work will include cutting-edge numerical techniques, such as machine learning and data-driven optimization, which could improve the quality of the model to facilitate the control of pollutants in porous media and allow better strategies of environmental protection, detection, and exploitation of non-renewable energies.