Power required to reach X velocity in X time with drag

AI Thread Summary
The discussion focuses on calculating the power required for a car to reach a specific speed within a given time, factoring in drag. The initial calculations provided a power estimate of 20,000 W in a vacuum, but adjustments for drag led to an incorrect estimate of 21,000 W, with a trial-and-error approach revealing the actual requirement to be around 23,500 W. Participants emphasized the need for numerical integration due to the nonlinear nature of drag, suggesting methods like Euler-Integration for simulating acceleration over time. Additionally, they highlighted the importance of considering tire traction limits at low speeds and the complexities of integrating the equations involved. The conversation concluded with acknowledgment of the learning curve involved in mastering these calculations and methods.
A_User
Messages
5
Reaction score
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?
 
Physics news on Phys.org
A_User said:
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).
 
A.T. said:
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
 
A_User said:
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.
 
A.T. said:
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
 
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.
 
  • Like
Likes A_User
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
Thank you everyone for your very complete answers, looks like I got a lot of learning to do!
 
jaumzaum said:
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
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.
 
  • Like
Likes cjl
  • #11
Yes I used a placeholder constant of 1 to make things simpler until I could figure out integration
 
Back
Top