You are on page 1of 2

Computational Assignment

June 8, 2021

1 Kinematics of a Point Mass under constant


Acceleration

Consider the kinematics of a point mass under constant acceleration being de-
scribed by the following set of equations,

v = u + at (1)

1
s = ut + at2 (2)
2

v2 = u2 + 2a.s (3)
where the variables have their usual meaning. Assume the particle was
subjected to a constant acceleration (a = 5 m/s2 ) from t = 0 to 10s. Particle
was initially at rest.

(a) Write a code to get final velocities after each time step and print those
values. Hint: You may assume any value time step. You need to clearly mention
the time step you have taken in your code. Say, you can go from 0s to 10s with
a step size of 1s or 2s; like 0, 1, 2 .... 10 or 0, 2, 4 ... 10.

(b) Plot v vs t

(c) Do the same to get displacement after each time step and print those
value.

(d) Plot s vs t

(e) What is your speculation about the role of time steps here? Would
you expect your plots to be affected by the choice of time step? Give proper
reasoning which plot (v vs t or s vs t) you would expect to be affected and why?

1
(f) Plot v vs t and and plot s vs t for 4 different set of time steps (larger
to smaller) and see if your reasoning stated in part (e) matches with the the
results that you got in part (f).

(g) Bonus Part: Now instead of taking u = 0 m/s, a = 5 m/s2 and final
time = 10 s, you can define user input variable for initial velocity, acceleration
and final time and redo all the parts.

2 Application of Quadratic Equation


You can use your previously written code for solving the roots of Quadratic
Equation and apply it solve equation (2). You can assume following values of
the physical quantities to proceed,

u = 5 m/s, a = 10 m/s2
Find time (in seconds) at which particle’s displacement is 5m.

You can submit your code and results (observations, plots, con-
clusion etc) along with what takeaway message you got from this
assignment in a PDF file.

You might also like