FDTD stop criterion help !
Not by setting the maximum time steps.
Thanks
There are various options. In any case it depends on what you want to measure?
I use all of the following dependent on what I compute.
1) number of steps
2) running time
3) 'model' time (e.g. see what happens during the first 2ns)
4) total energy content of the grid is below some threshold (or above to recognize blow-ups)
5) some functions has been consistently below a certain threshold (e.g currents) or stable
(e.g. S-parameters) for say the last 1000 steps
In general I run my simulations at least twice as long as I think I need to.
I have seen a case recently (Mie scattering) where you had to increase the running time
for a particular permittivity) by a factor of over 100 (compared to the time required for
other permittivities) until the simulation stabilized.
The upshot is that setting up a model always requires to decide the termination criterion.
And setting the termination criterion can be difficult.
Just a short elaboration of point 4 (triggered by some private message)
The energy densities of the electric/magnetic field are
u_e = epsilon *|E|^2
and
u_m = mu * |H|^2
So the total energy content can be computed as
TOTAL_ENERGY = SUM_{C in cells} (volume(C) * (u_e(C) + u_m(C))
Once you switch off your source the total energy should decrease more or less slowly
(provided your algorithm is stable and you have a working absorbing boundary).
Since computing the total energy is quite time consuming I would do this only all 100
iterations or so. This method makes sense whenever you use a pulse to excite the model.
How far the energy has to drop before stopping the simulation depends very much on what
you model.