formula in a test program for my sim, with the eventual objective of
picking up this Wheel class and dropping it into my sim proper. My
problem is how the torque applied to the wheel from the road
counteracts the torque applied to the wheel from the driveshaft. At
the moment, I do this:
pacejkaForce is then used to accelerate the car, which gives a new
hubVelocity. My problem is that the torque from the driveshaft is
constant (in the test program), which gives a constant angular
acceleration. Obviously the torque from the road on the wheel will
counteract this torque, and the resultant torque will accelerate the
wheel. The torque from the road on the wheel is pacejkaForce * radius,
I think, opposite in direction to the torqueFromDriveshaft
(counter-clockwise as opposed to clockwise, or vice versa).
I have played around with various ways to do this, but I want to know
the *correct* approximation :-). The main stumbling block is that on a
real car, these two torques are generated simultaneously and rely on
each other, whereas on a computer only calculating one thing at a
time, you need to calculate A to calculate B, but B influences A.
Circular calculations are something which apparently can never be
solved, and anyway I am not about to try, so which is the best
approximation? I am thinking along these lines:
In this example, the torque from the road on the wheel from the last
frame is used to counteract the torque from the driveshaft on this
frame, meaning a lag of 0.01s (or whatever the sim frequency is).
The free-rolling angular velocity of the wheel is also badly defined.
Is this (1) if the wheel continued to roll, with no slip, at the
current angular velocity (ie = lastFrameAngularVelocity), or is it (2)
if the wheel continued to accelerate at the current rate, the angular
velocity at the next timestep? Maybe this is all explained in some
document which I haven't seen, but it seems like a lot of work to get
something working which is in itself just a mathematical approximation
to real life, requires 11 coefficients just for the longitudinal
version, and doesn't even let you easily input tyre speed,
temperature, castor, camber, pressure, contact patch area or pressure
distribution, all of which have some sort of affect on the forces
generated. That is unless I am missing something quite large here.
Moments of inertia are another area which I don't fully understand. I
am using the equation Torque = MoI * AngAcc (F=ma in rotational
terms), but it never seems to work properly. I am confused about
rotating bodies, as well. If an object like a cylinder is rotating and
I grab it, it applies a torque to my hand, while at the same time I am
applying a torque to it. If it is a low-torque motor (like an electric
screwdriver) then I can completely stop it, but I can still feel it
trying to turn in my fingers. If I drop an engine and run it connected
to nothing (or run it in the car with the clutch in :-), the engine is
producing torque, but it is running at constant RPM. I know there
cannot be a resultant torque (as it is not accelerating rotationally),
but where is the opposing torque? Is there a way, using energy or
momentum which solves this, or am I just missing something? If I open
the throttle to 30%, the engine produces more torque, which
accelerates the crankshaft. However, the engine will eventually
equalise at a new RPM, but there is nothing which can be providing a
higher torque on the outside. Please somebody explain all this to me
before my head explodes.
Thanks,
Nick.
PS // I remember somebody asking what conicity was in a tyre in
another post (I am not even sure if it was in rec.autos.simulators),
but as it is relevant: Conicity is a property of a tyre when it is not
completely upright. If it is leaning slightly, it will act as if it is
the bottom of a cone. Imagine the axis drawn from the hub
perpendicular to the wheel until it hits the ground. This happens if a
car is steering in one direction, the wheels will lean outwards at the
top, and conicity will try to make the wheel turn in the other
direction:
-----\
Turning / / \
<--- / X/ \ Drawn from the front/rear (NOT top!)
/ / > \
/ / > \
--------P --------O--------GROUND
TYRE CONE
CONE = Imaginary cone drawn from the wheel, lying on its side on the
road. The base of the cone is the outside of the wheel, and the apex
(point) of the cone is at O. The centreline (axis of symmetry) goes
from X to O along the '>' line. So there you go, some dodgy ASCII art
into the bargain! The wheel doesn't shear like the diagram, but it
rotates around so it would be standing on point P if it were
completely solid.