AREALS surface pressure for DrivAerML

The AREALS geometry prior leochl/areals-geometry, fine-tuned to predict the time-averaged surface pressure coefficient (CpMeanTrim) on DrivAerML cars. It predicts from the car's shape alone, or from the shape plus Cp measured at a few surface points. The repository holds three fits of the same recipe on the 400 cars of DrivAerML's official training split, seeds 0, 1 and 2. They come from the method of Large Geometry Models Are Priors For Fast Physics Pretraining.

Model description

The model wraps the geometry prior: see leochl/areals-geometry for the encoder and decoder. Two input columns are added to the encoder's first layer: a standardised Cp value and a presence flag for each surface sample. Both columns start at zero, so before fine-tuning the model is the geometry prior. A linear head on the decoder's query features predicts standardised Cp at any query point. The prior's distance and normal heads and its readouts do not enter the Cp prediction.

  • Without sensors: both columns are zero and Cp comes from the shape alone.
  • With sensors: each sensor's value is attached to the encoder samples nearest to it.

Size. 3,215,504 trainable parameters per seed. The state dict also holds 352 fixed buffer elements, 3,215,856 elements in all.

Inputs and outputs

  • Geometry: the car surface as area-weighted samples in DrivAerML's coordinates (metres, flow along +x): points [N, 3], outward unit normals [N, 3] and area weights [N]. Training used 16,384 samples per car: cells of the DrivAerML boundary mesh drawn with replacement in proportion to cell area, each weighted total area / 16,384 (example/geometry/run_108.npz).
  • Queries: any points on the surface, in metres. The evaluation used 32,000 cells per car, drawn uniformly without replacement from the boundary mesh. example/fields/run_108.npz holds them with their centres, outward unit normals, areas and true CpMeanTrim.
  • Sensors (optional): Cp at any set of surface points. In training, 10% of examples had no sensors and 90% had between 5 and 500 (log-uniform count), drawn in proportion to area.
  • Output: standardised CpMeanTrim at each query. Cp = mean + std × output, with mean −0.2035 and std 0.2544 from normalisation.json. Sensor values are standardised the same way before input.
  • Frame: as in the base model, positions are taken relative to the surface's area-weighted centroid and RMS radius. Orientation is not normalised, and fine-tuning used no rotations, so inputs must use DrivAerML's axes.

Intended uses

  • Predicting the time-averaged surface pressure coefficient on DrivAer-type cars at DrivAerML's flow condition, from geometry alone or with a few pressure measurements.
  • Integrating predicted Cp into pressure forces such as pressure drag (results below).
  • A starting point for fine-tuning on related car pressure data.

DrivAerML's runs are parametric variants of the DrivAer notchback, all at one flow condition. The model has no input for flow conditions.

Training data

  • Dataset: DrivAerML (Ashton et al., 2024, arXiv:2408.11969), revision 5d448b209bf654503c64ce7261c34fa125f46392, CC BY-SA 4.0. It holds scale-resolving CFD of parametric variants of the DrivAer notchback, of which 484 runs are available.
  • Split: the dataset's official full split, with 400 training, 34 validation and 50 test runs. split.json lists the run ids. Each run has its own geometry.
  • Per run: from boundary_N.vtp and boundary_cell_area_N.npy, the cell centres, outward unit cell normals, cell areas and CpMeanTrim, with 7.3 to 10.2 million cells per car. The field cells are 32,000 of these, drawn uniformly without replacement with a seed per run. The geometry input is 16,384 cells drawn with replacement in proportion to area. In the code repository, experiments/08_expanded_benchmarks/existing_data_expansion/source/export_native.py draws both from the per-cell arrays.

Training procedure

