Anisotropic unstructured mesh and 3D boundary layer

Moderator: GiD Team

Post Reply
DCortellessa
Posts: 4
Joined: Thu Mar 09, 2023 3:11 pm

Anisotropic unstructured mesh and 3D boundary layer

Post by DCortellessa »

Hello,

I have the CAD of an S-Bend. What I would like to do is to generate an unstructured mesh of tetrahedra, stretched in the direction of the flow.

To my understanding, GiD only allows to set a size for unstructured volume meshes. Therefore my question is: am I missing some option that would allow me to generate an anisotropic unstructured grid?
Screenshot 2023-03-09 alle 15.18.40.png
Screenshot 2023-03-09 alle 15.18.40.png (49.4 KiB) Viewed 195 times

Also, I'm having issues with the 3D boundary layer function.
In the example below I've asked for a 10 elements boundary layer. However, as you can see, in most of the areas it puts less elements and there are zones in which it puts none.
Do you have any idea on what I might be doing wrong?
Screenshot 2023-03-09 alle 15.31.28.png
Screenshot 2023-03-09 alle 15.31.28.png (919.65 KiB) Viewed 195 times
Thank you for your help,

Davide Cortellessa
User avatar
escolano
Posts: 1834
Joined: Sun Sep 05, 1982 10:51 pm

Re: Anisotropic unstructured mesh and 3D boundary layer

Post by escolano »

GiD do no only allows to set a size for unstructured volume meshes,
also structured and semi-structured meshes take have size:
Setting the number of divisions means also a kind of size
(and is also allows to assign a size that is mapped to a number of structured divisions)

if do you want attach a zip with your GiD model.

About the boundary layer, the 'number of boundary layers' is only a maximum, when the growing size of the boundary layer reach the inner unstructured mesh size the boundary layer vanish and is merged with the unstructured mesh.
Probably the thickness of your boundary mesh is too big. Usually is a very small value to try to capture the physics of the fluid touching the boundary.
DCortellessa
Posts: 4
Joined: Thu Mar 09, 2023 3:11 pm

Re: Anisotropic unstructured mesh and 3D boundary layer

Post by DCortellessa »

Sure, here is the project!
SBendProject.gid.zip
(1.39 MiB) Downloaded 1 time
For the boundary layer, by setting the sizes to be much lower then what I thought it would be necessary, it performed better.
For example, this surface has an unstructured mesh of size 2 (the volume mesh even larger), I selected 5 boundary layer elements, starting from 0.5 and with 1.2 grow factor. However, as you can see, or reproduce in the attached project, in the top right corner it's not generating it.
Screenshot 2023-03-09 alle 18.05.22.png
Screenshot 2023-03-09 alle 18.05.22.png (206.54 KiB) Viewed 187 times

As for the volume mesh, as you can see from the project, I was able to generate structured surface meshed for the straight parts of the pipe, but I'm not able to maintain this stretching in the volume mesh...

I know that I'm probably not using GiD properly, but I'm not able to find a solution in the reference manual.

Thank you for your reply!
User avatar
escolano
Posts: 1834
Joined: Sun Sep 05, 1982 10:51 pm

Re: Anisotropic unstructured mesh and 3D boundary layer

Post by escolano »

The thickness 0.5 of the first layer and the general mesh size of 2.0 are of the same order of magnitude,
The next boundary layer will reach this 2.0 size fastly, and will vanish mixed with the unstructured elements.

If I set for example a first thickness=0.001 this is the boundary layer obtained
boundary_layer_0_001.png
boundary_layer_0_001.png (49.26 KiB) Viewed 184 times
In my opinion 0.5 seems a too big size for your model, but in any case I am not a CFD expert at all. You must calculate a size and number of layers appropriated for your specific simulation (fluid properties, range of velocities, Reynolds number, ...)
DCortellessa
Posts: 4
Joined: Thu Mar 09, 2023 3:11 pm

Re: Anisotropic unstructured mesh and 3D boundary layer

Post by DCortellessa »

Got it, thanks!

So in order to obtain a proper boundary layer from the 3D boundary layer function I need to select a much lower first element thickness.

Also, by modifying some geometrical entities, I was able to divide the volume in 3 prismatic volumes, thus allowing for a semi-structured mesh that preserves the stretching!

Thank you for your answers and suggestions,

Davide
DCortellessa
Posts: 4
Joined: Thu Mar 09, 2023 3:11 pm

Re: Anisotropic unstructured mesh and 3D boundary layer

Post by DCortellessa »

I have a follow-up question.

I've understood that, in order to properly generate a boundary layer, I have to select a sufficiently small first layer thickness.

However, at the moment I'm struggling to avoid a large jump between the end of the boundary layer and the interior mesh:
Screenshot 2023-03-15 alle 12.07.46.png
Screenshot 2023-03-15 alle 12.07.46.png (170.67 KiB) Viewed 155 times
If I try asking for more boundary layer elements, it's not placing them everywhere and I still get some large jumps, especially near the corners:
Screenshot 2023-03-15 alle 12.05.02.png
Screenshot 2023-03-15 alle 12.05.02.png (129.02 KiB) Viewed 155 times

Is there a way to fix this?

I'm guessing that it is not possible to change the mesh generation order from
surface -> volume -> boundary layer, to
surface -> boundary layer -> volume

But maybe there a way of correcting the sizes of the volume mesh as a "post-process"?

If it helps, this is the GiD project I've used to generate the mesh in the second picture.

Thank you,

Davide
Attachments
5_SemiStructuredBoundayLayer.gid.zip
(318.8 KiB) Downloaded 1 time
User avatar
escolano
Posts: 1834
Joined: Sun Sep 05, 1982 10:51 pm

Re: Anisotropic unstructured mesh and 3D boundary layer

Post by escolano »

You can set a smaller mesh size transition, but this basically affects the 'normal mesh', not the boundary layer elements generation.
Utilities->Preferences->General: Size transition, set a small value (e.g. 0.1) to grown from small to big sizes more slowly.

Afthe the mesh generation there are automatically done some 'postprocess' operations, to enhance a little the mesh quality (smoothing, swap edges,..)
You can invoke again manually on the current mesh, but won't change drastically.

Mesh->Edit mesh->Smooth elements
then in the contextual menu of the mouse will appear some sub-options, can try the 'Laplace smooth' one, and select the elements to be smoothed
(and maybe is better to send before the elements to the same layer, otherwise I think that the nodes on the interface of layers won't be allowed to be moved by the smoother)
Post Reply