Please enable JavaScript to view this site.

Knowledge Base

Navigation: Scripting Language > Adding Objects

addimportnk

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

Adds a nk import object to the FEEM simulation environment where the profile of the material with a spatially varying index can be imported from an external Matlab file.  

 

Supported Product: DEVICE

 

Syntax

Description

addimportnk;

Adds an import primitive to define material with a spatially varying index profile in the FEEM solver.

This function does not return any data.

 

Once the nk import object is created, the data can be imported from a matlab (.mat) file using the GUI or by assigning a dataset to the object using the importdataset script command. The dataset can be in rectilinear or unstructured (finite-element) format.

 

Example

The following script command will add an import heat source to the HEAT solver region and will load an analytic 3D heat data into it.

addfeemsolver;

addimportnk;

 

# create coordinate vectors and 3D matrix for nk input

x = linspace(0,1e-6,11);

y = linspace(-1e-6,1e-6,2);

z = linspace(0,2e-6,101);

nk = matrix(11,2,101)+3.45; # assume the index input is 3.45 everywhere

 

for (i=1:length(x)){  # assume that index varies along x-axis 

nk(i,:,:)=x(i)*1e5;

}

 

# create dataset

nkmaterial = rectilineardataset("nk import",x,y,z);

nkmaterial.addparameter("a",1); # add a dummy parameter

nkmaterial.addattribute("nk",nk);

 

# load data into nk import

select("FEEM::nk import"); # The source is a child of the solver region so the "FEEM::" prefix in necessary

importdataset(nkmaterial);

 

 

See Also

Adding Objects, addfeemsolver, rectilineardataset, select, importdataset

Copyright Lumerical Inc. | Privacy | Site Map