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

[snappyHexMesh] SnappyHexMesh with Empty patches in blockMesh

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 1 Post By Yann
  • 1 Post By Magistrane

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 6, 2022, 07:21
Default SnappyHexMesh with Empty patches in blockMesh
  #1
Member
 
Ilan
Join Date: Dec 2018
Posts: 48
Rep Power: 6
Magistrane is on a distinguished road
Hello Foamers,

I really hope someone will see this soon, cause I am stuck here :/

So, I am working on a project using oversets. I used the wolfdynamics tutorials as basis to build my simulation. In those, the meshes containing the structures uses snappyHexMesh without problems. Their front and back are defined in the blockMesh as symmetryPlane.
In the overall mesh (backgroud), front and back patches were defined as "empty". and the overset is working well.

My problem is, I need to use snappyHexMesh to localy improve my 2D mesh but with empty patches in blockmesh, there is a point the calcul stop sending a warning :

Code:
Correcting 2-D mesh motion--> FOAM Warning : 
    From void Foam::twoDPointCorrector::calcAddressing() const
    in file twoDPointCorrector/twoDPointCorrector.C at line 163
    The number of points in the mesh is not equal to twice the number of edges normal to the plane - this may be OK only for wedge geometries.
    Please check the geometry or adjust the orthogonality tolerance.

Number of normal edges: 1066710 number of points: 1269000
The snappy never ends.

I solved the problem by defining front and back as symmetryPlane but... doing that, the overset stopped working: in my simulation my moving meshes controled by the overset seems completly independant of the background mesh...

I indentified 4 potential solutions upto now but don't know how to apply them or which one would be the best :

- Include my mesh refinement in the blockmeshdict. I don't like this solution because it strongly limits my possibilities.

- Find a way to use snappyHexMesh with empty front and back patches. I already tried to reorder the points before using snappy, but it did not change a thing.

- Find another kind of patch that will not interfer with my overset. But as a symmetryPlane isn't working, I guess that none of them will.

- Putting the symmetryPlane to mesh and removing it with a createPatch -overwrite to empty, but until now, this solution never succeed for some magical reasons, openfoam is refusing to swap back to empty patches...

Do any of you have an idea how to solve this ? I would be really grateful.

Feel free to ask for informations if you thing something is lacking in the thread, I really need to sort the things out !

Have a amazing day !

Magi
Magistrane is offline   Reply With Quote

Old   May 6, 2022, 08:20
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 629
Rep Power: 20
Yann will become famous soon enough
Hi Magi,
  1. Do not use empty patch in your blockMeshDict
  2. After running snappyHexMesh, run extrudeMesh
  3. Finally, use changeDictionary to update your front and back patches to empty

Snappy uses octree structure to split the mesh when refining and AFAIK it cannot deal with 2D meshes. This means the resulting mesh will have several cells in the 3rd direction, which is obviously something your want to avoid for a 2D case.

This is why you need to use extrudeMesh to extrude a one layer thickness mesh out of one of the front or back patch. This will give you a clean 2D mesh with only one cell layer in the 3rd direction.

changeDictionary can be used to update boundary conditions or patches types, it is great to update boundary types after meshing.

I did not check but you should be able to find tutorials using extrudeMesh and changeDictionary.

I hope this helps,
Yann
Magistrane likes this.
Yann is offline   Reply With Quote

Old   May 9, 2022, 05:42
Default
  #3
Member
 
Ilan
Join Date: Dec 2018
Posts: 48
Rep Power: 6
Magistrane is on a distinguished road
Thank you for your reactivity Yann. The solution seems to work. i changed my boundaries using changeDictionary function :

Quote:
boundary
{
front
{
type empty;
}
back
{
type empty;
}
}
I have some instabilities in my calculation now, but i think it is more about my mesh.

Merci !
Yann likes this.
Magistrane is offline   Reply With Quote

Reply

Tags
blockmesh, patches, snapphhexmesh

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[mesh manipulation] createpatch not working when using layer addition in snappyHexMesh Dikkeunit OpenFOAM Meshing & Mesh Conversion 0 February 3, 2020 09:46
[snappyHexMesh] Patches disappearing after snappyHexMesh obiscolly50 OpenFOAM Meshing & Mesh Conversion 2 October 26, 2018 12:01
This mesh contains patches of type empty but is not 1D or 2D oric OpenFOAM Running, Solving & CFD 36 November 28, 2016 07:12
[snappyHexMesh] snappyHexMesh does not create boundary patches from .stl files bug_or_feature OpenFOAM Meshing & Mesh Conversion 7 August 30, 2016 19:18
[mesh manipulation] mirrorMesh and undoing the joining of patches chegdan OpenFOAM Meshing & Mesh Conversion 3 October 21, 2015 08:09


All times are GMT -4. The time now is 01:39.