Back

#piston

1 APIs with this tag

Slider-Crank Mechanism API

Slider-crank (piston-crank) mechanism kinematics as an API, computed locally and deterministically. The position endpoint takes the crank radius, the connecting-rod length and the crank angle from top dead centre and returns the exact piston displacement from TDC, x = r(1−cosθ) + l(1 − √(1−λ²sin²θ)) with λ = r/l, the piston-pin distance from the crank axis, the connecting-rod swing angle φ = asin(λ·sinθ), the stroke (2r), the rod ratio n = l/r and the fraction of stroke travelled. The velocity endpoint adds the crank speed (as rpm or angular velocity) and returns the exact piston velocity, v = ω·[r·sinθ + r·λ·sinθcosθ/√(1−λ²sin²θ)], and the piston acceleration from the standard two-term approximation a ≈ r·ω²·(cosθ + λ·cos2θ) — the inertia term engine designers use for balancing. The geometry endpoint summarises the whole mechanism: the stroke, the rod ratio, the top- and bottom-dead-centre positions, the maximum connecting-rod angle asin(λ), and — with a speed — the mean piston speed 2·stroke·(rev/s). Everything is computed locally and deterministically, so it is instant and private. Ideal for engine, compressor and pump-mechanism design tools, robotics and linkage simulation, CNC and animation, and mechanical-engineering education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is slider-crank linkage kinematics; for rotational energy use a flywheel API and for shaft torsion use a torsion API.

api.oanor.com/crankslider-api