Question
Aim Given the initial velocity and height of a 1D point particle, thrown up or down, calculate the velocity as a function of time in
Aim Given the initial velocity and height of a 1D point particle, thrown up or down, calculate the velocity as a function of time in the presence of air friction. Background The equation of motion that governs 1D motion with air friction is given below: ma(t)=mg1/2**A*Cd*^2 where is air density, A is the cross section area of the object Cd is a geometric constant. The drag force (the second term) is always in opposite direction to the velocity. Tasks USER INPUT: the initial velocity in m/sec and the height. The simulation of the motion should last until the particle hits the ground. Handle objects being thrown up (i.e. positive initial velocity) or down (i.e. negative initial velocity). You can take reasonable values for the mass (e.g. 1 kg), the time step (e.g. 0.001 sec) and the friction paramaters. Produce output file (S-fric1D.dat) which contains three columns: time, height, velocity. Hints Note that for both sets of initial conditions, terminal velocity has been reached. Allowed Libraries: math random mathplotlib.pyplot or any other equivalent plotting library for constants, see the links on top.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started