Just to give you some basic equations to work from:
Acceleration (in metres per second) = Force (in Newtons)/Mass (in Kilograms)
So at any given moment in your simulation, to work out the instantaneous acceleration, you just need to know the vehicle mass, the force being exerted at the contact patch and the forces resisting forward motion (ie. air resistance, rolling resistance etc.)
To work out your linear force at the contact patch, you need to work from the engine down. You'll need either an algorithm or a table which can tell you what torque the engine will output at a given RPM (at full throttle). This can be either a look up table which interpolates between values, or a fancy equation like what Scawen does
.
From this torque value you need to multiply by the current gear ratio to give you torque at the driveshaft. Engines are nearly always geared down, so torque at the drive shaft will be greater, and RPM lower.
Its preferable to use units of Nm for torque just to make things easier. Now to convert this driveshaft torque to linear force at the contact patch, you need to divide by the wheel/tyre radius.
So if you have a driveshaft torque of 1000Nm, and a tyre radius of 0.5m, you will get a linear force pushind the car forwards of 2000N.
linear driving force = (engineTorque*gearRatio)/tyreRadius
Resistance force from the air is basically proportional to the square of the velocity, so your equation for resistance is simply CdA*VelocitySquared (velocity in m/s). CdA is the coefficient of drag and is simply a constant that depends on the size and shape of the car, you can probably just play around with that value to get reasonable behaviour, or do some googling to find out what the typical values are for drag racers.
So now your actual net force (N)= Driving Force - Resistance Force
So your vehicle acceleration(m/s/s) = netForce(N) / vehicleMass(kg)
Now the question of turning these equations for a given moment in time into a continuous simulation is one I havent got much experience of, but if I was going to set out to do it, it would be like this.
We basically need to perform these equations to determine acceleration at one moment in time, then assume we have continued to accelerate at the same rate until the next time we calculate the acceleration, which should ideally be a fixed length of time, for simplicity of coding, although this may be difficult in javascript.
So assume we are travelling at 50m/s, and our calcs reveal we are accelerating at 10m/s/s. At that rate, in 1 second we would be travelling at 60m/s, but say our calculation rate is 50hz that means in 0.02s we will have increased our velocity by 10*0.02, or 0.2m/s.
So we add that to our velocity giving us 50.2m/s and start all over again.
The main difficulty with this approach is getting to and from stationary, as if your velocity is 0, all kinds of things go horribly wrong with the calcs, but given that you are doing drag racing, you can probably just script the start to give the car a small initial velocity, then then the simulation take over from there.
A further complication of the timestep method is if you cant rely on fixed lengths of time between your calcuations, then you need some method of keeping track of how much
actually passed between frames, and putting that value into the equations. Again, I dont know if javascript in max can do this.
Anyway, enough rambling. Sounds like an interesting project, good luck with it.