##### Overview

This repository contains the training dataset created within the research project "Structural Optimization for Fail-Safe Designs by Machine Learning".

The objective of the project is to investigate machine learning approaches for fail-safe topology optimization. In particular, a conditional generative adversarial network (cGAN) was trained to map topology-optimized non-fail-safe structures obtained from standard compliance minimization to corresponding fail-safe designs.

The repository contains the following files:

| File                         | Description                                                                                                                                |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| 'data.h5'                    | HDF5 dataset containing topology-optimized designs, problem definitions, and mechanical performance metrics                                |
| 'design_reshape.m'           | MATLAB (R2024b) example script demonstrating how to extract and reshape density vectors into matrix form for machine learning applications |
| 'structural_compliance.m'    | MATLAB (R2024b) example script demonstrating how to reconstruct the finite element equilibrium system and evaluate structural compliance   |

Researchers are encouraged to use, extend, and augment the dataset to further investigate the capabilities and limitations of machine learning-based fail-safe topology optimization.

Version: v1.0
Release date: 2026-05-11
DOI: https://doi.org/10.15480/882.17073

##### Creator 
Benedikt Hamann (ORCID: https://orcid.org/0009-0005-4887-115X)
Hamburg University of Technology 
Institute for Structural mechanics in lightweight design
[mailto:benedikt.hamann@tuhh.de]

##### Contributing Researchers
Benedikt Kriegesmann (ORCID: https://orcid.org/0000-0001-5330-9886)
Hamburg University of Technology 
Institute for Structural mechanics in lightweight design

##### Citation

If you use this dataset in academic work, please cite:
@dataset{hamann2026failsafe,
  author    = {Hamann, Benedikt},
  title     = {Dataset for Fail-Safe Topology Optimization using Artificial Neural Networks},
  year      = {2026},
  publisher = {TUHH Open Research (TORE)},
  doi       = {10.15480/882.17073},
  url       = {https://doi.org/10.15480/882.17073},
  version   = {v1.0}
}

##### Content of data.h5

The "data.h5" file contains the topology-optimized designs used to train the cGAN framework. During training, the non-fail-safe designs x were used as input to the neural network, while the fail-safe designs y served as the ground truth. To generate these topology-optimized designs, the problem formulations were created randomly. The topology optimization was performed on the high-performance computing cluster of the Hamburg University of Technology using an in-house developed MATLAB (R2023b) code. In addition, supplementary information describing the problem formulation of each topology optimization is provided.

Each sample is stored in an individual group indexed by an integer 'idx' ranging from 0 to 12416:

/0
/1
/2
...
/12416

For each sample, the following information is stored:

| Path                          | Description                                                          | unit   | Type      | Shape         |
| ----------------------------- | -------------------------------------------------------------------- | ------ | --------- | ------------- |
| '/idx/bc'                     | Name of the boundary condition (e.g. 'cantilever')                   | /      | string    | scalar        |
| '/idx/nx'                     | Number of elements in x-direction                                    | /      | int32     | scalar        |
| '/idx/ny'                     | Number of elements in y-direction                                    | /      | int32     | scalar        |
| '/idx/nElem'                  | Total number of elements                                             | /      | int32     | scalar        |
| '/idx/nNodes'                 | Total number of nodes                                                | /      | int32     | scalar        |
| '/idx/scale'                  | Scaling parameters defining the L-beam design domain                 | /      | float64   | (2,1)         |
| '/idx/design/x'               | Non-fail-safe design 'x' (density vector)                            | /      | float64   | (nElem,1)     |
| '/idx/design/y'               | Fail-safe design 'y' (density vector)                                | /      | float64   | (nElem,1)     |
| '/idx/supports'               | Support boundary condition (number of support conditions: nSupports) | /      | int32     | (nSupports,3) | 
| '/idx/loads'                  | External load cases (number of load cases: nLoads)                   | /      | int32     | (nLoads,3)    |
| '/idx/volfrac'                | Volume fraction constraint                                           | /      | float64   | scalar        |
| '/idx/filter_rad'             | Density filter radius                                                | /      | int32     | scalar        |
| '/idx/proj_hist/x'            | Projection parameter history ('β') for design 'x'                    | /      | int32     | (iter/x,1)    |
| '/idx/proj_hist/y'            | Projection parameter history ('β') for design 'y'                    | /      | int32     | (iter/y,1)    |
| '/idx/iter/x'                 | Number of optimization iterations required to generate 'x'           | /      | int32     | scalar        |
| '/idx/iter/y'                 | Number of optimization iterations required to generate 'y'           | /      | int32     | scalar        |
| '/idx/time/x'                 | Computation time required to generate 'x'                            | sec    | float64   | scalar        |
| '/idx/time/y'                 | Computation time required to generate 'y'                            | sec    | float64   | scalar        |
| '/idx/dmg_patch_size'         | Size of the square damage patch used to generate 'y'                 | /      | int32     | scalar        |
| '/idx/dmg_patch_stride'       | Stride of the square damage patch used to generate 'y'               | /      | int32     | scalar        |
| '/idx/c_und_x'                | Undamaged compliance of 'x'                                          | /      | float64   | scalar        |
| '/idx/c_und_y'                | Undamaged compliance of 'y'                                          | /      | float64   | scalar        |
| '/idx/c_dmg_wc_patch/x'       | Worst-case damaged compliance of 'x' using the patch-based criterion | /      | float64   | scalar        |
| '/idx/c_dmg_wc_patch/y'       | Worst-case damaged compliance of 'y' using the patch-based criterion | /      | float64   | scalar        |
| '/idx/c_dmg_wc_path/x'        | Worst-case damaged compliance of 'x' using the path-based criterion  | /      | float64   | scalar        |
| '/idx/c_dmg_wc_path/y'        | Worst-case damaged compliance of 'y' using the path-based criterion  | /      | float64   | scalar        |

##### License

This dataset is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).
https://creativecommons.org/licenses/by-nc/4.0/

##### Funding

This research project was funded by the: Deutsche Forschungsgemeinschaft (DFG) (KR4914/14-1)