XFLR5 vs CFD

Hi @DaleKramer!

First of all big props to your engagement since you are part of the SimScale community, really love it :slight_smile:

For this study we definitely need some time to get through all your points you mentioned. I am tagging @yosukegb4, @Get_Barried as well as @vgon_alves here who might give you some first impetus on your studies - I will follow up.

P.S.: Information from the XFLR5 page: “XFLR5 is by no means a professional product, and does not offer the same guarantees of robustness, reliability, precision or product support than commercial softwares.”

Best,

Jousef

Thanks Jousef…

:slight_smile: Precisely why I am here…

NO, I no longer think that Simscale is using frontal area for Cd!!!

I say that because it looks like the coefficients are determined with this Openfoam code (note that both coeffs[0] and coeffs[1] use that same Aref variable):

coeffs[0] = (totForce & liftDir_)/(Aref_*pDyn);
coeffs[1] = (totForce & dragDir_)/(Aref_*pDyn);
coeffs[2] = (totMoment & pitchAxis_)/(Aref_*lRef_*pDyn);

scalar Cl = sum(coeffs[0]);
scalar Cd = sum(coeffs[1]);
scalar Cm = sum(coeffs[2]);

scalar Clf = Cl/2.0 + Cm;
scalar Clr = Cl/2.0 - Cm;

And the Openfoam results in the Solver Log are (no boundary layer case):

ExecutionTime = 117.34 s  ClockTime = 127 s
SIMPLE solution converged in 239 iterations
forces forces10 output:
    sum of forces:
        pressure : (18403.0087721 -5.75163626308e-05 230589.781182)
        viscous  : (403.110911194 -0.0165566590641 -8.09310453274)
        porous   : (0 0 0)
    sum of moments:
        pressure : (1814.74400605 -4870667.68499 -78.5868128624)
        viscous  : (-6.75661079217 446.192159703 -38.8502471616)
        porous   : (0 0 0)
forceCoeffs forceCoeffs11 output:
    Cm    = -0.179828952378
    Cd    = 0.0209292345432
    Cl    = 0.256613182964
    Cl(f) = -0.0515223608965
    Cl(r) = 0.30813554386
End

For anyone interested, the forces and moments can be converted to lbs and in-lbs by dividing by the Universal Gravity Constant 386.0885827 in/sec^2.

Aha, I finally found a quick easy way to get access to the Forces and Coefficients, in the Solver Log :smile:

Again, I DO NOT THINK it is frontal area anymore since Openfoam is showing the Cd as 0.02093 , which is in my chart.

But this Cd is SO high compared to XFLR5… the quest continues…

Still looking for answers on 3, 4, 5 and 6 :wink:

1 Like

@DaleKramer, if the drag changes significantly when you remove the layers then you should probably check Y+ values. Ideally, for wall modelling, they should be between 30 and 300. I don’t know if XFLR is capable of accurate boundary layer prediction, it would be really nice to get some experimental data in here also, that way we know how each of the compare to experimental.

Looking forward to your thoughts :slight_smile:
Darren

1 Like

Darren @1318980 ,

InflateParameters

  1. Can you tell me which parameter is Y+ ?

  2. Also, do you mean if the PRESSURE drag changes considerably…

  3. By considerably, what percentage difference would you consider considerably?

        Layered Pressure Drag is 45.20 lbs and Viscous Drag is 16.48 lbs
    NON-Layered Pressure Drag is 47.66 lbs and Viscous Drag is 1.040 lbs
    

I do not think XFLR5 analyses boundary layer (I will confirm), that was another reason for me to do two meshes in CFD.

@1318980

Also, I am having difficulty with Y+, perhaps you can have a look at this topic.

Here is the current boundary layer mesh on this topics 12mm thick trailing edge:

Thanks, Dale

Hi @DaleKramer, the Y+ field can be added in the result controls in the simulation, I would expect to say up to 20% difference unless the Y+ is drastically off. I checked your topic, can you share the link to it? you might need to do to things:

  • node Y+ (Point data rather than cell data).
  • View the results as a surface.

If you share your project I can make sure we can do this online, otherwise, we might need to download the results.

Cheers,
Darren

I don’t seem to be able to figure out an answer to my questions 1 and 2 above

I sent you an invite to the other topics private project.

Correct Y+ is hard to achieve, you need a mesh to measure y+ then you need to alter the wall inflation in response to your Y+ results. Y+ is the dimensionless wall distance.

