Peter
I appreciate the posts. I now have a better understanding of what you are trying to achieve....
It might be useful to look at what a slotted flap is supposed to do from an engineering sense.
Everyone knows that to have lift on the section, there must be higher velocities on the lee side than on the windward side. That's easy to accomplish. What messes things up is the boundary layer. Skin friction is, to first order, proportional to the square of the velocity, so for minimum profile drag, the ideal case would be constant velocities over both the windward and leeward sides. This would result in rectangular pressure distributions on both sides and a constant lift over the whole chord.
But if the flow is attached, the velocities on both sides have to come together at the trailing edge. A.M.O. Smith called that the "dumping velocity" because it's the speed at which the boundary layers are dumped from the element. If the flow is decelerated too rapidly to get down to the dumping velocity, then it will separate. This sort of cuts the corner off the ideal pressure distribution, and the maximum speed has to be higher (and the cut-off corner larger) to maintain the same lift coefficient. If you could raise the dumping velocity, not as much deceleration would be required, and the pressure distribution could come closer to the rectangular ideal. A flap does this for the element ahead of it.
Take a look at the first pressure distribution above. At -8 deg angle of attack, the lee side pressure distribution on the forward element is pretty flat. It wouldn't take much tweaking of the shape to make it even flatter - moving the thickness back to create a little more curvature in the middle and a little less curvature at the leading edge would just about do it.
The same pressures in the second case are even flatter, but the pressure distribution tails off a lot more toward the forward element trailing edge. The dumping velocity for the forward element in this case is a lot lower than it is for the first case. This means the forward element is going to be more subject to separation just ahead of the slot.
The level of the rooftop is also a lot lower for the second case than it is for the first. The lift induced on the forward element by the flap is significantly less. This something that most people don't appreciate. Deflecting the flap doesn't just increase the lift on the flap, it also increases the lift on the forward element(s), too. In fact, the flap effectiveness in most cases is much more from the effect of the flap on the rest of the section than it is from the flap itself. This is why jibs seem to be more effective than mainsails - they get a huge boost from the mainsail itself.
A multi-element airfoil is like a relay race. The baton is handed off to a fresh runner with each succeeding hand-off so the first runners can sprint instead of having to go the distance. The forward-most elements have the highest dumping velocities, so they can have nearly rectangular pressure distributions with high rooftop velocities - they are the sprinters. And like the anchor in a relay, the the flap has to bring the flow home at the trailing edge. The job of the flap is to do the dirty work of the pressure recovery, slowing the lee side flow down to the final dumping velocity, which is a little slower than the freestream speed.
A single-element section is like a lone runner that has to go easier in the beginning to save some energy for the end. It has the same dumping velocity as the flap, but doesn't benefit from getting a fresh start to the boundary layer at intervening points. That's why the maximum lift of a single element section is lower than the maximum lift of a slotted section.
Notice that the pressure gradient over the entire flap in both cases (except for the very leading edge) is adverse. In the first case, the pressure distribution is nearly triangular. This will be a well-behaved pressure recovery, with separation starting at the trailing edge and moving progressively forward as stall sets in. With the high dumping velocity of the forward element and the moderate adverse pressure gradients on the flap, the the flap is being a team player, letting the forward element carry the lift while the flap finishes the job.
In the second case, the loading on the forward element is reduced and more of the load is carried by the flap - mostly in the form of a big leading edge pressure peak. This flap risks the sharp adverse gradient of the pressure peak causing massive separation of the entire flap. The flap is trying to outshine the star forward element, and the team suffers as a result. The drag polar may be better behaved in the second case, but the profile drag is higher at the same lift coefficient inside the drag bucket (before the big jump in drag).
The leading edge suction peak on the flap is a tip-off that the slot is too far open. Bringing the leading edge of the flap closer to the trailing edge of the forward element will start to superimpose the low velocities of the forward element trailing edge with the high velocities of the flap leading edge. The result will be a raising of the dumping velocity of the forward element and a blunting of the pressure peak on the flap.
The airfoil below is similar to the sections analyzed, with a 50% chord flap and 20 deg deflection, but the pivot point is farther forward - 7.5% of the total chord (15% of the main element chord) forward of the forward element trailing edge. As a result, the gap is larger and the flap is moved down and forward relative to the first case.
Note that the Y axis for this plot is velocity ratio (V/V0) instead of Cp. The corresponding Cp values are Cp = 1-(V/V0)^2.
The dumping velocity is higher (Cp = -0.56)and the lee side pressures on the forward element hardly tail off at all at the trailing edge. I didn't run -8 deg angle of attack, but extrapolating from what's shown, it would be pretty flat, too. At -4 deg angle of attack, there's no leading edge suction peak - just a gentle adverse pressure gradient over the whole forward element (peak is at Cp = -2.6). The pressures on the flap leading edge are fairly rounded, so the slot can probably be opened some more. This would bring in a little more of the pressure peak, making the flap pressures look more like the first example above, and possibly raise the forward element pressures some more.
The two examples above and the S901 illustrate how Javafoil can be used to diagnose problems and come up with detailed solutions. The problem of the first example was the high leading edge pressure peak that caused transition to suddenly jump to the leading edge, increasing the drag and possibly separating altogether in 3D flow. Opening the slot by moving the pivot back to the flap leading edge (second example, above) wasn't the best way to go about solving that problem because it decreased the lift on the forward element, reduced the dumping velocity, and created a leading edge suction peak on the flap. Moving the pivot forward created a bigger slot and had more overlap, which had the desired effect on the main element without adversely affecting the flap's ability to take over the pressure recovery from the forward element. The pressure distributions indicate a little more movement of the pivot forward may be worthwhile.
Javafoil doesn't have a shape design capability like XFOIL does. However, one can analyze an element by itself in XFOIL and make the same kinds of changes to its design pressure distribution that are indicated by the Javafoil analysis. Then the revised section shape can be taken back to Javafoil to see how it works out in conjunction with the other element(s). This is the way sections for the USA 17 mast and wing were designed, only using MSES instead of Javafoil for analysis.