-
-
July 6, 2023 at 7:57 pmnina.megierSubscriber
I am trying to set first two modes for the port with a code
fdtd.addport()fdtd.set("name","output_port")fdtd.set("x",3*unit)fdtd.set("x span",0*unit)fdtd.set("y",2*unit)fdtd.set("y span",3*unit)fdtd.set("z",0*unit)fdtd.set("z span",2*unit)fdtd.set('mode selection',(1,2))which does not work. I have tried also with [1,2], without success. How can I reach this?Setting only one mode works perfectly fine, with, eg.fdtd.set('mode selection','fundamental TM mode') -
July 6, 2023 at 10:55 pmDevAnsys Employee
-
July 7, 2023 at 4:27 amnina.megierSubscriber
Actually, I get with
fdtd.updateportmodes(1,2)an error:
lumapi.LumApiError: “argument list for the updateportmode is incorrect – updateportmodes arguments were converted to (‘int, ‘int)”
fdtd.updateportmodes([1,2]) also does not work with an error:”lumapi.LumApiError: ‘argument list for the updateportmode is incorrect – updateportmodes arguments were converted to (cell array)'” -
July 7, 2023 at 5:16 amnina.megierSubscriber
I have solved the issue, one should use
fdtd.set('mode selection','user select')fdtd.set("selected mode numbers",np.array([1,2])) -
July 7, 2023 at 6:37 amDevAnsys Employee
Hello Nina, thanks for the update.
We cab also use:
fdtd.updateportmodes(np.array([1,2]))https://optics.ansys.com/hc/en-us/articles/360034409174
https://optics.ansys.com/hc/en-us/articles/360043683873-lumapi-getv-Python-API-method
-
Viewing 4 reply threads
- The topic ‘set modes in python’ is closed to new replies.
Ansys Innovation Space
Trending discussions
- Errors Running Ring Modulator Example on Cluster
- INTERCONNECT – No results unless rerun simulation until it gives any
- Difference between answers in version 2024 and 2017 lumerical mode solution
- Import material .txt file with script
- Calculation of correlation values in laser modulation bandwidth simulation
- Trapezoidal ring
- Help for qINTERCONNECT
- Issues with getting result from interconnent analysis script
- Topology Optimization Error
- Edge Coupler EME Example Issue
Top Contributors
-
1141
-
471
-
468
-
225
-
201
Top Rated Tags
© 2024 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.