If the wall layers are altered significantly to be in the correct and incorrect range, then we can expect both the viscous and pressure drag to change, this is because the thicker boundary layer the more the pressure difference in front and behind will be, and the viscous drag will also change.

Best,
Darren

@1318980

  1. Can someone tell me where I can find a project that has a saved state in its post-processor results section that shows how to actually see the Y+ parameter, I have only got a saved state in this project that shows the 5 boundary layers created

OR

  1. Or could someone create a saved state in a copy of this topics project and send me a link so I can do the same in my project?

I guess I will see what you mean about correct and incorrect range after I can see Y+.

So, in the case of my 2 cases, Layered and NOT Layered the total Pressure and Vicious Drag is 26% higher for the Layered case and I really need to adjust my Expansion Ratio.

  1. Are we really trying to end up with the same total Pressure and Viscous Drag for both the Layered case and the NOT Layered Case or am I still confused? EDIT: or once we get Y+ in the correct range we just have what we have and it is irrelevant that the drag changed. I guess your >20% just tells for sure have to look at Y+ and correct if needed. I assume that in any case you should look at Y+…

I found out I could just map the yPlus [point data] directly on the surface of the results faces (turning internal mesh and bounding boxes off on its Property Panel). Then I just adjusted the scale to show a good range (the auto range was a max of ~18 which made the whole wing in the blue range).

Here are the yPlus values for the Bottom and Top of the wing:

The average is probably just around 1.0. It seems yPlus is directly related to the total thickness of the 5 layers created.

  1. To increase that to 30, would I just change expansion ratio to 1.3 times the 5th root of (30/1.0) or 2.57?
  2. Or should I try to get that to 160 (~halfway between 30 and 300) which would take an expansion ratio of 3.59?
  3. Why does the yPlus go smaller at the spanwise panel joints, is that because there are smaller mesh sizes there.
  4. If so, why would smaller mesh sizes mean a thinner boundary layer? Intuitively I would not think boundary layer thickness had anything to do with mesh size, more with pressure and air speed at the location on the surface…

Hi @DaleKramer, Good questions, I’ll go from the top.

Changing the expansion ratio would help, remember the final thickness is defined, and Y+ is calculated as distance to the first cell, so remember when calculating to account for this.

Yes, it would make more sense to stick it in the middle of the range not coming too close to either recommended boundary, in reality however, it will be a case of adjusting to ensure the maximum number of cells are in the range but might be unrealistic to manage to get them all in the range.

Yes exactly.

We are not measuring boundary layer thickness, we are measuring the dimensionless wall distance of the first cell, the thinner the cell, the lower the number. Because the mesher is set as default to use relative sizing, a smaller cell with layers will have thinner layers than a larger one. This can be changed by clicking on your mesh operation if using hex-dominant parametric. You are right though that the Y+ value will also change with the boundary layer. So Y+ at an aerofoil leading edge will be hard to get in the range when we are trying hard to get the range of the rest of the surface within 30 and 300.

Hope this helps,
Darren

1 Like

This is very confusing, I tried an expansion ratio of 3.57 and got very strange results.

The 5 layers clearly seen near the geometry surface using expansion ratio 1.3 are totally missing at expansion ratio 3.57 AND the average yPlus only increased to about 17, not 160 as expected.

Here are the mappings that show this:



I really don’t feel comfortable using the expansion ratio 3.57 mesh since I don’t ‘see’ the 5 layers at the geometry surface anymore.

I think I will bite the bullet and try the Hex Dominant Parametric Alogrithm.

Anybody else have any ideas at this point?

Thanks,
Dale

But I had the impression that these ‘layers’ we add to the mesh was the region where the speed of the air particles changed from 0 at the no-slip surface right up to the local freestream speed based on some rate of change curve set by the turbulence model, sort of like the boundary layer…

True, and the distance from the surface to the dimensionless distance to the first layer from the surface is the Y+ value you are observing here. However, wall modelling is only valid in the log region of the boundary layer, which is why, it is recommended to get the value between 30 and 300, as here the boundary layer is extremely predictable. bellow 30 there is the buffer layer and the linear layer, where if we fall in this region and model logarithmically it will be incorrect, likewise, as we start moving away from the wall above 300 there is increasing deviation from the log law. So the Y+ distance takes into account the distance to the first cell (Y) and the surface friction in relation to the U+ which is the dimensionless velocity, this is how wall modelling works. It works great as long as we obey its requirements.

