Page 1 of 1

AIRDEN Equation

Posted: Tue Oct 18, 2011 10:07 pm
by rscubelek
In the "How Megasquirt Works" section of http://www.megasquirt.info, the given AIRDEN equation is as follows:

AIRDEN(MAP, temp) = (0.0391568* (MAP*10-31.0)) / ((temp+459.7) * 1728)

and below the equation is the explanation of the equation, where it states:

459.7 is used to convert from Fahrenheit to absolute temperature


Degrees fahrenheit do NOT have a linear relationship with degrees Kelvin, so where does that 459.7 come from? The proper equation to convert degrees fahrenheit to degrees kelvin is as follows:

K = 5/9 (Degrees fahrenheit - 32) + 273

Is this an error in the Megasquirt literature, or is there some kind of justification for using the number 459.7? Because 459.7 K is like 368 F.

If anyone knows, please help me out.


EDIT: Also, what is the constant 0.0391568 used for?

Re: AIRDEN Equation

Posted: Wed Oct 19, 2011 4:39 am
by Matt Cramer
Because absolute zero is -459.7 degrees Fahrenheit, to the nearest degree. The equation is not working in degrees Kelvin at this point, but degrees Rankine.

http://en.wikipedia.org/wiki/Rankine_scale

Re: AIRDEN Equation

Posted: Wed Oct 19, 2011 2:37 pm
by rscubelek
Ah, alright. The page said nothing about degrees Rankine, I actually have never heard of it until I looked at that wikipedia page.

When I plug in the same information, in its respective units, into both the standard version and the metric version of this AIRDEN equation, should I not get the same number from either equation?

Also, what is that constant 0.0391568 used for?

Re: AIRDEN Equation

Posted: Thu Oct 20, 2011 3:13 pm
by msiddalingaiah
rscubelek wrote:When I plug in the same information, in its respective units, into both the standard version and the metric version of this AIRDEN equation, should I not get the same number from either equation?
The quantity will be the same, but the numbers will be different since the units are not the same.
rscubelek wrote:Also, what is that constant 0.0391568 used for?
It looks like it is the universal gas constant multiplied by a factor to make the units work:

http://en.wikipedia.org/wiki/Gas_constant

As far as I can tell, the AIRDEN equation is the ideal gas law rearranged with different units:

http://en.wikipedia.org/wiki/Ideal_gas_law

Re: AIRDEN Equation

Posted: Thu Oct 20, 2011 3:30 pm
by rscubelek
Ah, alright, thank you guys for your help.

Derivations of Equations used in Megasquirt

Posted: Thu Oct 20, 2011 3:32 pm
by rscubelek
I was wondering, does anyone have the derivations of the equations used in Megasquirt, such as the AIRDEN equation and the REQ_FUEL equation? I would be very interested in knowing more about these equations. Thanks in advance.

Re: Derivations of Equations used in Megasquirt

Posted: Sun Oct 23, 2011 6:18 am
by msiddalingaiah
rscubelek wrote:I was wondering, does anyone have the derivations of the equations used in Megasquirt, such as the AIRDEN equation and the REQ_FUEL equation? I would be very interested in knowing more about these equations. Thanks in advance.
I went through it once using MKS units. For whatever reason, I think MS does it English units, which gives me a headache.
The outline is spelled out in the Megamanual. For speed-density, it goes something like this:

Given the ideal gas law:

PV = nRT

You need air mass per engine stroke, which is

m_air = n * molar_mass_air

P is the manifold pressure (MAP), V is the engine displacement (DISP), R is the gas constant, T is air temperature. Rearranging, you get:

m_air = MAP * DISP * molar_mass_air / (R * T)

From thisou you calculate fuel mass, which is

m_fuel = m_air / AFR

Given fuel per engine stroke, pulse width per stroke is

t = m_fuel / inj_flow_rate

This is multiplied by the appropriate entry in the VE table, corrections for warm up, accel/decel enrichment, injector open time are added, and there you have it.