# 01 - Laboratory Configuration

## Context / Goal
Define the authoritative laboratory model that all downstream tasks (data generation, ontology, schemas) must follow. This file is a specification, not code; produce `./out/config/lab_config.yaml` capturing everything below.

## Dependencies
None (root task).

## Material system
- Substrate: Ti-6Al-4V coupons, 10 × 10 × 3 mm.
- Adhesion layer: Cr (sputtered).
- Functional coating: Pt-Au deposited in a **composition gradient** across each wafer; film thickness range 0.3-1.1 µm.

## Instruments
| Role | Instrument | Data produced |
|---|---|---|
| Friction | RAPID custom high-throughput parallelized 6-probe tribometer | COF vs cycle per track; test conditions |
| Nanoindentation | Bruker TI980 TriboIndenter | Hardness, reduced modulus (25 indents/coupon) |
| Composition | Bruker M4 Tornado micro-XRF (assumed model) | Pt/Au wt% map per coupon (20×20 grid) |
| Deposition | Kurt J. Lesker PVD 200 sputter-down | Batch deposition parameters |
| Surface roughness | AFM | Topography image metadata + Ra/Rq per coupon |
| Film thickness | Optical profilometry | Thickness map per coupon (10×10 grid) |
| Simulation | SIMTRA (sputter transport Monte-Carlo) | Deposition atom-energy / composition profiles per deposition run |

## Deposition matrix (4 batches)
| Batch | Pt:Au gun tilt | Pt power | Au power | Pt discharge | Au discharge |
|---|---|---|---|---|---|
| B721 | 20°:0°  | 150 W | 50 W  | 432 V | 311 V |
| B722 | 20°:20° | 100 W | 100 W | 399 V | 352 V |
| B723 | 20°:20° | 150 W | 50 W  | 430 V | 311 V |
| B724 | 0°:20°  | 50 W  | 150 W | 376 V | 340 V |

## Hierarchy and volumes
```
batch (×4) → wafer (×3 per batch) → coupon (×49 per wafer, 7×7 grid) = 588 coupons
```
- Friction testing: 480 coupons (4 RAPID runs × 120 coupons: 5 plates × 6 probes × 4 coupons/square).
- Reserve/QA: 108 coupons (no friction data; characterization only).
- Environments: run R1,R2 = Lab Air (µ_normal); run R3,R4 = Dry N2 (µ_dry_nit).
- Tracks: 3 replicate tracks per friction coupon, identical conditions, fresh counterface ball per track (3 balls per holder) → 1,440 tracks.
- Cycles: 1,000 reciprocating cycles per track → 1,440,000 cycle records.
- Friction loops: every 100th cycle stores a position-resolved loop of 200 points → 1,440 × 10 × 200 = 2,880,000 loop points.
- Nominal test conditions: normal load 100 mN, stroke 1 mm, sliding speed 1 mm/s, ruby (Al2O3) ball Ø 3.175 mm; RH 45% (Lab Air) / 2% (Dry N2); T 23 ± 1 °C.

## Physical models for value simulation (used in task 03)
- Coupon Au wt%: linear gradient across wafer x-position, batch-dependent center: B721 8%, B722 25%, B723 10%, B724 60%; ±5 wt% span across wafer; XRF grid adds N(0, 0.3) noise.
- COF run-in: `cof(c) = cof_ss + (cof_0 - cof_ss)·exp(-c/τ) + N(0, σ)`; cof_0 ∈ [0.35, 0.5]; τ ∈ [100, 400] cycles; σ = 0.01.
- Steady-state COF depends on Au% and environment: Lab Air `cof_ss = 0.32 - 0.0015·Au%`; Dry N2 `cof_ss = 0.24 - 0.0012·Au%`; clamp ≥ 0.12.
- Hardness: `H = 8.5 - 0.05·Au% + N(0, 0.25)` GPa; reduced modulus `Er = 190 - 0.6·Au% + N(0, 4)` GPa.
- Roughness Ra: log-normal, median 5 nm, σ_log 0.3.
- Thickness: 0.3-1.1 µm, radial wafer profile + noise.
- Wear volume per track: Archard-like `V = k·F·s`, k depends on Au% and environment; store as track-level derived measurement.

## Output
- `./out/config/lab_config.yaml` - machine-readable version of everything above (volumes, matrices, model coefficients, seed).
- Marker `./out/.done/01.ok`.
