This video is taken from the FDTD Learning Track on Ansys Innovation Courses.

## Transcript

Convergence testing is a method used to determine the settings required to meet the desired level

of accuracy for simulation results.

As we saw in a previous unit on the design workflow, convergence testing is recommended

as the final step in the design of a component after narrowing down the range of design parameters.

This is because reducing the simulation error often requires increased memory requirements

and simulation time.

Before any convergence testing is done, it's important to first determine an acceptable

level or error for the particular device that is being simulated.

For example, it's not necessary to resolve the sizes of features down to a precision

of 1 nm if you know that the manufacturing process used to fabricate the device can only

achieve an accuracy of 10 nm.

Since the FDTD method solves Maxwell's equations with no approximations, the main sources of

error from FDTD simulations come from the numerical error due to discretization of space

and time, use of artificial PML absorbing boundaries, and error in the broadband material

fits.

The discretization of the simulation volume in space by the simulation mesh can introduce

errors since curved surfaces of the structure will not be represented exactly, and there

can also be some monitor interpolation error that's introduced when field components are interpolated from

the locations where they are calculated on the Yee cell.

There's also some discrepancy between the simulated speed of light in a medium compared

to the ideal case due to the discrete mesh which is referred to as grid dispersion.

All of these errors are reduced when a finer mesh with smaller mesh step size is used.

If PML absorbing boundary conditions are used, there can be errors introduced if the boundary

is placed too close to the structure such that there is coupling of fields between evanescent

fields of the structure and the PML material.

There can also be artificial reflection from the PML material.

This error can be reduced by placing the PML boundary farther away from any scattering

objects and increasing the number of layers of PML material used.

The error in material fitting may not be included as part of the convergence testing process since it can typically

be reduced by modifying the material fitting parameters before running any simulations.

Changing the material fit does not typically cause any increase in simulation time.

Material fitting parameters can be set in the Material Explorer window from the Materials

button in the main toolbar.

You can review the details about material fitting in the Material Properties section

of this course.

If you want to quantify the error due to material fitting, you might want to compare the simulation

results between using the broadband material fit to results that you get from from single frequency simulations where the

material fit is not generated.

To quantify the level of convergence, you can start by choosing a result of interest from your

simulation.

For example, if you are simulating particle scattering, you could choose the result of

interest to be the value of the scattering cross section (sigma) of the particle.

In the case where you already know the correct value of the result analytically, you can

calculate the absolute error in the simulated result using the equation here.

However, you don't usually have an analytic answer to compare simulation results with,

so instead, you can estimate the absolute error due to a particular source of error

by using the following method: Run the simulation, varying one of the parameters related to a

source of error, such as the mesh step size.

If we sweep the mesh step size, reducing the mesh step size over N points in the sweep,

and collect the result at each point, we can estimate the absolute error in the result

for the ith point in the sweep using the equation here where sigma_i would be the scattering

cross section for the ith point in the sweep, and sigma_N would be the cross section at

the final point in the sweep.

Similarly, the relative error between two points in the sweep is given by the equation

here.

If measuring a result from a broadband simulation, you can use this equation to estimate the

absolute error which includes the integration over the wavelength range.

These plots show the relative and absolute error in a Mie scattering simulation as the

distance between the structure and PML is increased by increasing the simulation span,

and as the mesh is made finer by sweeping the mesh accuracy setting.

From these plots you can determine the necessary simulation span and mesh accuracy needed to

meet the acceptable level of error.

A full list of sources of error, and a detailed example of convergence testing can be found

in the link below this video.