Power required to reach X velocity in X time with drag

  • #1
5
0
Hello,
I wrote a program that adds force to a car like so:
Engine Force = Power / Velocity
Drag Force = -Velocity²
Net Force = Engine Force - Drag Force = Power / Velocity - Velocity²
I'd like to determine power based on how fast I want a car of a given mass to reach a given speed, for example, 0 to 20 m/s in 10 seconds for a 1000 kg car. Here is the equation I came up with to calculate the power needed without any drag:
Power = Force * Velocity = (Mass * Average Acceleration) * (Displacement / Time)

Using it to solve the example:

Mass = 1000 kg
Time = 10 s
Average Acceleration = 20 / 10 = 2 m/s
Displacement = 0.5 * 2 * 10² = 100 m
Power = (1000 * 2) * (100 / 10) = 20,000 W to go from 0 to 20 m/s in 10 seconds for a 1000 kg car
I'm not sure if that equation is sound but it calculates the power needed in a vacuum perfectly. The problems start when I try to account for drag:

Net Force = Power / Velocity - Speed²
Net Force + Speed² = Power / Velocity
Power = (Net Force + Velocity²) * Velocity
Power = [(Mass * Average Acceleration) + (Displacement / Time)²] * (Displacement / Time) = 21,000 W

This is incorrect. When I run my program with the calculated power, it takes the car ~11.5 s to reach 20 m/s, not 10 s. By trial and error, I determined that the correct value is ~23,500 W.

I've tried all day to find the correct equation with no success. What am I doing wrong?
 

Answers and Replies

  • #2
A.T.
Science Advisor
11,453
2,824
What am I doing wrong?
Since the drag is nonlinear you cannot use averaged values. You have to do actual integration (eventually numerically, so it's good that it's a program).
 
  • #3
5
0
Since the drag is nonlinear you cannot use averaged values. You have to do actual integration (eventually numerically, so it's good that it's a program).
That was my hunch, but I don't know how to go about it, I never learned integrals, much less how to solve them
 
  • #4
A.T.
Science Advisor
11,453
2,824
That was my hunch, but I don't know how to go about it, I never learned integrals, much less how to solve them
If you integrate over time numerically, you basically simulate the car in small time steps. The simplest approach for this is Euler-Integration. This gives you the duration to reach a given speed for a given power.

In an outer optimization loop you can then find the power needed for a given duration to reach a given speed. You can use Newton-Method here.

But note that the power that goes into acceleration cannot be constant throughout the acceleration. It's zero when v=0, for example.
 
  • #5
5
0
If you integrate over time numerically, you basically simulate the car in small time steps. The simplest approach for this is Euler-Integration. This gives you the duration to reach a given speed for a given power.

In an outer optimization loop you can then find the power needed for a given duration to reach a given speed. You can use Newton-Method here.

But note that the power that goes into acceleration cannot be constant throughout the acceleration. It's zero when v=0, for example.
I'll give it a try, thanks
 
  • #6
jack action
Science Advisor
Insights Author
Gold Member
2,284
4,282
When you consider aerodynamics, the acceleration becomes a function of velocity (equation 1b).

You also have to consider the maximum tractive force you can get. You correctly identified the one based on power. But at low speeds - as noted by @A.T. - you will have to consider the one based on tire traction, which can accept less than what the power can provide.

Then you can numerically integrate this way to find the distance traveled and the time taken to do it.

All of this theory is neatly wrapped up in this simulator.
 
  • #7
393
23
If you consider the power of the engine to be constant you would have:
##F=ma=mv'=m\frac{dv}{dt}=P/v-v^2##
##\frac{mv}{P-v^3}dv =dt##
##\int_{0}^{V} \frac{mv}{P-v^3} dv=\int_{0}^{T} dt=T##

This integral is defined, but is a very difficult integral to calculate. The easiest way to solve this problem is to make use computing methods or series.

If you really want to see why the real result you can see here in Wolfram:
https://www.wolframalpha.com/input/?i=int(m+v/(P-v^3),+v)

That monstrous function is equal to T plus the value of that function in zero, which is ##\frac{-\sqrt{3}m\pi}{18 P^{1/3}} ##
To get P you need to substitute the values of m, v and T and find the root of the below equation for P, which I think is not defined. So, anyway, you will have to make use of approximations.
 
  • Like
Likes A_User and jack action
  • #8
5
0
Thank you everyone for your very complete answers, looks like I got a lot of learning to do!
 
  • #9
cjl
Science Advisor
1,916
486
If you consider the power of the engine to be constant you would have:
##F=ma=mv'=m\frac{dv}{dt}=P/v-v^2##
##\frac{mv}{P-v^3}dv =dt##
##\int_{0}^{V} \frac{mv}{P-v^3} dv=\int_{0}^{T} dt=T##

This integral is defined, but is a very difficult integral to calculate. The easiest way to solve this problem is to make use computing methods or series.

If you really want to see why the real result you can see here in Wolfram:
https://www.wolframalpha.com/input/?i=int(m+v/(P-v^3),+v)

That monstrous function is equal to T plus the value of that function in zero, which is ##\frac{-\sqrt{3}m\pi}{18 P^{1/3}} ##
To get P you need to substitute the values of m, v and T and find the root of the below equation for P, which I think is not defined. So, anyway, you will have to make use of approximations.

Minor nitpick - your V^2 term should have a constant attached to account for the aerodynamics of the vehicle - it will basically be equal to 1/2*frontal area*air density*drag coefficient. Aside from that I agree though.
 
  • Like
Likes jaumzaum, A_User and jack action
  • #10
393
23
I just used OP's equations. In the original equation he used this constant equal to one. but I agree the general formula would have a k in there.
 
  • #11
5
0
Yes I used a placeholder constant of 1 to make things simpler until I could figure out integration
 

Related Threads on Power required to reach X velocity in X time with drag

  • Last Post
Replies
3
Views
817
  • Last Post
Replies
3
Views
3K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
17
Views
6K
Replies
5
Views
20K
Replies
3
Views
3K
Replies
3
Views
15K
  • Last Post
Replies
12
Views
1K
  • Last Post
2
Replies
26
Views
10K
Replies
1
Views
1K
Top