December 13, 2022 at 11:19 am
December 13, 2022 at 6:32 pmGuilin SunAnsys Employee
Since there are several variables, it can be challenge to directly give a solution. What I can suggest is, online 35, please use
I guess the length of J and V is less than kern, then kern+1 is out of the matrix range.
December 13, 2022 at 6:50 pm
December 13, 2022 at 7:07 pmGuilin SunAnsys Employee
Sorry, you did not write those two:
it will output the value of "kern" and the length of the J matrix.
If you use kern=length(J) then the next script will be definitely wrong, as you can not get J(kern+1) since its size is "kern".
Please try again.
December 13, 2022 at 7:23 pm
December 13, 2022 at 8:00 pmGuilin SunAnsys Employee
Perhaps you are not familiar to scripting. The question mark is to output the data. You did not provide the data from the bottom of the script file, so no further suggestion is available. Maybe you can check if J has negative values. If not, then
kern=0 so J(kern) will fail.
On the other hand, you should not use kern=length(kern) since kern should be one value, scalar, not a matrix. Please delete line 34. and check the result.
Please note that line 37 is to cacualte the matrix difference. If the matrix fails, or the denominator is zero, line 37 will fail.
Please watch some script videos once this issue is solved. https://optics.ansys.com/hc/en-us/sections/360007813714-SCRIPTING100-List-of-videos
December 13, 2022 at 8:10 pmIqrar HussainSubscriber
Sir Thank you for your guidance
I appreciate your effort.
- You must be logged in to reply to this topic.
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.
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 on Lumerical device
- Using a license file on a new license server
- Error: addfdtd is not a valid function or a variable name
- Ansys Insight: Diverging Simulations
- Ansys Insight: Transmission results greater than one
- Ansys Insight: About override mesh in FDTD: its use and settings
- Ansys Insight: Convergence issues in CHARGE
- Is there a Lumerical script command to output the Simulation and Memory requirements?
© 2023 Copyright ANSYS, Inc. All rights reserved.