### 5.2.10. Common Pitfalls and Troubleshooting

The following list describes some common problems users experience, and how to avoid them.

• If the mesh does not properly describe curved structures, and the shape of those structures is important to the electromagnetic system, the solution will converge poorly or it will not converge at all. If your geometry has curved surfaces in it and the AMR sequence is not converging well, you should create a mesh annotation and see how well the mesh is representing the curved surface. Adjust the mesh parameters to refine the mesh at the curved surface, as described in “Initial Meshing”.

• During the solve, it is possible for RF3p to produce the following warnings: "Impedance matrix invalid. Setting to zero," "Admittance matrix invalid. Setting to zero," and "Error computing renormalized S-matrix. Setting to zero." If you see any of these error messages in the log, it often indicates a problem in the geometry that is shorting the ports. A common culprit is use of the wrong type of symmetry plane. If your geometry has one or more symmetry planes, ensure that they are the correct type, as described in “Materials and Attributes”.

• PML is designed to work outside of the electromagnetic near field. The PML boundary must be positioned at least λ/4 from the radiating structure, where λ is the longest wavelength being simulated. If the PML boundary is closer than λ/4, reflections from the PML boundary increase in magnitude, compromising result accuracy.

• Numerical instabilities are likely to occur in simulations where the geometry contains large regions that are almost, but not quite, electrically isolated from each other. The connection between the regions will be defined by only a few elements, producing an ill-conditioned FEM matrix. An example is a geometry that contains a long, narrow tube, so that the elements on the interior of the tube are connected to the larger mesh by only the few elements at the ends. The result of such a numerical instability is not predictable. The simulation may fail with a solver error, and an analysis of the geometry will show this situation. Sometimes the simulation will not fail, however, instead manifesting by producing non-physical results. In this case it will likely not converge well. For this reason, whenever AMR convergence is suffering, it is important to examine a field annotation to verify that there is nothing non-physical present.

• If a multipacting simulation (PT2p/PT3p) is to be run subsequently to the driven frequency simulation, the driven frequency simulation can only use one port, and one frequency.