Guilin Sun
Ansys Employee

This post raises two questions. Here are the answers:

1: Error: LN_phase_modulator_CHARGE.lsf line 41: in expression A(i,...) the index was out of range.  If you did not modify the script, it should work. This error indicates size(E) might has something wrong. I modified the applied voltage and the script works fine:

2: "at some point n_eff increase becomes not linear with respect to voltage and even decreases further"

If the doping is strong and the applied voltage is too high, it may not keep linearity, and might be saturated. Please check the material properties /doping/vlotage and make sure they are physical.