Coder Social home page Coder Social logo

ruler's Introduction

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.

  1. Normalize and binarize the design pattern. Make sure the design pattern is a 2d or 3d array composed of 0 and 1.
  2. 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.
  3. 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.
  4. 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.

image

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

ruler's People

Contributors

mawc2019 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.