To create the script, perform the following procedure.

StepAction
1Click the Scripting tab and type the following script:

‘ Change the 2D refractive index

StartValue = 1.47

EndValue = 1.5

‘ RIofWaveguide is the name representing the material

‘ to be manipulated. It can be any other name. Dim RIofWaveguide

‘ Here, “Guide” must be the name of an existing material in the profile

Set RIofWaveguide = MaterialMgr.GetObjFromID( “Guide” ) For n = 1 to 4

RI = StartValue + (n-1)*( EndValue – StartValue ) / 3

‘ Reset the 2D refractive index of the material

RIofWaveguide.Set2DRefractiveIndex RI, 0.0

‘ Simulate and record the results in Analyser

ParamMgr.Simulate

Next

2From the Simulation menu, select Simulation Parameters.

The Simulation Parameters dialog box appears.

3 Click the 2D tab.
4Under Mesh, change the Number of points/µm to 10 (see Figure 11).

BPM - Figure 11 Simulation Parameters dialog box—Number of points/μm

Figure 11: Simulation Parameters dialog box—Number of points/μm

5Click the Global Data tab.
6Under Simulation technique, select Simulate Using Script (see Figure 12).

BPM - Figure 12 Global Data tab—Simulate Using Script

Figure 12: Global Data tab—Simulate Using Script

7To apply the settings and return to the main layout, click OK.