Does that make sense? so in order to predict the correct conditions at the boundary of the first cell using a logarithmic relation we need to ensure the cell distance lies in that logarithmic region.

1 Like

It is clearer but still confusing, I am sure at some point I will have an AHA moment and feel comfortable with it.

I just can’t get a handle on why the overall thickness of these added layers vary with their original mesh cell size, the actual boundary layer doesn’t change thickness because some mesh algorithm decided that an area needs a finer mesh. But if you say the math works out regardless that these added layers vary in thickness over areas where the true boundary layer does not, then I believe you.

From what I can tell at this point, I want to try to get the yPlus value to average ~165 at the surface of the geometry. To determine a surface average, I can do surface mapping as in the above images and set a yPlus color range so that my eyeball tells me what the surface average is for the surface in view.

This seems very cumbersome, why can’t the postprocessor just let me select a surface (or my whole geometry) and then tell me what the yPlus, max, min, average, std deviation etc. values are for that surface?

I also assume I want the mesh slices in the mesh result to actually SHOW the 5 or x number of layers added in the layering process. So why are the mesh layers ‘missing’ in the middle image of my last 3 images (and actually it was over the whole wing as far as I can tell, not just near the trailing edge)?

Very good suggestion and I agree entirely. Please, can you add this suggestion into our vote for features part of the forum?

There are a lot of quality checking that goes on in snappy hex mesh, and it does take a bit of experimenting to get this correct. For example, the volume ratio of the two cells might be too high so the algorithm cancelled inflation, this could be solved by reducing the expansion ratio or by increasing the allowable volume ratio.

Counter-intuitively maybe, increasing the expansion ratio will actually reduce the Y+. This is because the algorithm is maintaining a final cell size and adjusting the lower ones to be thinner. A better method would be to just reduce the number of cells, and if this doesn’t work we could use full resolution modelling (better suited to smaller Y+ values of around 1).

1 Like

Done, as long as you will vote for it :wink:

Darren @1318980,

I have been working hard trying to get the best mesh to start with before I layer the wing.

I have started a new public project with what I have done so far.

There is one geometry and two meshes in the project so far but I am working on the project and may try a simulation soon.

Mesh 1 is just a refined geometry with 2.03 million faces.

Here is Mesh 1 near the wingtip (~12 in chord and 0.17 in TE thickness) :

The 3.02 million face Mesh 2 is my attempt at layering Mesh 1 with the following procedure.

I am using the ~12 in tip chord and 135mph in the yPlus calculator like this:
yPlusforXFLR5vsCFD

Then in a spreadsheet I have this:
ParaCalcsFromEWD

Then in Mesh Refinement Parameters for Inflation I did this:

Then I started clipping Mesh 2 to view the layers I added to Mesh 1. I am not sure if they are good enough and don’t know where to start to make them better. I do not see an ‘allowable volume ratio’ in the Parametric parameters and I am a little confused about your other suggestions.

Here are the mesh clips, first, right at the wingtip:

6 inches in from tip:

At 1/2 span:

And at the root:

Can you give me any specific pointers to refine the layers now so I can go on and make a 1s simulation to see if I got the average surface yPlus anywhere near the 160 that I want?

Thanks,
Dale

1 Like

I did run a 1s simulation and I am very dissappointed that the yPlus at the surface seems to only average about 2.

What did I do wrong?

yPlus plots (yPlus [point_data]):

yPlus Bottom:

Time to go to bed :upside_down_face:
Dale

EDIT: Strange, this morning I wake up and decide to ‘save a state’ with my setup to view yPlus but now I can only achieve a view that shows the average yPlus is about 1 (not 2 like last nights images :disappointed_relieved:). Do I have the ‘saved state’ setup up properly this morning to view Yplus (I think it is too much of a coincidence that the average is 1, am I looking at some sort of Normalized value now)? Maybe I am just too groggy this morning :upside_down_face: :

Here is a mesh clip at y=-37.7 which is the start of the first wing planform taper and where the first big red area is (any way to fix these red islands, you can see the lack of layers there in this image):

The overall Layer thickness wherever they actually get added is about 0.3 inches, so the Parameter input looks OK, just why is the yPlus average showing at 1, and not 160?