File size: 9,392 Bytes
1e502cd 4fcddee a6925d6 1e502cd 4fcddee a6925d6 4fcddee 1e502cd ce041bf a6925d6 ce041bf a6925d6 ce041bf a6925d6 ce041bf a6925d6 ce041bf a6925d6 ce041bf a6925d6 ce041bf a6925d6 ce041bf 1e502cd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | ---
tags:
- physics
- simulation
- FEM
- electromagnetics
- neural-operator
- scientific-computing
size_categories:
- 100K<n<1M
pretty_name: MaxwellBench
dataset_creators:
- Bosch Center for Artificial Intelligence (BCAI)
viewer: false
---
# MaxwellBench
<p align="center">
<img src=".huggingface/Bosch_logo.png" alt="Bosch Logo" width="200">
</p>
<p align="center">
<em>Created by <a href="https://www.bosch-ai.com/">Bosch Center for Artificial Intelligence (BCAI)</a></em>
<br>
<strong>Paper:</strong> TBD <!-- Replace with the paper URL once published -->
</p>
A large-scale benchmark of 2D finite-element electromagnetic simulations for training and evaluating neural operators. Each sample is a complete FEM problem—geometry (unstructured triangular mesh), material properties (nonlinear B-H curves, conductivity), excitation sources, boundary conditions—paired with the solved magnetic flux density **B** field.
## Dataset Summary
| Property | Value |
|---|---|
| Domain | 2D Electromagnetic FEM |
| Number of subsets | 14 |
| Samples per subset | 11000 (10000 train / 1000 val) |
| Total samples | 154000 |
| File format | HDF5 (`.h5`) |
| Simulation types | Stationary, Frequency-domain |
| Coordinate systems | Cartesian (x, y), Cylindrical axisymmetric (r, z) |
## Subsets
| Subset Name | Device Type | Coordinate | Simulation Type |
|---|---|---|---|
| `Transformer_2D_UU` | Transformer (UU core) | x, y | Frequency-domain |
| `Transformer_2D_PQ` | Transformer (PQ core) | r, z | Frequency-domain |
| `Inductor_2D_I_gap` | Inductor (I core with gap) | x, y | Frequency-domain |
| `Inductor_2D_EI_multi_gap` | Inductor (EI core, with gaps) | x, y | Frequency-domain |
| `Inductor_2D_EE_multi` | Inductor (EE core, fixed center gap) | x, y | Frequency-domain |
| `Inductor_2D_Circular_Small_Gap` | Inductor (circular small core, with gaps) | x, y | Frequency-domain |
| `Inductor_2D_Circular_Large` | Inductor (circular large core, no gaps) | x, y | Frequency-domain |
| `Inductor_2D_UU` | Inductor (UU core) | x, y | Frequency-domain |
| `Electromagnet_2D` ⚠️ | Electromagnet | r, z | Stationary |
| `ElectromagnetC_wire_2D` | Electromagnet (C core, wire) | x, y | Stationary |
| `Transformer_2D_L` | Transformer (L core) | x, y | Frequency-domain |
| `Inductor_2D_EI_multi` | Inductor (EI core, fixed gap) | x, y | Frequency-domain |
| `Inductor_2D_Circular_Large_Gap` | Inductor (circular large core, with gaps) | x, y | Frequency-domain |
| `ElectromagnetC_chunk_2D` | Electromagnet (C core, chunk coil) | x, y | Stationary |
> ⚠️ **Note:** The `Electromagnet_2D` subset is **not publicly released** as it is closely related to a real business use case. It is listed here for completeness but is excluded from the public download. The public release contains 13 subsets (143,000 samples total).
### Sample Visualizations
<table>
<tr>
<td align="center"><strong>Transformer_2D_UU</strong><br><img src=".huggingface/Transformer_2D_UU.png"></td>
<td align="center"><strong>Transformer_2D_PQ</strong><br><img src=".huggingface/Transformer_2D_PQ.png"></td>
</tr>
<tr>
<td align="center"><strong>Transformer_2D_L</strong><br><img src=".huggingface/Transformer_2D_L.png"></td>
<td align="center"><strong>Inductor_2D_I_gap</strong><br><img src=".huggingface/Inductor_2D_I_gap.png"></td>
</tr>
<tr>
<td align="center"><strong>Inductor_2D_EI_multi_gap</strong><br><img src=".huggingface/Inductor_2D_EI_multi_gap.png"></td>
<td align="center"><strong>Inductor_2D_EI_multi</strong><br><img src=".huggingface/Inductor_2D_EI_multi.png"></td>
</tr>
<tr>
<td align="center"><strong>Inductor_2D_EE_multi</strong><br><img src=".huggingface/Inductor_2D_EE_multi.png"></td>
<td align="center"><strong>Inductor_2D_UU</strong><br><img src=".huggingface/Inductor_2D_UU.png"></td>
</tr>
<tr>
<td align="center"><strong>Inductor_2D_Circular_Small_Gap</strong><br><img src=".huggingface/Inductor_2D_Circular_Small_Gap.png"></td>
<td align="center"><strong>Inductor_2D_Circular_Large</strong><br><img src=".huggingface/Inductor_2D_Circular_Large.png"></td>
</tr>
<tr>
<td align="center"><strong>Inductor_2D_Circular_Large_Gap</strong><br><img src=".huggingface/Inductor_2D_Circular_Large_Gap.png"></td>
<td align="center"><strong>Electromagnet_2D</strong><br><img src=".huggingface/Electromagnet_2D.png"></td>
</tr>
<tr>
<td align="center"><strong>ElectromagnetC_wire_2D</strong><br><img src=".huggingface/ElectromagnetC_wire_2D.png"></td>
<td align="center"><strong>ElectromagnetC_chunk_2D</strong><br><img src=".huggingface/ElectromagnetC_chunk_2D.png"></td>
</tr>
</table>
## Data Format
Each sample is stored as an HDF5 file `Data_{i}.h5`. Inside the file, a top-level group is named after the subset (e.g., `Transformer_2D_UU`). The group contains the following structure:
### Attributes
| Attribute | Description | Values |
|---|---|---|
| `Type` | Simulation type | `"Stationary"` or `"Frequency domain"` |
| `Coordinate` | Coordinate system | `"x, y"` or `"r, z"` |
### Fields (Mesh & Geometry)
Located under `<subset_name>/Fields/`:
| Key | Shape | Description |
|---|---|---|
| `Nodes` | `(N_n, 3)` | Node coordinates and type: `[p0, p1, node_type]`. `p0, p1` are spatial coordinates; `node_type` indicates boundary/interior. |
| `Nodes_connectivity` | `(N_conn, 2)` | Edge connectivity (node index pairs). |
| `Body_elements` | `(N_b, 3)` | Triangular element connectivity (3 node indices per element). |
| `Body_areas` | `(N_b, 1)` | Area of each triangular element. |
| `Edge_elements` | `(N_e, 2)` | Edge element connectivity (2 node indices per edge). |
| `Edge_lengths` | `(N_e, 1)` | Length of each edge element. |
### Materials
**Body materials** (`<subset_name>/Materials_body/`): Each named material subgroup contains:
- An index array mapping body elements to this material.
- `BH` attribute: B-H curve as a `(K, 2)` array of `[H, B]` pairs (nonlinear permeability).
- `sigma` attribute: Electrical conductivity (S/m).
**Edge materials** (`<subset_name>/Materials_edge/`): Each named material subgroup contains an index array mapping edge elements to this material (used to identify material interfaces).
### Sources
Located under `<subset_name>/Sources/`: Each named source subgroup contains:
- An index array mapping body elements to this source.
- `magnitude` attribute: Current density magnitude (A/m²).
- `frequency` attribute: Excitation frequency (Hz). Zero for stationary problems.
- `phase` attribute: Phase angle (rad).
### Boundaries
Located under `<subset_name>/Boundaries/`: Each named boundary subgroup contains:
- An index array mapping edge elements to this boundary.
- `normal` attribute: `(2,)` outward normal vector.
- `type` attribute: Boundary condition type — `"Mag_insulation"` or `"Axial_sym"`.
### Physics (Target Output)
Located under `<subset_name>/Physics/`: The solved magnetic flux density field on body elements.
**Stationary problems:**
| Key | Shape | Description |
|---|---|---|
| `realBx_elem` / `realBr_elem` | `(N_b, 1)` | Real part of B in x/r direction |
| `realBy_elem` / `realBz_elem` | `(N_b, 1)` | Real part of B in y/z direction |
**Frequency-domain problems** (additional imaginary components):
| Key | Shape | Description |
|---|---|---|
| `realBx_elem` / `realBr_elem` | `(N_b, 1)` | Real part of B in x/r direction |
| `imagBx_elem` / `imagBr_elem` | `(N_b, 1)` | Imaginary part of B in x/r direction |
| `realBy_elem` / `realBz_elem` | `(N_b, 1)` | Real part of B in y/z direction |
| `imagBy_elem` / `imagBz_elem` | `(N_b, 1)` | Imaginary part of B in y/z direction |
## Directory Structure
```
MaxwellBench/
├── Transformer_2D_UU/
│ ├── train/
│ │ ├── Data_0.h5
│ │ ├── Data_1.h5
│ │ └── ... # 10000 files
│ └── val/
│ ├── Data_0.h5
│ └── ... # 1000 files
├── Transformer_2D_PQ/
│ ├── train/
│ └── val/
├── Inductor_2D_I_gap/
│ ├── train/
│ └── val/
└── ... # same structure for all subsets
```
## Quick Start
```python
import h5py
subset = "Transformer_2D_UU"
with h5py.File(f"MaxwellBench/{subset}/train/Data_0.h5", "r") as f:
sim = f[subset]
# Metadata
sim_type = sim.attrs["Type"] # "Stationary" or "Frequency domain"
coord = sim.attrs["Coordinate"] # "x, y" or "r, z"
# Mesh
nodes = sim["Fields"]["Nodes"][:] # (N_n, 3)
connectivity = sim["Fields"]["Nodes_connectivity"][:] # (N_conn, 2)
elements = sim["Fields"]["Body_elements"][:] # (N_b, 3)
areas = sim["Fields"]["Body_areas"][:] # (N_b, 1)
# Target B field
Bx = sim["Physics"]["realBx_elem"][:] # (N_b, 1)
By = sim["Physics"]["realBy_elem"][:] # (N_b, 1)
```
A github repo with dataloader, model, and distributed training pipeline will be published in the future.
## Intended Use
MaxwellBench is designed to:
- Train and benchmark **neural operators** for electromagnetic field prediction.
- Evaluate **generalization** across device topologies, coordinate systems, and simulation regimes.
- Support research on **foundation models** for scientific computing / PDE solving.
## Citation
If you use MaxwellBench in your work, please cite:
> Paper forthcoming. Citation details will be updated upon publication. |