Descent Topological Gradient Optimization Algorithm Applied to 1D and 2D Charged Photonic Crystals

Abstract

The aim of this research article is to apply topological optimization gradient algorithm applied to 1D and 2D photonic charged slabs. We compute the topological gradient using min max method. We use an iterative algorithm for descending the topological gradient and with steps as the radius of circular holes, implemented under FreeFEM with the finite elements’ method.

Share and Cite:

Dia, M. , Sagno, I. , Fall, M. , Toure, L. and Ndiaye, M. (2025) Descent Topological Gradient Optimization Algorithm Applied to 1D and 2D Charged Photonic Crystals. Journal of Applied Mathematics and Physics, 13, 2395-2417. doi: 10.4236/jamp.2025.137137.

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 J( Ω r )=J( Ω r , u r ) , where the perturbed domain Ω r of Ω is defined by Ω r = T r ( Ω ) or Ω r =Ω\ E r 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:

( ϵE )=ρ, (1)

where E is the electric field, ρ represents the charge density, and ϵ denotes the permittivity of the medium.

From Gauss’s theorem, we have:

Σ EdS = 1 ϵ 0 V ρdτ . (2)

Maxwell-Thompson’s law states that the flux of the magnetic field across a closed surface Σ f is always zero.

Σ f BdS =0. (3)

Using the divergence theorem, this implies:

B=0inΩ. (4)

Because the magnetic field H is related to the magnetic induction field B by B=μH , Maxwell-Faraday’s equation takes the following form.

×E= B t . (5)

Maxwell-Ampère’s equation is given by:

×B=μ( j+ J D ), (6)

where μ is the magnetic permeability, j represents the current density ( j= σ c E , where σ c is the electrical conductivity), and J D =ϵ E t corresponds to the displacement current.

Thus, we obtain the following system of Maxwell’s equations:

