File size: 3,477 Bytes
2588cbf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0eb9119
 
 
 
 
 
 
 
 
2588cbf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0eb9119
 
 
2588cbf
 
 
 
 
 
 
 
 
 
 
 
 
0eb9119
 
 
 
 
 
 
 
 
 
 
 
 
 
2588cbf
 
 
 
 
 
 
 
0eb9119
2588cbf
 
 
 
 
 
0eb9119
2588cbf
 
 
 
 
0eb9119
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: cc-by-sa-4.0
task_categories:
  - other
tags:
  - CFD
  - aerodynamics
  - point-cloud
  - pytorch
  - fluid-dynamics
  - regression
size_categories:
  - 100K<n<1M
splits:
  train:
    num_examples: 387
  validation:
    num_examples: 48
  test:
    num_examples: 49
---

# DrivaerML-PCTR

Processed version of [neashton/drivaerml](https://huggingface.co/datasets/neashton/drivaerml)
for use with the PCT-R (Point Cloud Transformer for Regression) model.

## Processing

Each `boundary_i.vtp` file (~500MB, ~8.8M cells) was processed as follows:

1. **Random sampling:** 100,000 cells per run, fixed seed `seed = run_id + 42`.
2. **Cell centres:** Coordinates are CFD cell centres — exact locations where OpenFOAM computed field values.
3. **Coordinate normalisation:** Local per-run, zero mean and unit std per axis. Stored in each file for unnormalisation.
4. **Target fields:** Raw, no normalisation. All 500 runs share identical CFD boundary conditions.

## Dataset Splits

The dataset is split **80/10/10** (train/val/test) using a random shuffle with `seed=42`.

| Split      | Runs |
|------------|------|
| Train      | 387 |
| Validation | 48 |
| Test       | 49 |
| **Total**  | **484** |

> **Missing runs:** `167, 211, 218, 221, 248, 282, 291, 295, 316, 325, 329, 364, 370, 376, 403, 473`

## File Structure

```
train/
  run_i/
    boundary_i.pt
val/
  run_i/
    boundary_i.pt
test/
  run_i/
    boundary_i.pt
```

Each `.pt` file contains:

```python
{
    'coords':      torch.float32,  # [100000, 3]  locally normalised x, y, z
    'targets':     torch.float32,  # [100000, 4]  raw CFD field values
    'sample_idx':  torch.int64,    # [100000]     indices into original VTP
    'coords_mean': torch.float32,  # [3]          per-axis mean
    'coords_std':  torch.float32,  # [3]          per-axis std
    'run_id':      int,
}
```

## Target Field Order

| Index | Field                  | Units     | Description                                              |
|-------|------------------------|-----------|----------------------------------------------------------|
| 0     | `CpMeanTrim`           | [-]       | Time-averaged static pressure coefficient               |
| 1     | `pMeanTrim`            | [m²/s²]   | Time-averaged kinematic pressure                        |
| 2     | `pPrime2MeanTrim`      | [m⁴/s⁴]   | Time-averaged square of pressure fluctuations           |
| 3     | `wallShearStressMeanTrim` | [m²/s²] | Magnitude of time-averaged wall shear stress vector    |

## Loading the Dataset

```python
from huggingface_hub import snapshot_download
import torch, os

# Download the full dataset
local_dir = snapshot_download(repo_id="Jrhoss/DrivaerML-PCTR", repo_type="dataset")

# Load a single run from the training split
data = torch.load(os.path.join(local_dir, "train", "run_1", "boundary_1.pt"))
print(data['coords'].shape)    # [100000, 3]
print(data['targets'].shape)   # [100000, 4]
```

## Citation

```bibtex
@article{ashton2024drivaer,
    title   = {DrivAerML: High-Fidelity Computational Fluid Dynamics Dataset for Road-Car External Aerodynamics},
    year    = {2024},
    journal = {arxiv.org},
    url     = {https://arxiv.org/abs/2408.11969},
    author  = {Ashton, N., Mockett, C., Fuchs, M., Fliessbach, L., Hetmann, H., Knacke, T.,
               Schonwald, N., Skaperdas, V., Fotiadis, G., Walle, A., Hupertz, B., and Maddix, D}
}
```

## License

CC-BY-SA 4.0 (inherited from original dataset)