TAGGED: awg
-
-
January 30, 2024 at 6:44 am
jing wang
SubscriberHello, may I ask how the result graph of VarFDTD simulation from the example of array waveguide grating simulation was extracted from the monitor of the output port, and what formula is needed to process it?
https://optics.ansys.com/hc/en-us/articles/360042800633-Arrayed-waveguide-grating-AWG -
January 31, 2024 at 12:23 pm
Afroditi Petropoulou
Ansys EmployeeDear Jing,
Thank you for contacting us.
To get the plot described in Step 4 of the Arrayed waveguide grating (AWG) – Ansys Optics, you need to run the “AWG” analysis first. Then you can either right-click on the T result that has appeared in the Result View window and visualize it or run a script to do that.
If you choose the first option, you will need to go to the plot settings to check the “log10y” option and to change the lambda units.
You can also change the axis limits.
If you want to use script so that you can also post-process the results, you can use the following script:
###################################################################################
n=8;
Tres=getresult("AWG","T");
lambda=Tres.lambda;
T=matrix(n,length(lambda));
for (i=1:n) {
T(i,:)=Tres.getattribute("T"+num2str(i));
plot(lambda*1e9,pinch(T,1,i),"lambda", "T");
holdon;
}
leg=cell(n);
y=linspace(1,n,n);
for (i=1:n){
leg{i}="Re(T"+num2str(y(i))+")";
}
legend(leg);
setplot("log10y",1);
setplot("y max",1);
setplot("y min",1e-7);
setplot("legend position",8);
holdoff;
#################################################################################
The above script should be used as an external script and not in the AWG analysis group. If you want to use it inside the AWG analysis group you can add it at the end of the analysis script but you need to remove the second line (i.e. the T=getresult("AWG","T"); line).
Does the above answer your question or do you need something regarding the analysis script?
Best regards,
Afroditi
-
January 31, 2024 at 12:27 pm
Afroditi Petropoulou
Ansys EmployeeDear Jing,
A small correction. Use this script:
n=8;
T=getresult("AWG","T");
lambda=T.lambda;
Tres=matrix(n,length(lambda));
for (i=1:n) {
Tres(i,:)=T.getattribute("T"+num2str(i));
plot(lambda*1e9,pinch(Tres,1,i),"lambda", "T");
holdon;
}
leg=cell(n);
y=linspace(1,n,n);
for (i=1:n){
leg{i}="Re(T"+num2str(y(i))+")";
}
legend(leg);
setplot("log10y",1);
setplot("y max",1);
setplot("y min",1e-7);
setplot("legend position",8);
holdoff;
The previous one will work as external script but will not work inside the analysis. Again if you want to use it in the analysis you need to remove the second line (T=getresult("AWG","T");). In this case, when you run the analysis, the results will be automatecally plotted.
Best regards,
Afroditi
-
February 1, 2024 at 1:55 am
jing wang
SubscriberDear Afroditi,
thank you very much, it really helps me a lot~
Best regards,
Jing
-
- The topic ‘the outputs of AWG’ is closed to new replies.
- Difference between answers in version 2024 and 2017 lumerical mode solution
- Import material .txt file with script
- Errors Running Ring Modulator Example on Cluster
- Absorption cross-section of AuNR excited by prism-based TIR
- Issues with getting result from interconnent analysis script
- How to measure transmission coefficients on a given plane .
- TE Polarization Fraction + Waveguide TE/TM Fraction
- Edge Coupler EME Example Issue
- Lumerical Python API Topology Optimization Error 2025 R1
- FDE : Simulation waveguides with electrodes
-
2122
-
918
-
599
-
591
-
483
© 2025 Copyright ANSYS, Inc. All rights reserved.