SimulationPattern
The SimulationPattern class can be initiated in Lua script by
s = SimulationPattern.new()
All of the function provided in base class can be used.
Note
The following functions are added and specific to SimulationPattern
object.
SetLattice(xLen, yLen, angle)
-
Arguments:
- xLen: [double], the length of the periodicity in direction in SI unit.
- yLen: [double], the length of the periodicity in the other direction in SI unit.
- angle: the angle between the two lattice axises, in degree.
-
Output: None
-
Note: MESH handles the case when one of the real space lattice is aligned with axis (with length
xLen
), and the other axis should be in the upper plane. The angle between the two axises are specified byangle
. See the following figure:
GetReciprocalLattice()
-
Arguments: None
-
Outputs: {{, }, {, }}. Two tables of the reciprocal lattices in SI unit.
SetLayerPatternRectangle(layer name, material name, {centerx, centery}, angle, {widthx, widthy})
-
Arguments:
- layer name: [string], the layer that this rectangle pattern will be embedded. Such layer should already exist in the simulation, otherwise an error message will be printed out.
- material name: [string], the material used as the rectangle pattern. Such material should already exist in the simulation, otherwise an error message will be printed out.
- angle: the rotated angle with respect to the positive direction in a counterclockwise manner, in degree.
- {centerx, centery}: [double table], the centers of the rectangle pattern in and direction, respectively, in SI unit.
- {widthx, widthy}: [double table], the widths of the rectangle pattern in and direction, respectively, in SI unit.
-
Output: None
SetLayerPatternCircle(layer name, material name, {centerx, centery}, radius)
-
Arguments:
- layer name: [string], the layer that this circle pattern will be embedded. Such layer should already exist in the simulation, otherwise an error message will be printed out.
- material name: [string], the material used as the circle pattern. Such material should already exist in the simulation, otherwise an error message will be printed out.
- {centerx, centery}: [double table], the centers of the circle pattern in and direction, respectively, in SI unit.
- radius: [double], the radius of the circle pattern in SI unit.
-
Output: None
SetLayerPatternEllipse(layer name, material name, {centerx, centery}, angle, {a, b})
-
Arguments:
- layer name: [string], the layer that this ellipse pattern will be embedded. Such layer should already exist in the simulation, otherwise an error message will be printed out.
- material name: [string], the material used as the ellipse pattern. Such material should already exist in the simulation, otherwise an error message will be printed out.
- angle: the rotated angle with respect to the positive direction in a counterclockwise manner, in degree.
- {centerx, centery}: [double table], the centers of the ellipse pattern in and direction, respectively, in SI unit.
- {a, b}: [double], the half widths the ellipse pattern in SI unit.
-
Output: None
-
Note: the ellipse with angle is written as:
SetLayerPatternPolygon(layer name, material name, {centerx, centery}, angle, { {v1_x, v2_x}, ..., {vn_x, vn_y} })
-
Arguments:
- layer name: [string], the layer that this polygon pattern will be embedded. Such layer should already exist in the simulation, otherwise an error message will be printed out.
- material name: [string], the material used as the polygon pattern. Such material should already exist in the simulation, otherwise an error message will be printed out.
- {centerx, centery}: [double table], the centers of the polygon pattern in and direction, respectively, in SI unit.
- angle: the rotated angle with respect to the positive direction in a counterclockwise manner, in degree.
- { {v1_x, v2_x}, ..., {vn_x, vn_y} }: [nested double table], coordinates of the vertices relative to the center in SI unit.
-
Output: None