Photonics

Photonics

Could anyone guide me about simulation of solar cell i have an error subcript

    • Iqrar Hussain
      Subscriber

    • Guilin Sun
      Ansys Employee

      Since there are several variables, it can be challenge to directly give a solution. What I can suggest is, online 35, please use

      ?kern; ?length(J);

      I guess the length of J and V is less than kern, then  kern+1 is out of the matrix range.

       

    • Iqrar Hussain
      Subscriber

       Hello Sir

      Thank you for your kind response I wrote the same as you suggested I mentioned both the script and error also

       

    • Guilin Sun
      Ansys Employee

      Sorry, you did not write those two:

      ?kern; ?length(J);

      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.

    • Iqrar Hussain
      Subscriber

      Sory Sir !

      Now I Wrote the line 

      I think this way that you were asking?

    • Guilin Sun
      Ansys 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

       

      kern

    • Iqrar Hussain
      Subscriber

      Sir Thank you for your guidance

      I appreciate your effort.

Viewing 6 reply threads
  • You must be logged in to reply to this topic.