Beispiel #1
0
 def where_wire(self, r):
     for cellc in self.cellcenters:
         if in_xslab(r, cx=self.resolution / 4, d=self.wirecut):
             return 0
         if  in_xcyl(r, cy=self.size_y/2+self.resolution/4, cz=cellc, rad=self.wirethick) or \
                 in_xcyl(r, cy= -self.size_y/2+self.resolution/4, cz=cellc, rad=self.wirethick):
             return self.return_value  # (do not change this line)
     return 0
 def where_wire(self, r):
     for cellc in self.cellcenters:
         if in_xslab(r, cx=self.resolution/4, d=self.wirecut):
             return 0
         if  in_xcyl(r, cy=self.size_y/2+self.resolution/4, cz=cellc, rad=self.wirethick) or \
                 in_xcyl(r, cy= -self.size_y/2+self.resolution/4, cz=cellc, rad=self.wirethick):
             return self.return_value             # (do not change this line)
     return 0
    def where_wire(self, r):
        if  in_xcyl(r, cy=0, cz=-self.ldist/2, rad=self.rcore1):                        ## first grid
            return self.return_value             # (do not change this line)

        if  in_xcyl(r, cy=self.tshift, cz=self.ldist/2, rad=self.rcore2) or \
                in_xcyl(r, cy=self.tshift-self.size_y, cz=self.ldist/2, rad=self.rcore2):       ## second grid may be transversally shifted
            return self.return_value             # (do not change this line)

        return 0
    def where_wire(self, r):
        if  in_xcyl(r, cy=0, cz=-self.ldist/2, rad=self.rcore1):                        ## first grid
            return self.return_value             # (do not change this line)

        if  in_xcyl(r, cy=self.tshift, cz=self.ldist/2, rad=self.rcore2) or \
                in_xcyl(r, cy=self.tshift-self.size_y, cz=self.ldist/2, rad=self.rcore2):       ## second grid may be transversally shifted
            return self.return_value             # (do not change this line)

        return 0
 def where_TiO2(self, r):
     #if  in_sphere(r, cx=0, cy=0, cz=0, rad=self.radius) and not  in_sphere(r, cx=0, cy=0, cz=0, rad=self.radius*.75):
     for cellc in self.cellcenters:
         if self.orientation=="E":
             if  in_xcyl(r, cy=self.resolution/4, cz=cellc, rad=self.radius):
                 return self.return_value             # (do not change this line)
         elif self.orientation=="H":
             if  in_ycyl(r, cx=self.resolution/4, cz=cellc, rad=self.radius):
                 return self.return_value             # (do not change this line)
     return 0
 def where_TiO2(self, r):
     #if  in_sphere(r, cx=0, cy=0, cz=0, rad=self.radius) and not  in_sphere(r, cx=0, cy=0, cz=0, rad=self.radius*.75):
     for cellc in self.cellcenters:
         if self.orientation=="E":
             if  in_xcyl(r, cy=self.resolution/4, cz=cellc, rad=self.radius):
                 return self.return_value             # (do not change this line)
         elif self.orientation=="H":
             if  in_ycyl(r, cx=self.resolution/4, cz=cellc, rad=self.radius):
                 return self.return_value             # (do not change this line)
     return 0
    def where_wire(self, r):
        dd=self.resolution/4
        for cellc in self.cellcenters:
            ## define the wires
            if  in_xcyl(r, cy=self.size_y/2, cz=cellc, rad=self.wirethick) or \
                    in_xcyl(r, cy= -self.size_y/2, cz=cellc, rad=self.wirethick):
                        return self.return_value             # (do not change this line)

            if (    # define the first splitting of SRR
                    not (r.z()>cellc+self.radius/2 and in_xslab(r, cx=dd, d=self.splitting))  
                    # define the 2nd splitting for symmetric SRR
                    and not (r.z()<cellc-self.radius/2 and in_xslab(r, cx=dd, d=self.splitting2))):
                # make the ring (without the central bar)
                if (in_ycyl(r, cx=dd, cz=cellc, rad=self.radius+self.srrthick/2)          # outer radius
                        and in_yslab(r, cy=dd, d=self.srrthick)                             # delimit to a disc
                        and not in_ycyl(r, cx=dd, cz=cellc, rad=self.radius-self.srrthick/2)):    # subtract inner radius 
                    return self.return_value             # (do not change this line)
                # optional capacitor pads
                if (self.splitting > 0
                        and in_xcyl(r, cy=dd, cz=cellc+self.radius, rad=self.capacitorr) 
                        and in_xslab(r, cx=dd, d=self.splitting+2*self.srrthick)):          
                    return self.return_value             # (do not change this line)
                # optional capacitor pads on second splitting
                if (self.splitting2 > 0 
                        and in_xcyl(r, cy=dd, cz=cellc-self.radius, rad=self.capacitorr) 
                        and in_xslab(r, cx=dd, d=self.splitting2+2*self.srrthick)):          
                    return self.return_value             # (do not change this line)

            if (self.cbarthick > 0 
                    # def splitting in the central bar for ESRR (the bar is completely disabled if insplitting high enough)
                    and not (in_zslab(r,cz=cellc,d=self.radius) and in_xslab(r, cx=dd, d=self.insplitting))):
                if (in_ycyl(r, cx=dd, cz=cellc, rad=self.radius+self.srrthick/2)         # outer radius
                        and in_yslab(r, cy=dd, d=self.srrthick)                          # delimit to a disc
                        and in_zslab(r,cz=cellc,d=self.cbarthick)):                       # but allow the central bar
                    return self.return_value             # (do not change this line)

                if ((self.insplitting > 0)
                        and in_xcyl(r, cy=dd, cz=cellc, rad=self.incapacitorr) 
                        and in_xslab(r, cx=dd, d=self.insplitting+2*self.srrthick)):          # optional capacitor pads
                    return self.return_value             # (do not change this line)

        return 0
    def where_wire(self, r):
        dd=self.resolution/4
        for cellc in self.cellcenters:
            ## define the wires
            if  in_xcyl(r, cy=self.size_y/2, cz=cellc, rad=self.wirethick) or \
                    in_xcyl(r, cy= -self.size_y/2, cz=cellc, rad=self.wirethick):
                        return self.return_value             # (do not change this line)

            if (    # define the first splitting of SRR
                    not (r.z()>cellc+self.radius/2 and in_xslab(r, cx=dd, d=self.splitting))  
                    # define the 2nd splitting for symmetric SRR
                    and not (r.z()<cellc-self.radius/2 and in_xslab(r, cx=dd, d=self.splitting2))):
                # make the ring (without the central bar)
                if (in_ycyl(r, cx=dd, cz=cellc, rad=self.radius+self.srrthick/2)          # outer radius
                        and in_yslab(r, cy=dd, d=self.srrthick)                             # delimit to a disc
                        and not in_ycyl(r, cx=dd, cz=cellc, rad=self.radius-self.srrthick/2)):    # subtract inner radius 
                    return self.return_value             # (do not change this line)
                # optional capacitor pads
                if (self.splitting > 0
                        and in_xcyl(r, cy=dd, cz=cellc+self.radius, rad=self.capacitorr) 
                        and in_xslab(r, cx=dd, d=self.splitting+2*self.srrthick)):          
                    return self.return_value             # (do not change this line)
                # optional capacitor pads on second splitting
                if (self.splitting2 > 0 
                        and in_xcyl(r, cy=dd, cz=cellc-self.radius, rad=self.capacitorr) 
                        and in_xslab(r, cx=dd, d=self.splitting2+2*self.srrthick)):          
                    return self.return_value             # (do not change this line)

            if (self.cbarthick > 0 
                    # def splitting in the central bar for ESRR (the bar is completely disabled if insplitting high enough)
                    and not (in_zslab(r,cz=cellc,d=self.radius) and in_xslab(r, cx=dd, d=self.insplitting))):
                if (in_ycyl(r, cx=dd, cz=cellc, rad=self.radius+self.srrthick/2)         # outer radius
                        and in_yslab(r, cy=dd, d=self.srrthick)                          # delimit to a disc
                        and in_zslab(r,cz=cellc,d=self.cbarthick)):                       # but allow the central bar
                    return self.return_value             # (do not change this line)

                if ((self.insplitting > 0)
                        and in_xcyl(r, cy=dd, cz=cellc, rad=self.incapacitorr) 
                        and in_xslab(r, cx=dd, d=self.insplitting+2*self.srrthick)):          # optional capacitor pads
                    return self.return_value             # (do not change this line)

        return 0
