AIRDEN Equation

A forum for discussing the creation, modification, and loading of embedded code for B&G MS-I/MS-II.
Forum rules
Read the manual to see if your question is answered there before posting. Many users will not reply if the answer is already available in the manual.

If your question is about troubleshooting, configuration, or tuning, you MUST include your processor type (MS-I or MS-II) and code version in your post. If your question is about PCB assembly or modifications, you must also include the main board version number (1.01, 2.2 or 3.0).

If you have questions about MS1/Extra or MS2/Extra code configuration or tuning, please post them at www.msextra.com Such questions posted here will be moved to: a temporary MSextra sub-forum, where they will be removed after 7 days

The full forum rules are here: Forum Rules, be sure to read them all regularly.
Post Reply
rscubelek
MegaSquirt Newbie
Posts: 4
Joined: Tue Oct 18, 2011 10:00 pm

AIRDEN Equation

Post 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?
Matt Cramer
Super Squirter
Posts: 2951
Joined: Sat Jul 03, 2004 11:35 am

Re: AIRDEN Equation

Post 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
rscubelek
MegaSquirt Newbie
Posts: 4
Joined: Tue Oct 18, 2011 10:00 pm

Re: AIRDEN Equation

Post 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?
msiddalingaiah
Helpful Squirter
Posts: 68
Joined: Fri Oct 09, 2009 7:39 am
Location: Maryland, US
Contact:

Re: AIRDEN Equation

Post 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
Madhu
1990 Suzuki DR350S EFI Conversion
Returnless, adjustable electronic Fuel Pump Controller requires less power
rscubelek
MegaSquirt Newbie
Posts: 4
Joined: Tue Oct 18, 2011 10:00 pm

Re: AIRDEN Equation

Post by rscubelek »

Ah, alright, thank you guys for your help.
rscubelek
MegaSquirt Newbie
Posts: 4
Joined: Tue Oct 18, 2011 10:00 pm

Derivations of Equations used in Megasquirt

Post 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.
msiddalingaiah
Helpful Squirter
Posts: 68
Joined: Fri Oct 09, 2009 7:39 am
Location: Maryland, US
Contact:

Re: Derivations of Equations used in Megasquirt

Post 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.
Madhu
1990 Suzuki DR350S EFI Conversion
Returnless, adjustable electronic Fuel Pump Controller requires less power
Post Reply