Skip to content

Python codes for generating datasets with topology optimization results for a cantilever beam

License

Notifications You must be signed in to change notification settings

Joquempo/Cantilever-Dataset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cantilever-Dataset

Python codes for generating datasets with topology optimization results for a cantilever beam.

Further details are presented in the documentation.pdf file.

General Description

This work is part of the PhD thesis entitled Análise de Sensibilidade de Variação Finita assistida por Redes Neurais Artificiais para Concepção de Metamateriais (Finite Variation Sensitivity Analysis assisted by Artificial Neural Networks for Designing Metamaterials). The author Daniel Candeloro Cunha and his supervisor Professor Renato Pavanello are researchers at the Laboratory of Topology Optimization and Multiphysics Analysis, at the University of Campinas (Brazil).

The objective of the provided programs is to generate datasets that will be used to train artificial neural networks. The purpose of such networks is to improve the performance of standard topology optimization programs, by reducing computational costs, making the procedures more stable, or more accurate.

The topology optimization of a cantilever beam is considered. Four free parameters are used to define the boundary conditions of the problem. For the specified mesh, there are 296208 unique sets of parameters, to generate the complete datasets, all the 148240 non-redundant cases must be optimized. The complementary cases can be obtained through simple operations described in this document (but not implemented in this version).

Each case is optimized twice, using different optimization methods: SILP-BESO and SIMP-MMA. Therefore, 296480 = 2 × 148240 optimizations are performed to generate the two datasets (one for each optimization method). For each iteration of each case, all results are stored: topology vectors; sensitivity vectors; displacements vectors; objective function values; volume fraction values; gray level values. Also, metadata is stored with relevant information, for example, the corresponding input parameters of each result. Together, both datasets occupy around 980 GB of disk.

To collaborate or report bugs, please look for the author's email address at: https://www.fem.unicamp.br/~ltm/

If you use the provided programs (or the data generated by it) in your work, the developer would be grateful if you would cite the indicated references, listed in the CITEAS file.

Dataset Generation

The codes provided in the source folder can be used to generate both BESO and SIMP datasets. All programs were developed in Python and Cython. Anaconda was used to manage packages through conda. Everything was developed in Linux (Ubuntu 20.04 LTS).

The steps to generate the datasets are:

  • install Anaconda
  • run ./source/cantilever.sh to setup the conda environment and build the cython codes
  • activate the cantilever environment
  • run ./source/python/input_str.py to generate the input data
  • edit ./source/python/BESO/structural_beso.py to select the cases that should be executed
  • run ./source/python/BESO/structural_beso.py to generate data corresponding to the selected cases
  • repeat until all 148240 SILP-BESO optimizations are concluded
  • edit ./source/python/SIMP/structural_simp.py to select the cases that should be executed
  • run ./source/python/SIMP/structural_simp.py to generate data corresponding to the selected cases
  • repeat until all 148240 SIMP-MMA optimizations are concluded
  • run ./source/python/generate_str.py to conclude the dataset generation

Sampling

The codes provided in the sample folder can be used to produce figures of selected samples from the generated datasets.

Validation

The codes provided in the validation folder can be used to verify the current implementation of the programs, performing simple validation procedures.

Acknowledgements

This work was supported by the São Paulo Research Foundation (FAPESP), grant numbers: 2013/08293-7 and 2019/19237-7.

About

Python codes for generating datasets with topology optimization results for a cantilever beam

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published