crosslight仿真之(三)功能集-4-排错


crosslight仿真之(零)系列目录

1. 语法问题

如果程序没有开始平衡态计算,就停止报各种错误,除了模型使用不当之外,很大程度上就是语法问题。

当提示足够详细时,就可以直接定位到某行。 当提示跟脚本没有显著对应时,大体可以根据提示看看相关的材料,参数等是否设置合理。

sol文件的运行规则是,后面的语句,覆盖前面的语句设置的参数。

include或引用的材料等间接使用的文件,相当于把内容移植到sol文件里。依然遵循先展开,在后面替换前面的规则。

具体起来,千奇百怪,参考的crosslight仿真之(一)从入门到精通的,第2,3部分,通常是官方的解决方法。

2. 内存问题

求解sol文件时,内存不足可以使用的命令:

  • add_mainmemory, 主求解器
  • add_arnoldimemory, arnoldi求解
  • add_thermalmemory, 温度求解
  • add_acmemory, 小信号求解
  • add_oxd_memory, 有机材料激子扩散方程的内存

3. 收敛问题

常见的收敛报错有2种

1) too many points in a scan

这种情况下是因为扫描太多而自动停止的。

2) ==============Convergent tips=================== Please check the following points for your case: 1) A physical solution may not exist for the configuration. If this is a new structure, please plot the band diagram using the data that is available and make sure the structure and doping are what you expect. 2) Reduce max_step in scan may help. A large max_step may drive the solver into unphysical state it can not recover. 3) The mesh may be too coarse. The band diagram in 1) should indicate this. Then, please refine the mesh. 4) The choice of solution variable may not be suitable. If the listing of solution error indicates much larger variable error than equation error, please set change_variable=yes. 5) The solution tolerance may be too small. For some tough cases, large tolerance in the order of 0.01 or 0.1 may be used. 6) For heterojunctions with large and abrupt change in band structure, a wider extra-point mesh spacing may help. Grading an abrupt heterojunction is another option. 7) For thermal simulation, different forms of thermal boundary or heating source (i.e.,j.e_model) seem to affect convergence. 8) For devices with high resistivity or insulating material, the correct solution can only be reached through transient state where displacement current plays a key role. Using a slow transient in scan may help. ==============End of Convergent tips===================

解决方案:关于不收敛的常规操作方法。

  • 1- 根据log最后报错提示, 改动相应的参数。
  • 2- newton_par 修改迭代参数。var_tol,res_tol分别是变量残差和方程残差,适度的大些容易收敛,但过大会使过程失真。damping_step相当于原始标准化步长的变化倍数,具体可以参看simu8.net
  • http://simu8.net/elearning/Crosslight_small_v5/1-3/1-3-15/start.html#c=1&g=1&p=1-1
  • max_iter 如果大于这个值,软件会终止本次迭代,减小步长,继续尝试下轮迭代。
  • opt_iter 软件会根据收敛的数据和这个值作对比,如果实际步数小于这个值,会增大偏压的步长,如果大于这个值会减小偏压的步长。
  • stop_iter 跟初始值相比没有任何提高, 尽早终止,尝试更小的步长。
  • 3- scan命令。最大步长过大容易跳过一些中间物理状态,结果体现出不同程度的随机性。如果收敛速度还可以,但是最小步长过大,可能会提前终止迭代,这时需要减小最小步长。
  • var2=time value2_to=这个主要是控制扫描时间,使偏压时有电容效应,从而提供一个小电流,符合实测场景,增加收敛性。
  • 4- 异常求解退出 尝试:parallel_linear_solver
  • 5- 绘制plt曲线,在异常处修改sol文件,保存异常附近的std, 重新运行后查看异常时的电学结构。
  • 6- 宽禁带材料小电流不收敛问题使用,set_minority_carrier,此项最好少用,仅收敛性不好时使用,是一种辅助收敛的技巧,不能作为物理模型。2021版会有升级。
  • 7- 对于掺杂浓度差异较大而不收敛的例子,可以使用new doping方法。思路是先用new doping 把浓度调至均匀,再把器件的偏压加上,然后还原doping,最后再把偏压归零。从而实现完整的扫描曲线。
  • 做这种操作需要对器件比较了解,如果同一偏压存在不同的物理状态 如栓锁,需要在偏置归零时通过scan电流或电压, 使器件进入需要测试的物理状态,然后再归零。具体例子可以查看 ./photo_detector/SAGCM_APD/apd01ph.sol
  • 8- 检查mesh是否合理,模型设置是否正确。
  • 9- 回到1 循环尝试。

欢迎留言交流,依据您的意见做修改补充。