Beispiel #9
0
 def where_wire(self, r):
     for cellz in self.cell_centers():
         if (in_xcyl(r, cy=self.resolution/4, cz=cellz, rad=self.radius)): 
             return self.return_value
         #if (in_zslab(r, cz=cellz, d=self.radius)): # and in_yslab(r, cy=.7e-6, d=60e-6-self.radius)):  # XXX
             #return self.return_value
         #if abs(cellz)>self.yspacing*1.5:
             #if (in_zslab(r, cz=cellz, d=self.radius)): # and in_yslab(r, cy=.7e-6, d=60e-6-self.radius)):  # XXX
                 #return self.return_value
         #else:
             #if (in_zslab(r, cz=cellz, d=self.radius*2)): # and in_yslab(r, cy=.7e-6, d=60e-6-self.radius)):  # XXX
                 #return self.return_value
     return 0
    def where_metal(self, r):
        return 0  ## nometal XXX

        for cellz in self.cell_centers():
            if in_xcyl(r, cy=0e-6, cz=self.wzofs + cellz,
                       rad=self.wlth) or in_ycyl(
                           r, cx=0e-6, cz=self.wzofs + cellz, rad=self.wlth):
                return self.return_value
        return 0  ## nometal
        for cellz in self.cell_centers():

            #if (in_xslab(r, cx=0e-6, d=self.wtth) or in_yslab(r, cy=0e-6, d=self.wtth)) and \
            if (in_yslab(r, cy=0e-6, d=self.wtth)) and \
                    in_zslab(r, cz=self.wzofs+cellz, d=self.wlth):
                return self.return_value
        return 0
 def where_TiO2(self, r):
     #if  in_sphere(r, cx=0, cy=0, cz=0, rad=self.radius) and not  in_sphere(r, cx=0, cy=0, cz=0, rad=self.radius*.75):
     if  in_xcyl(r, cy=0, cz=0, rad=self.radius):
         return self.return_value             # (do not change this line)
     return 0
Beispiel #12
0
 def where_filling(self, r):
     for cellz in self.cell_centers():
         if (in_xcyl(r, cy=self.resolution/4, cz=cellz+self.resolution/4, rad=self.radius) and 
             not in_xslab(r, cx=self.resolution/4, d=self.xlen)) : 
             return self.return_value
     return 0
Beispiel #13
0
 def where_TiO2(self, r):
     #if  in_sphere(r, cx=0, cy=0, cz=0, rad=self.radius) and not  in_sphere(r, cx=0, cy=0, cz=0, rad=self.radius*.75):
     if in_xcyl(r, cy=0, cz=0, rad=self.radius):
         return self.return_value  # (do not change this line)
     return 0