Crates.io | topopt |
lib.rs | topopt |
version | 0.1.5 |
source | src |
created_at | 2022-04-27 15:23:53.672771 |
updated_at | 2023-12-10 18:53:58.640149 |
description | Topology optimization in pure Rust, based on 99 lines of MATLAB |
homepage | https://github.com/cmccomb/topopt-rs |
repository | https://github.com/cmccomb/topopt-rs |
max_upload_size | |
id | 576089 |
size | 87,083 |
This package performs 2-dimensional topology optimization and is a port of "A 99 line topology optimization code written in Matlab".
Running the solve function with default settings will find a solution to the Messerschmitt–Bölkow–Blohm simply supported beam (enforcing symmetry).
topopt::solve(topopt::Settings::default());
The progress of the algorithm and a visualization of the optimized structure will be displayed in the command line
Alternatively, we could set up with the same simulation explicitly:
topopt::solve(
topopt::Settings::new(60, 20, 0.5)
.with_left_bc(true, false)
.with_bottom_right_bc(false, true)
.with_top_left_load(0.0, -1.0),
);