Guilin Sun
Ansys Employee

You want to swtich on and off an object or source DURING the simulation? unfortuately it is not doable, as all the solvers are deterministic.

In some cases you may use material plugin to have a refracgtive index change with time, but it is out of support scope. Please refer this "step index" example:

https://optics.ansys.com/hc/en-us/articles/360034394734

also refer how does it work:

https://optics.ansys.com/hc/en-us/articles/360034915213-Flexible-Material-Plugin-Framework