Reynolds number and JAVAfoil

Discussion in 'Software' started by peterraymond, Mar 10, 2010.

  1. peterraymond
    Joined: May 2009
    Posts: 81
    Likes: 2, Points: 0, Legacy Rep: 36
    Location: Colorado

    peterraymond Junior Member

    I'm messing around with JAVAfoil, specifically looking at creating simple combinations of 2 zero-camber foils.

    To start though I thought I'd just create a NACA 0012 foil in Excel, import it and compare it to the one that JAVAfoil creates. It looks like the spacing of points in the x direction matters. When I create a foils the CL vs CD curve is lumpy, but if I pull the x values out for the foil the program creates, my calculation for y agrees to, at worst, +/-1 in the 8th digit.

    The spacing between points seems to vary approximately sinusoidally. Maybe I should ignore this, since I'm with in 5% or so on L/D, but it bugs me.

    I've also looked at the effects of Re and am not surprised that results differ, but I am surprised that the shape of the curve changes so much. Attached is a plot that shows the performance of the NACA 0012 over Re that increases by a factor of 10 for every 2 lines, for an angle of attack that goes from -10 to 10 for each curve. As a sanity check, does this look right?

    And, a third question. Is there any documentation on JAVAfoil I could read?

    TIA for any useful comments,
    Peter Raymond
     

    Attached Files:

  2. Guest625101138

    Guest625101138 Previous Member

    Peter
    Your polars you have attached look about right.

    If you look at actual test data for foils the shape of the polar can vary wildly from one test to the next for almost identical Re#. The smallest variation can change shape of the polars dramatically. I used to use regressions on test data but now I just use the JavaFoil output as it usually provides a good average of the test data. Whether an average actually exists is doubtful but you need some basis for design that is not jumping about for the same conditions.

    I gather that changing the resolution of the foil section data by using more points is not too far different to the test situation. A small change can alter the polar. I do know that increasing the resolution does not necessarily produce a more accurate polar. You would need to closely compare the geometry and also look at the boundary layer states for the two conditions. Also the stall modelling is empirical and from my reading tends to overstate the Cl at stall.

    I would suggest you look at some foil test data before getting too uptight about the precision of JavaFoil. The measured data annoyed me more than JavaFoil.

    I just opened Selig Volume 2. Runs 776 and 784 on a NACA2415 foil:
    Re = 100800, Alpha = -0.26, Cl = 0.076, Cd = 0.0196
    Re = 101300, Alpha = -0.28, Cl = 0.138, Cd = 0.0253

    In one case L/D is 3.8 while the other is 5.4. A large variation at that alpha but the difference is smaller at higher alpha.

    You do need to make sure the data is consistent as it can produce meaningless output. I expect through numerical instability. Sometimes it will hang and you need to quit. The pressure visualisation and boundary layer data can be helpful in checking the sense or otherwise of the output.

    I find the ability to change Reynolds number to be an important consideration for prop design. So a significant advantage of using JavaFoil is to create the polars for your design conditions rather than extrapolating from test data at different Re.

    Rick W
     
  3. Guest625101138

    Guest625101138 Previous Member

    For the sake of it I ran a comparison of a NACA0012 foil with 141 data points against 61 points for a couple of Re#.

    The polars are a bit different. The maximum L/D is almost identical.

    Rick
     

    Attached Files:

  4. peterraymond
    Joined: May 2009
    Posts: 81
    Likes: 2, Points: 0, Legacy Rep: 36
    Location: Colorado

    peterraymond Junior Member

    Good, or bad?

    Rick - Thanks for the answer. I'm encouraged and discouraged. I'm encouraged because I now think I see a path to evaluating a simple 2-element wing design, but discouraged by seeing the work involved, at least in JAVAfoil.

    I did runs where I took 2 equal cord foils, played around qualitatively with spacing and angle, then picked one spacing, three pivot locations for the second foil and did polars for 0, 5, 10... 30 degrees. I then used the streamlines page to find the specific CD for CL's of 0.2, 0.4, 0.6... Finally, I took the best pivot location and created the chart attached.

    This was all based on foils created and modified in JAVAfoil, but inside the program I don't see any way to vary the profile type or T/C for the two elements independently. I do think now though that I know how to create 2 individual foils in JAVAfoil, import them into excel, combine them and then export them back.

    I can now do this for other variations, but the quantities get immense.

    Lets say:
    - 3 main element forms
    - 3 main element thicknesses
    - 3 flap forms
    - 3 flap thicknesses
    - 3 ratios of main element vs flap cord
    - 3 main element to flap spacings
    - 3 flap pivot locations
    - 3 wind speeds
    - 7 flap angles

    So, we haven't even begun to talk about custom profile design, wing plan-form, or twist control and we are up to 3^8*7 = 45927 permutations. It doesn't seem like JAVAfoil is designed to do this.
     

    Attached Files:

  5. Guest625101138

    Guest625101138 Previous Member

    The options page allows you to set the aspect ratio if you did not know this. I have not checked how the induced drag is calculated in JavaFoil but it seems to give a reasonable result.

    As you home in on something it gets a bit easier. At least you have a tool that gives more insight into what it actually going on.

    I find it useful to validate the observations against some real test data just to keep grounded. It may not give exact answers but it should provide relative merits and a good indication of what is possible.

    The modify page allows you to set the camber and thickness for each element independently. In the modify page you can select elements individually or all of them. Play around with the mouse and shift key. You have to be careful when you scale what area the coefficients actually apply to.

    It has the ability to set boundary conditions but I have not explored this function. The one time I played with it I got strange results and have not gone back into this function.

    Rick W
     

    Attached Files:

  6. tspeer
    Joined: Feb 2002
    Posts: 2,285
    Likes: 252, Points: 83, Legacy Rep: 1673
    Location: Port Gamble, Washington, USA

    tspeer Senior Member

    First of all, some of the Reynolds numbers you're using in that figure are very low. When you're in the 10^4 range and below, the flow is fully laminar - that is, laminar separation occurs before the flow can transition to turbulent flow. For Reynolds numbers below about 250,000, it's impossible for the flow to transition to turbulent by means of amplification of disturbances in the boundary layer before reaching the trailing edge, even at the maximum adverse pressure gradient that can be sustained by a a laminar boundary layer, and transition will happen through laminar separation and turbulent reattachment (laminar separation bubble).

    The reason you see the difference in shapes of the drag polars is the transition between laminar flow and turbulent boundary layer is occurring at different points along the surface. As the Reynolds number increases, the boundary layer can sustain a more adverse pressure gradient without separating. This makes it better able to negotiate the leading edge suction peak and delays separation to a higher angle of attack.

    2D section design is all about controlling the boundary layer development by tailoring the pressure distribution. If it weren't for the boundary layer, a particular pressure distribution would have no effect on the performance of the section, and all sections would behave pretty much the same (except for the aerodynamic moment). So where transition occurs and why are vitally important when designing a section.

    And in water, its likely there will be very little laminar flow a given Reynolds number compared to the same section in air. So you may need to artificially trip the boundary layer to represent what the flow will be in practice.
     
  7. peterraymond
    Joined: May 2009
    Posts: 81
    Likes: 2, Points: 0, Legacy Rep: 36
    Location: Colorado

    peterraymond Junior Member

    foil tips

    Rick, I will have to play some more, but I now see I wasn't paying enough attention to all the boxes on the modify page. I had been scaling and moving the two elements independently, but hadn't seen that I could change the thickness too.

    I'll play some more, but it does still seem like I can't mix, for instance, a NACA 4 digit and a NACA 6 digit with the modify capability. I can do it though by passing data back and forth from Excel and it looks pretty easy to do that. It looks like I just have to insert something like a 999.99,999.99 data point between elements.

    Tom, I suspect that my Reynolds numbers went down into the model sailboat ranges, but I did want to cover orders of magnitudes to see how big the effects could be. I suspect it's time to actually calculate some realistic numbers, meaning looking at say 4 to 18 knots of wind speeds with some guesses at upwind and downwind speeds and angles. I guess I'd also have to decide if it was an A wing, a C wing, or something else.

    I have started paying more attention to the boundary layer plots because you can see the transitions and also the effects of big changes in Reynolds numbers. I see separation moving back at higher Reynolds numbers, but with a NACA 0012 it never completely reaches the rear edge, which surprises me a little. Would editing y for one point on the profile be a reasonable way to induce turbulence?

    I had been paying more attention to the flow-field plot, particularly the streamlines. The streamlines do not show transition to turbulent, or separation, so I guess I don't trust them so much any more.

    I ran my models at a Reynolds number of 520,000 and was a little surprised by what seemed optimum with 2 equal cord NACA 0012 foils. As you suggested and from what I had seen in pictures, I started with tightly spaced foils and a relatively small gap.

    As I moved the second element around the performance polars seemed smoother and tended to have less drag as I moved the second element back to create a gap equal to around 10% of the single-element cord. I was more surprised to see that placing the pivot at the front edge of the second element seemed to lower drag and support a slightly higher maximum lift coefficient. I had also tried it with the same gap and a pivot 10% forward of the leading element trailing edge, but performance suffered some. I think though that I don't place much weight on these results. At least not yet and it sounds like they can't ever be expected to nail performance on the edge of stall.

    Thinking about all the options it would be nice to test, what I would really like is foil generation routines and analysis support inside MatLab. Then cycling through options and searching for optimums are all pretty straightforward and you can plot the results any way you like too. While I don't actually have access to MatLab, Octave is very close to a duplicate and is free.

    My goal of this whole exercise is learning and at least I'm doing that.
     
  8. Guest625101138

    Guest625101138 Previous Member

    Peter
    I am interested in looking at some of your pressure plots if you care to paste some screen dumps here.

    At least then I will have a better idea of what you are doing and I might learn something new as well. I think Martin keeps making little adjustments. It works better now than when I first started using it.

    I do use it often for multi-element stuff. In fact I use it very little for my own purposes now because I have a reasonably comprehensive set of foil data that was generated by JavaFoil that I use as required. It saves a huge amount of effort over transferring polar data from text - that could send me blind.

    Rick W
     
  9. peterraymond
    Joined: May 2009
    Posts: 81
    Likes: 2, Points: 0, Legacy Rep: 36
    Location: Colorado

    peterraymond Junior Member

    1st plots

    I' going to do two posts. In each the mast and flap are both 50 units wide and the flap is deflected 20 degrees. In this post the undeflected gap between the two is 1 unit and the flap pivot is 45 units from the mast leading edge.

    The main thing I don't like is the big jump in drag at high CL.
     

    Attached Files:

    Last edited: Mar 14, 2010
  10. peterraymond
    Joined: May 2009
    Posts: 81
    Likes: 2, Points: 0, Legacy Rep: 36
    Location: Colorado

    peterraymond Junior Member

    For these plots the gap between elements was opened up to 5 units and the pivot was moved to the leading edge of the flap. The drag at high CL is better, but also the performance is smoother, so that pitching of the boat or small changes in trim won't cause sharp changes in results.
     

    Attached Files:

  11. Guest625101138

    Guest625101138 Previous Member

    Peter
    I appreciate the posts. I now have a better understanding of what you are trying to achieve.

    The data looks consistent. It seems you are already getting some useful insight. Would be interesting to validate against some actual test data.

    Rick
     
  12. tspeer
    Joined: Feb 2002
    Posts: 2,285
    Likes: 252, Points: 83, Legacy Rep: 1673
    Location: Port Gamble, Washington, USA

    tspeer Senior Member

    This is a good example of how Javafoil can help you understand what is really going on. Notice the shape of the leading edge suction peaks on the flap and forward element for the two cases. The first case has a strong suction peak on the forward element and very well behaved pressures on the flap, while the change in slot geometry of the second case results in a suction peak on the flap but less of a suction peak on the leading edge.

    I think you'll find that the sudden increase in drag of the first configuration results because transition jumps from the well back on the forward element to the leading edge when the suction peak grows to the point that the adverse pressure gradient on the backside of the peak causes laminar separation to occur there. With the gap opened, the flap induced less lift on the forward element, reducing the leading edge suction peak. The leading edge suction peak on the forward element could also have been reduced by increasing the flap deflection and operating at a lower angle of attack to produce the same lift.

    For every flap deflection there will be a range of lift coefficients for which the deflection is well suited, with the range moving to higher lift coefficients as the flap is further deflected. The forward element may even be operating at a negative angle of attack relative to the free stream, but the "upwash" due to lift on the section will result in the stagnation point being on the windward/pressure side of the leading edge.

    The combination of flap deflection and angle of attack that keeps the stagnation point just to windward of the leading edge is a pretty good guide to trimming the wing. It also has the virtue that it is something that can be observed and measured while sailing.

    When you're dealing with variable geometry, like a flap that can be deflected, it's a good idea to overlay polars for different flap deflections and then look at the envelope of the polars to see how the flap should be operated in conjunction with the angle of attack.
     
  13. tspeer
    Joined: Feb 2002
    Posts: 2,285
    Likes: 252, Points: 83, Legacy Rep: 1673
    Location: Port Gamble, Washington, USA

    tspeer Senior Member

    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.
    [​IMG]
    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.
     
  14. Guest625101138

    Guest625101138 Previous Member

    Tom
    Your explanation is very helpful. I have not been following anything Peter has been doing other than on this thread.

    I have played for a few hours with Xfoil but found Javafoil to be easier to use. I now use it instead of looking up foil data. It has been very useful mainly for my low Re# prop design.

    I am interested to know a bit more about the functionality of Xfoil and if it is worth taking the time to get to know it.

    JavaFoil does have a foil design function whereby you can reshape the pressure distribution and then the "redesign" function progressively adjusts the shape to match the pressure distribution. I have attached an example? Can Xfoil do more than this? Is it worth the effort to learn how to drive it?

    Rick W
     

    Attached Files:


  15. tspeer
    Joined: Feb 2002
    Posts: 2,285
    Likes: 252, Points: 83, Legacy Rep: 1673
    Location: Port Gamble, Washington, USA

    tspeer Senior Member

    I wasn't aware of the design capabilties of Javafoil. That would be very useful. Maybe I should start working with it more!

    XFOIL has two design methods. One, MDES, reshapes the entire section in response to changes in the pressure distribution. The other, QDES, allows you to specify a particular portion of the section to be redesigned and the rest of the section will be kept the same. QDES can be very useful if you're modifying an existing wing, so the whole structure doesn't have to be changed. But I've found it easier to get what I want by using MDES.

    If you are working at low Reynolds numbers with single element sections, it would be worthwhile to learn to use XFOIL (or the graphical user interface Profili). The reason is XFOIL is the only inexpensive program I know that properly handles laminar separation bubbles and small amounts of turbulent separation.

    All of the programs we're talking about use potential flow to calculate the outerflow and in integral boundary layer method to get the flow at the surface. The difference is most programs use a direct boundary layer method, in which the velocities and pressure gradients at the outer edge of the boundary layer are specified and the skin friction is calculated from the corresponding boundary layer development. The outer flow is coupled to the boundary layer by either changing the shape of the body according to the displacement thickness of the boundary layer, or by adding fluid blowing out from the surface that also displaces the outer flow to account for the boundary layer thickness. A direct boundary layer method can't handle separation because the equations blow up when the skin friction becomes negative due to recirculation in the separated region.

    XFOIL uses an inverse boundary layer method in which the skin friction is specified and the outer flow velocity is calculated from the skin friction. The skin friction at the surface and the outer flow calculation are iterated simultaneously so the velocities at the edge of the boundary layer calculated by the two methods match. With XFOIL's inverse boundary layer method, it is possible to specify zero (corresponding to the point of separation) or negative skin friction and still get a valid answer. This allows it to negotiate modest amounts of separation.

    Massive separation, like stall, is still beyond the capabilities of XFOIL (or any integral boundary layer method) to handle. Likewise, if a multi-element version of XFOIL were available, it would not be able to handle situations like separation occurring in the middle of the flowfield. That's because XFOIL, Javafoil, and other inexpensive programs are boundary element methods. The flow physics have been simplified so that there are governing equations that cover the whole flowfield and it's only necessary to specify what's happening on the edges of the flow to know what's going on everywhere. Real flows are more complicated than that when there are strong shock waves, flow separation, or phase changes (like cavitation).

    Because laminar separation bubbles can play such a big role in low-Reynolds number sections, XFOIL is often the program of choice for low-Reynolds number work. I think it's worthwhile to learn to use XFOIL.

    For whatever reason, whether it is turbulence from waves or contaminants (including algae and plankton) in the water, laminar flow seems to be harder to maintain at the same Reynolds number in open water compared to air. This can be a good thing at low Reynolds numbers because it makes the foils less susceptible to laminar separation. But you won't necessarily get the performance benefits from laminar flow, either. So for hydrofoils, it's a good idea to assume earlier transition by using Ncrit in something like the 1 - 3 range, or simply fix transition near the leading edge, when generating section data for performance calculations. It's also good to make some runs with larger Ncrit values (the default is Ncrit=9) to ensure that if you do get laminar flow it won't cause problems by separating.
     
Loading...
Forum posts represent the experience, opinion, and view of individual users. Boat Design Net does not necessarily endorse nor share the view of each individual post.
When making potentially dangerous or financial decisions, always employ and consult appropriate professionals. Your circumstances or experience may be different.