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

[snappyHexMesh] Adding Layers to a curved Geometry

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 4, 2021, 11:13
Default Adding Layers to a curved Geometry
  #1
New Member
 
Join Date: May 2020
Posts: 11
Rep Power: 6
I7aniel is on a distinguished road
Hello everyone,

I am trying to simulate a flow through a pourous media. Therefore I have a geometry exported out of CAD and tried to mesh it with SHM. I want to do a 2D simulation so i plan on creating a 2D mesh using extrudeMesh after i create the mesh out of the CAD file. I attached the STL File which I use. I tried adding layer using the light red patches. Therefore Layers are added from both sides.

Inside the mesh this worked for three layers, however adding more layers results in problems due to the displacement of the other cells. Has anybody an idea how I can add more layers or how I can mesh the cells to follow the boundary? It is very important to the simulation that the cells "follow" the curved geometry at the left side over the hole diameter.

I added a screenshot of the mesh with 3 layers, this is how it should look like but the layers over the complete diameter. I also don't understand why the outside of the mesh has no layers (see also screenshot).

Has anybody an idea how i can mesh the curved geometry, so that the cells follow the outer walls? With blockMesh and splines i can create a geometry like that but I need the exact geometry from the CAD files.

Thanks in advance guys!
Attached Images
File Type: jpg 3Layers_slice.JPG (71.9 KB, 57 views)
File Type: jpg 3layers_outside.JPG (68.2 KB, 53 views)
File Type: jpg 4_layers_not_working.JPG (81.1 KB, 53 views)
File Type: jpg STL_file.JPG (16.6 KB, 43 views)
I7aniel is offline   Reply With Quote

Old   November 8, 2021, 04:46
Default
  #2
New Member
 
Join Date: May 2020
Posts: 11
Rep Power: 6
I7aniel is on a distinguished road
If somebody has an idea how I can mesh the curve geometry without SHM so that the cells are aligned to the curvature I would also appreciate that. I just have to use this geometry, but I am not fixed to using SHM
I7aniel is offline   Reply With Quote

Old   November 8, 2021, 07:56
Default
  #3
Member
 
Rodrigo
Join Date: Mar 2010
Posts: 98
Rep Power: 16
guin is on a distinguished road
Quote:
Originally Posted by I7aniel View Post
If somebody has an idea how I can mesh the curve geometry without SHM so that the cells are aligned to the curvature I would also appreciate that. I just have to use this geometry, but I am not fixed to using SHM
If I were you I'd give a try with blockMesh directly. You can find a handy option to project your edges based on a given geometry, for instance given by a loaded surface.

Here an example using a runtime-generated sphere https://github.com/OpenFOAM/OpenFOAM.../blockMeshDict

I guess You'll probably rather want to use something called "searchableSurface" or "searchableTriSurface" ... though I never use this and the precise name may differ (please someone correct me if wrong)

You can find more details at the user manual https://cfd.direct/openfoam/user-guide/v9-blockmesh/
guin is offline   Reply With Quote

Old   November 8, 2021, 07:59
Default
  #4
Member
 
Rodrigo
Join Date: Mar 2010
Posts: 98
Rep Power: 16
guin is on a distinguished road
Quote:
Originally Posted by I7aniel View Post
If somebody has an idea how I can mesh the curve geometry without SHM so that the cells are aligned to the curvature I would also appreciate that. I just have to use this geometry, but I am not fixed to using SHM
Another option for a hex-based mesh might be using SALOME-MECA ( https://www.salome-platform.org/ ) though installing that just for it sounds a bit hardcore to me.
guin is offline   Reply With Quote

Old   November 8, 2021, 09:49
Default
  #5
New Member
 
Join Date: May 2020
Posts: 11
Rep Power: 6
I7aniel is on a distinguished road
Quote:
Originally Posted by guin View Post
If I were you I'd give a try with blockMesh directly. You can find a handy option to project your edges based on a given geometry, for instance given by a loaded surface.

Here an example using a runtime-generated sphere https://github.com/OpenFOAM/OpenFOAM.../blockMeshDict
Hi guin thanks for yor answer, did you use blockMesh for a geometry that was given, in the example the geometry is a basic cylinder, do you know how i can import my surface in the blockmesh dict?

Thanks in advance,

Daniel
I7aniel is offline   Reply With Quote

Old   November 8, 2021, 10:42
Default
  #6
Member
 
Rodrigo
Join Date: Mar 2010
Posts: 98
Rep Power: 16
guin is on a distinguished road
Quote:
Originally Posted by I7aniel View Post
Hi guin thanks for yor answer, did you use blockMesh for a geometry that was given, in the example the geometry is a basic cylinder, do you know how i can import my surface in the blockmesh dict?

Thanks in advance,

Daniel
That's actually why I suggested you taking a look at the user manual https://cfd.direct/openfoam/user-guide/v9-blockmesh/

By the end of the section 5.3.3 Projection of vertices, edges and faces it tells you how to look for further examples inside the tutorials on your own
Code:
 find $FOAM_TUTORIALS -name blockMeshDict | xargs grep -l project
In your terminal (e.g. using bash) you can then, for instance, open them with your favourite editor (e.g. gedit ?):
Code:
 gedit $(find $FOAM_TUTORIALS -name blockMeshDict | xargs grep -l project)
I especially suggest you testing and trying to understand the workflow used in the cases involving following ones:
https://github.com/OpenFOAM/OpenFOAM.../blockMeshDict
https://github.com/OpenFOAM/OpenFOAM.../blockMeshDict

Best luck
guin is offline   Reply With Quote

Reply


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
[DesignModeler] ANSYS cannot read layers in my geometry ljjan ANSYS Meshing & Geometry 0 October 2, 2018 20:53
[Other] Meshing curved geometry zannatul OpenFOAM Meshing & Mesh Conversion 1 October 21, 2015 19:59
[snappyHexMesh] SnappyHexMesh no layers and no decent mesh for complex geometry pizzaspinate OpenFOAM Meshing & Mesh Conversion 1 February 25, 2015 08:05
[snappyHexMesh] fail adding layers Tensian OpenFOAM Meshing & Mesh Conversion 2 November 4, 2013 12:22
[snappyHexMesh] Effect of adding layers with sHM Nucleophobe OpenFOAM Meshing & Mesh Conversion 4 August 20, 2012 17:45


All times are GMT -4. The time now is 07:00.