# 2023 Tesla Model S -- published Cd approximately 0.208
#
# Scale check: the raw STL is 288.9 x 127.0 x 83.8 in arbitrary units.
# scale = 0.017203 puts the length at 4.97 m, which lands the height at
# 1.442 m against a real 1.445 m -- so the proportions are right and the
# scale is trustworthy. The width comes out ~2.19 m against a listed 1.964 m
# because the model includes the side mirrors.
#
# axis_order "yzx": the STL's y axis is nose-to-tail, its z is vertical, its
# x is spanwise. The nose sits at low y, so it faces the inlet with no flip.
# ALWAYS confirm with:  python waterfall.py cases/tesla.yaml --check

geometry:
  path: geometries/tesla_model_s_2023.stl
  units: m
  scale: 0.017203
  axis_order: yzx
  rotate_deg: [0.0, 0.0, 0.0]
  flip: [false, false, false]

domain:
  # 36 cells along a 4.97 m car -> dx = 138 mm. Runtime scales roughly as
  # cells_per_length^4 (finer cells cost both more cells and a smaller
  # timestep), so 40 -> 36 buys back about a third of the wall clock and is
  # what keeps this case inside the 30-minute budget.
  cells_per_length: 36
  upstream: 1.5
  downstream: 4.0           # long enough for the wake to leave cleanly
  side: 2.0
  above: 3.0                # keeps blockage under ~4%
  ground_clearance: 0.12    # m, Model S rides ~120 mm
  max_cells: 2500000

flow:
  speed: 30.0               # m/s (108 km/h)
  density: 1.225
  viscosity: 1.5e-5         # kinematic, m^2/s -> Re_L = 1.0e7
  ground: true
  rolling_road: true        # a fixed floor is a tunnel artefact, not reality
  sides: farfield
  # REQUIRED at this Reynolds number. Central differencing supplies no
  # dissipation of its own; with no subgrid model this exact case went
  # unstable at t = 2.6 s -- the timestep collapsed from 2.3e-4 to 1e-22 while
  # the divergence norm still read 7e-16, because the projection was solving
  # a field that was already garbage.
  sgs: vreman

run:
  convective_times: 6.0
  cfl: 0.4
  frames: 120
  save_fields: [vorticity, q]
  output: output/tesla
  time_budget_s: 1800
  log_every: 250

view:
  elev: 18.0
  azim: -62.0
