Sie sind auf Seite 1von 5

Mini Project IV

ME373
Due: March 1 (in class)1
Instructions
1. You are required to solve all problems for credit; however, not all problems will be graded. A
random sample of problems will be selected for grading.

2. You will submit one report per group. Clearly print names of all group members. Use this
front page as cover sheet.

3. You must show all detailed steps to get full credit. Please write legibly.

4. For ease in grading, please do NOT write on the backside of the paper.

5. If you are asked to plot graphs, all graphs should be clearly labeled; i.e. the x and y axes of
the plots should be labeled. If there are multiple curves on the same graph, indicate what
each curve corresponds to. Clearly show the range of the axes. The plots should be clearly
readable. Provide legends. Give caption to each plot.

6. If you have questions please do not hesitate to contact me. Good Luck!

1
All assignments are due before the start of the lecture, unless otherwise stated.

1
1. Consider the following differential equation:

d2 y dy
2
+ 2 + y = 0; y(0) = 1; y 0 (0) = 0. (1)
dx dx
(a) Find the maximum possible time-step that can still provide a stable solution using For-
ward Euler scheme for discretization. Use symbol ∆x for step size. Show all steps in
detail, clearly identify your notation.
(b) Using central differencing, find the finite difference approximation for the above differ-
ential equation. Your answer should be in a matrix-vector form.

2. Motion of a simple pendulum (see Fig 3) consisting of a mass m attached to a string of length
` and placed in a viscous fluid can be approximated by the following equation of motion for
a damped system:

g
θ00 + cθ0 = − θ (2)
`
where g is the gravitational acceleration, and θ the angle made by the string with the vertical
axis, c is the damping coefficient [in sec−1 ]. Let g = 9.81 m/sec2 , and ` = 0.6 m, c = 4 sec−1 .
Assume that the pendulum starts from rest with θ(t = 0) = 10◦ .

(a) Evaluate the exact solution (i.e. analytical approach) for the system (equation 2) using
the above values for the coefficients. Show all steps.
(b) Convert the second order differential equation 2 into two first order differential equations.
Identify the initial conditions. Work in symbolic variables. Write the system of equations
in a matrix-vector format.
(c) Using Forward Euler scheme, find the finite difference approximation for the system of
differential equations in the matrix-vector format. Then, using stability analysis identify
if the scheme is conditionally stable, unconditionally stable, or unconditionally unstable.
If stable, find out any restrictions on the step size. Show all steps.
(d) Using the forward Euler scheme, and ∆t = 0.1, compute the solution for the first three
time-steps (i.e. t = 0.1, 0.2, 0.3) using hand (calculator) calculations. Show all steps in
evaluating these hand calculations.

2
(e) Write a computer program to evaluate and plot (see instructions below for plotting)
numerical solution to the system of equations (i.e. (θ(t) at discrete times) using the
Forward Euler Scheme. Provide copy of your program with appropriate comments in
Matlab.
i. Find solution for 0 ≤ t ≤ 6 using the following time-steps (∆t = 0.1, 0.05, 0.025,
0.0125, 0.00625). Plot the solution for each time-step on the same figure. But use
clearly distinct line-types (or symbols + lines) to distinguish the plots. Your θ should
be in degrees and clearly label the axes with proper legend. On the same plot, also
plot the ‘exact solution’ obtained above (it should give a very smooth curve, i.e. use
sufficient discrete points for plotting the exact solution).
ii. For each time step, evaluate the maximum error (max ) in the solution over the period
0 ≤ t ≤ 6 using,
numerical
max = MAX}t=6 exact

t=0
θ (t) − θ (t) , (3)

where superscripts numerical and exact correspond to the numerically obtained


solution and exact solution at the discrete points based on respective time-steps
used and | | corresponds to the absolute of the error. Tabulate the above error
calculated for each time-step in a table showing ∆t and max as two columns.
iii. Plot the error (on y-axis) versus ∆t (from the table), on a log-log plot. Clearly label
your plot with proper legend. You should get nearly a straight line on a log-log plot.
Obtain approximate slope of the line. What does the slope represent? Comment on
your findings.

3. Baseball dynamics depends on the ball’s seam, the air drag, the initial rotational and linear
speeds and the orientation of the ball. Consider a left-handed pitcher pitching a ‘slider’ to
right-handed batter (see attached figure). Assuming that x measures displacement from the
pitcher to the batter, z measures vertical displacement of the ball (+z is upward displacement
direction (against gravity)), and y measures horizontal displacement (+y corresponds to the
displacement to the hitter’s right-hand side), v0 is the initial speed of the ball, θ is the angle
made by the ball’s trajectory with the x axis (see figure), ω ~ is the angular velocity vector
written as ω~ = ω(0, sin(φ), cos(φ)), where φ is the angle made by the angular velocity vector
with the vertical axis (z). For a slider, φ = 0. Let the distance between the pitcher and the
batter be 18.44 m. The initial rotational spin is |ω| = 1800 rpm with φ = 0◦ . Since CC is a
left handed pitcher, the spin will be in the reverse direction, and so use ω = −1800 rpm. The
trajectory and the speed of the baseball is governed by the following system of equations:

dx
= vx (4)
dt
dy
= vy (5)
dt
dz
= vz (6)
dt
dvx
= −F (v)vvx + Bω(vz sin(φ) − vy cos(φ)) (7)
dt

3
dvy
= −F (v)vvy + Bωvx cos(φ) (8)
dt
dvz
= −g − F (v)vvz + Bωvx sin(φ) (9)
dt
where vx , vy , and vz are the velocity componentspin the x, y, and z directions, respectively.
Also, v corresponds to the speed of the ball v = vx2 + vy2 + vz2 , g = 9.81 is the gravitational
acceleration, and F (v) is the drag force experienced by the baseball which is given as,
0.0058
F (v) = 0.0039 + , (10)
1 + exp[(v − 35)/5]

in SI units. B in the above expression results from a force called Magnus Force, a force
due to rotation of the ball in a shearing flow that causes the ball to curve during its forward
flight. Use B = 4.1 × 10−4 (note that B is dimensionless quantity).
Let the following be the initial conditions for the above system of equations:

x(t = 0) = 0 (11)
y(t = 0) = 0 (12)
z(t = 0) = 0 (13)
vx (t = 0) = v0 cos(θ) (14)
vy (t = 0) = 0 (15)
vz (t = 0) = v0 sin(θ), (16)

where v0 = 85 mph is the initial speed, and θ = 1◦ .

(a) Using Forward Euler discretization scheme, obtain a finite difference approximation for
each of the equations. Because of the non-linear equations, it is not necessary and
not recommended to write this in matrix-vector form.

4
(b) Solve above system of differential equations (i.e. write a program that will solve the
above equations using Forward Euler) and obtain solution up to a time at which the
ball crosses the batter (i.e. travels a total distance of 18.44 m. Be careful with the unit
conversions (convert all quantities to SI units). What is the time required for the ball to
cross the batter in seconds? What is the speed of the ball (in miles per hour) when it
just crosses the batter? Choose ∆t = 1 × 10−4 s.
(c) Plot z (i.e. vertical displacement of the ball) against x (x on x-axis). On the same plot
(and using different line style) plot y (i.e. horizontal displacement of the ball) against
x. Clearly label your plots. [For plotting purposes, convert x, y and z in feet
rather than meters.] What is the net vertical displacement of the ball (note positive
displacement is vertically upwards) as it crosses the batter? What is the net horizontal
displacement of the ball as it crosses the batter?

Das könnte Ihnen auch gefallen