| --- |
| 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. |