The positions R and T monitors and other questions


#40

Dear Nancy.
Hello and good time.

At first, thank you so much for considering your time to assist me. According to your recommend, I setup the structure owning to permittivity changes, but i am not sure that is right or not? Further, the values of permittivity tensor are very big you can see it as posted below, hence, i don’t know that is right or not?
Could you please check the setup my simulation, changes of script file and permittivity tensor are right? Likewise the this script matrix_transform_spatially_varying.lsf doesn’t work.

Thank you so much
Best Regard
Ali
Sunday/ 31July/ 2016

Simulation by Stress.fsp (4.9 MB)


#41

Dear Nancy.
Hello and good time.

I need some results in my simulation due to the list below, so i have some questions:

  1. Actually, the structure is setup by two monitors like reflectance and transmittance, therefore there are parameters into the two monitors such as E, P, H, T, far-field, which E, P, H means Electric field, Poynting vector Magnetic field, respectively. are they right or not? I don’t know about far-field.

  2. To get the results E, P or H, I should right click on them, is it right or there is the other method?

  3. Which monitors results of E, P or H are important, or it depends on me to choose monitors?

  4. To plot E, P and H versus strain, i need only one values of E, P and H, so how can i get them?

  5. Can i get the results like photoluminescence (PL) and intensity if it is possible how to get them?

Thank you so much
Best Regard
Ali
Tuesday/ 2 August/ 2016


#42

Dear Ali,

I checked the setup of the material and matrix transform grid attribute based on the permittivity tensor with off-diagonal components and it is correct. I noticed that the “900nN” object is already set up to use the “Moke” material, and the last thing you would need to do is to edit the object and apply the grid attribute by setting the “grid attribute name” setting to “kerr attribute”.

I also tested the matrix_transform_spatially_varying.lsf script file and I didn’t run into any problems with it. Since the spatially-varying grid attribute was added in a recent version of the software, it’s possible that the script does not work for you if you are using an older version of the software. You can get the installation package to upgrade to the latest version here:
https://www.lumerical.com/downloads/customer.html

Regarding question 1 of your latest post, you are correct that E, P, and H refer to electric field, Poynting vector, and magnetic field. The farfield result is a projection of the fields to a 1 meter hemisphere as described here:
https://kb.lumerical.com/en/index.html?solvers_far_field_projections.html

Regarding question 2, you can right-click on the monitors to visualize the results, but it’s also possible to collect the results from the script and perform analysis of the results from there. There is are some scripting tutorials that show how to do this here:
https://kb.lumerical.com/en/index.html?ref_scripts_tutorial_accessing_simulation_data.html

Regarding question 3, if I understand correctly, you are asking whether the frequency domain power monitor or profile monitor should be used in the simulation for collecting the results. The only difference between the two monitors is the type of interpolation used, so the difference is very small and either type of monitor could be used. If you are interested in getting a plot of the field profile over space then the profile monitor may be slightly preferable, and if you are interested in calculating the transmission or reflection, then the power monitor may be slightly preferable, although if the mesh you are using is fine enough then there should be only a neglible amount of difference between the two types of monitors.

Regarding question 4, if you only wanted to get the field or Poynting vector at a single location in the structure, then you could set the “monitor type” in the Geometry tab of the monitor to “Point” so that the monitor only records the data at one point in space. You could also use a monitor to record data over space and get the data from one position inside the monitor by slicing the data in the visualizer. The way to use the visualizer to slice the dimensions of the data is demonstrated in the video here:
https://kb.lumerical.com/en/index.html?layout_analysis_visualizer_introductory_video.html

Finally, regarding your last question, if the photoluminescence that you would like to measure is due to the resonance of the structure which is excited by the incident light source, you should be able to get the photoluminescence spectrum by looking at the transmission spectrum through the reflection monitor which is above the device with monitor apodization applied. Apodization will allow you to apply a windowing function to only look at spectrum of the time signal which contains resonant fields of the device, as described here:
https://kb.lumerical.com/en/index.html?ref_sim_obj_apodization.html

Let me know if you have more questions about any of this.


#43

Dear Nancy.
Hello and good time.

