David Megginson wrote:
> In YASim, propellers start turning backwards instead of windmilling.
> This code in PropEngine.cpp might be the problem:
>
>     // Euler-integrate the RPM.  This doesn't need the full-on
>     // Runge-Kutta stuff.
>     float rotacc = (engTorque-propTorque)/Math::abs(_moment);
>     _omega += dt * rotacc;

Sorry, you send this to me privately and I haven't looked at it. :)

I think it's more complicated.  The propTorque value comes out of
Propeller::calc(), and by design the point of zero torque is *not* the
same as the point of zero thrust.  When the propeller is below the
windmilling speed, propTorque should come out negative and accelerate
the rotation to the appropriate value.

Propeller::calc() is a rat's nest, sadly.  I had some cool ideas about
how to get props to auto-tune to specified performance numbers (the
same goal as the solver, though the method was radically different),
and this is the result.  The math doesn't show through the code very
well.  I wrote up a LaTeX document at one point, although it was never
finished and the code implements something slightly different.  I'll
see if I can dig it up.

If someone wants to try debugging this, I'd write a wrapper that runs
the calc method over a range of airspeeds and engine speeds (omega, in
the code) and graph the results.  You should see that torque reaches
zero at some positive value of omega depending on airspeed.  Hopefully
I just flipped a sign somewhere and there isn't a big logic gaff in
there.

But I promise, I'll come back someday. :)

Andy

-- 
Andrew J. Ross        Beyond the Ordinary        Plausibility Productions
Sole Proprietor       Beneath the Infinite       Hillsboro, OR
                  Experience... the Plausible?



_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to