![]() |
mergePatchPairs with blockMesh
1 Attachment(s)
Dear Foamers,
I have done a mesh with blockMesh consisting of 6 blocks. Now I want to merge all the blocks and I am using for it mergePatchPairs. It works for some patches but not for all of them. I have attached my blockMeshDict so that you can check it. Any idea or suggestion will be highly appreciated. Thanks a lot in advance Ivan |
Problem solved
I have just solved the problem using face matching instead of face merging!
I guess it must work also with face merging, but I am happy so far with the mentioned solution. Many greetings Ivan |
mergePatchPairs with blockMesh
can you tell me how to edit mergepatchpairs?My case is cut the windfarm into two blocks.Thaks a lots.
|
Hi hei@ge
at the end of your blockMeshDict there is a mergePatchPairs entry. You only have to write there which patch pairs you want to merge. If you have 2 different meshes that you want to merge, you can use the utility mergeMeshes for that. I hope this helps... Ivan |
Hi,thread,thank you for your reply.but i can not solve my problem.please see my blockmeshdict for me.
vertices ( ( 581321 4.78537e+06 930) ( 582290 4.78537e+06 930) ( 582290 4.78624e+06 930) ( 581321 4.78624e+06 930) ( 581321 4.78537e+06 1030) ( 582290 4.78537e+06 1030) ( 582290 4.78624e+06 1030) ( 581321 4.78624e+06 1030) ( 581321 4.78537e+06 2000) ( 582290 4.78537e+06 2000) ( 582290 4.78624e+06 2000) ( 581321 4.78624e+06 2000) ); blocks ( hex (0 1 2 3 4 5 6 7) (30 30 25) simpleGrading (1 1 1) hex (4 5 6 7 8 9 10 11) (30 30 30) simpleGrading (1 1 1) ); edges ( ); patches ( patch outlet ( (2 6 5 1) (6 10 9 5) ) patch sides ( (1 5 4 0) (5 9 8 4) (3 7 6 2) (7 11 10 6) ) patch inlet ( (0 4 7 3) (4 8 11 7) ) wall ground ( (0 3 2 1) ) patch top ( (8 9 10 11) ) patch interface1 ( (4 5 6 7) ) patch interface2 ( (4 7 6 5) ) ); mergePatchPairs ( (<interface1> <interface2>) ); my model is a Hex,i turn it into 2 blocks in the near bottom. |
Hi hei@ge,
You've probably figured it out by now, but just in case (and because unanswered threads bug me), here's your answer: Internal faces between blocks (which won't be receiving boundary conditions) don't get assigned as patches - they are simply ignored, and OpenFoam will recognize them as simply being an interface between two blocks. The exception is when the two blocks use separate vertices to define overlapping faces - say, if you were to copy vertices 4, 5, 6, & 7 to vertices 12, 13, 14, & 15. THEN you would use mergePatchPairs to merge the faces (4 5 6 7) and (15 14 13 12) Hope this helps someone! Regards, Jacob |
@ Hei@ge,
I don't if it is just a mistake in copy and paste but you should in matchPatchPairs write (interface1 interface2) instead of (<interface1> <interface2>) Cheers, Elia |
Hi,
Do you know how to specify BC at the interface patches ? thx ZMM |
hey
in case I can't connect my blocks because they don't have the same vertices at their interface how should I proceed. As aeroGeek described I need to define two patches and merge them with mergePatchPairs. The problem is than that I need boundaries in the 0 directory for the two new internal patches. Or are these two patches automatically formed to an internal face? Thanks a lot! Marvin |
Hi, I am a totally newbie in CFD. I am facing the problem that openfoam doesnt accept the block with internal faces. But i need that to build a hollow cavity within the center of a rectangular box. What should I do? i hope can get some advice and will be very grateful on that. thanks
Creating topology blocks --> FOAM Warning : From function Foam::vector Foam::cellModel::centre(const labelList&, const Foam::UList<Foam::Vector<double> >&) const in file meshes/meshShapes/cellModel/cellModel.C at line 70 zero or negative pyramid volume: -10.12 for face 0 --> FOAM Warning : From function Foam::vector Foam::cellModel::centre(const labelList&, const Foam::UList<Foam::Vector<double> >&) const in file meshes/meshShapes/cellModel/cellModel.C at line 70 zero or negative pyramid volume: -10.12 for face 1 --> FOAM Warning : From function Foam::vector Foam::cellModel::centre(const labelList&, const Foam::UList<Foam::Vector<double> >&) const in file meshes/meshShapes/cellModel/cellModel.C at line 70 zero or negative pyramid volume: -23.76 for face 3 --> FOAM Warning : From function Foam::vector Foam::cellModel::centre(const labelList&, const Foam::UList<Foam::Vector<double> >&) const in file meshes/meshShapes/cellModel/cellModel.C at line 70 zero or negative pyramid volume: -10.12 for face 4 --> FOAM Warning : From function Foam::vector Foam::cellModel::centre(const labelList&, const Foam::UList<Foam::Vector<double> >&) const in file meshes/meshShapes/cellModel/cellModel.C at line 70 zero or negative pyramid volume: -10.12 for face 5 --> FOAM FATAL IO ERROR: Block hex (37 38 46 45 53 54 62 61) (16 339 4) simpleGrading (1(1) 1(1) 1(1)) has inward-pointing faces 4(37 53 61 45) 4(38 46 62 54) 4(45 61 62 46) 4(37 45 46 38) 4(53 54 62 61) file: /mnt/c/Users/User/OpenFOAM/jhTutorial/pimpleDyMfoam/elevator/system/blockMeshDict.blocks at line 91. From function void Foam::blockDescriptor::check(const Foam::Istream&) in file blockDescriptor/blockDescriptor.C at line 89. FOAM exiting |
Were you able to solve this problem? blockMesh does not like internal faces, but a cavity inside is not usually a problem because this is external to the mesh. If you post the geometry or blockMeshDict file, I can help you with it.
In any case, you can take a look at the createBaffles utility if you want internal walls. |
Quote:
previously, by using setSet, I got my hollow box within the domain. But i faced another problem, the deleted cell zone left a hole there when it moved up. The mesh seems not replaced automatically. I am trying the moving Cone topo method which is topo changer. As it seems limited, so i was trying to modify it to suit my case which has vertical translation motion. thanks again for your help. |
No, splitMeshRegions splits the mesh into different regions, which I achieve in my case through meticulous blocking and naming. createBaffles on the other hand is capable of generating internal walls using previously defined cell sets or regions. Here is an example image of my mesh with internal walls and cavity, note that I define internal walls explicitly in the blockMeshDict using duplicate vertices instead of using the createBaffles utility:
https://www.cfd-online.com/Forums/op...evolution.html Again, it is difficult to say what exactly is the problem in your case without any details but it seems to me like you are trying to transform your mesh to create a cavity instead of deleting it. To me, this seems a little strange way to do things. |
Quote:
https://www.cfd-online.com/Forums/op...ide-fluid.html Actually i am trying to build a 3D hollow box moving in a rectangular tube (domain), and i aim to mesh the space btwn hollow box and rectangular tube to study the external airflow and pressure and turbulence parameters. This is my starting step to learn the simulation of aerodynamic outside a vehicles or body within a domain. Is it correct for me to delete the cells within the box to make it hollow? i am sry for my dummy questions. Thanks a lot :) |
Quote:
Code:
/*--------------------------------*- C++ -*----------------------------------*\ |
Quote:
But i still cnt figure out if there's the function for me to choose where i wan to mesh, something like locationInMesh in snappyHexM. So that i can choose only to mesh the space between my hollow box and the rectangular domain. And most importantly, when the hollow car moved up, its original location won't left a hole there. HTML Code:
Keep in mind that you can assign a boundary condition to a block face and not to part of it (unless you make use of an additional utility). HTML Code:
here is an example blockMeshDict that you can adapt for your case. I have made it based on the movingCone case so you can test this case with pimpleDymFoam (remember to change the boundary conditions from wedge to empty) Thanks again for your help. I very appreciate your help :) Thanks |
Does anyone know how to give boundary condition to internal faces that you have merged through merge patch pairs? I had different size blocks and merged them through mergePatchPairs. Now it's giving me error that interface boundary condition is not defined in 0 folder.
|
Quote:
If you are not using multi-region CHT, I think you might need to create a baffle out of the internal face using createBafflesDict or something similar. If you are using CHT, in your blockMeshDict, specify the two interface boundaries as type `patch` in the `boundary` group as shown below. Code:
... |
All times are GMT -4. The time now is 18:56. |