-
-
May 10, 2021 at 5:20 pm
Guilin Sun
Ansys Employee问题: 为什么用软件直接作图(例如光强度随位置的分布)看起来正常,而将数据倒入Mtalb再画就失真了呢? 答案: 如果整个仿真区用均匀网格,两款软件作图是一样的。但是,由于Lumerical软件使用了高级的自适应网格,网格不再均匀,Matlab 画出来就失真了。 这是因为两款软件作图方法不同: Lumerical软件直接用的是仿真时的空间网格点,因此画出来时是真实、正确的;而Matlab是取坐标的最大和最小值然后再计算出均匀网格,因此失真。当然其好处是不需要记录每一个坐标点,节约了一些内存。 解决此问题的方法是,在用Script 取出数据后,先将它们转换为均匀坐标,然后再保存为Matalb数据或直接调用Matlab作图。 例如,用script得到坐标x,y: E2=getelectric(“monitor”);#获得强度分布 x=getdata(“monitor”,“x”); y=getdata(“monitor”,“y”); mx=100;#matlab中的x点数 my=50; #matlab中的y点数 xmatlab=linspace(min(x),max(x),mx); ymatlab=linspace(min(y),max(y),my); E2matlab=interp(E2,x,y,xmatlab,ymatlab);#插值为均匀网格 matlabput(E2matlab,xmatlab,ymatlab);#送入matlab工作空间 matlab(" image(xmatlab,ymatlab,E2matlab); ") 可以与用脚本作图的结果作比较,看看两者是否一致。
-
- 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
- Ansys Insight: FDTD 和 varFDTD 常见的发散原因以及处理
- Ansys Insight: FDTD 如何设置圆偏振光
- 如何仿真一维光子晶体能带?
- 老师,您好。FDTD中simulation bandidth和source中wavelength区别在哪里,仿真根据哪个进行?
- Ansys Insight: 几个简单实用的脚本Script命令:用于结果分析
- Ansys Insight: 透射率反射率大于1,或者透射率反射率之和大于1的原因与解决方案–综合贴
- Ansys Insight: FDTD 初学者: 平面波和全场散射场tfsf光源有什么区别
- 左旋圆偏振光透过超表面后,获得的右旋圆偏振光能量比入射的左旋圆偏振光能量还要大?
- Ansys Insight: script中的数据类型和数据格式 Dataset
-
3744
-
2573
-
1793
-
1236
-
594
© 2023 Copyright ANSYS, Inc. All rights reserved.