# Piston stroke length based on crankshaft degree

#### ISX

I am wanting to form an equation I can use on excel that allows me to find how far the piston has gone down depending on how many degrees the crankshaft has turned. I know the length of the stroke but I also know that the stroke is not linear to the degrees turned, as in the stroke goes farther per degree when the crank is at 90* rather than when it is at TDC.

I want to put in the degree and stroke and it give me back how far the piston has gone down. If the stroke were 4 inches then at 90* it should come back with 2 inches. I know at 45* it wouldn't be 1 inch.

Anyone know how to do this?

#### ISX

After starring at this all morning, I think all I need to do is find the distance of line CD and subtract it from half the stroke or all of the stroke depending on if it is past the 90* mark or not.

I will just use 45* as an example for this pic so BAC is 45*. AB is 2, AC is 2.

So how do I find CD with that info? Thanks #### Mark44

Mentor
I am wanting to form an equation I can use on excel that allows me to find how far the piston has gone down depending on how many degrees the crankshaft has turned. I know the length of the stroke but I also know that the stroke is not linear to the degrees turned, as in the stroke goes farther per degree when the crank is at 90* rather than when it is at TDC.

I want to put in the degree and stroke and it give me back how far the piston has gone down. If the stroke were 4 inches then at 90* it should come back with 2 inches. I know at 45* it wouldn't be 1 inch.

Anyone know how to do this?
This is an application of trig. I think I can get you most of the way through this, so that you can finish it off.

I drew a diagram to help me put this together. I have a triangle whose top vertex is at the center of the piston pin (looking at the end of the piston pin). The bottom vertex is straight below the top vertex, and is at the center axis of the crankshaft (viewing the crank from the end on). The vertex on the right is the axis of rotation of the crank throw.

I labeled the three sides this way:
y = length of the vertical side, the center-to-center distance from the crank to the piston pin.
t = length of crank throw.
r = length of connecting rod.

theta = angle between crank throw and vertical
alpha = angle between crank throw and connecting rod

Using the Law of Sines, r/sin(theta) = y/sin(alpha) ==> y = r sin(alpha)/sin(theta)

You'll need to do a little more work to get the position of the piston relative to crank angle, but when theta = 0, y = t + r, and when theta = 180 deg, y = r - t. The stroke is the difference, which is 2t - you probably knew that already.

Hope this helps.

#### ISX

The only problem is I don't know connecting rod length, is there a way to get around it? Not sure how critical that is.

#### uart

I want to put in the degree and stroke and it give me back how far the piston has gone down. If the stroke were 4 inches then at 90* it should come back with 2 inches.
No that's not correct. If the full stoke is 4" then it will be down by a little more than 2" at 90 degrees.

The only problem is I don't know connecting rod length
Then if you want to accurately model this you'll probably need to make a measurement of how far the piston is down at some specific crank angle and use that to deduce the rod length (from the formula I'll give below). Alternatively if you know the distance from the top of the piston to the piston pin (gudgeon pin) then you could measure the distance from the crank center to the piston top (at top dead center) and use this to deduce the rod length.

Formula : I applied the "law of cosines" to problem so as to get the result in terms of just the crank angle and got the following.

r^2 = t^2 + y^2 - 2 y t cos(theta)

Where r t y and theta are as per Mark44's definition.

Solving the quadratic for y gives

$$y = t \cos(\theta) + \sqrt{ t^2 \cos^2(\theta) + r^2 - t^2 }$$