structure{ region{} } - Repeating regions

The following specifiers can be used to define a periodically repeated pattern. Experimentally, a periodic geometry might have been generated by e.g. etching. This feature is useful for multi-quantum wells, superlattices, Quantum Cascade Lasers, Bragg reflectors, etc. Also, it is possible to make the number of layers a variable ($NUM_QUANTUM_WELLS) in a corresponding template. Please also note to adjust the grid accordingly (grid{ }), e.g. if a nonuniform grid is chosen.

Note

array_x{} was previously called repeat_x{} (and max was called num with max=num-1). repeat_x{} is deprecated and should be replaced with array_x{} .

array_x{}, array_y{}, array_z{}

These copy the region object. The loop runs from -shift*min to shift*max.

Example:

array_x{                                # (optional)
        shift          = 11.0           # repeat region in x direction by shifting it 11.0 nm (in units of [nm])
        max            = 3              # repeat region in x direction by applying the shift 3 (=max) times (Here, 4 regions will be set: The original one, and 3 shifted ones.)
                                        # max = 0 does not set a repeated (=shifted) region; negative values are not allowed.
        min            = 2              # (optional, default is 0) repeat region in negative x direction 2 times, i.e. the region object will be shifted 2 times by -shift.
                                        # min = 0 does not set a repeated (=shifted) region; negative values are not allowed.
                                        # In this example, the region is repeated 2 (=min) times into the negative direction and 3 (=max) times into the positive direction.
}
array_y{                                # (optional, 2D and 3D only)
        ... (same as array_x but for y direction)
}
array_z{                                # (optional, 3D only)
        ... (same as array_x but for z direction)
}

repeat_profiles

repeat_profiles specifies which profiles are shifted. If repeat_profiles is not defined, shift all profiles (default).

Example:

repeat_profiles = "               # enumerate profiles to be shifted. If repeat_profiles is not defined, shift all profiles (default).
                    alloy
                    doping
                    generation      # periodic generation may be caused by having a periodic light absorbing mask
                    injection
                    other
                    "

If you want to shift alloy/doping/generation profiles independent of each other you have to define separate regions (region) for each, for instance a separate region for doping where you add array_x and shift.

(==> region{ doping{...} array_x{ shift = ... } })

For instance, two identical layers containing 16 quantum dots each, can be easily generated by specifying only one quantum dot geometry.

../../../../_images/dotarray_small.jpg
region{
        cone{                       # Here, the quantum dot has the shape of a cone.
        base_x     = [1.0,7.0]      # extension of base plane in x direction, i.e. from 1.0 to 7.0 nm
        base_y     = [1.0,7.0]      # extension of base plane in y direction, i.e. from 1.0 to 7.0 nm
        base_z     = [6.0,6.0]      # base plane at z = 6.0 nm
        top        = [4.0,4.0,10.0] # top coordinate of the cone (x,y,z) = (4.0,4.0,10.0) in units of [nm]
        diminution = 0.25           # cone: diminution = 0.0, cylinder: diminution = 1.0
        }
        Note: Exactly one of the elements base_x, base_y, and base_z has to be set by two equal numbers to define the base plane.

        ternary_linear{
        name    = "Al(x)Ga(1-x)As"  # AlxGa1-xAs
        alloy_x = [0.25, 1.0]       # vary alloy composition from x = 0.25 (Al0.25Ga0.75As) to x = 1.0 (AlAs)
        z       = [10, 6]           # vary alloy content from z = 10 nm to z = 6 nm
        }

        array_x{
        shift = 11.0   max = 3      # repeat region in x direction by shifting it 11.0 nm (4 objects in total: The original region and 3 shifted ones.)
        }
        array_y{
        shift = 11.0   max = 3      # repeat region in y direction by shifting it 11.0 nm (4 objects in total: The original region and 3 shifted ones.)
        }
        array_z{
        shift = 20.0   max = 1      # repeat region in z direction by shifting it 20.0 nm (2 objects in total: The original region and 1 shifted one.)
        }
        repeat_profiles{ "alloy" }
}

array2_x{}, array2_y{}, array2_z{}

These are the second hierarchy of repetitions.

array2_x{...} # (optional)
array2_y{...} # (optional)
array2_z{...} # (optional)

Usage is exactly as array_x, array_y, array_z. If both are defined, all possible combinations of allowed shifts will be used (e.g. can be used to define repeated clusters of objects).
Example:

region{
        binary{ name = "InAs" }
        array_x{  shift=20  num=5 }
        array_y{  shift=20  num=5 }
        array2_x{ shift=150 num=3 }
        array2_y{ shift=150 num=3 }
        repeat_profiles = 'other doping'

        circle{
                center{ x=100 y=100 }
                radius = 30
        }

        doping{
                gaussian2D{
                name = B conc=1e18 x=100 y=100 sigma_x=7 sigma_y=7 add=yes}
                }
        }
}

This produces the following:

../../../../_images/array_x2_example.png

For repeated structures which extend beyond the bounds of the simulation regions, please make sure that min and max are large enough to also include objects which are partially outside of the simulation region.

Warning

Special care has to be taken when using remove{} or add = no for doping{}/fixed charge/generation{} in some repeated regions. Namely, repeated regions are created by sequentially creating multiple instances of a given region at the different positions defined by the array_* and array2_* statements. But the order in which these instances are created depends on undocumented implementation details and thus may change from release to release. For additive dopants/fixed charges/generation, or for repeated regions which do not self-overlap, the final structure and profiles do not depend on this undocumented creation order and thus no problems will occur. However, for repeated regions which self-overlap (e.g. due to small region shifts), using remove{} or add = no results in the final structure and profiles being dependent on that creation order and often being different from the user’s intentions. Therefore, in case of doubt, please visually inspect your structure and profiles to avoid such issues.