JuliaTopOpt/TopOpt.jl
A package for binary and continuous, single and multi-material, truss and continuum, 2D and 3D topology optimization on unstructured meshes using automatic differentiation in Julia.
Featured achievements
The project's latest awards
#1 Repository of the month
#1 Repository of the month
#1 Repository of the month
TopOpt.jl
TopOpt is a topology optimization package written in Julia. To learn more and see some examples, visit the documentation. Numerous examples can also be found in the test/examples and test/wcsmo14 directories.
Installation
To install TopOpt.jl, run:
using Pkg
pkg"add TopOpt"
To additionally load the visualization submodule of TopOpt, you will need to install GLMakie.jl using:
pkg"add Makie, GLMakie"
To load the package, use:
using TopOpt
and to optionally load the visualization sub-module as part of TopOpt, use:
using TopOpt, Makie, GLMakie

Features available
All the following features are available in TopOpt.jl but the documentation is currently lacking! Feel free to open an issue to ask about how to use specific features.
Optimizaton domains
- 2D and 3D truss domains
- 2D and 3D continuum domains
- Unstructured ground mesh
- Linear and quadratic triangle, quadrilateral, tetrahedron and hexahedron elements in ground mesh
- Fixed and non-design domain support
- Concentrated and distributed loads
- Multi-material design parameterisation
High level algorithms and penalty types
The following high level topology optimization algorithms and penalty types are available.
- Solid isotropic material with penalization (SIMP)
- Rational approximation of material properties (RAMP)
- Continuation SIMP/RAMP
- Bi-directional evolutionary structural optimization (BESO) with soft-kill
- Topology optimization of binary structures (TOBS)
Differentiable functions
There are numerous functions in TopOpt.jl that are defined in a differentiable way and you can use them in the objectives or constraints in topology optimization formulations. In TopOpt.jl, you can build arbitrarily complex objective and constraint functions using these differentiable functions as building blocks or lego pieces chaining them in any arbitrary way. The gradient and jacobian of the aggregate Julia function defined is then obtained using automatic differentiation. For a detailed account of the functions available, see the relevant section in the documentation.
Linear system solvers
- Direct sparse Cholesky decomposition based linear system solver
- Preconditioned conjugate gradient method with matrix assembly
- Matrix-free preconditioned conjugate gradient method
Optimization algorithms
We use Nonconvex.jl for the optimization problem definition and solving. The following algorithms are all available using Nonconvex.jl.
- Method of moving asymptotes
- All the algorithms in NLopt
- Ipopt
- First order augmented Lagrangian algorithm
- Nonlinear semidefinite programming for buckling constrained optimization
- Basic surrogate assisted optimization and Bayesian optimization
- Integer nonlinear programming (design variables guaranteed to be integer)
- Sequential integer linear programming in the topology optimization for binary structures (TOBS) algorithm
Handling uncertainty
- Handling load uncertainty in compliance-based topology optimization
- Reliability-based topology optimization
Visualization and post-processing
- End-to-end topology optimization from INP file to VTK file
- Interactive visualization of designs and deformation using Makie.jl
- Interactive visualization of designs using Dash apps and DashVtk
Citation
To cite this package, you can cite the following 2 conference publications.
- TopOpt.jl: An efficient and high-performance package for topology optimization of continuum structures in the Julia programming language
@inproceedings{tarek2019topoptjl,
title={TopOpt.jl: An efficient and high-performance package for topology optimization of continuum structures in the Julia programming language},
author={Tarek, Mohamed},
booktitle={Proceedings of the 13th World Congress of Structural and Multidisciplinary Optimization},
year={2019}
}
@inproceedings{huang2021topoptjl,
title={TopOpt.jl: Truss and Continuum Topology Optimization, Interactive Visualization, Automatic Differentiation and More},
author={Huang, Yijiang and Tarek, Mohamed},
booktitle={Proceedings of the 14th World Congress of Structural and Multidisciplinary Optimization},
year={2021}
}
Contribute
We always welcome new contributors! Feel free to open an issue or reach out to us via email if you want to collaborate. There are plenty of things to do including beginner friendly tasks and research-oriented tasks. You can help us create the best topology optimization ecosystem in the world! Some beginner-friendly ideas you could be working on include:
- Level set design parameterization
- Lattice design parameterization
- Local volume constraints
- Supporting rectilinear grids
- Wrapping OpenLSTO_jll which is the precompiled binary for M2DOLab/OpenLSTO
- Wrapping TopOpt_in_PETSc_jll which is the precompiled binary for topopt/TopOpt_in_PETSc
- Robust optimization
- Stochastic optimization
Questions?
If you have any questions, join us on on the #topopt channel in the Julia slack, open an issue or shoot us an email.
Similar Projects
Discover other similar projects and AI models.
Physical-Engineering’s Last Exam (Dev Set) Physical-Engineering’s Last Exam (PLE) is a benchmark of long-horizon engineering tasks built by licensed practicing engineers across 4 disciplines. In each task, an agent works inside a realistic project workspace containing drawings, specifications, spreadsheets, solver scripts, and CAD/BIM or simulation tools to produce engineering deliverables: code, calculations, models, schedules, and technical reports. This repository contains… See the full description on the dataset page: https://huggingface.co/datasets/physical-engineerings-last-exam/physical-engineerings-last-exam.
Physical-Engineering’s Last Exam (Dev Set) Physical-Engineering’s Last Exam (PLE) is a benchmark of long-horizon engineering tasks built by licensed practicing engineers across 4 disciplines. In each task, an agent works inside a realistic project workspace containing drawings, specifications, spreadsheets, solver scripts, and CAD/BIM or simulation tools to produce engineering deliverables: code, calculations, models, schedules, and technical reports. This repository contains… See the full description on the dataset page: https://huggingface.co/datasets/google/physical-engineerings-last-exam.
EngineeringPaper.xyz is a web app that makes it easy to create, save, and share engineering calculations.
Educational Vibration programs. Intended for undergraduate and early graduate students.
CAD/CAE Copilot — an AI-native CAD/CAE/CAX workbench for AI agents. Text-to-CAD, text-to-CAE, real build123d/OpenCASCADE geometry, editable parameters, stable topology pointers, deterministic critique, and MCP server tools.
How do you stand out and get hired in today's market as an engineer? A strong portfolio demonstrates your technical skills and problem-solving in ways a traditional resume can not. Here, Lowinertia provides engineers all the tools needed to get started!
DeepJEB++ Foundation Model-Driven Large-Scale 3D Engineering Dataset via 2D Latent Space Augmentation Soyoung Yoo · Leekyo Jeong · Jinsu Ra · Dongeon Lee · Sunwoong Yang · Hyogu Jeong · Namwoo Kang — KAIST SmartDesignLab 📦 Dataset size & viewer note. DeepJEB++ contains 15,360 deployable, simulation-labeled brackets. The Hugging Face Dataset Viewer above shows only a small preview because the FEA field data are distributed as a compressed archive… See the full description on the dataset page: https://huggingface.co/datasets/KAIST-SmartDesignLab/DeepJEB-PP.
ERI — Engineering Reasoning and Instruction 53,429 instruction–response pairs spanning nine engineering disciplines, seven question types and three difficulty levels, for instruction-tuning and evaluating language models on engineering reasoning. from datasets import load_dataset eri = load_dataset("mznaser/ERI-Engineering-Reasoning-and-Instruction") civil = eri.filter(lambda r: r["field"] == "civil_engineering") Schema Every record has six fields: Field… See the full description on the dataset page: https://huggingface.co/datasets/mznaser/ERI-Engineering-Reasoning-and-Instruction.