# General Range Formula



## powerhouse (Apr 1, 2011)

Hey Guys

I'm working on a small school project and I need some help.

Basically, im creating a very simple range calculator in Matlab, a program maker. 

I want to collect some small variables from the user,
Drag Coefficient
Frontal Area
Weight after conversion
Drive efficiency
Tire circumference
rolling resistance
battery pack kWh

I need to know how far someone can expect to go at 10, 20, 30, 40 mph etc. 

I can't find a formula that incorporates drag and frontal area into finding range. I have tried reverse engineering existing calculators, but jeez they have so many variables its ridiculous. 
Also, if any more variables are necessary, or certain ones arent let me know! I just have to figure out how speed is related to range. 

Ultimately, I want the program to create a graph showing range vs speed. So the most important part is that I find out how speed is related to range. 

Any help is appreciated!


----------



## major (Apr 4, 2008)

powerhouse said:


> Any help is appreciated!


You calculate the power required for specific speeds.

The amount of time traveled at a specific speed gives you distance.

The time traveled using a specific power gives you energy.

So using the speed, power, time and energy, you can calculate the distance energy relationship.


----------



## powerhouse (Apr 1, 2011)

major said:


> You calculate the power required for specific speeds.
> 
> The amount of time traveled at a specific speed gives you distance.
> 
> ...


Thanks major !! 

I haven't taken physics yet so its all kinda new to me.

How do you calculate the power necessary at speeds? I think that would require the drag coeff and rolling resistance, but the problem is I don't know the formula that uses those!


----------



## TigerNut (Dec 18, 2009)

Force times distance is work done (in the physics sense), this is equivalent to energy.
Force times velocity is power.

