# How to put mur's absorbing boundary condition in 1d fdtd maxwell equation

• s_hy
In summary, by applying Mur's ABC algorithm to your Fortran code, you can effectively implement an absorbing boundary condition and improve the accuracy of your 1D FDTD Maxwell's equation simulation in free space.
s_hy
hi

can anyone teach me how to put Mur's ABC in my fortran code for 1d fdtd maxwell's equation as below

Code:
!1d fdtd Simulation in free space
subroutine fd1d01(f0,miu,delta,S,E0)
implicit none

double precision                   :: f0               !frequency
double precision                   :: miu              !permittivity
double precision                   :: delta
double precision                   :: S
double precision                   :: E0
integer                            :: iinit
integer                            :: ilast
integer                            :: i,j
integer                            :: n
double precision                   :: Ca
double precision                   :: Da
double precision                   :: tdelta
double precision                   :: c
double precision,dimension(202)    :: Ez
double precision,dimension(202)    :: Hy
double precision, parameter        :: pi = 3.14159265
double precision                   :: Cb
double precision                   :: Db
double precision                   :: lambda
character(len=20)                  :: filename

f0 = 100.0
miu = 1.0
delta = 1.e-3
S = 1.0001
E0 = 1.0
iinit = 1
ilast = 100

c = 1.0
lambda = c/f0

tdelta = (delta/c)/sqrt(2.0)

!initialization
do j = 1, 2*ilast
If (Mod(j,2) == 0) then  !j is even; hence di is whole number
Hy(j) = 0
else
Ez(j) = 0
End if
end do

Ca = 1.0
Cb = (tdelta/delta)

Da = 1.0
Db = tdelta/(miu*delta)

do n = 1,200
write (filename, "('ez',I3.3,'.dat')") n
open (unit=130,file=filename)

do j = 2, 2*ilast-1
if (Mod(j,2) /= 0) then  !j is odd;
Ez(j) = Cb*(Hy(j+1)-Hy(j-1)) + Ca*Ez(j)
!        Print*, 'n, j, Ez(j) = ', n, ' ', j, ' ' , Ez(j)
write (130,*) Ez(j)
end if
end do !j

!absorbing boundary condition
Ez(2) = 0
Ez(202) = 0

do j = 2, 2*ilast-1
if (Mod(j,2) == 0) then  !j is even;
Hy(j) = Db*(Ez(j+1)-Ez(j-1)) + Da*Hy(j)
end if
end do !j

!plane wave source
Ez(101) = E0*sin (2*pi*f0*n*tdelta)

close (unit=130)

end do !n

end SUBROUTINE fd1d01

i tried to put it after Ez and before Hy...but i guess my ABC algorithm is wrong. anyone can teach me?

thanks

Mur's ABC algorithm can be used to implement an absorbing boundary condition in your Fortran code. The algorithm works by taking the difference between the values of the fields at two successive points and applying a damping factor to reduce the amplitude of the propagating wave. The damping factor is chosen such that it reduces the amplitude of the wave exponentially as it propagates away from the boundary. For example, for your code, you can add the following lines after the line that initializes the Hy and Ez arrays:do j = 1,2*ilast if (j <= 2) then !apply Mur's ABC to the left boundary Ez(j) = Ez(j) - dampingFactor*(Hy(j+1)-Hy(j)) end if if (j >= 2*ilast-1) then !apply Mur's ABC to the right boundary Ez(j) = Ez(j) + dampingFactor*(Hy(j)-Hy(j-1)) end ifend dowhere dampingFactor is a value chosen to reduce the amplitude of the wave exponentially as it propagates away from the boundary. The exact value of this parameter will depend on the physical characteristics of your problem, so it is best to experiment with different values until you find one that works well.

## 1. What is a mur's absorbing boundary condition?

Mur's absorbing boundary condition is a type of boundary condition used in numerical simulations, specifically in the finite-difference time-domain (FDTD) method. It is used to simulate the behavior of electromagnetic waves in open spaces by absorbing the waves that would otherwise reflect off of the boundaries of the simulation domain.

## 2. How does mur's absorbing boundary condition work?

Mur's absorbing boundary condition works by creating a layer of absorbing material at the edges of the simulation domain. This material is designed to absorb any electromagnetic waves that reach the boundary, preventing them from reflecting back into the simulation domain. The thickness and properties of the absorbing layer can be adjusted to optimize the performance of the boundary condition.

## 3. Why is mur's absorbing boundary condition important?

Mur's absorbing boundary condition is important because it allows for more accurate simulation of electromagnetic wave propagation in open spaces. Without this boundary condition, waves would reflect off of the simulation domain boundaries, leading to inaccurate results. By absorbing these waves, mur's absorbing boundary condition allows for more realistic simulations.

## 4. How is mur's absorbing boundary condition implemented in 1d fdtd maxwell equations?

In 1d fdtd maxwell equations, mur's absorbing boundary condition is typically implemented by adding a layer of absorbing material at the edges of the simulation domain. This material is represented by a set of equations that describe how the material absorbs electromagnetic waves. These equations are then incorporated into the fdtd algorithm to ensure that the waves are absorbed at the boundaries.

## 5. Are there any limitations to mur's absorbing boundary condition?

Yes, there are some limitations to mur's absorbing boundary condition. One limitation is that it is only effective for waves traveling perpendicular to the boundary. Waves traveling at an angle may still reflect off of the boundary and lead to inaccuracies in the simulation results. Additionally, the performance of the boundary condition can be affected by the thickness and properties of the absorbing layer, so it may require some optimization for different simulation scenarios.

• Programming and Computer Science
Replies
4
Views
2K
• Programming and Computer Science
Replies
8
Views
6K
• Programming and Computer Science
Replies
4
Views
3K
• Programming and Computer Science
Replies
4
Views
3K
• Programming and Computer Science
Replies
5
Views
2K
• Programming and Computer Science
Replies
1
Views
1K
Replies
1
Views
4K
• Programming and Computer Science
Replies
4
Views
3K
• Programming and Computer Science
Replies
2
Views
1K
• Atomic and Condensed Matter
Replies
8
Views
4K