Graphing Terminal Velocity using Euler's Method

AI Thread Summary
The discussion focuses on calculating terminal velocity using Euler's Method for a 20kg object shot upward with an initial velocity of 20m/s, considering a drag coefficient of 0.25 and gravity at 9.8m/s². The user is uncertain about the accuracy of their acceleration vs. time graph, particularly regarding a "wiggle" observed around -9.8m/s². Responses indicate that the graph's shape appears correct, with the wiggle reflecting changes in the velocity slope, particularly around t=2 seconds. Suggestions include adjusting the drag coefficient to better visualize the relationship between acceleration and velocity. The conversation emphasizes the importance of understanding how acceleration curves relate to the slopes of velocity graphs.
jinksys
Messages
122
Reaction score
0
Suppose an object of 20kg is shot upward with an initial velocity of 20m/s. The drag coefficient I've chosen is 0.25, and gravity is 9.8m/s. I'm trying to calculate the terminal velocity using Euler's Method (using a C prog), and then graph the data using openoffice. I know I am converging to the correct terminal velocity, however I'm not confident in my graph of acceleration vs time.

Does this look right?

http://i36.tinypic.com/10p4jmh.png"

Here is my code:
PHP:
#include <stdio.h>
#include <unistd.h>
#include <math.h>
#include <stdlib.h>

double accel(double v);
double velocity(double v, double a, double t);


int main()
{
double a,v,t,time;
v=0.0;
t=0.01;
a=1.0;
time=0.0;
printf("Velocity, Acceleration, Time,\n");

while(fabs(a)>0.00001)
	{
	a=accel(v);
	printf("%f, %f, %f,\n",v,a,time);
	v=velocity(v,a,t);
	time+=0.01;
	}

}

double accel(double v)
{

double a,k,g,m;
k=0.25;
g=9.8;
m=20.0;

if(v!=0.0){
	a=(-k*v*v*fabs(v));
	a/=m*v;
	a-=g;
	return a;
	}

	return -9.8;
}

double velocity(double v, double a, double t)
{
v = v + (a * t);
return v;
}
 
Last edited by a moderator:
Physics news on Phys.org
Hi jinksys,

The shape of the curve looks fine to me; was there something in particular that bothered you about it?
 
alphysicist said:
Hi jinksys,

The shape of the curve looks fine to me; was there something in particular that bothered you about it?

Well, my professor said that my graph of velocity vs time http://i38.tinypic.com/51368i.png" is correct. However, since my acceleration is essentially a graph of the velocity's slope, the "wiggle" around -9.8 should represent something on my velocity graph around 0m/s. He's not seeing where I get the wiggle.

So you're saying the graph looks correct? What is causing the wiggle?
 
Last edited by a moderator:
jinksys said:
Well, my professor said that my graph of velocity vs time http://i38.tinypic.com/51368i.png" is correct. However, since my acceleration is essentially a graph of the velocity's slope, the "wiggle" around -9.8 should represent something on my velocity graph around 0m/s. He's not seeing where I get the wiggle.

So you're saying the graph looks correct? What is causing the wiggle?


The wiggle on the a vs. t graph occurs at arount t=2, and that corresponds to what is happening at t=2 on the v vs. t graph.

If you look at the acceleration curve, it starts out at about -14.8 or so, and then the wiggle is at -9.8m/s, and then it rapidly goes to zero.

This corresponds to the velocity curve: initially it has a slope of about -14.8; the slope changes to -9.8 around t=2 seconds and the wiggle is showing that that slope stays approximately constant arount t=2 seconds.


I think if you change your drag coefficient to about 2.5, and look at the a and v curve at around t=1 second, it is easier to see what is going on. (Notice that around t=0 the v curve is sloped, around t=1 is approximately straight, and past t=1 it curves again.)



The thing to remember is that the acceleration curve gives the slope of the velocity curve: so these wiggles (which are where the acceleration curves are not changing very much) indicates that the velocity slope is roughly a straight line at that time.
 
Last edited by a moderator:
Thread 'Variable mass system : water sprayed into a moving container'
Starting with the mass considerations #m(t)# is mass of water #M_{c}# mass of container and #M(t)# mass of total system $$M(t) = M_{C} + m(t)$$ $$\Rightarrow \frac{dM(t)}{dt} = \frac{dm(t)}{dt}$$ $$P_i = Mv + u \, dm$$ $$P_f = (M + dm)(v + dv)$$ $$\Delta P = M \, dv + (v - u) \, dm$$ $$F = \frac{dP}{dt} = M \frac{dv}{dt} + (v - u) \frac{dm}{dt}$$ $$F = u \frac{dm}{dt} = \rho A u^2$$ from conservation of momentum , the cannon recoils with the same force which it applies. $$\quad \frac{dm}{dt}...
TL;DR Summary: I came across this question from a Sri Lankan A-level textbook. Question - An ice cube with a length of 10 cm is immersed in water at 0 °C. An observer observes the ice cube from the water, and it seems to be 7.75 cm long. If the refractive index of water is 4/3, find the height of the ice cube immersed in the water. I could not understand how the apparent height of the ice cube in the water depends on the height of the ice cube immersed in the water. Does anyone have an...
Back
Top