The recipe is protocol.json, run by experiments/02_simulation_efficiency/drivaerml/source/study.py.

  • Initialisation: the leochl/areals-geometry weights (geometry.pt, SHA-256 a47a387a…). The new input columns start at zero, and the head is randomly initialised with a seed per fit.
  • Updates: 8,000 updates at a batch of 8 cars. The 400 training cars are visited in seeded rounds, 160 passes in all.
  • Each example:
    • with probability 0.1, no sensors;
    • otherwise k sensors, with k log-uniform in [5, 500], drawn in proportion to area without replacement from the 32,000 field cells;
    • 2,048 query cells drawn in proportion to area, with standardised Cp as the target.
  • Loss: squared error, weighted 1 at query cells without a sensor and 0.25 at sensor cells.
  • Optimisation: AdamW at learning rate 10⁻³ for all parameters, weight decay 0.05, a one-cycle schedule (10% warm-up, cosine annealing), gradient clipping at 1.0 and bf16 autocast.
  • Selection: every 500 updates, the zero-sensor nRMSE on the 34 validation cars; the lowest is kept. For all three seeds this was the last evaluation, at update 8,000, with validation nRMSE 0.1924, 0.1965 and 0.1941.
  • Seeds: 0, 1 and 2 differ in head initialisation, example order and sensor draws.
  • Hardware and time: one NVIDIA H100 80GB per fit, on Nebius: 549 s, 491 s and 541 s.
  • Software: PyTorch 2.15.0 (CUDA 13.2), Python 3.12.3, areal_tokens 0.6.0.

Evaluation

Data and metric. The 50 official test cars were scored once per seed, in bf16 on an H100. Per car, the nRMSE is the area-weighted RMSE over the field cells without a sensor, divided by the car's area-weighted Cp standard deviation over all its cells. The table averages it over cars. For the 20-sensor scores, Cp is given at 20 cells per car, drawn in proportion to area and fixed per car, with the same checkpoint. The scratch control is the same architecture trained from random weights with the same protocol, subsets and seeds. seedK/test_metrics.json has the per-car rows, which also include relative L2 error and the error of the integrated pressure force.

Test nRMSE, no sensors Test nRMSE, 20 sensors MAE in Cp, no sensors
Seed 0 0.1903 0.1905 0.0241
Seed 1 0.1924 0.1926 0.0245
Seed 2 0.1905 0.1908 0.0241
Mean 0.1911 0.1913 0.0242
From scratch, 3-seed mean 0.2273 0.2276 0.0294

A paired hierarchical bootstrap over seeds and test cars (5,000 draws) gives 95% intervals of 0.1870–0.1951 for this model and 0.2208–0.2336 from scratch. The paired difference is −0.0362, with interval −0.0419 to −0.0302. leochl/areals-geometry has the same comparison at 25 to 400 training cars.

Pressure drag ranking. Pressure drag is Cd_p = −Σ a·Cp·n_x / A_ref, with outward normals, flow along +x and each car's own reference area. It is estimated from 200,000 cells per car, drawn with replacement in proportion to area from the full surface, with Cp predicted without sensors (fp32). Across the 50 test cars, the true Cd_p has a standard deviation of 0.0186.

Spearman Pearson RMSE in Cd_p
This model, seeds 0 / 1 / 2 0.852 / 0.765 / 0.848 0.857 / 0.809 / 0.876 0.0115 / 0.0124 / 0.0106
This model, 3-seed mean 0.822 0.847 0.0115
From scratch, 3-seed mean 0.743 0.779 0.0134
True Cp through the same 200,000-cell estimate 0.944 0.975 0.0043

Environmental impact

  • Hardware: NVIDIA H100 80GB HBM3
  • Cloud provider: Nebius
  • Fine-tuning: 0.44 GPU-hours for the three fits, one GPU each
  • Base model pretraining: 23.2 GPU-hours (see leochl/areals-geometry)

How to get started

git clone https://github.com/leochlon/areals_model_experiments
pip install -e areals_model_experiments safetensors huggingface_hub
export PYTHONPATH=$PWD/areals_model_experiments/shared/field_benchmark/kit
hf download leochl/areals-drivaerml --local-dir areals-drivaerml
cd areals-drivaerml

Run this from the downloaded folder. It predicts Cp for the test car in example/.

import json

import numpy as np
import torch
from safetensors.torch import load_file

import field_benchmark as fb  # shared/field_benchmark/kit in the code repository
from areal_tokens.config import ExperimentConfig
from areal_tokens.field import FieldEncoder
from areal_tokens.model import GeometryAutoencoder

config = ExperimentConfig.load("config.json")
model = FieldEncoder(GeometryAutoencoder(config.model))
model.load_state_dict(load_file("seed0/model.safetensors"))
model.eval()
norm = json.load(open("normalisation.json"))

