-
-
June 25, 2023 at 7:19 am
ceshi xiazai
Subscriber老师您好,我最近看了官网案例(1x2_MMI和1x4_CWDM_2D),于是我就想尝试一下1x4功分器件,但是在优化迭代的过程中遇到了无法解释的问题。
优化脚本代码为:def runSim(params, eps_bg, eps_wg, x_pos, y_pos, z_pos, filter_R, min_feature_size, working_dir, beta = 1):
geometry = TopologyOptimization3DLayered(params=params, eps_min=eps_bg, eps_max=eps_wg, x=x_pos, y=y_pos, z=z_pos, filter_R=filter_R, min_feature_size=min_feature_size, beta=beta)
######## DEFINE FIGURE OF MERIT FOR EACH OUTPUT WAVEGUIDE ########
fom1 = ModeMatch(monitor_name = 'fom_1', mode_number = 'Fundamental TE mode', direction = 'Forward', norm_p = 2, target_fom=0.25)
fom2 = ModeMatch(monitor_name = 'fom_2', mode_number = 'Fundamental TE mode', direction = 'Forward', norm_p = 2, target_fom=0.25)
fom3 = ModeMatch(monitor_name = 'fom_3', mode_number = 'Fundamental TE mode', direction = 'Forward', norm_p = 2, target_fom=0.25)
fom4 = ModeMatch(monitor_name = 'fom_4', mode_number = 'Fundamental TE mode', direction = 'Forward', norm_p = 2, target_fom=0.25)
######## DEFINE OPTIMIZATION ALGORITHM ########
optimizer = ScipyOptimizers(max_iter=80, method='L-BFGS-B', scaling_factor=1, pgtol=1e-6, ftol=1e-5, scale_initial_gradient_to=0.25)
######## DEFINE SETUP SCRIPT AND INDIVIDUAL OPTIMIZERS ########
script = os.path.join(os.path.dirname(__file__), '1x4_test_material.fsp')
size_x = max(x_pos)-min(x_pos)
script = script.replace('opt_size_x=10e-6','opt_size_x={:1.6g}'.format(size_x))
size_y = max(y_pos)-min(y_pos)
script = script.replace('opt_size_y=16e-6','opt_size_y={:1.6g}'.format(size_y))
wavelengths = Wavelengths(start = 1550e-9, stop = 1550e-9, points = 1)
opt1 = Optimization(base_script=script, wavelengths = wavelengths, fom=fom1, geometry=geometry, optimizer=optimizer, use_deps=False, hide_fdtd_cad=False, plot_history=False, store_all_simulations=False)
opt2 = Optimization(base_script=script, wavelengths = wavelengths, fom=fom2, geometry=geometry, optimizer=optimizer, use_deps=False, hide_fdtd_cad=False, plot_history=False, store_all_simulations=False)
opt3 = Optimization(base_script=script, wavelengths = wavelengths, fom=fom3, geometry=geometry, optimizer=optimizer, use_deps=False, hide_fdtd_cad=False, plot_history=False, store_all_simulations=False)
opt4 = Optimization(base_script=script, wavelengths = wavelengths, fom=fom4, geometry=geometry, optimizer=optimizer, use_deps=False, hide_fdtd_cad=False, plot_history=False, store_all_simulations=False)
######## PUT EVERYTHING TOGETHER AND RUN ########
opt = opt1+opt2+opt3+opt4
opt.continuation_max_iter = 20
opt.run(working_dir = working_dir)
在迭代过程中的FOM如下图所示:
想问一下老师中间这两个端口功率这么大是正常的吗?
往下继续进行了几次迭代,发现4个端口的功率变化不大,得到的结果没有向P=0.25方向走。希望老师帮忙解答一下疑惑,非常感谢。
-
June 26, 2023 at 10:35 pm
Guilin Sun
Ansys Employee其中两个(2,3)Transmission是负的,估计是与光源相反的方向吧?
变化不大后你仿真最后的文件,看看结果就知道是否正确了。
-
June 27, 2023 at 11:08 am
ceshi xiazai
Subscriber非常感谢孙老师的回答,但是我觉得FOM的结果与光源方向应该没有关系,中间两个端口的FOM<0的原因是,我想得到的FOM是0.25,但是实际得到的FOM是0.48,而在lumopt中FOM=目标FOM-实际FOM。逆向设计最终得到的四个端口的FOM应该是都接近于0的(lumopt中算法求解FOM是求最小值),而图中迭代过程显示的结果不同,迭代100次+80次二值化之后得到的结果是中间两端口的功率还是很大(接近0.5),边缘两端口的功率接近于0,有种1x2MMI的感觉。。。
我验证了得到的结果,和迭代过程中得到的功率分配是一致的(中间两个端口功率高,边缘两端口功率低)。
目前可以想到的原因是因为给的折射率比较小(比如随便给的2.5),所以材料对光的调控作用不够强,这个解释不知道合不合理。。。
另外想问一下做逆向设计的老师或者同学们,对于我这种情况有什么建议
-
June 27, 2023 at 7:10 pm
Guilin Sun
Ansys Employee因为现在是标量优化,也就是总共只有一个FOM,它无法保证单个FOM的优化,只能保证总和FOM的优化。例子中没有讲,但优化的是不同波长,这个可能是其成功的原因,因为不是对同一个波长入射功率优化的。说不定你修改一下FOM, 将两个Port的透射率做比例,有可能好一些。
欢迎其他用户展开讨论。
-
June 28, 2023 at 12:57 am
ceshi xiazai
SubscriberOK,谢谢孙老师,我去尝试一下。
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- 询问关于FDTD和matlab软件的互联问题 ——appopen
- 关于中国用户访问Lumerical官网和帐号注册的补充说明
- Ansys Insight: 透射率反射率电场大于1,或者透射率反射率之和大于1的原因与解决方案–综合贴
- Ansys Insight: FDTD 和 varFDTD 常见的发散原因以及处理
- Ansys Insight: FDTD Solutions 的光源类型及其典型应用:初学者
- 左旋圆偏振光透过超表面后,获得的右旋圆偏振光能量比入射的左旋圆偏振光能量还要大?
- 有效折射率
- Ansys Insight: 关于FDTD 并行计算的有关问题
- 请问FDTD中如何改变光源的偏振态及如何获得能量的数值?
- Ansys Insight: 几个简单实用的脚本Script命令:用于结果分析
-
7818
-
4514
-
2979
-
1453
-
1322
© 2023 Copyright ANSYS, Inc. All rights reserved.