Dispersion - Dealing with very low loss
Dispersion simulations can become difficult when losses are very low (Im(neff)<1e-11 or so). This is because both real and imaginary parts of neff share the same absolute precision (ultimately set by machine precision); since the real part of neff is of order unity, this means the best possible precision for the imaginary part of neff is of order 1e-13 or so. When calculating dispersion curves, linear extrapolations are used as initial guess to find the value of neff at the next wavelength step. Once Im(neff)<1e-11 or so, the best possible relative accuracy on Im(neff) becomes of order of 1%, which can make linear extrapolation inaccurate. In particular, if the wavelength step is such that the difference in Im(neff) is only 1%, the error is as large as the expected variation and the relative error of the extrapolation can thus become larger than 100%. In these cases increasing the wavelength steps (ie decreasing 'number of steps') can sometimes solve the problem.
To avoid problems, it is essential to use the smallest possible value of 'precision goal' and 'accpetable accuracy', typically 1e-13 for both. It is also best to use a value of order that provides good accruacy - check the Wijngaard test of your bcf file before starting. If any cylinders are red, consider increasing order.
When losses become so small that simulations stop, one possible workaround is to set Im(neff) to zero artificially. For this, the mode can be searched with zero imaginary part and zero imaginary width in the first place, or one can edit the bcf file of the relevant mode with a text editor and set the imaginary part of neff to zero (neff is on the 5th line of the bcf file) - only do this if the imaginary part is already very small! Alternatively, one can chose to work with a simpler structure with higher losses (eg with a smaller number of confining rings). If the value of Im(neff) is important, the full dispersion curve can be found by restarting the dispersion simulation from the wavelength they failed at (using 'load dispersion' file or not), or by using 'search modes' for a large number of wavelengths.
Note that when Im(neff)=1e-11 at 1.5 micron wavelength, the losses are already 0.4dB/km - for PCFs scattering and material losses are almost always larger than this.