soft source fdtd
hisham said:
Ez(i,j)= Eosin(2*pi*f*n*dt);
this would be a hard source. But to implement it in terms of a soft source, you can simply add the reflected component calculated by the FDTD algo.
i.e
Ez(i,j)=Ez(i,j)+Eosin(2*pi*f*n*dt)
This is actually not totally accurate, based on three reasons:
1) The electric field Ez(i,j) is impressed as a current density at the timestep of the magnetic field.
2) The missing operator in front of the sin-function
3) Since the excitation is impressed as a current density, which is coming from the left equations system, we need a minus in front of the amplitude.
this yields for a soft excitation to
Ez(i,j,) = Ez(i,j) - Ehat*sin(2*pi*f*(n+0.5)*dt)
Ehat = (Amplitude*dt)/eps0
Nevertheless, i have some difficulties with the soft excitation, since the impressed excitation function gets differentiated through the curl equations and following time loop, which means, if i superpose a gaussian pulse, i get an differentiated gaussian pulse at the port (see pseudo code). How do i get a "real" gaussian pulse as a soft excitation ?
time loop
[
(1) hx(i,j) = hx(i,j) - (dt/mue0)*[ ez(i,j+1) - ez(i,j) ]
(2) hy(i,j) = hy(i,j) + (dt/mue0)*[ ez(i+1,j) - ez(i,j) ]
(3) ez(i,j) = ez(i,j) + (dt/eps0)*[ hy(i,j) - hy(i-1,j) - hx(i,j) + hx(i,j-1) ]
(4) ez(i,j) = ez(i,j) - (dt/eps0)*exp(-(((n+0.5)*dt-t0)/tw)^2 )
]
After setting the exc-function (line 4), in the next time step the calculation of the magnetic component uses the "new" electric (line 1 and 2) and split the energy to hx(i,j), hx(i,j+1), hy(i,j), hy(i+1,j), the following ez calculation uses this and split it again, the result -> differentiated gaussian impulse