At first thank you so much to sending your time to help me. Actually, could you please consider the requests below:

  1. As you mentioned to solve the problem in this script matrix_transform_spatially_varying.lsf script, i should better to update the software. Actually, the error is "the matrices for addattribute don’t have the correct size to match the dataset’, hence could you please give me the other recommend to solve it?

  2. Regarding, I have setup two monitors including Reflectance a Transmittance, thus there are E, P, and H parameters into the two monitors, hence my question is which one is important to get results like E, P and H ( Reflecttance or Transmittance monitor)?

  3. I need the maximum values of E, H and P, so is there easy method to get them?

  4. It is still unclear how to get photoluminescence results and setup my structure.

Thank you so much
Best Regard
Ali
Saturday/ 6 August/ 2016


#44

Dear Ali,

Regarding 1, the newer version of the software allows you to set the matrix transform that is spatially-varying, so the dimensions of the data are larger than the previously accepted data since it can now include the x, y, z dimensions of the data. When using the older version of the software where the spatially-varying transform is not available, you will see the error message that you mentioned.

If you want to continue using the older version of the software instead of upgrading, it may be possible to set up the spatially varying structure by creating the larger structure using many smaller objects where you apply a different matrix transform attribute to each object in order to get the spatially-varying effect.

Regarding your second question, the data that you collect in the monitors depends on what measurements you want from the simulation, so it is really up to you which monitor you want to collect the data from or what data you want to collect. For example, if you are interested in only the fraction of power reflected or transmitted at each frequency (the T result from the monitor after you run the simulation), then you do not need to collect the E, H, and P field data, and you only need to collect “output power”. You can choose what data you want to record from the monitors by editing the monitor and going to the “data to record” tab of the edit window:
https://kb.lumerical.com/en/index.html?ref_sim_obj_monitors_frequency_domain_field.html

You can get the maximum value of E, H or P from the script, and there is some example code to get the maximum E intensity from a monitor. The “max” script command returns the index of the maxiumum value - please see the fourth example script on the following page and let me know if you have any questions about it:
https://kb.lumerical.com/en/index.html?ref_scripts_find.html

Finally for the photoluminescense result, could you give me some details about how you are getting the measurement experimentally, and what value is being recorded in the measurement? That may help me understand what result you need from the simulation.


split this topic #45

A post was split to a new topic: Error in installation, code 5556


split this topic #46

A post was merged into an existing topic: Error in installation, (activation code error)


#47

Dear Nancy.
Hello and good time.

Actually, i installed the last version, so there are some question and errors with respect to the list below:

  1. Permittivity tensors of crystal material is like

But the Permittivity tensors is used into the script file is like

So, which one can be correct the first or the second?

  1. It is impossible to set the “grid attribute name” setting to “kerr attribute” in import object. Could you please check the simulation file as posted.

Simulation by Stress.fsp (4.9 MB)

3.Could you please check the changes of script files due to the my structure are right or not? it should be noted that i have changed only matrix A, Linspace into the two scrip files, i didn’t changed the other parameters as you can see in screenshots.

  1. After running the matrix_transform_spatially_varying.lsf script file, there is this warning: matrix attribute: warning, not all matrices in the dataset were unitary and they were corrected, the lorgest singular value correction(from 1) was 5.55556e-07.

  2. Finally, there is this error after running:

Thank you so much
Best Regard
Ali
Thursday/11 August/ 2016


#48

Dear Nancy.
Hello and good time.

Regarding “photoluminescence result, could you give me some details about how you are getting the measurement experimentally, and what value is being recorded in the measurement?”. You can see the detail due to the list below:
In photoluminescence the sample is excited by light with a photon energy larger than the fundamental optical absorption edge. The light emitted by the sample is recorded as a function of photon energy. To measure the lifetime of optically excited states a pulsed laser system and a time resolving photon detector are used.

