SnappyHexMesh with Empty patches in blockMesh
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 : 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 |
Hi Magi,
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 |
Thank you for your reactivity Yann. The solution seems to work. i changed my boundaries using changeDictionary function :
Quote:
Merci ! |
Quote:
I tried to do the mentioned steps, except for running extrudeMesh! However, I can't see any changes in the boundary patches!! Code:
/*--------------------------------*- C++ -*----------------------------------*\ Code:
/*--------------------------------*- C++ -*----------------------------------*\ |
Hello Saeed,
What output do you get when running changeDictionary? If you're using v2112 the syntax should be: Code:
/*--------------------------------*- C++ -*----------------------------------*\ Yann |
yeahhh, it worked.
Thanks Yann:cool: |
1 Attachment(s)
Ohhh, changeDictionary works properly, but an error occures in decomposition step!!
Code:
Create mesh for time = 0
The error refers to this part in cellLevel: Attachment 98243 |
Hello Saeed,
changeDictionary modified your patch type to empty in the mesh (specifically in the constant/polyMesh/boundary file) but it didn't update these patches in the 0 directory since you didn't specify it. cellLevel is a variable written by snappy while meshing, so it has the same patch type as the ones defined during meshing. decomposePar complains because the front and back patches are now type empty in the boundary file, but the boundary conditions defined for those patches in 0 directory are incompatible (it should be empty too) To solve this issue you should also update the files in 0 directory: Code:
/*--------------------------------*- C++ -*----------------------------------*\ |
1 Attachment(s)
Hello Yann, thank you for the reply.
I adopted the following changeDictionary for my case, however, it gave me additional repetitive patches for front and back!! Code:
/*--------------------------------*- C++ -*----------------------------------*\ |
My bad, this should be the proper syntax for the changeDictionaryDict file:
Code:
cellLevel |
Ohhh yeahh, I think I need some rest to recharge my batteries:)
Thanks again. |
All times are GMT -4. The time now is 07:50. |