Photonics

Photonics

Topics related to Lumerical and more.

Script for Generating of evenly spaced dipole in a circle FTDT

    • MANNAN
      Subscriber

      Dear @gsun and @troberts ,

      I would like to know any script that will generate the dipoles in below mention pattern in the FTDT environment. in the XY plan


    • Greg Baethge
      Ansys Employee
      Hi Array,nThanks for posting your question. I take the liberty to reply on behalf of my colleagues Array I don't think we really have any script example doing exactly this, but I don't think it is very difficult. The basic idea is to run 2 nested loops, one on the angle (theta) and one of the position of the dipole for a defined theta, and calculate the xy coordinates.nFor example, it could be something like:nntheta = 36; # number of angle pointsnnr = 10; # number of point along each radiusnrmax = 5e-6; # max value of the radiusntheta = linspace(0, 360, ntheta);nr = linspace(0, rmax, nr);nfor(i=1:ntheta) {n for(j=1:nr) {n x = r(j)*cos(theta(i)*pi/180);n y = r(j)*sin(theta(i)*pi/180);nn adddipole;n set(x, x);n set(y, y);n }nnNote this script is probably incomplete: for instance, it will add a dipole at (0,0) for each value of theta while you probably only want 1 and there might be duplicate for theta=0 and theta=360. n
Viewing 1 reply thread
  • The topic ‘Script for Generating of evenly spaced dipole in a circle FTDT’ is closed to new replies.