Giter VIP home page Giter VIP logo

simpletopopt.jl's Introduction

SimpleTopOpt

Stable Dev Build Status Coverage Code Style: Blue

A small package implementing basic techniques for classic elastic compliance, thermal compliance, and fluidic topology optimization problems, following Efficient topology Optimization in MATLAB using 88 lines of code, the toph code listing from Topology Optimization, and A detailed introduction to density-based topology optimization of fluid flow problems with implementation in MATLAB.

Features and Usage

SimpleTopOpt.jl implements three topology optimization algorithms following popular educational papers for solutions to problems in structural compliance, thermal compliance, and fluid flows. The package is primarily accessed through the optimize function and problem containers Top88Problem, TophProblem, DoublePipeProblem, and PipeBendProblem, the latter two of which are both fluid flow problems.

Top88

This solves the classical MBB beam problem, where specifically we seek to minimize the compliance of a structure within a rectangular domain, on which a load is placed on the top left corner; the left side and bottom right corner are fixed.

We expect a structure composed of triangles eventually connecting the two fixed components.

domain_1 = Top88Domain(60, 40)

SIMP = ModifiedSIMPParameters(penal=3.0)
optimizer = OptimalityCritera()
filter = SensitivityFilter()

problem = Top88Problem(domain, SIMP, optimizer, filter)

sol = SimpleTopOpt.Top88.optimize(problem)

heatmap(sol.design)

TopH

This solves a classical thermal compliance problem, where specifically we seek to minimize the thermal compliance achievable in a unit square domain wherein the top middle third is removed, allowing heat to escape, while the domain is constantly and evenly heated.

We expect a symmetric structure branching out like tree roots as to maximize the surface area.

using SimpleTopOpt
using Plots

domain = TophDomain(40, 40)

SIMP = ModifiedSIMPParameters(penal=3.0)
optimizer = OptimalityCriteria()
sensitivity_filter = SensitivityFilter()

problem = TophProblem(domain, SIMP, optimizer, sensitivity_filter)

sol = SimpleTopOpt.TopH.optimize(problem)

heatmap(sol.design)

Topflow

Warning: Topflow currently requires MATLAB.jl, which itself requires a working MATLAB installation before 2022a. See the MATLAB.jl page for more detail.

This implements two fluidic topology optimization problems.

In the first problem, the double pipe problem, we seek to minimize the dissipated energy (with the Brinkman penalty term) over a rectangular domain with two pairs of cut-outs immediately facing each other. So, we expect to see two pipes, each connecting a pair.

In the second problem, the pipe bend problem, we seek to minimize the dissipated energy in a rectangular domain with a cutout on the left and bottom sides. So, we expect to see a sort of pipe form connecting immediately these cutouts.

using SimpleTopOpt
using Plots    

Lx = 1.0; Ly = 1.0; nely = 30
volfrac = 1/3 ; Uin = 1e0; rho = 1e0
mu = 1e0; conit = 50

domain = TopflowDomain(Lx, Ly, nely)
fea = SimpleTopOpt.TopflowFEA(domain)
optimizer = OptimalityCriteria()
pbbc = SimpleTopOpt.PipeBendBC(domain, fea, Uin)
pbp = PipeBendProblem(domain, volfrac, optimizer)

sol = SimpleTopOpt.TopFlow.optimize(pbp)

heatmap(sol.design)

Acknowledgements

Thanks to Mohamed Tarek and Yuqing Zhou for their advice over summer 2023 as the initial development was underway.

simpletopopt.jl's People

Contributors

github-actions[bot] avatar mjachi avatar mohamed82008 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

simpletopopt.jl's Issues

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.