4 Excel Inclass Assignment Slider Crank1 PDF Free
4 Excel Inclass Assignment Slider Crank1 PDF Free
R L W
θ φ
rr
You will need to use seven equations in your spreadsheet. These are provided below. Remember
that Excel needs to have arguments of trigonometric functions (sin, cos, etc.) in radians.
R
φ = arcsin × sin θ (1)
L
R cos θ
LVel = ×ω× (3)
L cos φ
W ×Acc
Force = − (7)
386.4 ×cos φ
Where you will provide input values for R, L, ω (in rad/s), and W. Vel is the velocity of the
piston, LVel is the angular velocity of the connecting rod (in rad/s), Acc is the acceleration of the
piston, and LAcc is the angular acceleration of the connection rod (in rad/s^2).
Your assignment is to use the equations above to generate a spreadsheet, like the one attached,
that calculates the connecting rod force.
Provide a title at the top of your worksheet, “Force in Connecting Rod.” Make the title stand out
a little by increasing its size and using other enhancements. Provide cells for inputting the values
for R, L, ω, and W. Put values of 4, 12, 3000 and 4 respectively in them for now. You can
change them later. Place comments (right click and choose insert comment) in these cells that
say to enter the lengths R and L in inches, the speed of the machine ω in rpm, and the weight W
in pounds. It’s a good idea to calculate the machine speed in rad/s too because that’s the way we
use it in calculations. Place the radian/s value in a handy cell. Shade or color the input area to set
it off from the rest of the spreadsheet where keyboard inputs will not be allowed. Select the four
input cells (for R, L, ω, and W).
Set up headings from left to right in the order that I have them in my spreadsheet. Increment
crank angle from zero to 360 degrees in increments of 5 degrees. In the Radians column, use a
Math and Trig Function (RADIANS) to convert degrees to radians. For the Phi column, use
Equation (1). You will have to use the input values for R and L and the ASIN function in Math
and Trig to compute the arcsine. The r column uses the second and third columns and the input
values of R and L in Equation (2).
The L-Vel column comes from Equation (3) which uses cosine functions of the second and third
columns and the input value for ω. Vel uses Equation (4) which uses R and values you have
already computed in other columns. L-Acc comes from Equation (5) and uses input values R, L,
and ω, and values you have already computed. Acc comes from Equation (6) and Force comes
from Equation (7). In each column, copy the formulas down to 360 degrees crank angle. Shade
the Degrees, r, Vel, Acc, and Force columns because we are going to graph them next.
When your spreadsheet is finished, format the numbers in the columns like I have them in my
spreadsheet (two places after the decimal point, etc.). Now for fun, try entering some different
numbers for R, L, ω, and W just to see what will happen to the Force.
Plotting slider-crank output
• Select the Theta (degrees), r (inches), and Force (lbs) columns and make an X-Y chart with
the Theta column as the x-axis. Place the chart on a separate sheet. Format the X-axis to go
from 0 to 360 degrees in 30 degree major tics. Format the X-axis font to be 14 pt.
• Put the Piston Displacement (r) on the first Y-axis and Force on the second Y-axis. Format
fonts on these axes to be 14 pt.
• Format fonts for the X and Y axis titles to be 16 pt and the Chart title to be 18 pt.
• Format the plot area to be no color. Move the legend into the plot area. Make the legend font
14 pt.
• Go to Select Data. Name the displacement series, “Displacement.” Name the Force series,
“Rod force.” These name should then show up in your legend.
• Format the displacement curve to be a solid line. Format the Rod force curve to be dashed.
• Format some stuff with colors – curves, chart area, other…
• Add a drawing of the slider-crank to the plot area. Paste it from your spreadsheet.
• Go to Page Setup. Select landscape. Make 1-inch margins all around. Make a custom header
with “Excel Slider Crank Problem” on the left, your name in the center, and the date at the
right.
Solving Ordinal Differential Equation Using Ms. Excel
I assume that you’re using Ms. Excel 2007 or 2010 so I’ll explain you as you’re using one of
them. And make sure that Macro in your Excel is enabled. Now, let’s work on one famous
model: Damped Simple Harmonic Motion
For this phenomenon, we can model it into a “simple” equation of motion:
Which v equals to dx/dt, and M, D, k, f are constants. Hence, there will be two ODEs, they are:
Now, our task is to solve them with our Excel. Just follow simple procedure below:
1. Because we have two equations, fill cell B1 with 2
2. Because our variables are t, x, and v, change y into v, and v’ into y’. Our variable is v, not
y.
Note: If you have three equations or above, just fill B1 with 3, and you can just put
another variable in D3
3. Fill H3 and cells below it with our constants, and suppose we have a 0.5 kg burden, a
spring with k = 2 kg/s2 and damper 0.3 kg/s, and a constant outer force 1 Newton, just
like below.
4. Fill in cells B5:B6 with our equations. I mean fill in B5 with =C3 , and B6 with =(-
I3/I2)*C3+(-I4/I2)*B3+(I5/I2)
5. We will try to integrate the ODEs we have from 0 to 20, so fill B7 with 0 and B8 with 20.
Then determine a step size. Too big step size might cause some significant error, and too
small step size make calculating time longer. We try to put 0.2 into B9.
6. Now, put any initial value into cells A12:A14.
For Instance, at t=0, x=1.0 m and v=0 m/s.
7. After above steps, the worksheet must be like this
8. Now press CALCULATE, and the VBA code inside our worksheet will integrate and
display the results under cells filled with initial values.
9. From result data, we can draw a graph x and y versus t like below
We can see that it just resemble the typical graph of Damped Simple Harmonic Motion,
but be careful that we have to compare it to analytical solutions of this model, then
calculate the sum of the error. Try by your selves, but I’m pretty sure the error is small
enough to be neglected