A typical experimental set-up for photoluminescence spectroscopy is shown in below screenshot. For measurements on organic semiconductors light in the visible to UV region has to be used. The pulsed light source shown in below screenshot is a Ar laser combined with a dye lase and a cavity dump. While the gas laser only emits light at certain photon energies, the dye laser offers the possibility to tune the photon energy in a certain energy range. The short light pulses are produced by the cavity dump. A cavity dump uses a variable attenuator, where a high attenuation corresponds to a low quality factor (Q-factor) of the resonator. Switching from low to high Q-factor starts stimulated emission, that is, laser operation. Switching back to low Q-factor dumps the laser light from the cavity all at once. A cavity dump is often accompanied by mode locking. The pulsed laser light is focussed via a lens onto the sample in a spot of lens than 1 mm diameter. To investigate the influence of temperature on the lifetime of optical transitions the sample is mounted on a Kryostat in vacuum. The light emitted from the sample is collect by the same lens and focused onto the entrance slit of a monochromator. Within the monochromator the light is dispersed in energy and project onto the exit slit where a time-resolving photon detector is mounted. Data acquisition of the photon detector is triggered by the pulsed laser, and a delay stage is used to set the time interval between excitation and data acquisition. Plotting the intensity as a function of the time set by the delay stage reveals the lifetime of optically exited stages.

Thank you so much
Best Regard
Ali
Friday/12 August/2016


#49

Dear Ali,

Regarding question 1, the permittivity tensor of the BTO crystal with applied stress has off-diagonal components, like you have calculated for your structure earlier (in this post: The positions R and T monitors and other questions)

Because we can’t directly type in the full permittivity tensor since the material database can only take diagonal refractive index values, we can represent the full permittivity tensor of the material with applied stress, by setting up the combination of a material with diagonalized refractive index values with an appropriate applied matrix transformation. The matrix_transform.lsf contains the code which calculates the required diagonal refractive index values and the matrix transform U to use.

Regarding question 2, I looked into the file and I did notice that after setting the grid attribute name of the object to kerr attribute, the name didn’t show up in the edit window, however, I could see from the script that the setting was actually set. For example, I used the following code to check that the grid attribute name is set to “kerr attribute”:
?getnamed(“900 nN”,“grid attribute name”);

I have reported the problem to the developers that the grid attribute name doesn’t show up properly in the edit window of the imported object.

Regarding question 3, if the material has a uniform permittivity tensor over the entire object, then you can use just the matrix_transform.lsf script file and you don’t need to use the matrix_transform_spatially_varying.lsf script file.

In the matrix_transform.lsf script file, the permittivity tensor A should be set to the full tensor with off-diagonal components instead of the tensor with just diagonal components.

Regarding part 1 of question 3, this error message is normal since the matrix transform grid attribute requires unitary matrices – the calculated U matrix that is set has some numerical error which makes the matrix non-unitary and small corrections need to be made to the values that are set. The correction here is very small, on the order of 1e-7, so it doesn’t indicate anything to be concerned about.

Regarding part 2 of question 3, the message shows that the grid attribute name of the object named “Load 900 nN” is set to “Kerr attribute”. From the file which you provided, it looks like the name of the grid attribute is “kerr attribute”. Since the names of objects are case-sensitive, this could be what is causing the error, so the grid attribute name would need to be changed from “Kerr attribute” to “kerr attribute” to match the name of the matrix transform grid attribute exactly. Please let me know if that change works for you.


#50

Dear Nancy.
Hello and good time.

At first thank you so much for assisting and spending your time to solve my problems. Actually, i have some questions with respect to the below list:

  1. Regarding your recommend “if the material has a uniform permittivity tensor over the entire object”, actually i couldn’t find the example of uniform permittivity tensor, if you have please post it?

  2. For bulk ZnO material is only determined refractive index as 1.998, therefore imaginary refractive index value is not defined yet and it equals to zero, but after running the matrix_transform.lsf, determine the values of imaginary refractive index for my material. It can be right or not?

  3. Regarding your recommend " In the matrix_transform.lsf script file, the permittivity tensor A should be set to the full tensor with off-diagonal components instead of the tensor with just diagonal components", I have setup it like [ 11.9740, 11.9722,0; -11.9722, 11.9704, 0; 0, 0, 12.0037], so in the matrix_transform_spatially_varying.lsf script file, i have setup like A = [ 11.9704, 2z(k),0;-2z(k), 11.9704,0;0,0,12.0037]. My question is, i must setup (11.9722z(k), -11.9722z(k)) instead of (2z(k) or -2z(k)) or (2z(k) or -2z(k)) are right?

  4. To get get the maximum value of E, H or P, i have followed the script file from https://kb.lumerical.com/en/index.html?ref_scripts_find.html, but it didn’t work, therefore i wrote script file below that it works and i got the values:

