|
[Sponsors] |
June 21, 2023, 10:11 |
Hybrid meshes with boundary layers
|
#1 |
Member
Giorgio
Join Date: Mar 2023
Posts: 55
Rep Power: 3 |
Dear all,
I am modeling a network of pipes, here is a simplified geometry that contains the issue: I would like to mesh the three straight pipes with structured hexahedra and the Ts with unstructured thetrahedra. I have make a partition with 10 solids (3 Ts and 7 straight pipes) : I start meshing using submeshes from the central T with Netgen 3D-2D-1D, applying boundary layers on walls, and propogating on pipes with 3D extrusion, everything seems to go smoothly There is the boundary layer on the walls as wanted However, when I try to export to OpenFoam (I use salomeToOpenFOAM.py because there are piramids in the mesh), the export fails and some defaultPatches are generated in the mesh tree: I think those defaultPatches are generating the export error, and I think they are generated because the mesh is not conformal. I visualized these patches, here is where they are located: and here is the shape So those patches are genereated at the interface pipe/T when the T mesh is generated AFTER the pipe mesh. Using a clip also it is clear the mesh is not conformal. Before the T After the T: Does anyone know how to fix it and generate a valid mesh? Thanks in advance |
|
June 21, 2023, 10:34 |
|
#2 |
Senior Member
Join Date: Dec 2021
Posts: 251
Rep Power: 5 |
Hey, me again
I tried to mesh several junctions the way you tried, and failed too, it seems impossible to create an extrusion with boundary layers between two junctions. After seeing the pictures you attached, I think you should give cfMesh a try. It can generate nice boundary layers everywhere, and you can apply a nonuniform stretching to cells in the straight pipes to lower the cell count. |
|
June 21, 2023, 11:40 |
|
#3 | |
Member
Giorgio
Join Date: Mar 2023
Posts: 55
Rep Power: 3 |
Quote:
This problem is really giving me headhaches! I'll try out cfMesh right away |
||
June 22, 2023, 12:18 |
|
#4 |
Senior Member
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28 |
You could try to separate your pipe geometry into two distinct entities: the pipe interior and the wall layer. In my experience, it is easier to generate matching meshes, when using tet and extrusion meshing, if you do not bother with boundary layers in the first step.
So, instead of meshing the T-sections using a tet meshing algorithm with a boundary layer hypothesis; you would mesh the interior of the T-section using tets, and then mesh the boundary layer region using an extrusion algorithm. This increases the complexity of your geometry and the meshing workflow, but in my experience it is not possible to "inform" a boundary layer hypothesis from the outside. I hope this makes somewhat sense. Salome is very good at making meshes in a bottom-up approach. Hence, if you separate meshing of the interior and the creation of the boundary layers, you will be able to achieve nice meshes. |
|
June 23, 2023, 10:03 |
|
#5 | |
Member
Giorgio
Join Date: Mar 2023
Posts: 55
Rep Power: 3 |
Quote:
Thanks for your reply. It seems unnecessarily complicated. I don't even know how to extract the inner geometry (inside the boundary layer) at the intersection between the pipes. I mean, this is a trivial geometry, it's unbelievable it cannot be done with a classic procedure... |
||
June 23, 2023, 15:57 |
|
#6 |
Senior Member
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27 |
If you dont mind sharing the Geometry (BREP) I can give it a quick go
__________________
Linnemann PS. I do not do personal support, so please post in the forums. |
|
June 24, 2023, 11:26 |
|
#7 | |
Member
Giorgio
Join Date: Mar 2023
Posts: 55
Rep Power: 3 |
Quote:
https://www.dropbox.com/scl/fi/una1c...kpspxm472x52fd |
||
June 24, 2023, 16:29 |
|
#8 |
Senior Member
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27 |
Hi
Here is the results after about 30min. The trick is to mesh the Tee first, parallel project the inletFace of the Tee to the internalFace of the Tee. Project each of the Mesh faces of the Tee to their own face from the geo. Use the projected mesh to make an extrusion of the face into 3D along a 1D line Mesh. Make a mesh compund of the Tee and the Vertical Mesh. Copy that 2 times, copy the internal pipe 1 time and mirror the inlet mesh around the center. Make a Compund mesh of all these meshes and that will automatically merge internal nodes/faces if they lie on top of each other. I have provided a link to the Study and the resulting UNV file for you to look at. checkMesh shows nice values. https://drive.google.com/file/d/1Ddo...ew?usp=sharing Code:
Checking geometry... Overall domain bounding box (-300 -10 -10) (300 10 300) Mesh has 3 geometric (non-empty/wedge) directions (1 1 1) Mesh has 3 solution (non-empty) directions (1 1 1) Boundary openness (-6.36013e-17 1.32379e-17 -3.5847e-17) OK. Max cell openness = 3.46929e-16 OK. Max aspect ratio = 42.7402 OK. Minimum face area = 0.19949. Maximum face area = 31.8451. Face area magnitudes OK. Min volume = 0.141434. Max volume = 29.4749. Total volume = 460177. Cell volumes OK. Mesh non-orthogonality Max: 60.3271 average: 8.61917 Non-orthogonality check OK. Face pyramids OK. Max skewness = 2.06016 OK. Coupled point location match (average 0) OK.
__________________
Linnemann PS. I do not do personal support, so please post in the forums. |
|
June 26, 2023, 08:22 |
|
#9 | |
Member
Giorgio
Join Date: Mar 2023
Posts: 55
Rep Power: 3 |
Quote:
Dear linnemann, Thank you for the explication and the link Indeed, your solution is very interesting, but it does not apply to my real case. In fact, this is a simplified geometry, and in your procedure you exploited the symmetry of it. In my real case I can't do that. In my case, I cannot avoid to generate the mesh of a T imposing the mesh on one (or more) of the external faces connected to the pipes. In your procedure, you meshed one T (without constraints), and copied that mesh. This cannot be done in a real case where every T is different from the other. However, seeing what you did, I think I understood some key ingredients I was missing in Salome. Maybe I can mesh a T imposing the mesh on the faces using the 1D projections as you did in this simplified case? |
||
June 26, 2023, 10:01 |
|
#10 | |
Member
Giorgio
Join Date: Mar 2023
Posts: 55
Rep Power: 3 |
Quote:
How is it done exactly this 3d extrusion? Thanks in advance |
||
June 26, 2023, 15:00 |
|
#11 |
Senior Member
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27 |
Sure, attached are the steps.
Regarding your real case. You can do the same with "Extrusion along path" and the projecting the faces where they are in-line. The face meshes need to match up in order for the merging of nodes on the compound mesh. So its doable, just takes a bit of time.
__________________
Linnemann PS. I do not do personal support, so please post in the forums. |
|
June 27, 2023, 09:32 |
|
#12 | |
Member
Giorgio
Join Date: Mar 2023
Posts: 55
Rep Power: 3 |
Quote:
|
||
June 27, 2023, 09:52 |
|
#13 | |
Member
Giorgio
Join Date: Mar 2023
Posts: 55
Rep Power: 3 |
Quote:
See this example: I am extruding a mesh in a pipe, I get this Now I need to mesh the next connected part (this cone): I projet the 2D mesh from the pipe to the upper face of the cone this goes well: Now I want to mesh the cone with an unstructured mesh, keeping the mesh of the face on the top. Here I am not sure what algorithm to use.. If I use Netgen 3D-2D-1D, the final mesh looks like this See what I mean? The mesh of the top face has changed! Why is it doing that is beyond my comprehension. If I just mesh using Net 3D-2D-1D WITHOUT projecting the face mesh before, the mesh on the top face looks kind of OK, but the nodes are not matching (which is understandable since the two meshes are completely independent) |
||
June 27, 2023, 15:18 |
|
#14 |
Senior Member
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27 |
Hi
You are correct, doing it this way for you case breaks the face mesh when it is projected when it has boundary layers. Without BL it works fine. There is a way to do it using the "Extrusion 3D" meshing strategy. Here is a link to the case and the checkMesh output. https://drive.google.com/file/d/1De3...ew?usp=sharing Code:
Checking geometry... Overall domain bounding box (0 -49.9013 -49.6057) (700 49.9013 50) Mesh has 3 geometric (non-empty/wedge) directions (1 1 1) Mesh has 3 solution (non-empty) directions (1 1 1) Boundary openness (7.93909e-17 3.36127e-18 -1.20437e-17) OK. Max cell openness = 7.47279e-16 OK. Max aspect ratio = 46.4566 OK. Minimum face area = 1.33659. Maximum face area = 316.204. Face area magnitudes OK. Min volume = 8.42164. Max volume = 973.656. Total volume = 3.36768e+06. Cell volumes OK. Mesh non-orthogonality Max: 19.7951 average: 7.36319 Non-orthogonality check OK. Face pyramids OK. Max skewness = 0.315532 OK. Coupled point location match (average 0) OK. Mesh OK.
__________________
Linnemann PS. I do not do personal support, so please post in the forums. |
|
June 28, 2023, 04:44 |
|
#15 | |
Member
Giorgio
Join Date: Mar 2023
Posts: 55
Rep Power: 3 |
Quote:
|
||
June 28, 2023, 05:31 |
|
#16 | |
Senior Member
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28 |
Quote:
This observed behaviour is exactly why I suggested to split-off the geometric region which is to contain the boundary layer. So, that you can create your hybrid mesh of tets and extrusions without the hassle of boundary layers. And then in a second step, extrude your boundary layers radially from the surface of the interior region. This is a lot of extra work; but Salome is really good at creating meshes in a bottom-up approach as long as the individual steps are simple. |
||
June 28, 2023, 14:34 |
|
#17 | |
Senior Member
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27 |
Quote:
So the best approach IMO is either to make the connection between the parts with AMI and live with the small interpolation errors introduced. It can be done in Salome, but it will be tedious and error prone. Or, you do as previously suggested and use cfMesh and live with the higher cellcount. This would be my prefered method. You will loose some time in solving, but you will gain it back manyfold by not having to deal with the mesh. Do you want to share the complex shape in post #9? I can give it a quick cfMesh go.
__________________
Linnemann PS. I do not do personal support, so please post in the forums. |
||
June 29, 2023, 04:47 |
|
#18 | |
Member
Giorgio
Join Date: Mar 2023
Posts: 55
Rep Power: 3 |
Quote:
https://www.dropbox.com/scl/fi/b7zpl...i9k426iwzt83gf I have already tried cfMesh. Without anisotropic refinement, it produces a good mesh with about 500K elements. I believe this case could be done with a good resolution with less then 200K. Unfortunately, I think there is a bug in the anisotropic refinement in cfmesh. I posted the issue on a simplified case here: Anisotropic refinement on box not working and here Anisotropic refinement fails If you could take a look to it and tell me what you think it would be great. Your help is really appreciated. Giorgio |
||
June 29, 2023, 05:00 |
|
#19 | |
Member
Giorgio
Join Date: Mar 2023
Posts: 55
Rep Power: 3 |
Quote:
All in all this turns out to be a big limitation of Salome. The geometry is simple, the strategy is clear, and yet you can't do it. That's a pity since the software is appealing in so many other aspects. |
||
June 29, 2023, 10:02 |
|
#20 |
Senior Member
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28 |
Dear Giorgio,
Even if you need to use a different meshing software for meshing the geometry in question, take this episode as a vital learning experience. If you understand what Salome can easily do, and what not; you may benefit in the future. Depending on your workflows, you may help your meshing efforts in the geometry creation stage prior to beginning meshing. Sometimes it is easier to accomodate the needs of the meshing software when creating the geometry, rather than working around issues within the meshing software. The beauty of applying open source software is that you can use apply all of them. With expensive commerical software, you would likely select the most fitting one, and that would be it. With open source, you can simply use them all. |
|
Tags |
boundary layer, hybrid mesh, submeshes |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Table bounds warnings at: END OF TIME STEP | CFXer | CFX | 4 | July 17, 2020 00:44 |
CFD analaysis of Pelton turbine | amodpanthee | CFX | 31 | April 19, 2018 19:02 |
Domain Imbalance | HMR | CFX | 5 | October 10, 2016 06:57 |
Error finding variable "THERMX" | sunilpatil | CFX | 8 | April 26, 2013 08:00 |
Convective Heat Transfer - Heat Exchanger | Mark | CFX | 6 | November 15, 2004 16:55 |