You'll have to work out, for each speed you're interested in, what all of the opposing force components are: air drag, tire rolling resistance, and gravity (if you're going up hills).

Air drag is proportional to the square of your speed, so you'll find that this starts to become significant pretty quickly. Rolling resistance goes down slightly with speed, IIRC. 

You can search out the appropriate conversion constants on Wikipedia, and there are tables of drag coefficients and frontal areas on ecomodder and elsewhere.


----------



## powerhouse (Apr 1, 2011)

TigerNut said:


> Force times distance is work done (in the physics sense), this is equivalent to energy.
> Force times velocity is power.
> 
> You'll have to work out, for each speed you're interested in, what all of the opposing force components are: air drag, tire rolling resistance, and gravity (if you're going up hills).
> ...


Looking for some formulas, kinda tough 

EDIT: I have found a somewhat useful formula

F= (mass x gravity constant x coeff of rolling resistance) + ((density of air x coeff of drag x frontal area x (velocity of vehicle)^2) / 2) + (mass x acceleration) 

This is for flat surfaces


----------



## major (Apr 4, 2008)

powerhouse said:


> Looking for some formulas, kinda tough


It is not unique to EVs. It should be many basic vehicle performance books or papers or lecture notes. I took a look and was surprised it wasn't in this site's wiki.


----------



## powerhouse (Apr 1, 2011)

major said:


> It is not unique to EVs. It should be many basic vehicle performance books or papers or lecture notes. I took a look and was surprised it wasn't in this site's wiki.


Yeah, I searched diy before I even made the thread. Nothing much on the topic unfortunately. 

Using the formula I posted above for force, how would you find power?


----------



## TigerNut (Dec 18, 2009)

powerhouse said:


> Looking for some formulas, kinda tough
> 
> EDIT: I have found a somewhat useful formula
> 
> ...


That should give a pretty good first approximation. Most likely it will give at least a 95% accurate answer, and some of the error will be due to errors in the vehicle mass, drag coefficient, or frontal area.


----------



## major (Apr 4, 2008)

powerhouse said:


> Using the formula I posted above for force, how would you find power?





TigerNut said:


> Force times velocity is power.


______________________________


----------



## PStechPaul (May 1, 2012)

I just made a web page using JavaScript that calculates force and power from the equations above. However I probably don't have the units correct, so please check it out and let me know what typical values are and the units so it will be correct. I can also add other common EV calculations, such as the Torque-HP-RPM formula and wheel RPM to speed. I can jazz it up with English/Metric conversions as well.

http://www.enginuitysystems.com/ForceCalculator.htm

I also put a link in the Wiki.


----------



## powerhouse (Apr 1, 2011)

Alright, im kinda understanding now..

Mass: 1000 
Gravity Constant:	14
Coefficient of Rolling Resistance: 0.02
Density of Air: 0.01
Coefficient of Drag: 0.05
Frontal Area: 2.5 m^2
Velocity: 100 km/hr
Acceleration: 0.1 m/sec/sec

Gives 386.25 kg of force
And 10.729 kg-m/sec of power

So 

if you travel 100 km 
You would travel for an hour, so 3600 seconds. 

Therefore 10.729 (power) x (time) 3600 = 38624 (wh?)

But that doesn't sound right... 38 kWh just to go at 100km/h (60ish mph)?


----------



## Ziggythewiz (May 16, 2010)

There are two separate calculations you need. One to get up to speed, where you're primarily fighting your weight, and one to maintain that speed where weight matters little and all you're fighting is drag. 

As ballpark numbers, you would want around your 38kW (or better) to get to 60 mph in a reasonable amount of time, but once there you'll cruise around 10-20kW.


----------



## major (Apr 4, 2008)

powerhouse said:


> Alright, im kinda understanding now..
> 
> Mass: 1000
> Gravity Constant: 14
> ...


Nope, you're all over the place. It is a big help to use the proper units when doing calculations. When those units don't work out, it is a clue you've messed up. See: http://www.chemie.fu-berlin.de/chemistry/general/si_en.html/ and other references.

Example: Power in Watts (W). Time in seconds (s). Energy in Joules (J). A Joule is also defined as a Watt second (Ws). Then energy is power times time, J = W * s = Ws. 

Coefficient of drag is way off for any shaped object of which I am aware.


----------



## GerhardRP (Nov 17, 2009)

major said:


> Coefficient of drag is way off for any shaped object of which I am aware.


look here:
http://en.wikipedia.org/wiki/Automobile_drag_coefficient
Gerhard


----------



## Daox (Jan 18, 2008)

Ecomodder has a great aero, rolling resistance, power, and mpg calculator on their site. They also site the formulas used.


----------



## TigerNut (Dec 18, 2009)

Just because values are present in an input box when you go to a given site, doesn't mean they're right...

"gravity constant"? There are only two in common use, g = 9.81 m/s/s or 32.2 ft/s/s (depending on if you use Metric or Imperial measures), and G, the universal gravitational constant used in astronomy. You want 'g'.

Similarly, the density of air is dependent on temperature, but 0.1 is not the right number for nearly any temperature or altitude you're likely to encounter. http://en.wikipedia.org/wiki/Density_of_air

Drag coefficient should be in the range of 0.15 to 0.5. 

2.5 m^2 for frontal area is pretty huge... not many cars will have that.

Still, putting in reasonable values for all these gives a pretty huge force number. Strictly, "force" should be Newtons - maybe we have a units problem?


----------



## PStechPaul (May 1, 2012)

OK, I think I have fixed the calculator, and I added some automatic conversions to English units. Please try again:

http://www.enginuitysystems.com/ForceCalculator.htm

Note: I am having problems getting it to work with IE9. But it seems OK with Firefox and Chrome.

I think I'll add a Peukert calculator and other handy functions. 

Here is a more capable utility that I may enhance with more functions, but just adding Peukert was a challenge.

http://www.enginuitysystems.com/EVCalculator.htm


----------



## GerhardRP (Nov 17, 2009)

PStechPaul said:


> Here is a more capable utility that I may enhance with more functions, but just adding Peukert was a challenge.
> 
> http://www.enginuitysystems.com/EVCalculator.htm


Nice. 
The compute hours and compute capacity effectively do the same thing, because they call each other. [How does than not end up as an infinite loop?]
Another function might be compute current, for when you want to operate for some selected time.
Gerhard


----------



## PStechPaul (May 1, 2012)

GerhardRP said:


> Nice.
> The compute hours and compute capacity effectively do the same thing, because they call each other. [How does than not end up as an infinite loop?]


Yup, it was an infinite loop. But apparently JavaScript detects such recursion and handles it nicely. So I made the correction. Thanks for pointing out this booboo! 



> Another function might be compute current, for when you want to operate for some selected time.
> Gerhard


Done. It was a bit tricky, but seems to work well. 

I can think of lots of other common calculations I can add to this. Or it can be a collaborative effort if you'd like to add anything. I can then upload it to my server, or maybe it can also be on the forum server.

Of course there are other much more detailed EV calculators, but I wanted something simple for commonly used calculations.


----------



## GerhardRP (Nov 17, 2009)

Include compute capacity at end of compute current.
Maybe add max DOD as a parameter.
Gerhard


----------