monitor name

m=“Refractive”;

get individual data elements with getdata

x=getdata(m,“x”);
y=getdata(m,“y”);
z=getdata(m,“z”);
f=getdata(m,“x”);
Ex=getdata(m,“Ex”);
Ey=getdata(m,“Ey”);
Ez=getdata(m,“Ez”);
E2=(Ex^2+Ey^2+Ez^2);
E=max(E2);
Could you please tell me, is it right?

Best Regard
Ali
Tuesday/ 16 August/ 2016


#51

Dear Ali,

Questions 1 and 3:
The matrix_transform.lsf script file from the following page is an example of how to set up the uniform permittivity tensor over the entire object since the transform matrix U is set to only a 3x3 matrix which means that the same 3x3 transform matrix is used over all positions inside the structure:
https://kb.lumerical.com/en/index.html?materials_anisotropic_matrix_transformation_grid_attribute.html

Here, the 3x3 tensor that you mentioned would be the permittivity tensor A that is specified:
[ 11.9740, 11.9722,0; -11.9722, 11.9704, 0; 0, 0, 12.0037]

In the matrix_transform_spatially_varying.lsf the U matrix is set to be a 3x3xMxNxO matrix where N, M, O are the x, y, z positions in space. This means that the 3x3 transform matrix varies over space. In the example script, the multiplication by 2*z(k) in the permittivity is only used as an example to illustrate the case where the permittivity changes as a function of the z position in space, but in your case there is no such relationship between the z position and the permittivity of the structure since the permittivity is only changing depending on the applied stress. Since you have already calculated the permittivity tensor due to the applied stress you don’t need to use the method in the matrix_transform_spatially_varying.lsf script to calculate the permittivity tensor over space.

Question 2:
When you diagonalize the permittivity matrix, the diagonalized values that are used to set up the material can be complex (so the imaginary part of the refractive index is non-zero), however, the actual permittivity tensor that is simulated will be:
eps = Ueps_dctranspose(U)

Where eps is the permittivity tensor with off-diagonal components, U is the applied matrix transform, and eps_d is the matrix with diagonalized elements. Basically, the matrix transform grid attribute applies the Ueps_dctranspose(U) operation to the material of the object where the grid attribute is specified. This idea is discussed on the following page under the “General anisotropic materials” heading:
https://kb.lumerical.com/en/index.html?materials_anisotropic.html

This means that even though the diagonalized values may have imaginary parts, the permittivity that is simulated will not have the imaginary components.

Question 4:
The script that you have will return Ex, Ey, Ez, and E2 values that are different from the values that you would see if you plotted the E result from the monitor since the E dataset result from the monitor returns results with CW normalization applied. When you use the “getdata” script command to get field data, this is getting the raw field data before CW normalization is applied.

CW normalization is used for frequency domain monitors to give results as though the same source amplitude is being injected at all frequencies, as discussed on this page:
https://kb.lumerical.com/en/index.html?ref_sim_obj_cw_normalization.html

If you could let us know what error you are seeing when you try to use the example script, we may be able to help correct it.


#52

Dear engineer.
Hello and good time.

There are some errors in my structure with respect to the list below:

After running my simulation due to the matrix_transform.lsf script file, there is this message " warning! The simulation that created the data in the monitors and sources below diverged, and the data is likely invalid. Please see the Diverging simulation page for help on solving. After checking and changing some parameters as recommend by Diverging simulation page, actually i couldn’t find where is the problem. Could you please check my simulation file as posted it here.

Simulation.fsp (4.9 MB)

  1. To get the maximum value of E, H or P, i have followed the script file from https://kb.lumerical.com/en/index.html?ref_scripts_find.html, that is like

