DOI: 10.5281/zenodo.7034899
title: SELTO Dataset

description: A Benchmark Dataset for Deep Learning-based Methods for 3D Topology Optimization. One can find a description of the provided dataset partitions in Section 3 of Dittmer, S., Erzmann, D., Harms, H., Maass, P., SELTO: Sample-Efficient Learned Topology Optimization (2022) https://arxiv.org/abs/2209.05098. <br> Every dataset container consists of multiple enumerated pairs of CSV files. Each pair describes a unique topology optimization problem and a corresponding binarized SIMP solution. Every file of the form {i}.csv contains all voxel-wise information about the sample i. Every file of the form {i}_info.csv file contains scalar parameters of the topology optimization problem, such as material parameters. <br> This dataset represents topology optimization problems and solutions on the bases of voxels. We define all spatially varying quantities via the voxels' centers -- rather than via the vertices or surfaces of the voxels.<br> In {i}.csv files, each row corresponds to one voxel in the design space. The columns correspond to ['x', 'y', 'z', 'design_space', 'dirichlet_x', 'dirichlet_y', 'dirichlet_z', 'force_x', 'force_y', 'force_z', 'density']. x, y, z - These are three integer indices stating the index/location of the voxel within the voxel mesh. design_space - This is one ternary variable indicating the type of material density constraint on the voxel within the TO problem formulation. "0" and "1" indicate a material density fixed at 0 or 1, respectively. "-1" indicates the absence of constraints. dirichlet_x, dirichlet_y, dirichlet_z - These are three binary variables defining whether the voxel contains homogenous Dirichlet constraints in the respective axis direction. force_x, force_y, force_z - These are three floating point variables giving the three spacial components of the forces applied to each voxel. All forces are body forces given in [N/m^3]. density - This is a binary variable stating whether the voxel carries material in the solution of the topology optimization problem. Any of these files with the index i can be imported using pandas by executing: <pre><code class="language-python">import pandas as pd directory = ... file_path = f'{directory}/{i}.csv' column_names = ['x', 'y', 'z', 'design_space','dirichlet_x', 'dirichlet_y', 'dirichlet_z', 'force_x', 'force_y', 'force_z', 'density'] data = pd.read_csv(file_path, names=column_names)</code></pre> From this pandas dataframe one can extract the torch tensors of forces F, Dirichlet conditions ω<sub>Dirichlet</sub>, and design space information ω<sub>design</sub> using the following functions: <pre><code class="language-python">import torch def get_shape_and_voxels(data): shape = data[['x', 'y', 'z']].iloc[-1].values.astype(int) + 1 vox_x = data['x'].values vox_y = data['y'].values vox_z = data['z'].values voxels = [vox_x, vox_y, vox_z] return shape, voxels def get_forces_boundary_conditions_and_design_space(data, shape, voxels): F = torch.zeros(3, *shape, dtype=torch.float32) F[0, voxels[0], voxels[1], voxels[2]] = torch.tensor(data['force_x'].values, dtype=torch.float32) F[1, voxels[0], voxels[1], voxels[2]] = torch.tensor(data['force_y'].values, dtype=torch.float32) F[2, voxels[0], voxels[1], voxels[2]] = torch.tensor(data['force_z'].values, dtype=torch.float32) ω_Dirichlet = torch.zeros(3, *shape, dtype=torch.float32) ω_Dirichlet[0, voxels[0], voxels[1], voxels[2]] = torch.tensor(data['dirichlet_x'].values, dtype=torch.float32) ω_Dirichlet[1, voxels[0], voxels[1], voxels[2]] = torch.tensor(data['dirichlet_y'].values, dtype=torch.float32) ω_Dirichlet[2, voxels[0], voxels[1], voxels[2]] = torch.tensor(data['dirichlet_z'].values, dtype=torch.float32) ω_design = torch.zeros(1, *shape, dtype=int) ω_design[:, voxels[0], voxels[1], voxels[2]] = torch.from_numpy(data['design_space'].values.astype(int)) return F, ω_Dirichlet, ω_design</code></pre> The corresponding {i}_info.csv files only have one row with column labels ['E', 'ν', 'σ_ys', 'vox_size', 'p_x', 'p_y', 'p_z']. E - Young's modulus [Pa] ν - Poisson's ratio [-] σ_ys - Yield stress [Pa] vox_size - Length of the edge of a (cube-shaped) voxel [m] p_x, p_y, p_z - Location of the root of the design space [m] Analogously to above, one can import any {i}_info.csv file by executing: <pre><code class="language-python">file_path = f'{directory}/{i}_info.csv' data_info_column_names = ['E', 'ν', 'σ_ys', 'vox_size', 'p_x', 'p_y', 'p_z'] data_info = pd.read_csv(file_path, names=data_info_column_names)</code></pre>
description: The authors would like to thank the Federal Ministry for Economic Affairs and Climate Action of Germany (BMWK) and the German Aerospace Center (DLR) Space Agency for supporting this work (grant no. 50 RL 2060)