Guilin Sun
Ansys Employee
importnk2(n,x,y,z);
SO you will need specify refractive index at the given point xyz. I believe there is problem with this assignment. What the refractive index you specified? did you use binary operation to extract where is the material and where is the background? Please use index monitor to compare them. In order to get the same result, the refractive index distribution and the values must be exactly the same.
Since your direct simulation works fine, the problem is from your import. Efforts should be made on the improvement of importnk2(n,x,y,z). Make sure the index profiles are the same.
I would suggest that you modify your first optimization to get better result, instead of using the first optimization as the initial point. This means the first optimization result is not optimal in you have any improvement. isn't it?