Please enable JavaScript to view this site.

Knowledge Base

Navigation: Scripting Language > Manipulating objects

updatesourcemode

We've made some changes. Use 'Ctrl-F5' to clear your browser cache.
Scroll Prev Top Next More

Updates the mode profile of selected mode source. If there is no mode profile stored in the source, then the mode with the highest effective index will be selected. If a mode is already stored in the source, then the mode with the best overlap with the old mode will be selected. Note that the mode source must be selected before running this command.

 

Supported Product: FDTD, MODE

 

Syntax

Description

?updatesourcemode;

Updates mode profile of the selected Mode source.

Returns the fraction of electromagnetic fields that overlap between the old and the new mode

?updatesourcemode(mode_number);

Updates the mode source and selects the desired mode number. For example, updatesourcemode(1); will calculate the fundamental mode. Please note that making this call will force a recalculation of a mode, even if the same mode has previously been calculated. In addition, making this call will force the mode selection method to become "user select". This optional argument was introduced in FDTD Solutions 8.6.3 and MODE Solutions 6.5.3.

 

Supported Product: FDTD, MODE

 

NOTE: Saving simulation files before using updatesourcemode

If you have a script file which updates the simulation mesh, then you should use the save script command before updating the source mode. This will ensure that the mesh has been updated before the new mode is calculated.

 

NOTE: overlap

The fraction of electromagnetic fields that overlap between the two modes is given by the expression below. It is also the fraction of power from mode2 that can propagate in mode1. For more information, please see overlap script command.

 

Example

Select the source, then update the mode profile. Once the mode profile has been updated, output the mode effective index and visualize the mode field profile.

# update the source mode profile

select("source");

updatesourcemode;

 

# get the mode profile and effective index

n=getresult("source","neff");

?"Effective index = " + num2str(n.neff);

field=getresult("source","mode profiles");

visualize(field);

 

See Also

Manipulating objects, addmode, clearsourcedata, clearmodedata, getresult, overlap, expand, seteigensolver, geteigensolver, updatemode, updateportmodes

Copyright Lumerical Inc. | Privacy | Site Map