CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Salome] Hybrid meshes with boundary layers

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 29, 2023, 11:40
Default
  #21
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 555
Rep Power: 27
linnemann will become famous soon enough
Quote:
Originally Posted by giorgianig View Post
Thank you Niels. Yes, here is the geometry:

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

I honestly dont understand why you would want to deal with anisotropic elements here. I have 186k cells in 19s using a 6core virtual machine.
Its more hasle than its worth. I mean 19s for meshing!!


Regarding Paid vs Open Source, please keep in mind that there is no such thing as free beer.

I have used open source professionally since 2010.

The companies I have worked for/with have contributed back with either knowledge sharing or sponsoring to implement the features missing.

The cost for implementing something in an open source tool is a one-time cost vs. a yearly subscription/license fee for commercial.
Attached Images
File Type: jpg Mesh.jpg (53.4 KB, 14 views)
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Old   June 30, 2023, 04:34
Default
  #22
Member
 
Giorgio
Join Date: Mar 2023
Posts: 46
Rep Power: 3
giorgianig is on a distinguished road
Quote:
Originally Posted by linnemann View Post
I honestly dont understand why you would want to deal with anisotropic elements here. I have 186k cells in 19s using a 6core virtual machine.
Its more hasle than its worth. I mean 19s for meshing!!


Regarding Paid vs Open Source, please keep in mind that there is no such thing as free beer.

I have used open source professionally since 2010.

The companies I have worked for/with have contributed back with either knowledge sharing or sponsoring to implement the features missing.

The cost for implementing something in an open source tool is a one-time cost vs. a yearly subscription/license fee for commercial.


Hello Niels, could you share the meshDict file please? I think I remember with my options I got 500K elements.

Well it works, no doubt, I can use it. Nonetheless, the bug in anisotropic meshing is there. I think stretching the elements along the pipe would be useful, but I don't care discussing about it.

I am not trying to drink beer for free here . Just inquiring opportunities.
Obviously, if we open this activity with free softwares, my work will feed back the software I would use.
giorgianig is offline   Reply With Quote

Old   June 30, 2023, 14:33
Default
  #23
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 555
Rep Power: 27
linnemann will become famous soon enough
Sure, here you go.


To prepare the geometry I scaled the geometry to mm first then export to stl as in the attached image.


Ran these commands.


Code:
cd STL
./renameSTL.sh
cd ..
surfaceToFMS STL/joined.stl
surfaceFeatureEdges -angle 34 STL/joined.fms STL/joined2.fms
cartesianMesh
The "renameSTL.sh" is just a little utility to rename the boundary to the stl filename and join into one file called "joined.stl".

Makes more sense when you have many STL files.

This is just my normal workflow.
Attached Images
File Type: png 010079.png (20.7 KB, 3 views)
Attached Files
File Type: txt meshDict.txt (2.2 KB, 2 views)
File Type: txt renameSTL.sh.txt (416 Bytes, 4 views)
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Old   July 4, 2023, 08:18
Default
  #24
Member
 
Giorgio
Join Date: Mar 2023
Posts: 46
Rep Power: 3
giorgianig is on a distinguished road
I tried cfmesh. In my opinion, cartesianMesh is not fit for this geometry. The mesh is relatively fine on the portion aligned with the cartesian axis, but on the diagonal ones is pretty bad.

I gave it a try nonetheless. I have a case with lagrangian particles that I am solving with MPPICFoam. The computation runs until the particles are injected, then it crashes with this error:

"No base point for face xxx, produces a valid tet decomposition." Again, the problem seems to be the mesh.

Indeed, checkMesh -allGeometry shows some problems. Following another post in this forum, the issues seems to be this one:

***Error in face tets: 60 faces with low quality or negative volume decomposition tets.

So, all in all, also the mesh generated with cfmesh is useless.

I tried another solution: I generated with Salome a mesh WITHOUT boundary layer, combining Netgen on Ts and 3D extrusion on straight pipes. The mesh is kind of ok, even thought non-orthogonality is kind of high (~80), but I think this could work with non-orthogonal corrections. The problem is, I would like to add a boundary layer to this, using generateBoundaryLayers . Guess what? After the generation of bl, the mesh is useless again ( highly skew faces ), the computation crashes at the first iteration (on the pressure loop).


What a nightmare! Bear in mind, I am not even trying to be perfectionist here, just trying to obtain 1 single solution to my problem.

No way.




giorgianig is offline   Reply With Quote

Old   July 4, 2023, 11:05
Default
  #25
Senior Member
 
Join Date: Dec 2021
Posts: 209
Rep Power: 5
Alczem is on a distinguished road
Did you try to run your simulation on a straight pipe with no bends and a "perfect" mesh? Just to make sure the mesh is the culprit here. In my experience, cfMesh is one of the most robust meshing tools around.


Keep us posted
Alczem is offline   Reply With Quote

Old   July 5, 2023, 03:44
Default
  #26