#Get the monitor data
E = getresult(“monitor”,“E”);
#Get the position and frequency data from the dataset E
x = E.x;
y = E.y;
z = E.z;
f = E.f;
#Get the length of the properties
nx = length(x);
ny = length(y);
nz = length(z);
nf = length(f);
#Get the intensity values
e2 = E.E2;
#Get the maximum intensity value
indexE2 = find(e2, max(e2));
#Create the grids that will be used to extract the actual position values
X = meshgrid3dx(x,y,f);
Y = meshgrid3dy(x,y,f);
Z = meshgrid3dy(x,y,f);
F = meshgrid3dz(x,y,f);
#Create the grids that will be used to extract the index values
X2 = meshgrid3dx(1:nx,1:ny,1:nf);
Y2 = meshgrid3dy(1:nx,1:ny,1:nf);
Z2= meshgrid3dy(1:nx,1:ny,1:nf);
F2 = meshgrid3dz(1:nx,1:ny,1:nf);
#Output the values of the position and the index
?X(indexE2);
?Y(indexE2);
?F(indexE2);
?X2(indexE2);
?Y2(indexE2);
?F2(indexE2);
After running the script file, i got these results including:
result: 8.13185e-02, result:-1.2439e-008, result: 742, result: 959, result:1.

So, which one can be maximum result that i want, the other question is for getting maximum value of H and P, i changed E to H and P, respectively but i got the same result. Could you please tell me where is the problem?

Thank you so much
Best Regard
Ali
Friday/ 19 August/ 2016.


#53

Dear Ali,

I noticed that your simulation file requires a large amount of memory to run, so I have the following suggestions that could help reduce the memory requirements:
-Increase z min position of the simulation region so that the simulation region includes a smaller portion of the silicon substrate
-Decrease simulation region y span
-Use a coarser mesh in the mesh override regions

I tested the simulation file and I found that the simulation only diverges when the “MOKE.900” material is used, so I believe the divergence is related to the material. I am still looking into what changes could be made to make the simulation stable when using this material but the material and grid attribute do appear to be set up correctly. I’ll try to get back to you about this as soon as possible.

Regarding the script that you are using, it outputs the index and position of the maximum E field intensity, however if you only want to obtain the value of the maximum E, and H intensity and maximum Poynting vector magnitude P, then the script can be made simpler like below:

# Get the monitor data
E = getresult("R","E");
H = getresult("R","H");
P = getresult("R","P");

# Get the maximum E and H intensity values
maxE2 = max(E.E2); 
maxH2 = max(H.H2); 

# Get the maximum P magnitude
P = P.P;
Px = pinch(P,5,1);
Py = pinch(P,5,2);
Pz = pinch(P,5,3);
maxP = max(sqrt(abs(Px)^2+abs(Py^2)+abs(Pz)^2));

# Print results to script prompt
?"Max E intensity: "+num2str(maxE2);
?"Max H intensity: "+num2str(maxH2);
?"Max P: "+num2str(maxP);

#54

Dear Nancy.
Hello and good time.

At first thank you so much for assisting and spending your time to solve my problems. Actually, i have set-up the structure according to your recommends, but it didn’t work, so it showed the same error ( Diverging simulation). It works while i set the “Imaginary Refractive Index” as zero in xx and yy directions in material database as posted the screenshot. The problem is, i don’t know if it effects on the results ?

Thank you so much
Best Regard
Ali
Saturday/ 3 September/ 2016.


#55

Dear Ali,

After testing your simulation file, I consulted a colleague who pointed out that in the following permittivity tensor:
[ 11.9740, 11.9722,0; -11.9722, 11.9704, 0; 0, 0, 12.0037]

The element -11.9722 has a refractive index of sqrt(-11.9722)=3.46i

Since the refractive index has a negative imaginary part, this means that the material has gain which will lead to the fields diverging towards infinity since there is no gain saturation mechanism in the material model.

In your most recent reply you mentioned that you tried setting the imaginary part of the refractive index to 0 in the MOKE.900 material. Normally this would remove gain or loss from the material, however, in this case since you are also applying a matrix transform using the grid attribute, the actual simulated material refractive index might still have gain. Instead, to remove the gain, you could remove the imaginary part of the refractive index from the full tensor before diagonalizing it, so you would start with a permittivity tensor of:
[ 11.9740, 11.9722,0; 0, 11.9704, 0; 0, 0, 12.0037]

