This is a small Python program for computing the minimum length scale of a design pattern given by topology optimization. The latest version is at https://github.com/NanoComp/photonics-opt-testbed.
The theoretical basis of this method lies in morphological transformations. The method is outlined as follows.
- Normalize and binarize the design pattern. Make sure the design pattern is a 2d or 3d array composed of 0 and 1.
- Select a filter radius and compute the difference between the operations of open and close operators. This difference should be a 2d or 3d array with the same shape as the design pattern.
- Count the number of interior nonzero pixels in the image of difference. The interior nonzero pixels are those surrounded by other nonzeros pixels, as shown in the figure below.
- Repeat Steps 2 and 3 for a series of filter radii, and seek the smallest filter radius at which an interior nonzero pixel emegrges. The minimum length scale is considered as twice this filter radius.
References
[1] L. Hägg and E.Wadbro, On minimum length scale control in density based topology optimization, Struct. Multidisc Optim. 58(3), 1015–1032 (2018).
[2] Rafael C. Gonzalez and Richard E. Woods, Digital Image Processing (Fourth Edition), Chapter 9 (Pearson, 2017).
[3] Alec Hammond et al., Adjoint solver in Meep: https://github.com/smartalecH/meep/blob/jax_rebase/python/adjoint/filters.py