PHYS 220 — HW #4
This assignment is due at the beginning of lecture on
Monday, 23 Feb.
The equations of motion for a golf ball in a realistic atmosphere
are given by (be careful of signs!):
- d²x/dt² = - (Fdrag_x +
Sωvy) / m
- d²y/dt² = -g - (Fdrag_y -
Sωvx) / m
The drag force is the same "quadratic" drag force we encountered
in Lab #3 and lecture. S and ω
represent a coefficient used to estimate the Magnus force on a
spinning ball and the rotation rate of that ball.
- Write out the figurative representation of the vector containing
the variables in the problem as vars = [ ... ].
- Using valid MATLAB code, write the single line of code for the
derivative function (if you defined an auxiliary variable for ease
of writing out that line, provide it as
well) dvarsdt = [ ... ].
- List the parameters you need to pass into your derivative function.
The following problem concerns error analysis/control. You're modelling a
non-linear oscillator that has a characteristic amplitude of
45°. You're currently running your simulation with a timestep Δto = 0.05 s. For the problem at
hand you desire a fractional error of 0.5% of the amplitude scale.
- At some point in your simulation you
estimate a local truncation error of -0.09°. Calculate
Δt1 required for the following methods:
- Euler method
- Mid-point method (rk2)
- Runge-Kutta method (rk4)
Further into the simulation you estimate a local truncation error
of 0.9°. Calculate Δt1 required for the
following methods:
- Euler method
- Mid-point method (rk2)
- Runge-Kutta method (rk4)
Comment on the results found in 4 & 5, above.