-
-
March 20, 2024 at 3:44 pm
minusunny
SubscriberHi how to add user select mode in FDTD port:
set('mode selection','user select');
set('number of field profile samples',2);
#set('select modes',1);
Â
updateportmodes(2);
-
March 20, 2024 at 5:39 pm
Amrita Pati
Ansys EmployeeHi,
Let's say you want to inject the first 5 modes, you can try the following line of code:
setnamed("FDTD::ports::port 1","selected mode numbers",[1,2,3,4,5]);
Regards,
Amrita -
March 20, 2024 at 5:59 pm
minusunny
SubscriberHi,
I am trying to add to analysis group: This is what i wrote:
addport; # add port
##input source
set('name','In1');
set('x',0e-06);
set('y',0e-06);
set('y span',2e-06);
set('z',0);
set('z span', 2e-06);
set('injection axis', 'x-axis');
set('direction', 'Forward');
set('mode selection','user select');
set('number of field profile samples',5);
setnamed('FDTD::ports::In1','selected mode numbers',1);
If i try this :
error: prompt line 1125: in setnamed, no items matching the name 'FDTD::ports::In1' can be found.
-
March 20, 2024 at 6:54 pm
Amrita Pati
Ansys EmployeeHi,
Thanks for sharing additional details. I was able to run your script successfully:
When you test the script, make sure that you are in Layout mode. I saw this error when I tested the script in the analysis mode. As objects are not created in analysis mode, Line 1109 won't be able to find the object. Make sure that the port is being created before setting the other properties. Please let me know if you are already running it in Layout Mode and still see the error.Â
Regards,
Amrita -
March 20, 2024 at 7:22 pm
minusunny
SubscriberThank you, due to some reasom it is giving me error, but when i applied changes it worked!.
Minu
-
March 20, 2024 at 9:18 pm
Amrita Pati
Ansys EmployeeYou are welcome! Great to know that it's working. I will close this post then.
Regards,
Amrita
-
- The topic ‘User select mode in FDTD port using lumerical script’ is closed to new replies.
- Import material .txt file with script
- Errors Running Ring Modulator Example on Cluster
- Absorption cross-section of AuNR excited by prism-based TIR
- 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
- 2D inverse design grating coupler
- FDE : Simulation waveguides with electrodes
- Loss of lithium niobate phase modulator
-
2337
-
925
-
599
-
591
-
527
© 2025 Copyright ANSYS, Inc. All rights reserved.