TAGGED: material-properties, script
-
-
August 4, 2023 at 8:05 am
Lord Li
Subscriber我注意到,在:
https://optics.ansys.com/hc/en-us/articles/360034930013-addmaterial-Script-command
https://optics.ansys.com/hc/en-us/articles/360034409654-setmaterial-Script-command
两个页面中是可以对conductive和(n,k)材料的property(如refractive index)进行设置。
但是,当我需要添加各向异性材料(Sampled 3D data类型材料)时,设置property却出现了报错,参照链接 我的脚本如下:
setmaterial(addmaterial("Sampled 3D data"),"name","LN-Zelmon");
setmaterial("material_123","anisotropy",2);
setmaterial("material_123","wavelength",sampledData(:,1));
setmaterial("material_123","Re(index xx)",sampledData(:,2));
setmaterial("material_123","Re(index yy)",sampledData(:,3));
setmaterial("material_123","Re(index zz)",sampledData(:,4));
(在此,sampledData是已经定义好的矩阵)
脚本从第三行到第六行都提示 The material's Refractive index property is not available.
Sampled 3D data的界面如下,按理来说property的设置应该没问题。
因此,想请问应如何设置property?
-
August 4, 2023 at 5:32 pm
Guilin Sun
Ansys Employee这种材料需要先将材料数据做成TXT文件,然后输入,而不是用脚本这样添加。只有单套数据才可以,比如nk 材料和电导率材料。
参见
-
August 7, 2023 at 5:48 am
Lord Li
Subscriber现在需要使用脚本来添加,不知道能否实现呢?
-
-
August 8, 2023 at 3:39 pm
Guilin Sun
Ansys Employee最好不要用脚本,因为你不知道材料拟合怎么样。
你可以添加到材料库中,不需要每次都要输入,否则材料已经存在,即使删除用此材料的几何形体,因为材料在材料库中(非永久,仅在此文件中),再输入此材料的话脚本就会出错。
参见 https://optics.ansys.com/hc/en-us/articles/360034915093-Creating-new-sampled-data-materials-in-FDTD 看看后面部分如何添加到材料库。
-
- 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命令:用于结果分析
-
7592
-
4440
-
2953
-
1427
-
1322
© 2023 Copyright ANSYS, Inc. All rights reserved.