Member
 
Giorgio
Join Date: Mar 2023
Posts: 46
Rep Power: 3
giorgianig is on a distinguished road
Quote:
Originally Posted by Alczem View Post
Did you try to run your simulation on a straight pipe with no bends and a "perfect" mesh? Just to make sure the mesh is the culprit here. In my experience, cfMesh is one of the most robust meshing tools around.


Keep us posted



I ran a simulation with a mesh with no boundary layers (with a lower Re), generated with Salome. The simulation ran smoothly until the end.

I read in several places that Lagrangian solvers have problems with faces with low quality or negative volume decomposition tets.
Alczem likes this.
giorgianig is offline   Reply With Quote

Old   July 5, 2023, 04:33
Default
  #27
Member
 
Giorgio
Join Date: Mar 2023
Posts: 46
Rep Power: 3
giorgianig is on a distinguished road
This is the mesh on diagonal pipes. It doesn't look acceptable to me. I know the strategy of cartesianMesh, I am not blaming the code.
That's why I struggled to do it with Salome.
Attached Images
File Type: png Capture d’écran 2023-07-05 102946.png (95.2 KB, 8 views)
giorgianig is offline   Reply With Quote

Old   July 5, 2023, 11:05
Default
  #28
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 555
Rep Power: 27
linnemann will become famous soon enough
Quote:
Originally Posted by giorgianig View Post
I ran a simulation with a mesh with no boundary layers (with a lower Re), generated with Salome. The simulation ran smoothly until the end.

I read in several places that Lagrangian solvers have problems with faces with low quality or negative volume decomposition tets.

Did not know this is what you were simulating.
Could have saved you some time.


OpenFOAM, Lagrangian and boundary layers do really not match.
The Lagrangian stuff in OF needs some love to be really usable.


I've had luck in creating two meshes (mapping the flow results), one for the flow part, with BL, and one for the Lagrangia, without BL, using uncoupledKinematicParcelFoam.

You loose the two way coupling this way and really is only an option for diluted flows.


Also see here for similar issue for CFX, Lagrangian particle tracking and cell size


Leaving this here as well.
https://www.foamacademy.com/wp-conte...les_slides.pdf
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Old   July 6, 2023, 09:00
Default
  #29
Member
 
Giorgio
Join Date: Mar 2023
Posts: 46
Rep Power: 3
giorgianig is on a distinguished road
Quote:
Originally Posted by linnemann View Post
Did not know this is what you were simulating.
Could have saved you some time.


OpenFOAM, Lagrangian and boundary layers do really not match.
The Lagrangian stuff in OF needs some love to be really usable.


I've had luck in creating two meshes (mapping the flow results), one for the flow part, with BL, and one for the Lagrangia, without BL, using uncoupledKinematicParcelFoam.

You loose the two way coupling this way and really is only an option for diluted flows.


Also see here for similar issue for CFX, Lagrangian particle tracking and cell size


Leaving this here as well.
https://www.foamacademy.com/wp-conte...les_slides.pdf







Hello, after reading your post, I made some tests, and realized a couple of things. Indeed, as you said, the mesh is not the only problem.



In fact, the particles I have to simulate are very big, about 10mm in diameters (well, they are not sphere either, but let's forget that for a moment). The Re is about 1.6e5. There is really no way to make a mesh where the elements are bigger then the particles. If I understood correctly, for a Lagrangian solver, the particles have to be smaller then the mesh. I did a test with a straight pipe and a boundary layer (minimum thickness ~1mm, y+ ~200), it works only with small particles. If the particles are big, as soon as they approach the wall, the computation crashes.



I think I have to change solver, maybe an immersed boundary method. But in that case, maybe I will have the opposite problem, when the mesh is too big (far from walls).



Do you have suggestions?



ps. We are way out of topic from the original post, maybe I should open another thread?
giorgianig is offline   Reply With Quote

Old   July 6, 2023, 14:35
Default
  #30
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 555
Rep Power: 27
linnemann will become famous soon enough
You will not find any "normal" solver for what you need.


You need a full CFD-DEM solution.
This is true both for opensource and commercial.


For opensource you can go with https://www.cfdem.com/cfdemrcoupling...-dem-framework


They also have a commercial branch https://www.aspherix-dem.com/
They are quite proffesional and capabale and I would suggest setting up a meeting/demo with them.


For Commercial you have Rocky DEM which is now owned by Ansys.
https://rocky.esss.co/



None of them are cheap, but you are going into a niche of a niche branch of CFD.
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Reply

Tags
boundary layer, hybrid mesh, submeshes


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Table bounds warnings at: END OF TIME STEP CFXer CFX 4 July 16, 2020 23:44
CFD analaysis of Pelton turbine amodpanthee CFX 31 April 19, 2018 18:02
Domain Imbalance HMR CFX 5 October 10, 2016 05:57
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 07:00
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 15:55


All times are GMT -4. The time now is 13:15.