Descent Topological Gradient Optimization Algorithm Applied to 1D and 2D Charged Photonic Crystals ()
1. Introduction
The year 1987 marked the discovery of periodic structures capable of trapping, confining, and guiding electromagnetic waves. Professors E. Yablonovitch [1] and S. John [2], through their respective works, independently concluded that in periodically structured media, there exist forbidden and allowed bands for electromagnetic waves. This breakthrough revolutionized technology has led to major innovations in optical fibers, compact discs, and telecommunications. This has led to a growing interest in photonic, which represents a major breakthrough in emerging technologies and information science [3]-[6].
Recent years have seen significant progress in the field of photonic crystal optimization, with a wide range of methodologies developed to tackle both structural and functional objectives. Among the most prominent approaches are level-set methods [7] [8], phase-field formulations [9] [10], and density-based techniques such as SIMP [11]. These methods have proven effective in generating complex dielectric patterns that enhance photonic performance, including band gap formation and wave guiding.
Despite these advances, most existing studies primarily focus on passive structures without accounting for the influence of external charges or electric field-induced phenomena. Furthermore, the role of boundary conditions Dirichlet vs. Neumann has rarely been explored in a comparative optimization framework.
In this work, we propose a novel perspective by investigating the topological optimization of charged photonic crystals using topological derivatives within a Mumford-Shah-type variational framework. Our approach addresses both Dirichlet and Neumann boundary conditions systematically, offering new insight into their respective impacts on algorithmic convergence and structural formation. To the best of our knowledge, such a dual-boundary analysis in the context of charged photonic systems remains largely unexplored, and we believe it provides valuable guidance for the design of efficient photonic structures.
Topological optimization provides an opportunity to obtain important information on the topology of the considered domain to optimize at least one criterion. Domain optimization is used today in many industrial environments, such as Airbus for the reduction of structures, the improvement of resistance to vibrations and many other areas of physics [12]-[14]. This gives us the idea of looking at the topological derivative, but this time using the recent work of [15]-[17]. Therefore, we study the topological derivative using the min-max method. for more information on this method the reader can consult the work of [18]. For more practical cases the reader can also consult the paper by [19], where the topological derivative of a functional linked to a linear thermoplastic problem was calculated. on the other hand in the paper by [17] the author established a practical case of the topological derivative linked to Helmholtz problems. The main objective in this article is to determine the topological derivative of the functional
, where the perturbed domain
of
is defined by
or
depending on the derivative to be calculated but also to perform numerical simulations for both edge conditions.
The work program was as follows. Section 2 describes the modelization of photonic slabs. The application of topological derivatives to photonic slabs is described in section 3. To do this, we first establish the topological derivative for a Dirichlet condition and then for a Neumann condition using the minmax method. Section 4 establishes the numerical simulations for both the above conditions and Section 5 provides a conclusion and some possible extensions.
2. Model of Photonic Slabs
The modeling of photonic crystals aims to describe the propagation of electromagnetic waves in a medium with a periodically varying dielectric constant. Maxell’s equations govern the behavior of these waves in such structured materials.
2.1. Maxwell’s Equations for an Anisotropic Medium
Maxwell’s equations were derived for anisotropic media. The equation governing the electric field in domain
is given by:
(1)
where
is the electric field,
represents the charge density, and
denotes the permittivity of the medium.
From Gauss’s theorem, we have:
(2)
Maxwell-Thompson’s law states that the flux of the magnetic field across a closed surface
is always zero.
(3)
Using the divergence theorem, this implies:
(4)
Because the magnetic field
is related to the magnetic induction field
by
, Maxwell-Faraday’s equation takes the following form.
(5)
Maxwell-Ampère’s equation is given by:
(6)
where
is the magnetic permeability,
represents the current density (
, where
is the electrical conductivity), and
corresponds to the displacement current.
Thus, we obtain the following system of Maxwell’s equations:
(7)
2.2. Propagation of Electromagnetic Waves in a Good Conductor
In periodic structures such as photonic crystals, the medium is typically electrically neutral (
) and has a periodic dielectric constant
, where
and
are the permittivity of free space and the relative permittivity, respectively. The magnetic permeability is given by
, where
is the permeability of free space and
is the relative permeability.
For a good conductor, Maxwell’s equations simplify to:
(8)
Using the identity:
(9)
and substituting into the above equations, we derive the wave equation:
(10)
Assuming a plane wave solution of the form
, where
is the wave vector,
is the angular frequency, and
is the wave amplitude, we rewrite the equation as:
(11)
where
and
represents the speed of light.
This equation describes the propagation of electromagnetic waves in a conducting photonic crystal, accounting for the dielectric and conductive properties of the material.
2.3. Propagation of Electromagnetic Waves in a Periodic Medium with Charge and Source
In an inhomogeneous medium with a source, we have
,
, and the magnetic permeability
satisfies
.
In this case, Maxwell’s equations become:
(12)
Using the vector calculus identity
(13)
and combining it with (12), we obtain:
Simplifying, this leads to:
Finally, we obtain:
(14)
By considering a plane harmonic wave solution of (14) in the form
, we obtain:
(15)
where
.
Remark 1 For the case of a monochromatic wave, we have:
(16)
where
represents the dispersion relation of the crystal.
3. Application of the Topological Derivative to Charged Photonic Slabs
In this section, we focus on the study of photonic crystals using topological optimization methods. Topological optimization is a branch of shape optimization that seeks an optimal shape by changing the topology of the initial domain. This is a rapidly developing subject in several fields.
Our research follows the studies of crystals using topological optimization methods by Ngom et al. ([20]), where they minimized a least-squares type functional and compliance for photonic and phononic crystals, respectively. Thus, in our study, we considered a shape functional that combines the two functionals used in ([20]).
Let
(or
) be an open bounded domain and
, a function of class
. We define the boundary operator of domain
as:
(17)
and the partial differential equation:
(18)
We then consider the functional
defined by:
(19)
where
is the solution of (18), and
are real numbers, and
is a function in
.
Consider
and let
be a positive real number. We define
, where
.
Let
, be the solution to the perturbed problem.
(20)
with
, where
is the refractive index of the periodic medium.
We define the spaces
and
as follows:
(21)
(22)
Consequently, we express the functional defined in (19) in the perturbed domain as:
(23)
where
is the solution of (20) and
are real constants.
Thus, we determine the topological derivative
by seeking the asymptotic expansion of functional (19) in the case of Dirichlet or Neumann boundary conditions on the hole border.
In each case, we determine
and
such that:
(24)
Remark 2 The expression of the topological gradient does not depend on the condition imposed on the boundary of the domain
, but rather on the condition considered at the boundary of the hole.
In the following theorem
denotes the dimension of the workspace,
the dimension of a subset
of
,
is the radius of the ball, and
is the volume of the unit ball in
.
3.1. Dirichlet Condition around the Hole
Let us associate with
,
, the perturbed domain
, where by assumption,
, and
and
.
Let
be the solution for the following system:
(25)
which can be extented to
by intoducing the solution
of the problem
(26)
We suppose that
has two components
and
.
is the component of
for which
is part of its boundary.
is the blind component of
whose boundary has an empty intersection with
. The function
is distributed between the two components
and
as
(27)
Since
is made up of two disjoint boundary
and
, we can construct an extension to
by defining the solution
(28)
For simplicity, we assumed that
is empty.
In the following, we also consider the functional defined in
, by
(29)
where
be the solution to the following problem
(30)
Considering a shape function
defined by
(31)
where
is solution to the variational problem
(32)
The shape functional associated the perforated domain is given by
(33)
where
is solution the variational problem
(34)
We aim to compute the topological derivative of the functional
And for this purpose, we define the following set:
(35)
Our variational formulation (25) consists of finding
such that
(36)
By taking
, we have
(37)
Thus, the Lagrangian dependent on
will be written in the form :
From this, we can evaluate the derivative of the Lagrangian, dependent on
, with respect to
.
Subsequently, we obtained the variational formulation of the adjoint state equation given by
, where
for
. Find
such that
(38)
And we have
(39)
Next, we derive the Lagrangian with respect to
.
The initial state
is a solution of
and in this case, we have:
Then, we have:
The state
for all
satisfies
In the following, we aim to determine the derivative of the Lagrangian, with respect to
. To achieve this, let us first compute the quotient
For
,
,
.
By evaluating the last equation at the point
, we obtain:
Hence, if
, we have:
Therefore, taking the ast result at the point
becomes:
We now define
as
By substituting
and
into the adjoint equation for
, we obtain:
Thus, for all
, equation (38) becomes:
Now, considering the assumption about
,
and
And in this case, we have:
(40)
Taking the difference between equation (38) and equation (40), we obtain
The adjoint equation for
yields:
(41)
By taking
in equation (41), we have:
The final equation for
becomes:
THEOREME Let
, and
. The topological derivative exists if and only if the following limit is satisfied:
exists with
and
Moreover, the topological derivative of the function is given by the expression:
where
are solutions of systems
In particular for
,
3.2. Neumann Condition
In this section, we consider the case of a Neumann condition, and the perturbed problem thus becomes:
(42)
First of all, the calculations were the same. The changes were simply in the spaces considered. The techniques for calculating the Lagrangian derivative with respect to the variables remain the same. For this, we do not need to go into all the details, as we did in the case of the Dirichlet condition. And we can be extended to
by introducing the solution
of the problem
(43)
We suppose that
has two components
and
.
is the component of
for which
is part of its boundary.
is the blind component of
whose boundary has an empty intersection with
. The function
is distributed between the two components
and
as
(44)
Since
is made up of two disjoint boundary
and
, we can construct an extension to
by defining the solution
(45)
For simplicity, we assumed that
is empty. For this purpose, we define the following set:
(46)
Our variational formulation (42) consists of finding
such that
(47)
where
is define by
And we have
(48)
Thus, the Lagrangian dependent on
defined from
to values in
will be written in the form:
The derivative of the Lagrangian, dependent on
, with respect to
is given by:
And the variational formulation of the adjoint state equation is given by: find
such that
(49)
And we have
(50)
The derive of the Lagrangian with respect to
verifies:
The state
for all
satisfies
For
,
,
.
By evaluating the last equation at the point
, we obtain:
Hence, if
, we have: Therefore, taking the ast result at the point
becomes:
We now define
as
And the formulas of
becomes:
THEOREME Let
, and
. The topological derivative exists if and only if the following limit is satisfied:
exists with
and
Moreover, the topological derivative of the function is given by the expression:
where
are solutions of systems
In particular for
,
4. Numerical Simulations
In this section, we present the numerical results of the application of topological optimization to one-dimensional and two-dimensional photonic crystal problems. This method seems to be suitable for such kind models [21] [22]. To achieve this, we used the topological gradient descent method to minimize the functional (19), with
.
Indeed, this is an optimization problem of functional J under the constraint that state u is the solution of the partial differential equation (18). The existence and uniqueness of this minimization problem are ensured by the ellipticity of the bilinear form associated with the problem that corresponds to the Helmholtz equation with a source term.
Thus, we used the finite element method to solve the direct and adjoint states involved in the partial differential equation.
We then developed a topological gradient descent algorithm to obtain the optimal shape using FreeFEM ([23]).
The simulations were made under these data the light celerity
; the pulsation
, the magnetic permeability is assumed to
; and the time
. The charge distribution follows is supposed to be Gaussian and given by:
in 2D or
in 3D.
4.1. Results in 1D Dimension Photonic Crystal with Charge
We consider an initial domain
. Photonic crystal in one direction are characterized by a medium in which the permittivity varies periodically in one direction. In this section we assume that the permittivity function is periodic in the x direction with a period of 2.
Its expression is
with
.
For this case, we have Figure 1, which shows the permittivity distribution in both two-dimensional and three-dimensiosnal views. We observed the periodicity of permittivity along the x-direction.
Figure 1. (a) permittivity in 1 dimension view; (b) permittivity in 3 dimensions view.
Using finite elements in FreeFEM and the above data values, Figure 2 represents the direct and adjoint states and the topological derivative with Dirichlet and Neumann conditions.
Figure 2. (a) Direct state; (b) Adjoint state; (c) Dirichlet topological derivative; (d) Neumann topological gradient.
In Figure 2, we observe the distributions of the topological gradient for both Neumann and Dirichlet boundary conditions. These distributions provide insight into the location of the gradient minima by examining the values indicated on the color bar. Using the topological gradient descent algorithm, we identify the points in
where the gradient reaches a minimum and insert a hole at those locations in order to perturb the topology accordingly.
1) Case of Dirichlet condition around the hole.
Inserting circular holes
in the initial domain where the topological derivatives admits a minimum global at
and iterate, we have
Figure 3. (a) Dirichlet topological derivative; (b) After one iteration; (c) After 245 iterations; (d) After 246 iterations.
Graphs (a) and (b) in Figure 3 illustrate the initial step of inserting a hole at the point where the topological gradient reaches its most negative value. Thus, for a Dirichlet boundary condition on the hole, we observe that after 246 iterations, the distribution of the topological gradient is zero everywhere. The descent algorithm converges, and the optimal topology of the domain is achieved, as shown in graph (d).
2) Case of a Neumann condition around the hole.
For the Neumann boundary condition, graphs (a) and (b) of Figure 4 illustrate the creation of a hole at the location where the topological gradient is the most negative. This leads to a decrease in the gradient distribution, which progressively approaches zero throughout the domain
.
Figure 4. (a) Neumann topological derivative after one iteration; (b) After two iterations; (c) After 443 iterations; (d) After 444 iterations. After 444 iterations, the algorithm converges. The topological gradient becomes nearly zero throughout the domain, indicating that the optimal shape minimizing the objective function has been reached.
4.2. Results in 2D Dimension Photonic Crystal with Charge and Height Near to Zero
Considering a initial domain
.
In this section we present a quasi two dimensional photonic crystal which is characterized by a periodic permittivity
in the x and y directions.
Thus the permittivity is shown by Figure 5
Figure 5. (a) Permittivity periodicity in 2 dimension; (b) Permittivity in 3 dimension view.
With this characteristic in the charged photonic medium, we have:
Figure 6. (a) Direct state; (b) Adjoint state; (c) Dirichlet topological derivative; (d) Neumann topological gradient.
For two-dimensional photonic crystals with charge sources and unit thickness, Figure 6 shows the topological gradient plots under both Dirichlet and Neumann boundary conditions, as well as the corresponding direct and adjoint states. From these results, we observe that the location of the most negative values of the topological gradient indicates where the structure should be perturbed to improve the objective functional. The direct state reflects the wave propagation in the current structure, while the adjoint state captures the sensitivity of the objective to changes in the domain. The comparison between the two boundary conditions also highlights the influence of the choice of boundary model on the resulting optimized design.
1) Case of Dirichlet condition around the hole. Inserting circular hole
in the initial domain where the topological derivatives admits a minimum global at
and iterating we have the Figure 7 which shows the variation of the gradient when perturbing the topology of the initial domain.
Figure 7. (a) Dirichlet topological derivative after 1 iteration; (b) After 2 iteration; (c) After 88 iterations; (d) After 89 iterations.
Figure 7 shows that insertion a hole in the minium of the Dirichlet gradient vanishes the gradient sited at neighborhood at this minimizer. Following the procedure of the algorithm, we see after 89 iterations or insertions of holes, the gradient vanishes everywhere at the domain. We have convergence and the topological optimal design in graph (d) of Figure 7.
2) Case of a Neumann condition around the hole.
For the Neumann boundary condition, after inserting one or two holes at the points where the topological derivative reaches its minimum, we observe that the gradient distribution approaches zero.
Figure 8 shows that after 1241 iterations we get the optimal design.
Figure 8. (a) Neumann topological derivative after one iteration; (b) After two iterations; (c) After 1240 iterations; (d) After 1241 iterations.
5. Conclusions
The present work focuses on the topological optimization of one- and two-dimensional charged photonic crystal problems. We first derive the topological derivative for Dirichlet boundary conditions, followed by the case of Neumann boundary conditions. Numerical simulations are then performed and interpreted for both types of boundary conditions. The application of the topological derivative to charged photonic crystals appears to be well-suited, based on the convergence results obtained for both Dirichlet and Neumann cases.
The results show that, for the same initial domain and simulation parameters, the descent-gradient topological algorithm converges more rapidly under Dirichlet conditions than under Neumann conditions.
This observation provides a useful recommendation for choosing boundary conditions when aiming to efficiently design photonic crystals and save computational time.
In future work, we aim to couple shape and topological derivatives in the context of photonic slabs. This combined algorithm will enable the search for an optimal topology without the need to add or remove material along the domain boundary.
Finally, a comparative study between our proposed algorithm and one based on the coupling of shape and topological gradients would be essential to evaluate the practical relevance of these tools in mathematical and physical modeling.