Files
FluidSimCpp/verification/YZ125_BASELINE.md

109 lines
5.6 KiB
Markdown

# YZ125 baseline verification
Linux Release checks, 2026-10-23. All six CTest suites passed. This is a
YZ125-sized simulation baseline, not a measured replica of a particular year.
## Changes and physical basis
Pipes already supported per-cell areas/lengths and the geometric momentum
source for varying area. The earlier exhaust was a small expansion chamber,
but the UI drew all pipes with pressure-dependent thickness. The display now
uses physical diameter and axial cell length. A shared profile builder preserves
exact conical-frustum volume across mesh refinements.
The new estimated racing pipe has these dimensions (metres):
| Section | Length | Inlet diameter | Outlet diameter |
| --- | ---: | ---: | ---: |
| Header | .160 | .036 | .036 |
| First diffuser | .180 | .036 | .060 |
| Second diffuser | .190 | .060 | .105 |
| Belly | .130 | .105 | .105 |
| Baffle cone | .210 | .105 | .022 |
| Stinger | .240 | .022 | .022 |
Default mesh maximum length is 10 mm. The straight comparison has the same
total length and a uniform 36 mm bore. These are design estimates, not Yamaha
factory pipe dimensions. The test pulse returned -34.33 Pa from a diffuser and
+27.52 Pa from a convergent, with no positivity repairs. The intended negative
scavenging pulse and later positive plugging pulse follow the mechanism in
[SAE 680469](https://saemobilus.sae.org/papers/investigation-tuning-exhaust-system-small-two-stroke-cycle-engines-680469).
Two-stroke port areas now come from piston travel past rectangular port roofs,
replacing the poppet-style curtain-area curve. Assumed transfer/exhaust durations
are 130/190 degrees and aggregate widths 50/36 mm. Trapped compression is 8.2:1;
clearance volume is derived at exhaust closure, rather than confusing this with
full-stroke geometric compression. The exhaust power valve remains fixed open.
These port dimensions and compression interpretation require measured validation.
Combustion has an estimated .8 ms minimum burn duration; timing and duration are
frozen for each active charge. The estimated ignition curve retards above 6000
RPM rather than continuing to advance toward 40 degrees. Neither is a measured
factory CDI/flame model. Fuel remains ideally calculated at port closure.
Mechanical friction now includes a quadratic windage term. The two-stroke uses
FMEP [bar] = .4 + .09*mean_piston_speed + .0009*mean_piston_speed^2, converted to
crank torque with one revolution per cycle. Coefficients are generic estimates
within the ranges discussed in this
[Chalmers engine-model study](https://publications.lib.chalmers.se/records/fulltext/147782.pdf),
not a YZ125 coast-down fit. Crankcase pumping work is already modeled separately.
No speed clamp or rev limiter was added.
Drivetrain ratios use Yamaha's
[2022 YZ125 specification](https://global.yamaha-motor.com/jp/news/2021/0730/yz125.html):
primary 64/19, final 49/13, and six ratios approximately 2.384, 1.933, 1.588,
1.352, 1.176, 1.055. Nominal rear radius is .3313 m from the 100/90-19 tire;
loaded rolling radius is unmeasured. Test mass is 95 kg plus an assumed 75 kg
rider. First/sixth overall reductions are 30.276/13.402, replacing the twin's
much taller drivetrain. Other road-load/clutch parameters remain estimates.
The dyno now records brake shaft torque/power before external load reaction;
previously it displayed acceleration torque/power, which becomes zero at loaded
steady speed. An analytic load-balance test checks 10 Nm and 1 kW at 100 rad/s.
## Measurements and limits
The fixed-speed benchmark imposes speed as an ideal motoring/absorbing dyno and
records shaft output. It runs one simulated second per point and averages the
last half. All points fired approximately once per revolution, had zero pipe
positivity repairs, and cost about .53-.58 wall seconds per simulated second.
| RPM | Straight kW | Racing kW |
| ---: | ---: | ---: |
| 6000 | 4.02 | 6.27 |
| 8000 | .63 | 5.53 |
| 10000 | 2.43 | 10.53 |
| 12000 | 3.96 | 14.32 |
| 14000 | 3.60 | 12.38 |
| 17000 | -.80 | -3.94 |
This coarse sweep peaks near 12000 RPM; it is not a validated Yamaha dyno curve.
Negative power at 17000 means the virtual dyno must motor the engine. Free-rev
speed differs from peak-power speed: full pedal with the straight pipe still
approaches 16950 RPM after eight seconds. This remains an unresolved calibration
limit. The standard transient reached 16128 RPM, recovered idle at 3159 RPM,
and launched the motorcycle to 61.3 km/h without repairs or nonfinite output.
Six-second .6-pedal field captures had no clipping: racing rendered peak .201,
straight .554. Firing cadence, port timing and geometry are improved, but exact
YZ125 sound still requires listening and further combustion/scavenging work.
The first-order pipe flux damps high-frequency content; the compact source,
constant-gamma gas, ideal fueling, fixed power valve, single-zone mixing and
empirical monitoring/environment filters limit fidelity. No engine sound sample
or synthetic two-stroke firing track has been added.
## Run and compare
```sh
cmake --build build-desktop --target fluidsim_desktop -j 4
./build-desktop/fluidsim_desktop --scenario two-stroke --exhaust racing --scene field
./build-desktop/fluidsim_desktop --scenario two-stroke --exhaust straight --scene field
cmake --build build-audit --target fluidsim_two_stroke_benchmark -j 4
./build-audit/fluidsim_two_stroke_benchmark
```
Hold C, shift to first with D, apply W, then release C. A/D shift, Z selects
neutral. Up/down adjusts persistent pedal request; R changes environment.
The capture tool accepts the same exhaust option. Current captures are under
`build/audio/yz125-{racing,straight}-{rendered,dry,unfiltered}.wav`.