This might be of some use; it’s the (paraphrased) code I used to make the torque curves 'n stuff I posted above. It might give an idea of the number of parameters used to “predict” the performance.
The total drag on the car (in kN) is given by the equation below (where veh_speed is the speed of the car in m/s at any given point, A is the frontal area taken as the height*width, Cd is the drag coefficient, generally about ~0.3 for a standard family car, decreasing down to ~0.05 for a top-end supercar, and rho is the density of the air, ~1.225 kg/m^3. “ad” is the drag due to the surface the tyres are in contact with, and is a figure roughly between 0.01 and 0.3)
I’m aware I haven’t said what bd is; that’s because I don’t remember, and have to wait to download MatLab again so I can check in the actual file.
Total_Drag = (VehicleMass+DriverMass)*gravity*(ad + bd*veh_speed)+1/2*rho*A*Cd*veh_speed^2
The maximum power available from the engine at any given point is calculated by several equations.
Number 1 (where EngineSpeed is the current base engine speed in rpm; i.e. what the crankshaft is rotating at).
EngSpdRad = EngineSpeed*2*pi/60
Number 2 (unfortunately I don’t have the code for the torque map, it was produced using a seperate program I didn’t write
X-axis is engine speed in rpm, Y-axis is Nm)
EngPower = EngSpdRad*EngineTorque
Then, taking the largest value from the previous calculation,
CurrentTractiveEffort = maxPower/veh_speed
(Now, bare in mind that this value is not the actual tractive effort figure; we haven’t discussed gears yet…)
So, moving onto the actual fun stuff…
In this calculation the EngineTorque is the current torque the engine is producing. As I don’t know quite how this is calculated I can only suggest you set the torque to a figure roughly based on the Y-axis figures in the image above, given the current engine speed (in rpm).
(FinalDriveRatio is a figure generally between 3 and 5, GearRatios[i] will be a table of ratios; I can’t check what figures they are until I’ve downloaded MatLab again, which I’ll try do overnight. Yes, overnight… It’s a 2GB file and our internet is <2mb/s… RollingRadius is [I think] simply the radius of the tyre)
for i = 1,6 do
TractiveEffort = (EngineTorque*FinalDriveRatio*GearRatios[i]*transEfficiency)/RollingRadius
veh_speed = EngSpdRad/GearRatios[i]*FinalDriveRatio*2*pi*RollingRadius/60
end
Here are a few images that might be of additional use to see standard torque and power curves against vehicle speed (taken from my course documents).
Hope all this help a bit and doesn’t just add confusion lol