Fix rotational mechanics initialization and torque balance#486
Conversation
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
|
Investigation scratchpad:
|
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
73e0d2e to
93ebf68
Compare
|
Stacked this branch on prerequisite #485 and force-updated it with an explicit lease after verifying the remote tip was unchanged. Fresh local verification against ModelingToolkit
The earlier #486 failures were the piston error fixed by #485; this stack lets CI reach the rotational change. |
|
Independent verification against the published stacked tip timeout 3600 julia +1.12 --startup-file=no --project=mtksl-rotational-env test/rotational.jlexited 0 with 31/31 assertions passing (two inertias 6/6, driving torque 6/6, first 1/1, stick-slip 2/2, sensors 12/12, position 4/4). The test retains the existing A clean-main native |
|
Fresh LTS CI reaches and passes the intended rotational coverage: The job later fails in an unrelated thermal test before package completion: |
|
The refreshed downgrade job is the same clean-main thermal failure already isolated from #485: |
|
The current Julia 1.12.6 and pre-release Julia 1.13.0-rc1 lanes now confirm the same clean-main thermal structural error as LTS: piston passes 3/3 and rotational passes 31/31, then test/thermal.jl:64-93 errors while compiling Heat flow system with 11 highest-order derivative variables versus 10 equations (candidate extras mass1.T and hf_sensor2.Q_flow.u). FixedHeatFlow passes 2/2 in both of these lanes. This is one shared clean-main audit, separate from the downgrade-only FixedHeatFlow retcode investigation; neither warrants altering #486. |
Releases the rotational mechanics initialization/torque balance fix from #486, currently unreleased on master. Claude-Session: https://claude.ai/code/session_01SFmcAmLrGPrGtzwP333mX8 Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This PR should be ignored until reviewed by @ChrisRackauckas.
Summary
TorqueSensormoved from@mtkmodelto@component.The existing
atol = 1conservation check is unchanged.Root cause
With the acceleration constraint, the preloaded spring and damper force the second inertia to start at
500πrad/s. On current ModelingToolkit this produced:Explicitly starting both inertias from rest gives a maximum conservation residual of
0.31813746890592665, below the unchanged tolerance.The missing
TorqueSensorflow balance separately left the sensor model with 23 highest-order variables and 22 equations. After restoring it, the sensor torque is exactly opposite the fixed support reaction (maximum(abs.(sensor_tau .+ fixed_tau)) == 0.0).Source-history bisects identified:
27fa668cc920d1de71d724978b926e43758e3526(test(Rotational): fix offsets and sol definitions) as the first commit with the current driven-inertia initialization/offset pattern.5d56791e142853b1eeeb34eccdaa7a4edfc430dc(refactor: use @component syntax instead of @mtkmodel) as the first commit whereTorqueSensorno longer receives the connector flow balance generated by@mtkmodel.Verification
Against ModelingToolkit
34ee9182900688f8545d61fb92d143ed29a8ad7fon Julia 1.12.6, in separate processes:Also passed: