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!
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- “Import optical generation” or “delta generation rate”?
- Why am I getting “process exited without calling finalize”, and how do I fix it?
- Error: addfdtd is not a valid function or a variable name
- Error on Lumerical device
- Using a license file on a new license server
- Ansys Insight: Diverging Simulations
- Ansys Insight: Transmission results greater than one
- Ansys Insight: About override mesh in FDTD: its use and settings
- Is there a Lumerical script command to output the Simulation and Memory requirements?
- Ansys Insight: Convergence issues in CHARGE
-
3670
-
2552
-
1751
-
1232
-
584
© 2023 Copyright ANSYS, Inc. All rights reserved.