Hi,

Andy Ross wrote:
Maik Justus wrote:
Therefore for an wing without flap, spoiler and slat [...] no surface
element is generated.

Ah, OK.  Yes, this was indeed a bug; I'm kinda shocked that we never
noticed this before, it's been there since the code was written.  And
unfortunately it affects *all* wings with segments that like between a
control position and an edge.  Which means that we're going to need to
retest the solution results for basically every YASim aircraft once
this goes in.  Ick. :(

As always, it's nicer to hear about bugs as bug reports, and not as
anonymous changes in a 120k patch file. :) Can you (1) split this out
into a separate patch as above, (2) add a comment explaining the two
new entries in the table, and (3) write "10" instead of "8+2" (or
BOUND_COUNT or sizeof(bounds)/sizeof(bounds[0]), etc...).

Here it (the patch) is.

But before testing it with any YASim aircraft: I probably found another bug in surface.cpp. For "general lift" and "flap-lift" the effect of stall is calculated in stallFunc() resp. FlapLift(). These functions are similar. In stall they return 1, without stall the "pre stall value" and in between a cubic interpolation. But the results are used quite different. While the result of stallFunc() is reduced by one and than used as factor for an additional lift, the result of FlapLift() is directly added to the lift. In stall, stallFunc() returns 1, which gives (after the mentioned calculation) a summand of zero, but FlapLift() returns a non neutral summand 1. Therefor in stall we get an additional lift from nowhere. If I interpreted the code correct, YASim-fuselages are (nearly *) ) always in stall and produce lift. If the fuselage is large in comparison to the wing, this amount can be rather high. (Maybe this causes the YF-23 to climb without thrust?). In the bo the additonal lift at cruise speed is larger than the drag of the fuselage.

I suggest to change the FlapLift() function to return zero in stall:

diff -u -p -B -r1.6 Surface.cpp
--- Surface.cpp    10 Mar 2006 19:46:16 -0000    1.6
+++ Surface.cpp    6 Aug 2006 15:24:43 -0000
@@ -300,11 +300,11 @@ float Surface::flapLift(float alpha)
    if(alpha < _stalls[0])
        return flapLift;
    else if(alpha > _stalls[0] + _widths[0])
-        return 1;
+        return 0;

    float frac = (alpha - _stalls[0]) / _widths[0];
    frac = frac*frac*(3-2*frac);
-    return flapLift * (1-frac) + frac;
+    return flapLift * (1-frac);
}

float Surface::controlDrag(float lift, float drag)



*) If I interpreted the code correctly, fuselages are nearly always in stall. I think this is another bug. Either they should be always in stall, or they should have more realistic stall parameters. Now they are only not in stall at a very small region (+- a half degree) around an incidence angle of 0 (for flap-lift calculation). The lift of the fuselage of the bo is producing rather high torque. Due to the bug in FlapLift, the no-stall in exactly horizontal flight results in a suddenly appearing pitching of the bo. For fuselages the stall values of the surfaces are not set and therefor they are defined in the surface-constructor :

   for(i=0; i<4; i++) {
       _stalls[i] = 0;
           _widths[i] = 0.01; // half a degree
       }

We could  add

   if(_stalls[0] == 0)
           return 0;

to FlapLift() (like in stallFunc()) and maybe add adjustable stall parameters to fuselages as in wings.

Maik

Attachment: YASim.diff.gz
Description: application/gzip

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to