# Test car run_108: 16,384 surface samples (geometry) and 32,000 surface cells with true Cp (fields).
car = dict(id="run_108", path="example/geometry/run_108.npz")
cells = fb.load_field("example/fields", "run_108")    # points (m), normals, weights (areas), values (Cp)
prepared = fb.prepare_car(car, cells.points, config)  # encoder samples, anchors and surfels


def predict_cp(sensors):
    """Cp at every cell; `sensors` indexes the cells whose Cp is given (empty: shape alone)."""
    values = (cells.values[sensors] - norm["mean"]) / norm["std"]
    batch = fb.collate_inputs([fb.encoder_inputs(prepared, len(cells.points), sensors, values)])
    queries = torch.as_tensor(cells.points, dtype=torch.float32)[None]  # any surface points, in metres
    with torch.inference_mode():
        tokens = model.encode(batch, batch["values"], batch["present"], batch["anchor_values"],
                              batch["anchor_present"])
        return model.predict(tokens, queries)[0].double().numpy() * norm["std"] + norm["mean"]


none = np.empty(0, dtype=np.int64)
twenty = np.sort(np.random.default_rng(0).choice(len(cells.points), 20, replace=False,
                                                 p=cells.weights / cells.weights.sum()))
for name, sensors in (("no sensors", none), ("20 sensors", twenty)):
    cp = predict_cp(sensors)
    scores = fb.problem_metrics(cells, sensors, cp)  # scored on the cells without a sensor
    print(f"{name}: nRMSE {scores['nrmse']:.4f}, MAE {scores['mae']:.4f}")

On CPU this prints:

no sensors: nRMSE 0.1722, MAE 0.0219
20 sensors: nRMSE 0.1725, MAE 0.0219

The study scored this car at nRMSE 0.1725 without sensors, in bf16 on an H100. seed1/ and seed2/ hold the other fits. seed0/checkpoint.pt loads with areal_tokens.load_field_encoder and gives identical outputs.

Files

File Contents
seed0/, seed1/, seed2/ One fit each
seedK/model.safetensors Weights: the FieldEncoder state dict, 159 tensors (float32, plus int64 rotary axis indices)
seedK/checkpoint.pt The original checkpoint: weights, configuration, selected update, and the normalisation and training cars as benchmark. It loads with areal_tokens.load_field_encoder
seedK/test_metrics.json Test metrics per car (50 cars, no sensors and 20 sensors), with their means and definitions
config.json Geometry model configuration, the same as the base model's; load with ExperimentConfig.load
normalisation.json Cp mean and standard deviation for standardising inputs and outputs
protocol.json The study protocol: training budgets, seeds, arms and recipe
split.json DrivAerML run ids of the official train, validation and test split
example/geometry/run_108.npz, example/fields/run_108.npz Inputs for DrivAerML test run 108: 16,384 geometry samples, and 32,000 cells with their true CpMeanTrim. Derived from DrivAerML (CC BY-SA 4.0)
SHA256SUMS SHA-256 of every file

Citation

@misc{chlon2026areals,
  title         = {Large Geometry Models Are Priors For Fast Physics Pretraining},
  author        = {Chlon, Maggie and Chlon, Leon},
  year          = {2026},
  eprint        = {2611.02066},
  archivePrefix = {arXiv},
  primaryClass  = {cs.LG},
  url           = {https://arxiv.org/abs/2611.02066}
}

@misc{ashton2024drivaerml,
  title         = {DrivAerML: High-Fidelity Computational Fluid Dynamics Dataset for Road-Car External Aerodynamics},
  author        = {Ashton, Neil and Mockett, Charles and Fuchs, Marian and Fliessbach, Louis and Hetmann, Hendrik and Knacke, Thilo and Schonwald, Norbert and Skaperdas, Vangelis and Fotiadis, Grigoris and Walle, Astrid and Hupertz, Burkhard and Maddix, Danielle},
  year          = {2024},
  eprint        = {2408.11969},
  archivePrefix = {arXiv},
  url           = {https://arxiv.org/abs/2408.11969}
}

Released by Hassana Labs.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for leochl/areals-drivaerml

Finetuned
(1)
this model

Dataset used to train leochl/areals-drivaerml

Papers for leochl/areals-drivaerml