We’re putting the final touches on our new badges platform. Badge issuance remains temporarily paused, but all completions are being recorded and will be fulfilled once the platform is live. Thank you for your patience.

Ansys Learning Forum Forums Discuss Simulation Photonics – Chinese 拓扑优化迭代报错问题 Reply To: 拓扑优化迭代报错问题

22721064
Subscriber

好的谢谢孙老师,我用报错处的参数继续进行迭代可以正常运行;另想咨询一下老师有没有导出gds文件的另外办法,我将mini_size_feature设置为0,应该是跳过了DFM阶段,然后按照官网所给的按折射率导出gds文件的办法尝试导出,代码见下方,然后对gds文件进行fdtd仿真,效果和拓扑优化结果相差较大,想请教一下老师如何将拓扑优化结果进一步加工成可以流片的结果呢,我初步的想法是将mini_size_feature设置成代工厂给定的最小尺寸,添加惩罚,不知道有没有用。

官网所给代码如下:

#get index data

index = getresult("opt_fields_index","index");

#specify index threshold

ind = 2.5;

#extract contours

contour = getcontour(index,"index_x", ind );

#generate GDS

f = gdsopen('contours.gds'); #creates gds in current working directory

 

for ( i = 1:length(contour)){

cellname = "contour_" + num2str(contour{i}.level);

gdsbegincell(f, cellname);

for (i = 1 : length(contour{1}.polygons)){

a = contour{1}.polygons{i};

gdsaddpoly(f,0,a);

}

gdsendcell(f);

}

gdsclose(f);

如下图为二值化结束时的折射率分布图