DOI: 10.5281/zenodo.7034898
title: SELTO Dataset

description: <strong>A Benchmark Dataset for Deep Learning for 3D Topology Optimization</strong> This dataset represents voxelized 3D topology optimization problems and solutions. The solutions have been generated in cooperation with the Ariane Group and Synera using the Altair OptiStruct implementation of SIMP within the Synera software. The SELTO dataset consists of four different 3D datasets for topology optimization, called <em>disc simple</em>, <em>disc complex</em>, <em>sphere simple</em> and <em>sphere complex</em>. Each of these datasets is further split into a training and a validation subset. The following paper provides full documentation and examples: Dittmer, S., Erzmann, D., Harms, H., Maass, P., SELTO: Sample-Efficient Learned Topology Optimization (2022) https://arxiv.org/abs/2209.05098. The Python library <strong>DL4TO</strong> (https://github.com/dl4to/dl4to) can be used to download and access all SELTO dataset subsets.<br> Each <code>TAR.GZ</code> file container consists of multiple enumerated pairs of <code>CSV</code> files. Each pair describes a unique topology optimization problem and contains an associated ground truth solution. Each problem-solution pair consists of two files, where one contains voxel-wise information and the other file contains scalar information. For example, the <code>i</code>-th sample is stored in the files <code>i.csv</code> and <code>i_info.csv</code>, where <code>i.csv</code> contains all voxel-wise information and <code>i_info.csv</code> contains all scalar information. We define all spatially varying quantities at the center of the voxels, rather than on the vertices or surfaces. This allows for a shape-consistent tensor representation. For the <code>i</code>-th sample, the columns of <code>i_info.csv</code> correspond to the following scalar information: <code>E</code> - Young's modulus [Pa] <code>ν</code> - Poisson's ratio [-] <code>σ_ys</code> - a yield stress [Pa] <code>h</code> - discretization size of the voxel grid [m] The columns of <code>i.csv</code> correspond to the following voxel-wise information: <code>x</code>, <code>y</code>, <code>z</code> - the indices that state the location of the voxel within the voxel mesh <code>Ω_design</code> - design space information for each voxel. This is a ternary variable that indicates the type of density constraint on the voxel. <code>0</code> and <code>1</code> indicate that the density is fixed at 0 or 1, respectively. <code>-1</code> indicates the absence of constraints, i.e., the density in that voxel can be freely optimized <code>Ω_dirichlet_x</code>, <code>Ω_dirichlet_y</code>, <code>Ω_dirichlet_z</code> - homogeneous Dirichlet boundary conditions for each voxel. These are binary variables that define whether the voxel is subject to homogeneous Dirichlet boundary constraints in the respective dimension <code>F_x</code>, <code>F_y</code>, <code>F_z</code> - floating point variables that define the three spacial components of external forces applied to each voxel. All forces are body forces given in [N/m^3] <code>density</code> - defines the binary voxel-wise density of the ground truth solution to the topology optimization problem <strong>How to Import the Dataset</strong> <strong>with DL4TO: </strong>With the Python library DL4TO (https://github.com/dl4to/dl4to) it is straightforward to download and access the dataset as a customized PyTorch <code>torch.utils.data.Dataset</code> object. As shown in the tutorial this can be done via: <pre><code class="language-python">from dl4to.datasets import SELTODataset dataset = SELTODataset(root=root, name=name, train=train)</code></pre> Here, <code>root</code> is the path where the dataset should be saved. <code>name</code> is the name of the SELTO subset and can be one of "disc_simple", "disc_complex", "sphere_simple" and "sphere_complex". <code>train</code> is a boolean that indicates whether the corresponding training or validation subset should be loaded. See here for further documentation on the <code>SELTODataset</code> class. <strong>without DL4TO:</strong> After downloading and unzipping, any of the <code>i.csv</code> files can be manually imported into Python as a Pandas dataframe object: <pre><code class="language-python">import pandas as pd root = ... file_path = f'{root}/{i}.csv' columns = ['x', 'y', 'z', 'Ω_design','Ω_dirichlet_x', 'Ω_dirichlet_y', 'Ω_dirichlet_z', 'F_x', 'F_y', 'F_z', 'density'] df = pd.read_csv(file_path, names=columns)</code></pre> Similarly, we can import a <code>i_info.csv</code> file via: <pre><code class="language-python">file_path = f'{root}/{i}_info.csv' info_column_names = ['E', 'ν', 'σ_ys', 'h'] df_info = pd.read_csv(file_path, names=info_columns)</code></pre> We can extract PyTorch tensors from the Pandas dataframe <code>df</code> using the following function: <pre><code class="language-python">import torch def get_torch_tensors_from_dataframe(df, dtype=torch.float32): shape = df[['x', 'y', 'z']].iloc[-1].values.astype(int) + 1 voxels = [df['x'].values, df['y'].values, df['z'].values] Ω_design = torch.zeros(1, *shape, dtype=int) Ω_design[:, voxels[0], voxels[1], voxels[2]] = torch.from_numpy(data['Ω_design'].values.astype(int)) Ω_Dirichlet = torch.zeros(3, *shape, dtype=dtype) Ω_Dirichlet[0, voxels[0], voxels[1], voxels[2]] = torch.tensor(df['Ω_dirichlet_x'].values, dtype=dtype) Ω_Dirichlet[1, voxels[0], voxels[1], voxels[2]] = torch.tensor(df['Ω_dirichlet_y'].values, dtype=dtype) Ω_Dirichlet[2, voxels[0], voxels[1], voxels[2]] = torch.tensor(df['Ω_dirichlet_z'].values, dtype=dtype) F = torch.zeros(3, *shape, dtype=dtype) F[0, voxels[0], voxels[1], voxels[2]] = torch.tensor(df['F_x'].values, dtype=dtype) F[1, voxels[0], voxels[1], voxels[2]] = torch.tensor(df['F_y'].values, dtype=dtype) F[2, voxels[0], voxels[1], voxels[2]] = torch.tensor(df['F_z'].values, dtype=dtype) density = torch.zeros(1, *shape, dtype=dtype) density[:, voxels[0], voxels[1], voxels[2]] = torch.tensor(df['density'].values, dtype=dtype) return Ω_design, Ω_Dirichlet, F, density</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)