利用 Lumerical FDTD Solutions 仿真30,60,90nm直径银纳米线的归一化散射场强度随散射角变化曲线代码及详细操作步骤
时间: 2024-03-27 12:36:44 浏览: 214
FDTD solutions问题解答
5星 · 资源好评率100%
以下是使用 Lumerical FDTD Solutions 仿真30,60,90nm直径银纳米线的归一化散射场强度随散射角变化曲线的详细操作步骤和代码:
1. 打开 Lumerical FDTD Solutions 软件,并创建一个新项目。
2. 在新项目中创建一个新的电磁仿真区域(EM simulation region)。
3. 在仿真区域中创建一个直径分别为30nm、60nm、90nm的银纳米线模型,可以使用圆柱形状来建立。在建立银纳米线时,需要设置纳米线的位置、直径、长度、材料等参数。
```
# 30nm 直径银纳米线
addcircle;
set("name", "AgNW_30nm");
set("x", "0");
set("y", "0");
set("z", "0");
set("radius", "15nm");
set("material", "Ag (Silver) - Johnson and Christy");
set("theta", "0");
set("phi", "0");
set("create monitor", "0");
# 60nm 直径银纳米线
addcircle;
set("name", "AgNW_60nm");
set("x", "0");
set("y", "0");
set("z", "0");
set("radius", "30nm");
set("material", "Ag (Silver) - Johnson and Christy");
set("theta", "0");
set("phi", "0");
set("create monitor", "0");
# 90nm 直径银纳米线
addcircle;
set("name", "AgNW_90nm");
set("x", "0");
set("y", "0");
set("z", "0");
set("radius", "45nm");
set("material", "Ag (Silver) - Johnson and Christy");
set("theta", "0");
set("phi", "0");
set("create monitor", "0");
```
4. 设置仿真区域的边界条件,例如使用周期性边界条件(periodic boundary conditions)。
```
set("x min bc", "Periodic");
set("x max bc", "Periodic");
set("y min bc", "Periodic");
set("y max bc", "Periodic");
set("z min bc", "Anti-Symmetric");
set("z max bc", "Anti-Symmetric");
```
5. 设置仿真区域内的光源,例如使用平面波光源(plane wave source),波长可以根据需要自行设置。
```
addfdtd;
set("x", "0");
set("y", "0");
set("z", "0");
set("z span", "2um");
set("simulation time", "300fs");
set("use complex fields", "1");
set("background index", "1.0");
set("dt stability factor", "0.5");
set("mesh type", "auto non-uniform");
set("non-uniform meshing", "optical");
set("minimum wavelength", "400nm");
set("maximum wavelength", "800nm");
set("mesh accuracy", "2");
set("mesh refinement", "2");
set("mesh refinement for structures", "2");
set("mesh auto refine", "1");
set("mesh global refinement", "2");
set("mesh refinement for wavelength", "2");
set("use PML", "1");
addplane;
set("name", "source");
set("x", "0");
set("y", "0");
set("z", "-1um");
set("wavelength start", "600nm");
set("wavelength stop", "800nm");
set("polarization angle", "0deg");
set("angle theta", "0deg");
set("angle phi", "0deg");
set("amplitude", "1");
set("use wavelength spacing", "1");
set("wavelength spacing", "5nm");
```
6. 运行仿真,并记录仿真结果。
```
run;
```
7. 使用仿真结果数据分析工具(post-processing tools)中的“散射角分析”(scattering analysis)功能,计算出银纳米线的归一化散射场强度随散射角变化的曲线。
```
addanalysis;
set("analysis type", "scattering");
set("scattering type", "farfield");
set("theta max", "90");
set("phi max", "180");
set("theta steps", "1");
set("phi steps", "2");
set("polarization type", "unpolarized");
set("normalize to incident power", "1");
set("use total field", "1");
set("use far field", "1");
set("farfield radius", "100um");
set("theta offset", "0deg");
set("phi offset", "0deg");
runanalysis("scattering");
getresult("scattering", "theta");
getresult("scattering", "data");
```
8. 对于每个直径的银纳米线,重复上述步骤,并记录每个直径对应的散射角-归一化散射场强度随散射角变化曲线。
9. 可以使用数据可视化工具(data visualization tools)对不同直径的银纳米线的散射角-归一化散射场强度随散射角变化曲线进行比较和分析。
以上是详细的操作步骤和代码,需要根据具体的模型和仿真需求进行调整和优化。
阅读全文