Inserting Boundary layer elements

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Guillaume THIRIET
Posts: 14
Joined: Fri Dec 23, 2022 9:50 am

Re: Inserting Boundary layer elements

Post by Guillaume THIRIET »

Hello,

I made a try this morning with a "complicated" shape involving straight and rounded part, created using the Salome geometry module. I did not get any problem despite the complexity of the shape so I gess that the problem come from the foil geometry which I guess was imported from another software.

I think that if you reproduce the foil using the Salome geometry module, then it should work.

I apologise but my skills with Salome and Saturne are limited and I can't help really more... :(

Good luck with it

Please, keep us informed.
trilbytim
Posts: 32
Joined: Thu Jan 05, 2023 11:52 am

Re: Inserting Boundary layer elements

Post by trilbytim »

I don't think I'm getting anywhere, I just can't see why this won't work. I've simplified my wing down to one single section and thinned out the points on it (imported from CAD as a brep)
Image
I've tried coarser and finer meshes (I've attached the coarser one), it fails every time (after running for some time). The run_solver.log includes hundreds of lines of the form:

Code: Select all

Boundary layer insertion:
  120 cells would have a negative volume
  54 cells would have a volume reduced by more than 0.2
    (which is the user-defined threshold)
  reducing insertion at nearby boundary vertices.
What's this about, is this the problem? What can I change to make this work?
Attachments
error_r3.txt
(876 Bytes) Downloaded 63 times
run_solver.log
(91.58 KiB) Downloaded 58 times
P7sec.cgns
(2.43 MiB) Downloaded 67 times
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Inserting Boundary layer elements

Post by Yvan Fournier »

Hello,

We need to add a visualisation feature to see how this behaves, but every time the déformation induced by pushing the mesh to allow for the boundary layer leads to a negative volume, one layer less is used in faces adjacent to negative volume cells. And thos is done recursively.
If a cell with negative volume does not touch a boundary layer, the algorithm fails.

To increase chances of convergence, start with a thinner boundary layer. Using aproportional boundary layer thickness also helps (i.e. thixkness -0.3 means 1/3 of the mean adjacent cell height).

Best regards

Yvan
trilbytim
Posts: 32
Joined: Thu Jan 05, 2023 11:52 am

Re: Inserting Boundary layer elements

Post by trilbytim »

I was using thickness =-1
I think it does definitely need a finer mesh close to the aerofoil surface. The 2D mesh generated on the surface is OK, it's relatively fine because it follows the CAD file in which the surface is divided into fairly narrow faces. However as the overall fluid mesh density is quite coarse then when it interacts with the surface mesh then it creates elements which are very high aspect ratio, very narrow in the direction of the surface but very tall, which might be the problem (see the image in the first post). Really I want a mesh that grades from fine at the surface out to coarse in the freestream.

I know that when creating meshes in Gmsh as a standalone mesher you can define local target mesh sizes on points and it grades the mesh density between these points. I can't see a way of doing this with the Gmsh parameters window in Salome. I'm just using Gmsh for meshing in Salome as it's the method used in this video https://www.youtube.com/watch?v=VGpiWwZYrH4, I know there's so many different way to generate meshes. Is there a better way to mesh something like this, are there tutorials on that?
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Inserting Boundary layer elements

Post by Yvan Fournier »

Hello,


I usuamly start with a thickness of -0.3. Can you try that ? Also, since the size of cells on your original mesh vary a lot, you might want to test with a fixed thickness too.

The issue here may also be due to the high aspect ratio. The numerical basis of code_saturne (colocated finite volumes with reconstructed gradients, no shame functions) does not match with a combination of curved surfaces and high aspect ratios. In this case, since cell faces are assumed to be planar, the cell center can be outside the plane-bounded volume.

So the solution in the latter case may be to refine the mesh in all directions, to reduce aspect ratio though this is costly.
Having a more homogeneous cell size in the original mesh should help.

Finally, though this is supposed to be handled automatically, it can be interesting to try not adding the boundary layer at the last faces of the trailing edge, as the extrusion direction there is not well controlled (though you could control it with more advanced settings).

Best regards,

Yvan
trilbytim
Posts: 32
Joined: Thu Jan 05, 2023 11:52 am

Re: Inserting Boundary layer elements

Post by trilbytim »

Hooray!

I couldn't get the inserting boundary elements within Code Saturne to work (boundary layer of -0.3 also didn't help), I think because the mesh generated by gmsh was too poor.

However following this tutorial: https://youtu.be/IJLROB28nXE I used Netgen to build the mesh so as to be graduated from coarse close to the surface to fine further away and to insert the boundary elements at this stage, and this now works for me.
Image
trilbytim
Posts: 32
Joined: Thu Jan 05, 2023 11:52 am

Re: Inserting Boundary layer elements

Post by trilbytim »

I'm still not getting it to solve though :cry:

I'm just trying a 3D aerofoil section in a box, it ran for 2 hours and then exited with code 1. How do I go about troubleshooting this? Is it an area where the mesh is too coarse, or the mesh too distorted or some settings to do with turbulence or with the solver wrong? What should be my next steps?

I've attached the log file from the run.
Attachments
run_solver.log
(40.66 KiB) Downloaded 58 times
Post Reply