{ ( ϵE )=ρ, B=0, ×E=μ H t , ×H=μ( j+ϵ E t ). (7)

2.2. Propagation of Electromagnetic Waves in a Good Conductor

In periodic structures such as photonic crystals, the medium is typically electrically neutral ( ρ=0 ) and has a periodic dielectric constant ϵ= ϵ 0 ϵ r , where ϵ 0 and ϵ r are the permittivity of free space and the relative permittivity, respectively. The magnetic permeability is given by μ= μ 0 μ r , where μ 0 is the permeability of free space and μ r is the relative permeability.

For a good conductor, Maxwell’s equations simplify to:

{ ( ϵ 0 ϵ r E )=0, B=0, ×E=μ H t , ×H=μ( j+ϵ E t ). (8)

Using the identity:

×( ×E )=( E ) 2 E, (9)

and substituting into the above equations, we derive the wave equation:

ΔEϵμ 2 E t 2 μ σ c E t =0. (10)

Assuming a plane wave solution of the form E= E 0 e i( kxωt ) , where k is the wave vector, ω is the angular frequency, and E 0 is the wave amplitude, we rewrite the equation as:

ΔE+ ω 2 c 2 μ r ϵ E=0, (11)

where ϵ = ϵ r +i σ c ω ϵ 0 and c= 1 μ 0 ϵ 0 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 ρ0 , ϵ ϵ 0 , and the magnetic permeability μ satisfies μ= μ 0 μ r .

In this case, Maxwell’s equations become:

{ div( ϵ r E )= ρ ϵ 0 , div( H )=0, ×E= H t , ×H=μ( j+ϵ E t ). (12)

Using the vector calculus identity

×( ×E )=( E )ΔE, (13)

and combining it with (12), we obtain:

×( H t )= ×H t = μ( j+ϵ E t ) t = ( μj ) t ( μϵ E t ) t .

Simplifying, this leads to:

ΔE 1 ϵ x ρ ( μj ) t ( μϵ E t ) t =0.

Finally, we obtain:

ΔE 1 ϵ x ρεμ 2 E t 2 μ σ c E t =0. (14)

By considering a plane harmonic wave solution of (14) in the form E=u( x )  e i( kxwt ) , we obtain:

Δu( x )+ w 2 c 2 μ r ϵ u( x )= 1 ϵ x ρ e i( kxwt ) , (15)

where ϵ = ϵ r +i σ c w ϵ 0 .

Remark 1 For the case of a monochromatic wave, we have:

Δu( x )+ w 2 c 2 μ r ϵ r u( x )= 1 ϵ x ρcos( ( kxwt ) ), (16)

where k 2 = w 2 c 2 μ r ϵ r 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 Ω 2 (or 3 ) be an open bounded domain and u Ω , a function of class C 2 . We define the boundary operator of domain Ω as:

B Ω : ΩΩ, u Ω B Ω u Ω ={ u Ω , or, u Ω n , (17)

and the partial differential equation:

{ Δu( x )+ w 2 c 2 μ r ϵ r u( x )= 1 ϵ x ρcos( ( kxwt ) )inΩ, B Ω u Ω =0onΩ. (18)

We then consider the functional J defined by:

J( Ω )=j( u Ω )=α Ω | u Ω u 0 | 2 dx +β Ω | u Ω | 2 dx , (19)

where u Ω is the solution of (18), and α,β are real numbers, and u 0 is a function in L 2 ( Ω ) .

Consider x 0 Ω and let r be a positive real number. We define Ω r =Ω\ E r ¯ , where E r ={ x 0 +rE,EΩ } .

Let u r , be the solution to the perturbed problem.

{ Δu( x )+ w 2 c 2 μ r ϵ r u( x )= 1 ϵ x ρcos( ( kxwt ) )in Ω r , B Ω u Ω r =0onΩ, B E r u Ω ε =0on E r , (20)

with k 2 = ϵ r w 2 c 2 = n 2 w 2 c 2 , where n is the refractive index of the periodic medium.

We define the spaces H r and H ˜ r as follows:

H r ={ u H 1 ( Ω ε ), B Ω u=0onΩ }, (21)

H ˜ r ={ u H r , B E u=0on E r }. (22)

Consequently, we express the functional defined in (19) in the perturbed domain as:

J( Ω r )=j( u Ω r )=α Ω r | u Ω ε u 0 | 2 dx +β Ω r | u Ω r | 2 dx , (23)

where u Ω r is the solution of (20) and α,β are real constants.

Thus, we determine the topological derivative g( x 0 ) 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 g( x 0 ) and f( r ) such that:

j( u Ω r )j( u Ω )=f( r )g( x 0 )+o( f( r ) ). (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 N denotes the dimension of the workspace, d the dimension of a subset E of N , r is the radius of the ball, and α Nd is the volume of the unit ball in Nd .

3.1. Dirichlet Condition around the Hole

Let us associate with r , 0<rR , the perturbed domain Ω r =Ω\ E r , where by assumption, Ω r =Ω E r , and Ω E r = and E r C 1,1 .

Let u Ω r be the solution for the following system:

{ Δ u Ω r ( x )+ w 2 c 2 μ r ϵ r u Ω r ( x )= 1 ϵ x ρcos( ( kxwt ) )in Ω r , u Ω r =0onΩ, u Ω r =0on E r , (25)

which can be extented to Ω by intoducing the solution E r 0 of the problem

Δ u Ω r ( x )+ w 2 c 2 μ r ϵ r u Ω r ( x ) = 1 ϵ x ρcos( ( kxwt ) )in E r 0 and u Ω r 0 = u Ω r on E r . (26)

We suppose that Ω r has two components Ω r m and Ω r 0 . Ω r m is the component of Ω r for which Ω is part of its boundary. Ω r 0 is the blind component of Ω r whose boundary has an empty intersection with Ω . The function u Ω r is distributed between the two components Ω r 0 and Ω r m as

u Ω r = u Ω 0 in Ω r 0 and Δ u Ω r ( x )+ w 2 c 2 μ r ϵ r u Ω r ( x )= 1 ϵ x ρcos( ( kxwt ) )in E r 0 in Ω r m , (27)

{ u Ω r =0onΩ, u Ω r =0on Ω r m E r ,

Since E r is made up of two disjoint boundary Ω r 0 and Ω r m E r , we can construct an extension to Ω by defining the solution E r 0

Δ u Ω r ( x )+ w 2 c 2 μ r ϵ r u Ω r ( x )= 1 ϵ x ρcos( ( kxwt ) )in E r 0 and u Ω r 0 = u Ω r on Ω r m E r u Ω r 0 = u Ω r on Ω r 0 . (28)

For simplicity, we assumed that Ω r 0 is empty.

In the following, we also consider the functional defined in Ω r , by

J( Ω r )=β Ω r | u Ω r | 2 dx +α Ω r | u Ω r u 0 | 2 dx (29)

where u Ω r be the solution to the following problem

{ Δ u Ω r ( x )+ w 2 c 2 μ r ϵ r u Ω r ( x )= 1 ϵ x ρcos( ( kxwt ) )in Ω r , u Ω r =0onΩ, u Ω r =0on E r , (30)

Considering a shape function J defined by

J( Ω )=α Ω | u Ω u 0 | 2 dx +β Ω | u Ω | 2 dx (31)

where u Ω is solution to the variational problem

Ω u Ω vdx + Ω u Ω n vdx + w 2 c 2 μ r ϵ r Ω u Ω vdx = Ω 1 ϵ x ρcos( ( kxwt ) )vdx (32)

The shape functional associated the perforated domain is given by

j( χ r ( x 0 ) )=J( Ω r )=α Ω r | u Ω r u 0 | 2 dx +β Ω r | u Ω r | 2 dx (33)

where u Ω r is solution the variational problem

Ω r u Ω r vdx + Ω r u Ω r n vdx + w 2 c 2 μ r ϵ r Ω r u Ω r vdx = Ω r 1 ϵ x ρcos( ( kxwt ) )vdx (34)

We aim to compute the topological derivative of the functional J( Ω r )

dJ= lim r0 J( Ω r )J( Ω ) α Nd r Nd .

And for this purpose, we define the following set:

H r ={ u Ω H 1 ( Ω r ): u Ω =0onΩ, u Ω =0on E r } (35)

Our variational formulation (25) consists of finding u Ω r H r such that

Ω r u Ω r vdx + Ω r u Ω r n vdx + w 2 c 2 μ r ϵ r Ω r u Ω r vdx = Ω r 1 ϵ x ρcos( ( kxwt ) )vdx vH (36)

By taking H r =H , we have

Ω r u Ω r vdx + w 2 c 2 μ r ϵ r Ω r u Ω r vdx = Ω r 1 ϵ x ρcos( ( kxwt ) )vdx v H r . (37)

Thus, the Lagrangian dependent on r will be written in the form :

L( r,ϕ,Φ )=β Ω r | ϕ | 2 dx +α Ω r | ϕ u 0 | 2 dx Ω r ϕvdx + Ω r ϕ n vdx + w 2 c 2 μ r ϵ r Ω r ϕvdx Ω r 1 ϵ x ρcos( ( kxwt ) )vdx

J( Ω r )= inf ϕ H r sup Φ H r L( r,ϕ,Φ ).

From this, we can evaluate the derivative of the Lagrangian, dependent on r , with respect to ϕ .

d ϕ L( r,ϕ,Φ, ϕ )= Ω r 2βϕ ϕ dx + Ω r 2α( ϕ u 0 ) ϕ dx Ω r ϕ Φdx + w 2 c 2 μ r ϵ r Ω r ϕ Φdx .

Subsequently, we obtained the variational formulation of the adjoint state equation given by d ϕ L( 0, u Ω 0 , p 0 , ϕ )=0 , where u Ω 0 = u Ω r for r=0 . Find p 0 H 0 1 ( Ω ) such that

Ω 2β u Ω 0 ϕ dx + Ω 2α( u Ω 0 u 0 ) ϕ dx Ω ϕ p 0 dx + w 2 c 2 μ r ϵ r Ω ϵ ϕ p 0 dx =0. (38)

And we have

Ω [ 2β u Ω 0 ϕ +2α( u Ω 0 u 0 ) ϕ ϕ p 0 + w 2 c 2 μ r ϵ r ϕ p 0 ]dx =0. (39)

Next, we derive the Lagrangian with respect to Φ .

d Φ L( r,ϕ,Φ, Φ )= Ω r ϕ Φ dx Ω r 1 ϵ x ρcos( ( kxwt ) ) Φ dx + Ω r w 2 c 2 μ r ϵ r ϕ Φ dx .

The initial state u Ω 0 = u Ω is a solution of d Φ L( 0, u Ω 0 ,0, Φ )=0 Φ H 0 1 and in this case, we have:

Ω u Ω 0 Φ dx Ω 1 ϵ x ρcos( ( kxwt ) ) Φ dx + Ω w 2 c 2 μ r ϵ r u Ω 0 Φ dx =0.

Then, we have:

Ω [ u Ω 0 Φ 1 ϵ x ρcos( ( kxwt ) ) Φ + w 2 c 2 μ r ϵ r u Ω 0 Φ ]dx =0.

The state u Ω r for all r0 satisfies

Ω r [ u Ω r Φ 1 ϵ x ρcos( ( kxwt ) ) Φ + w 2 c 2 μ r ϵ r u Ω r Φ ]dx =0, Φ H.

In the following, we aim to determine the derivative of the Lagrangian, with respect to r . To achieve this, let us first compute the quotient

L( r,ϕ,Φ )L( 0,ϕ,Φ ) s .

L( r,ϕ,Φ )L( 0,ϕ,Φ ) =β Ω r | ϕ | 2 dx +α Ω r | ϕ u 0 | 2 dx Ω r ϕΦdx + w 2 c 2 μ r ϵ r Ω r ϕΦdx Ω r 1 ϵ x ρcos( ( kxwt ) )Φdx [ β Ω | ϕ | 2 dx +α Ω | ϕ u 0 | 2 dx ] [ Ω ϕΦdx + w 2 c 2 μ r ϵ r Ω ϕΦdx Ω 1 ϵ x ρcos( ( kxwt ) )Φdx ]

L( ϵ,ϕ,Φ )L( 0,ϕ,Φ ) =[ E r β | ϕ | 2 +α | ϕ u 0 | 2 ϕΦ 1 ϵ x ρcos( ( kxwt ) )Φ+ w 2 c 2 μ r ϵ r ϕΦ ]dx.

For d=0 , ω={ x 0 } , E r ={ x N :| x x 0 |ϵ }= B ¯ ( x 0 ,r ) .

d s L( 0,ϕ,Φ )= lim s0 1 | B( x 0 ,r ) | [ B( x 0 ,r ) β | ϕ | 2 +α | ϕ u 0 | 2 ϕΦ 1 ϵ x ρcos( ( kxwt ) )Φ+MϕΦ ]dx =β | ϕ( x 0 ) | 2 α | ϕ( x 0 ) u 0 ( x 0 ) | 2 +ϕ( x 0 )Φ( x 0 ) + 1 ϵ x ρcos( ( kxwt ) )Φ( x 0 ) w 2 c 2 μ r ϵ r ϕ( x 0 )Φ( x 0 ).

By evaluating the last equation at the point u Ω 0 , p 0 , we obtain:

d s L( 0, u Ω 0 , p 0 )=β | u Ω 0 ( x 0 ) | 2 α | u Ω 0 ( x 0 ) u 0 ( x 0 ) | 2 + u Ω 0 ( x 0 ) p 0 ( x 0 ) + 1 ϵ x ρcos( ( kxwt ) ) p 0 ( x 0 ) w 2 c 2 μ r ϵ r u Ω 0 ( x 0 ) p 0 ( x 0 ).

Hence, if 0<dN1 , we have:

L( r,ϕ,Φ )L( 0,ϕ,Φ ) s = 1 | E r | [ E r β | ϕ | 2 +α | ϕ u 0 | 2 ϕΦ 1 ϵ x ρcos( ( kxwt ) )Φ+ w 2 c 2 μ r ϵ r ϕΦ ]dx = 1 α Nd r Nd [ E r β | ϕ | 2 +α | ϕ u 0 | 2 ϕΦ 1 ϵ x ρcos( ( kxwt ) )Φ ]dx 1 α Nd r Nd [ E r w 2 c 2 μ r ϵ r ϕΦ ]dx [ E β | ϕ | 2 +α | ϕ u 0 | 2 ϕΦ 1 ϵ x ρcos( ( kxwt ) )Φ+ w 2 c 2 μ r ϵ r ϕΦ ]d H d .

Therefore, taking the ast result at the point u Ω 0 , p 0 becomes:

d s L( 0, u Ω 0 , p 0 )= [ E β | u Ω 0 | 2 +α | u Ω 0 u 0 | 2 u Ω 0 p 0 1 ϵ x ρcos( ( kxwt ) ) p 0 + w 2 c 2 μ r ϵ r u Ω 0 p 0 ]d H d .

We now define R( r ) as

R( r )= 0 1 d x L ( r, u Ω 0 +Ψ( u Ω r u Ω 0 ), p 0 ,( u Ω r u Ω 0 s ) )dΨ.

By substituting ϕ = u Ω r u Ω 0 r and Ψ= u Ω r u Ω 0 2 into the adjoint equation for p 0 , we obtain:

R( r )= Ω r 2β ( u Ω r + u Ω 0 2 )( u Ω r u Ω 0 s )dx + Ω r 2α [ ( u Ω r + u Ω 0 2 ) u 0 ]( u Ω r u Ω 0 s )dx Ω r ( u Ω r u Ω 0 s ) p 0 dx + w 2 c 2 μ r ϵ r Ω r ( u Ω r u Ω 0 s ) p 0 dx = 1 s [ Ω r 2β ( u Ω r + u Ω 0 2 )( u Ω r u Ω 0 )dx + 2α[ ( u Ω r + u Ω 0 2 ) u 0 ]( u Ω r u Ω 0 ) ]dx 1 s [ Ω r ( u Ω r u Ω 0 ) p 0 w 2 c 2 μ r ϵ r ( u Ω r u Ω 0 ) p 0 ]dx

R( r )= 1 s [ Ω r 2β ( ( u Ω r + u Ω 0 2 ) u Ω 0 + u Ω 0 )( u Ω r u Ω 0 ) ]dx + 2α s Ω r [ ( u Ω r + u Ω 0 2 ) u Ω 0 + u Ω 0 u 0 ]( u Ω r u Ω 0 )dx 1 s [ Ω r ( u Ω r u Ω 0 ) p 0 w 2 c 2 μ r ϵ r ( u Ω r u Ω 0 ) p 0 ]dx = 1 s [ Ω r 2β ( ( u Ω r u Ω 0 2 )+ u Ω 0 )( u Ω r u Ω 0 ) ]dx + 1 s [ Ω r 2α [ ( u Ω r u Ω 0 2 )+ u Ω 0 u 0 ]( u Ω r u Ω 0 ) ]dx 1 s [ Ω r ( u Ω r u Ω 0 ) p 0 w 2 c 2 μ r ϵ r ( u Ω r u Ω 0 ) p 0 ]dx

R( r )= Ω r ( β | ( u Ω r u Ω 0 s ) | 2 +α | u Ω r u Ω 0 s | 2 )dx + 1 s [ Ω r 2β u Ω 0 ( u Ω r u Ω 0 ) +2α( u Ω r u Ω 0 )( u Ω 0 u 0 ) ]dx 1 s [ Ω r ( u Ω r u Ω 0 ) p 0 w 2 c 2 μ r ϵ r ( u Ω r u Ω 0 ) p 0 ]dx

Thus, for all u Ω 0 H 0 1 ( Ω ) , equation (38) becomes:

Ω r ( u Ω r v 1 ϵ x ρcos( ( kxwt ) )v+ w 2 c 2 μ r ϵ r u Ω r v )dx =[ E r u Ω r v 1 ϵ x ρcos( ( kxwt ) )v ][ E r w 2 c 2 μ r ϵ r u Ω r v ]dx = E r u Ω 0 n vd H N1 ,v H 0 1 ( Ω ).

Now, considering the assumption about E , E r C 1,1 and

u Ω 0 n = u Ω 0 n Ω r = u Ω 0 dEon E r .

And in this case, we have:

Ω r ( u Ω r v 1 ϵ x ρcos( ( kxwt ) )v+ w 2 c 2 μ r ϵ r u Ω r v )dx = E r u Ω 0 dEvd H N1 . (40)

Taking the difference between equation (38) and equation (40), we obtain

Ω r ( u Ω r u Ω 0 )v = E r u Ω 0 dEvd H N1 .

The adjoint equation for r0 yields:

Ω r 2β u Ω 0 ϕ dx + Ω r 2α( u Ω 0 u 0 ) ϕ dx Ω r ϕ p r dx + w 2 c 2 μ r ϵ r Ω r ϕ p r dx =0. (41)

By taking ϕ = u Ω r u Ω 0 in equation (41), we have:

Ω r 2β u Ω 0 ( u Ω r u Ω 0 )dx + Ω r 2α( u Ω 0 u 0 )( u Ω r u Ω 0 )dx Ω r ( u Ω r u Ω 0 ) p r + w 2 c 2 μ r ϵ r Ω r ( u Ω r u Ω 0 ) p r dx =0.

Ω r 2β u Ω 0 ( u Ω r u Ω 0 )+2α( u Ω 0 u 0 )( u Ω r u Ω 0 )dx = Ω r ( u Ω r u Ω 0 ) p r w 2 c 2 μ r ϵ r ( u Ω r u Ω 0 ) p r dx

The final equation for R( r ) becomes:

R( r )= Ω r [ β | ( u Ω r u Ω 0 s ) | 2 +α | u Ω r u Ω 0 s | 2 ]dx + 1 s [ Ω r m E r u Ω 0 dω p 0 d H N1 ]dx 1 s Ω r ( u Ω r u Ω 0 ) p r w 2 c 2 μ r ϵ r ( u Ω r u Ω 0 ) p r dx.

THEOREME Let 0d<N , and s= α Nd r Nd . The topological derivative exists if and only if the following limit is satisfied:

l= lim r0 ( l 0 ( r )+ l 1 ( r ) ),

exists with

l 0 ( r )= Ω r β | ( u Ω r u Ω 0 s ) | 2 +α | u Ω r u Ω 0 s | 2

and

l 1 ( r )= 1 s [ Ω r m E r u Ω 0 dE p 0 d H N1 ]dx 1 s Ω r ( u Ω r u Ω 0 ) p r w 2 c 2 μ r ϵ r ( u Ω r u Ω 0 ) p r dx.

Moreover, the topological derivative of the function is given by the expression:

dJ= lim r0 J( Ω r )J( Ω ) α Nd r Nd =l [ E β | u Ω 0 | 2 +α | u Ω 0 u 0 | 2 u Ω 0 p 0 1 ϵ x ρcos( ( kxwt ) ) p 0 + w 2 c 2 μ r ϵ r u Ω 0 p 0 ]d H d .

where p 0 , u Ω 0 are solutions of systems

Ω [ 2β u Ω 0 ϕ +2α( u Ω 0 u 0 ) ϕ ϕ p 0 + w 2 c 2 μ r ϵ r ϕ p 0 ]dx =0.

In particular for d=0 ,

dJ=lβ | u Ω 0 ( x 0 ) | 2 α | u Ω 0 ( x 0 ) u 0 ( x 0 ) | 2 + u Ω 0 ( x 0 ) p 0 ( x 0 ) + 1 ϵ x ρcos( ( kxwt ) ) p 0 ( x 0 ) w 2 c 2 μ r ϵ r u Ω 0 ( x 0 ) p 0 ( x 0 ).

3.2. Neumann Condition

In this section, we consider the case of a Neumann condition, and the perturbed problem thus becomes:

{ Δ u Ω r ( x )+ w 2 c 2 μ r ϵ r u Ω r ( x )= 1 ϵ x ρcos( ( kxwt ) )in Ω r , u Ω r =0onΩ, u Ω r n =0on E r . (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 E r 0 of the problem

Δ u Ω r ( x )+ w 2 c 2 μ r ϵ r u Ω r ( x )= 1 ϵ x ρcos( ( kxwt ) )in E r 0 and u Ω r 0 = u Ω r on E r . (43)

We suppose that Ω r has two components Ω r m and Ω r 0 . Ω r m is the component of Ω r for which Ω is part of its boundary. Ω r 0 is the blind component of Ω r whose boundary has an empty intersection with Ω . The function u Ω r is distributed between the two components Ω r 0 and Ω r m as

u Ω r = u Ω 0 in Ω r 0 and Δ u Ω r ( x )+ w 2 c 2 μ r ϵ r u Ω r ( x )= 1 ϵ x ρcos( ( kxwt ) )in E r 0 in Ω r m , (44)

{ u Ω r =0onΩ, u Ω r =0on Ω r m E r ,

Since E r is made up of two disjoint boundary Ω r 0 and Ω r m E r , we can construct an extension to Ω by defining the solution E r 0

Δ u Ω r ( x )+ w 2 c 2 μ r ϵ r u Ω r ( x )= 1 ϵ x ρcos( ( kxwt ) )in E r 0 and u Ω r 0 = u Ω r on Ω r m E r u Ω r 0 = u Ω r on Ω r 0 . (45)

For simplicity, we assumed that Ω r 0 is empty. For this purpose, we define the following set:

r ={ u Ω H 1 ( Ω r ): u Ω =0onΩ } (46)

Our variational formulation (42) consists of finding u Ω r r such that

Ω r u Ω r vdx + Ω r u Ω r n vdσ + E r u Ω r n vdσ + w 2 c 2 μ r ϵ r Ω r u Ω r vdx = Ω r 1 ϵ x ρcos( ( kxwt ) )vdx v ˜ r (47)

where ˜ r is define by

˜ r ={ v H 1 ( Ω r ):v=0onΩ }= r

And we have

Ω r u Ω r vdx + w 2 c 2 μ r ϵ r Ω r u Ω r vdx = Ω r 1 ϵ x ρcos( ( kxwt ) )vdx v ˜ r . (48)

Thus, the Lagrangian dependent on r defined from [ 0,R ]× r to values in will be written in the form:

L( r,ϕ,Φ )=β Ω r | ϕ | 2 dx +α Ω r | ϕ u 0 | 2 dx Ω r ϕvdx + Ω r ϕ n vdx + w 2 c 2 μ r ϵ r Ω r ϕvdx Ω r 1 ϵ x ρcos( ( kxwt ) )vdx

The derivative of the Lagrangian, dependent on r , with respect to ϕ is given by:

d ϕ L( r,ϕ,Φ, ϕ )= Ω r 2βϕ ϕ dx + Ω r 2α( ϕ u 0 ) ϕ dx Ω r ϕ Φdx + w 2 c 2 μ r ϵ r Ω r ϕ Φdx .

And the variational formulation of the adjoint state equation is given by: find p 0 H 0 1 ( Ω ) such that

Ω 2β u Ω 0 ϕ dx + Ω 2α( u Ω 0 u 0 ) ϕ dx Ω ϕ p 0 dx + w 2 c 2 μ r ϵ r Ω ϵ ϕ p 0 dx =0. (49)

And we have

Ω [ 2β u Ω 0 ϕ +2α( u Ω 0 u 0 ) ϕ ϕ p 0 + w 2 c 2 μ r ϵ r ϕ p 0 ]dx =0. (50)

The derive of the Lagrangian with respect to Φ verifies:

Ω [ u Ω 0 Φ 1 ϵ x ρcos( ( kxwt ) ) Φ + w 2 c 2 μ r ϵ r u Ω 0 Φ ]dx =0.

The state u Ω r for all r0 satisfies

Ω r [ u Ω r Φ 1 ϵ x ρcos( ( kxwt ) ) Φ + w 2 c 2 μ r ϵ r u Ω r Φ ]dx =0, Φ H.

For d=0 , ω={ x 0 } , E r ={ x N :| x x 0 |ϵ }= B ¯ ( x 0 ,r ) .

d s L( 0,ϕ,Φ )= lim s0 1 | B( x 0 ,r ) | [ B( x 0 ,r ) β | ϕ | 2 +α | ϕ u 0 | 2 ϕΦ 1 ϵ x ρcos( ( kxwt ) )Φ+MϕΦ ]dx =β | ϕ( x 0 ) | 2 α | ϕ( x 0 ) u 0 ( x 0 ) | 2 +ϕ( x 0 )Φ( x 0 ) + 1 ϵ x ρcos( ( kxwt ) )Φ( x 0 ) w 2 c 2 μ r ϵ r ϕ( x 0 )Φ( x 0 ).

By evaluating the last equation at the point u Ω 0 , p 0 , we obtain:

d s L( 0, u Ω 0 , p 0 )=β | u Ω 0 ( x 0 ) | 2 α | u Ω 0 ( x 0 ) u 0 ( x 0 ) | 2 + u Ω 0 ( x 0 ) p 0 ( x 0 ) + 1 ϵ x ρcos( ( kxwt ) ) p 0 ( x 0 ) w 2 c 2 μ r ϵ r u Ω 0 ( x 0 ) p 0 ( x 0 ).

Hence, if 0<dN1 , we have: Therefore, taking the ast result at the point u Ω 0 , p 0 becomes:

d s L( 0, u Ω 0 , p 0 )= [ E β | u Ω 0 | 2 +α | u Ω 0 u 0 | 2 u Ω 0 p 0 1 ϵ x ρcos( ( kxwt ) ) p 0 + w 2 c 2 μ r ϵ r u Ω 0 p 0 ]d H d .

We now define R( r ) as

R( r )= 0 1 d x L ( r, u Ω 0 +Ψ( u Ω r u Ω 0 ), p 0 ,( u Ω r u Ω 0 s ) )dΨ.

And the formulas of R( r ) becomes:

R( r )= Ω r [ β | ( u Ω r u Ω 0 s ) | 2 +α | u Ω r u Ω 0 s | 2 ]dx + 1 s [ Ω r m E r u Ω 0 dω p 0 d H N1 ]dx 1 s Ω r ( u Ω r u Ω 0 ) p r w 2 c 2 μ r ϵ r ( u Ω r u Ω 0 ) p r dx.

THEOREME Let 0d<N , and s= α Nd r Nd . The topological derivative exists if and only if the following limit is satisfied:

l= lim r0 ( l 0 ( r )+ l 1 ( r ) ),

exists with

l 0 ( r )= Ω r β | ( u Ω r u Ω 0 s ) | 2 +α | u Ω r u Ω 0 s | 2

and

l 1 ( r )= 1 s [ Ω r m E r u Ω 0 dE p 0 d H N1 ]dx 1 s Ω r ( u Ω r u Ω 0 ) p r w 2 c 2 μ r ϵ r ( u Ω r u Ω 0 ) p r dx.

Moreover, the topological derivative of the function is given by the expression:

dJ= lim r0 J( Ω r )J( Ω ) α Nd r Nd =l [ E β | u Ω 0 | 2 +α | u Ω 0 u 0 | 2 u Ω 0 p 0 1 ϵ x ρcos( ( kxwt ) ) p 0 + w 2 c 2 μ r ϵ r u Ω 0 p 0 ]d H d .

where p 0 , u Ω 0 are solutions of systems

Ω [ 2β u Ω 0 ϕ +2α( u Ω 0 u 0 ) ϕ ϕ p 0 + w 2 c 2 μ r ϵ r ϕ p 0 ]dx =0.

In particular for d=0 ,

dJ=lβ | u Ω 0 ( x 0 ) | 2 α | u Ω 0 ( x 0 ) u 0 ( x 0 ) | 2 + u Ω 0 ( x 0 ) p 0 ( x 0 ) + 1 ϵ x ρcos( ( kxwt ) ) p 0 ( x 0 ) w 2 c 2 μ r ϵ r u Ω 0 ( x 0 ) p 0 ( x 0 ).

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 α=β=1 .

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 c=3× 10 8 ; the pulsation w=8× 10 8 , the magnetic permeability is assumed to μ=1 ; and the time T=50 . The charge distribution follows is supposed to be Gaussian and given by: ρ( x,y )=exp( 100( ( x0.5 ) 2 + ( y0.5 ) 2 ) ) in 2D or ρ( x,y,z )=exp( 100( ( x0.5 ) 2 + ( y0.5 ) 2 + ( z0.5 ) 2 ) ) in 3D.

4.1. Results in 1D Dimension Photonic Crystal with Charge

We consider an initial domain Ω 0 =] 10;10 [×] 10;10 [ . 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 ε( x,y )={ 1, sixmod2<1 18, sixmod21 y with ε( x+2,y )=ε( x,y ) .

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 Ω 0 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 B( x * , ε 0 ) in the initial domain where the topological derivatives admits a minimum global at x * 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 Ω 0 =] 1;1 [×] 1;1 [ .

In this section we present a quasi two dimensional photonic crystal which is characterized by a periodic permittivity ε( x,y ) 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 B( x * , ε 0 ) in the initial domain where the topological derivatives admits a minimum global at x * 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.

Conflicts of Interest

The authors declare no conflicts of interest regarding the publication of this paper.

References

[1] Yablonovitch, E. (1987) Inhibited Spontaneous Emission in Solid-State Physics and Electronics. Physical Review Letters, 58, 2059-2062.[CrossRef] [PubMed]
[2] John, S. (1987) Strong Localization of Photons in Certain Disordered Dielectric Superlattices. Physical Review Letters, 58, 2486-2489.[CrossRef] [PubMed]
[3] Yablonovitch, E. (1993) Photonic Band-Gap Structures. Journal of the Optical Society of America B, 10, 283-295.[CrossRef]
[4] Cuisin, C., Chelnokov, A., Lourtioz, J., Decanini, D. and Chen, Y. (2000) Submicrometer Resolution Yablonovite Templates Fabricated by X-Ray Lithography. Applied Physics Letters, 77, 770-772.[CrossRef]
[5] Ammari, H., Bossy, E., Jugnon, V. and Kang, H. (2010) Mathematical Modeling in Photoacoustic Imaging of Small Absorbers. SIAM Review, 52, 677-695.[CrossRef]
[6] Rolland, Q., Oudich, M., El-Jallal, S., Dupont, S., Pennec, Y., Gazalet, J., et al. (2012) Acousto-Optic Couplings in Two-Dimensional Phoxonic Crystal Cavities. Applied Physics Letters, 101, Article ID: 061109.[CrossRef]
[7] Wang, X., Mei, Y. and Wang, M.Y. (2004) Level-Set Method for Design of Multi-Phase Elastic and Thermoelastic Materials. International Journal of Mechanics and Materials in Design, 1, 213-239.[CrossRef]
[8] Burger, M., Hackl, B. and Ring, W. (2004) Incorporating Topological Derivatives into Level Set Methods. Journal of Computational Physics, 194, 344-362.[CrossRef]
[9] Takezawa, A., Kobayashi, M. and Kitamura, M. (2010) Phase Field Approach to Topology Optimization for Thermomechanical Problems. Structural and Multidisciplinary Optimization, 41, 859-869.
[10] Blank, L., Garcke, H. and Hecht, C. (2014) Phase Field Approach to Structural Topology Optimization. Mathematical Models and Methods in Applied Sciences, 24, 541-564.
[11] Bendsoe, M.P. and Sigmund, O. (2003) Topology Optimization: Theory, Methods and Applications. Springer.
[12] Wang, X., Mei, Y. and Wang, M.Y. (2004) Level-Set Method for Design of Multi-Phase Elastic and Thermoelastic Materials. International Journal of Mechanics and Materials in Design, 1, 213-239.[CrossRef]
[13] Luo, Y., Wang, M.Y. and Kang, Z. (2015) Topology Optimization of Geometrically Nonlinear Structures Based on an Additive Hyperelasticity Technique. Computer Methods in Applied Mechanics and Engineering, 286, 422-441.[CrossRef]
[14] Gao, T., Xu, P. and Zhang, W. (2016) Topology Optimization of Thermo-Elastic Structures with Multiple Materials under Mass Constraint. Computers & Structures, 173, 150-160.[CrossRef]
[15] Delfour, M.C. (2018) Topological Derivative: A Semidifferential via the Minkowski Content. Journal of Convex Analysis, 3, 957-982.
[16] Delfour, M.C. (2018) Control, Shape, and Topological Derivatives via Minimax Differentiability of Lagrangians. In: Falcone, M., Ferretti, R., Grüne, L. and McEneaney, W., Eds., Numerical Methods for Optimal Control Problems, Springer, 137-164.[CrossRef]
[17] Ngom, M.G., Faye, I. and Seck, D. (2023) A Minmax Method on Shape and Topological Derivatives and Homogenization: The Case of Helmholtz Equation. Nonlinear Studies, 30, 213-247.
[18] Delfour, M.C. (2021) Topological Derivatives via One-Sided Derivative of Parametrized Minima and Minimax. Engineering Computations, 39, 34-59.[CrossRef]
[19] Fall, M., Sy, A., Faye, I. and Seck, D. (2025) On Shape Optimization Theory with Fractional p‐Laplacian Operators. Abstract and Applied Analysis, 2025, Article ID: 1932719.[CrossRef]
[20] Ngom, M., Sy, A., Faye, I. and Seck, D. (2011) Study of Phononic and Photonic Crystal Problems by Topological Optimization Method. Journal Name Missing, 5, 723-745.
[21] Dia, M.B., Faye, I. and Sy, A. (2022) Topological Optimization Applied to a Variable Density and Conductivity Model of Pollution in Porous Media. Engineering Reports, 5, e12557.
[22] Dia, M.B., Faye, I. and Sy, A. (2018) Topological Optimization for Photonic and Phononic Crystals Problems. In: Euclid, P., Samb Lo, G., Dia, G., Seydi, H. and Diakhaby, A., Eds., A Collection of Papers in Mathematics and Related Sciences, a Festschrift in Honour of the Late Galaye Dia, SAPS EDITIONS, 523-558.[CrossRef]
[23] Hecht, F. (2012) New Development in FreeFem++. Journal of Numerical Mathematics, 20, 251-266.[CrossRef]

Copyright © 2026 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.