Creating a compact model for a Taper using API and FDTD ports



Hello again,
As the latest version of Lumerical 2017a is just released, it is becoming easier and easier to keep your design more modular and employ photonic circuit simulation on Interconnect. Extraction of the S-parameters is no more a headache. All you need is to define where are your ports and what modes are you studying. That’s all. This urged me really to re-write the steps of creating a custom CML element. This time the scripts are way shorter.

  1. First, you need to build the FDTD model as below.

To account for the design parameters, the model should have some properties:

So the MODEL setup is scripted whereas no script is needed for the Analysis tab.

  1. In INTERCONNECT, the model is build up using 2 ports and Optical S parameters components.
    Yet, the script is simple:

lsf_filename = %local path% + ‘/fdtd/ebeam_taper_1550/taperAPI.lsf’;
set(“load from file”, 1);
set(“s parameters filename”, s_filename);

The script above calls an API script which in turn checks the existence of the S-parameter file according to the values of w1, w2 and L. If found, the S-parameters file is loaded. If not, the script passes the design values w1, w2, and L to the FDTD model. The model is adjusted, modes are updated and the S-parameters sweep is run to produce the *.dat file containing the correct s-parameters. This file is then loaded in INTERCONNECT.

I called this API script “taper API.lsf”

s_filename = %local path% + ‘/source_data/ebeam_taper_1550/’ + “ebeam_taper_te1550_w1” + num2str(wg_width11e9) + “nm_w2” + num2str(wg_width21e9) + “nm_L” + num2str(wg_length*1e9) + “nm.dat”;
if (!fileexists(s_filename)) {
f1 = opensession(“fdtd”);
?fsp_filename = %local path% + ‘/fdtd/ebeam_taper_1550/ebeam_taper_te1550.fsp’;
api_script = “”;
api_script = api_script + ‘load("’ + fsp_filename + ‘");’ + endl;
api_script = api_script + ‘
# run s-parameter sweep
runsweep(“s-parameter sweep”);
# export to interconnect .dat file
exportsweep(“s-parameter sweep”,s_filename);
evalremote(f1, api_script);

  1. Here comes the question how to package this library into an element file (*.ice) and some source files.
    @konslekk and @gwang: Thanks for explaining to me before the straightforward approach to this. This is very useful.
    Steps of Creating a Compact model for a Taper Waveguide

However, it doesn’t work for the case when your element relies on some other S-parameters files, FDTD and Script files. Instead I tried the following but I am not sure if there is an easier way to do it.

I called my element ebeam_taper_te1550_flex.

After creating the Library “ebeam_user”, under Custom, I checked its path:

I copied my source files to this directory where the .ice file was created:

I then published ‘ebeam_user’

The package is created successfully with all the source files included:

To check my CML works well, I installed it to the Design Kits and dragged the taper element to the workplace.

Everything is okay!

Sorry for the lengthy post with so many pictures :smiley: but there is no better way to describe the steps I followed.
@gwang : Is there a shortcut to packaging the element in this case?

I have attached this underdevelopment CML in case anybody would like to check it.


Hi @aya_zaki,

You are doing the right way to package the libraries :slight_smile: The CML doesn’t seem to be fully uploaded at the end.

Thanks for this post.