TAGGED: FDE, frequency-sweep, MODE
-
-
May 27, 2022 at 8:57 am
matteo
SubscriberHi Using the Frequency Sweep tab in the FDE solver in MODE solution, I would like to simulataneously calculate the dispersion of several modes. I was able to do it by shift selecting with my mouse all the modes of interest, but I would like to make this automatic using script commands. I found the selectmode(); command, but I am able to select only a single mode with it.
Is it possible to programmatically select multiple modes among the simulated ones?
-
May 27, 2022 at 9:05 pm
Guilin Sun
Ansys Employeeselectmode can only be used to select ONE specified mode https://support.lumerical.com/hc/en-us/articles/360034405234-selectmode-Script-command
If you need to sweep specially selected modes, you may need to use selectmode and do this in a loop. Please refer this script:
run;
findmodes;
DD=getdata("frequencysweep","D");
nn=[1;3;4]; #choose mode 1,mode3 and mode4
setanalysis("number of points",9);
setanalysis("stop wavelength",1.49e-6);
setanalysis("number of test modes",5);
setanalysis("track selected mode",1);
setanalysis("detailed dispersion calculation",1);
D=zeros(length(DD),length(nn));
for(n=1:length(nn)){
selectmode(n);
frequencysweep;
D(:,n)=getdata("frequencysweep","D");
}
f=getdata("frequencysweep","f_D");
plot(f,D);
-
May 30, 2022 at 2:01 pm
matteo
SubscriberHi, thanks!
That is quite disappointing, I wanted to avoid a loop because it basically repeats N times the same simulation, and I'm trying to speed up the calculations I'm making.
-
May 30, 2022 at 2:40 pm
Guilin Sun
Ansys EmployeeThe other viable way is not to select any mode so to sweep the default 8 modes.
Since this command is designed to select only one mode, please file a feature request for multiple modes: Vote new features, and file your feature request
-
May 30, 2022 at 2:44 pm
matteo
SubscriberHi, yeah, I tried that, but the issue is that I need to track the mode, since I have mode crossings, AND I wanted to select only two of the 10 modes found at the initial wavelength. I hoped that selectmodecould accept as an input a list of desired modes. I will file a feature request, thanks!
-
Viewing 4 reply threads
- The topic ‘Script command to select all modes in FDE frequency sweep simulation’ is closed to new replies.
Ansys Innovation Space
Trending discussions
Top Contributors
-
3892
-
1414
-
1241
-
1118
-
1015
Top Rated Tags
© 2025 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.