chatcad / DRIVAERNET_PARITY.md
Samarjithbiswas's picture
chat_cad live (Docker app + weights)
32c7c43 verified
|
Raw
History Blame Contribute Delete
5.41 kB

chat_cad vs DrivAerNet / DrivAerNet++: capability parity

Author: Samarjith Biswas, PhD (https://samarjithbiswas.com)

This note maps the public DrivAerNet project (https://github.com/Mohamedelrefaie/DrivAerNet, Elrefaie, Dai, Ahmed) against what chat_cad does, so the software demonstrably performs the same class of work: data-driven aerodynamic design and prediction on car geometry, driven by the paper's own model (RegDGCNN) on real DrivAer data.

What DrivAerNet provides

DrivAerNet++ is a dataset of 8,150 car designs with high-fidelity CFD, covering fastback / notchback / estateback bodies, plus a model zoo. Its capabilities fall into these groups:

  1. Parametric models (26 design parameters per car).
  2. CFD aerodynamic coefficients (drag Cd, lift Cl, moments).
  3. Surface fields (pressure coefficient Cp, wall shear stress).
  4. Volumetric fields (3D pressure / velocity / turbulence).
  5. Point clouds and high-resolution meshes.
  6. Renderings and hand-drawn sketches.
  7. ML models: RegDGCNN (drag and surface-field regression), PointNet variants, GNNs, plus framework examples (FIGConvUNet / AeroGraphNet in NVIDIA Modulus, PaddleScience).
  8. An "AI Agents in Engineering Design" extension: VLM/LLM agents that go from a design brief to a simulated result.

Capability matrix

DrivAerNet capability chat_cad status How chat_cad does it
Drag (Cd) prediction with RegDGCNN DONE vehicle_regdgcnn.py implements the paper's Dynamic Graph CNN (EdgeConv blocks 64/64/128/256, k=20, emb=1024). Trained on real DrivAer CFD point clouds.
Trained on REAL DrivAer geometry DONE fetch_drivaernet_pointclouds.py pulls real CFD surface point clouds from Hugging Face (Jrhoss/Drivaerml_point_clouds); drivaernet_pointclouds.py pairs them with the authors' train/val/test split.
Surface field prediction (Cp) DONE (added) vehicle_surface_field.py is a DGCNN segmentation-head RegDGCNN that predicts per-point CpMeanTrim from geometry, then paints a pressure heat-map on the 3D mesh (car_pressure command).
Lift / moment coefficients PARTIAL Cl reported; analytic estimate by body class, with real Cl available in the CFD label CSVs for future training.
26 parametric design descriptors DONE 26-param vehicle design space (vehicle_lib.py, vehicle_sim.py).
Generative design DONE Conditional VAE body generator (vehicle_generative.py) conditioned on target CdA / stiffness / mass.
Sketch to design DONE car_sketch / /car/sketch reads a side-profile silhouette and builds a 3D car (analogue of the DrivAerNet++ Styling Agent).
Real-CFD retrieval / calibration DONE drivaernet_calibration.py + car_retrieve match a design to the closest real DrivAerNet++ CFD cases and calibrate Cd.
LLM/agent design-to-simulation loop DONE The whole app is a chat agent that goes from a brief to geometry, surrogate aero, FEA, NVH (car_design full pipeline).
Volumetric 3D flow field prediction NOT DONE Out of scope (would need volumetric CFD fields, 39 TB Globus-only).
Semantic component segmentation (29 labels) NOT DONE Not implemented; the segmentation backbone is now present (surface-field head) and could be retargeted to labels.

The two RegDGCNN engines in chat_cad

  1. Scalar drag: vehicle_regdgcnn.py -> weights/regdgcnn_cd.pt. Global max-pool over EdgeConv features -> single Cd. Wired into predict_aero_auto (preferred over the older PointNet, with an analytical fallback). Reported by car_aero and car_design stage 3.

  2. Per-point surface field: vehicle_surface_field.py -> weights/regdgcnn_cp.pt. Same EdgeConv backbone, but the global feature is broadcast back and concatenated with per-point features so the head emits one Cp per point. Exposed by car_pressure <part>, which writes a vertex-coloured OBJ and overlays it as a pressure heat-map in the 3D viewer (pressure off restores the part).

Training data and provenance

The real point clouds carry true CFD surface fields per point: CpMeanTrim (pressure coefficient) and wallShearStressMeanTrim_* (wall shear stress magnitude and components). Drag labels come from each run's force_mom_*.csv (Cd, Cl, Clf, Clr, Cs). The authors' splits.json is honoured for train/val/test so results are reported on a held-out set, exactly as the paper does.

How to reproduce

# 1. download real DrivAer CFD point clouds (5k-node surface samples)
python fetch_drivaernet_pointclouds.py            # or --limit N for a subset

# 2a. train the drag RegDGCNN
python -m vehicle_regdgcnn train --data ./DrivAerNet --epochs 80 \
    --batch 8 --num-points 2048

# 2b. train the surface-pressure (Cp) RegDGCNN
python -m vehicle_surface_field train --data ./DrivAerNet --epochs 60 \
    --batch 4 --num-points 2048

# 3. in the app: build or sketch a car, then
#    car_aero <body>        -> Cd / Cl / Cm  (engine: regdgcnn)
#    car_pressure <body>    -> per-point Cp heat-map on the 3D mesh

Validation note: on CPU with the small downloaded subset (140 train runs, N=2048), the drag model reaches a positive held-out R2 and the surface-Cp model learns the pressure distribution. The published paper reaches R2 ~ 0.9 with the full dataset at N=5000 on GPU; the chat_cad pipeline is the same architecture and data and scales to that with more runs.