# Convergence Testing — Lesson 1

### Intro

Convergence testing is a way of varying certain setup parameters to ensure accurate simulation results. In this video, you will learn what the main sources of errors in the EME simulations are and how to quantify and reduce them through various convergence tests.

### Mode Convergence Sweep

There are many sources of errors in the EME simulation. In this video lesson, you will learn about the effect of the number of modes used for the mode expansion on the simulation results. We will demonstrate how to use the mode convergence sweep tool to find the minimum number of modes to obtain a converged result. The link for the simulation file used in the video can be found here.

### Too Many Modes

A larger number of modes for mode expansion would generally mean more accurate results. However, there can be exceptions where this is not true. In this video lesson, we will show that too many modes can produce unphysical results using a fiber grating example.

### Number of Cells

When the cell width is continuously changing, it is important to have enough cells to obtain accurate simulation results. In this video lesson, we will show how script files can be used to run a convergence test on the number of cells.

### Mode Profiles

Errors in the mode profiles calculated using the Finite-Difference Eigensolver method during the mode-finding stage of the simulation can also contribute to errors in EME simulation results.

Errors in the calculated modes can come from:

• Discretization of the mesh in the y and z directions
• Distance from the simulation boundaries

Convergence testing of the number of mesh cells used, or mesh step size used, can be done to reduce error due to discretization of the mesh:  Convergence testing of the simulation region y and z span settings can be performed to reduce error due to having the boundary conditions too close to the structure: 