Then you could follow the same method of using matrix_transform.lsf to set up the combination of the diagonalized refractive index material and the grid attribute.

Please try it out and let me know if you have further questions.


#56

Dear Nancy.
Hello and good time.

Really thank you so much. According to your recommend the problem solved. Actually, to simulate the structure in order to investigate the effects mechanical strain or stress on photoluminescense of ZnO nanowire i don’t know how to do it. The photoluminescense (PL) experiment information was defined in the below list:

In a typical PL experiment, a semiconductor is excited with a light-source that provides photons with an energy larger than the bandgap energy. The incoming light excites a polarization that can be described with the semiconductor Bloch equations. Once the photons are absorbed, electrons and holes are formed with finite momenta k in the conduction and valence bands, respectively. The excitations then undergo energy and momentum relaxation towards the band gap minimum. Typical mechanisms are Coulomb scattering and the interaction with phonons. Finally, the electrons recombine with holes under emission of photons. I got the information from https://en.wikipedia.org/wiki/Photoluminescence#Photoluminescence_properties_of_direct-gap_semiconductors

All the best wishes
Best Regard
Ali
Friday/ 9 September/ 2016


#57

Dear Nancy.
Hello and good time.

I need the units of the value of the maximum E, and H intensity and maximum Poynting vector magnitude P to plot them versus strain. Actually, i checked into the FDTD, so there are units, hence

  1. Could you please tell me the units for my structure? Regarding my material dimension has size in the nanometer scale.

  2. Could you please guide me the various factors that cause changes in optical properties of my structure after applying mechanical strain or stress?

Thank you so much
Best Regard
Ali
Saturday/ 10 September/ 2016


#58

The units of E intensity, H intensity and Poynting vector from the frequency domain monitors are provided in the table on the following page:
https://kb.lumerical.com/en/index.html?solvers_optical_units.html

You can expand the section called “Frequency domain electromagnetic fields - Steady state, single frequency, cwnorm data” to see the table with the units. Monitor data that you get using the script is always in SI units no matter what unit settings you have set in the graphical user interface.

Regarding your second question, the photoelastic effect which causes the change in optical properties is described here:

You might be able to find additional details if you look into the reference where you obtained the values of the photo elastic constant for ZnO.

FInally, about the photoluminescence for semi-conductors, it could be possible in FDTD Solutions to simulate the resonance frequency of the structure if there is any resonance, as well as the aborption the material which can be done using the Pabs analysis group:
https://kb.lumerical.com/en/index.html?layout_analysis_pabs.html

The power absorption can be related to the rate of generation of electron-hole pairs as described here:
https://kb.lumerical.com/en/index.html?solar_cells_methodology.html

Since power absorption is related to the generation of electron-hole pairs and this then results in the recombination that then emits the light that you measure in a PL experiment, you might be able to relate the frequency where absorption is highest to the peak frequency of the PL spectrum. Unfortunately it would not be possible to directly simulate the light generation due to recombination in an FDTD Solutions simulation.


#59

Dear Nancy.
Hello and good time.

Thank you so much for replying. Actually, i have some questions due to the below list:

  1. I got the maximum values of E, H intensity and Poynting vector like 0.374022, 2.43766e-06 and 0.000954745, respectively. So, my questions are including:

(I) Can i plot directly the values versus strain ( that means I don’t need to convert the values)?

(II) According to the table the units of E, H intensity and Poynting vector are Volts squared per meter squared, Amperes squared per meter squared, Watts per meter squared, respectively, those are right or not?

2.I followed your recommend to do simulation like Pabs analysis, so could you please check my simulation is right like the position of pabs analysis monitor and geometry ? As posted the file simulation.

Simulation.fsp (4.9 MB)

3.How can i get the maximum results of power absorption?

4.I used the script files of Simple method and Advanced method as recommend in the website, but they didn’t work?

5.Do i need only to Pabs analysis simulation to get the results of Pl spectrum, or not?

All the best wishes
Best Regard
Ali
Thursday/ 15 September/2016