I have simulated a solid core photonic crystal fiber with a pitch of 'P'. Is it necessary to define a PML for it? then, how should set its parameters in Comsol?
It depends on the resolution of your model and the physics: for the case of the optical regime, a thickness of 5 times the biggest wavelength shall make it.
I suggest you make a convergence test: first create a model with a determined PML thickness, run the model and save the imaginary part of the effective index of the fundamental mode. Increase the thickness and run it again. Keep iterating after you see that the imaginary part of the effective index do not changes considerably.
It depends on the resolution of your model and the physics: for the case of the optical regime, a thickness of 5 times the biggest wavelength shall make it.
I suggest you make a convergence test: first create a model with a determined PML thickness, run the model and save the imaginary part of the effective index of the fundamental mode. Increase the thickness and run it again. Keep iterating after you see that the imaginary part of the effective index do not changes considerably.