|
[Sponsors] |
[blockMesh] mergePatchPairs with blockMesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 7, 2011, 14:23 |
mergePatchPairs with blockMesh
|
#1 |
Member
Join Date: Oct 2010
Location: Germany
Posts: 39
Rep Power: 16 |
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 Last edited by Ivanet; July 8, 2011 at 03:00. |
|
July 8, 2011, 12:35 |
Problem solved
|
#2 |
Member
Join Date: Oct 2010
Location: Germany
Posts: 39
Rep Power: 16 |
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 |
|
November 25, 2011, 00:51 |
mergePatchPairs with blockMesh
|
#3 |
Member
张德胜
Join Date: Oct 2011
Posts: 71
Rep Power: 15 |
can you tell me how to edit mergepatchpairs?My case is cut the windfarm into two blocks.Thaks a lots.
|
|
November 25, 2011, 04:05 |
|
#4 |
Member
Join Date: Oct 2010
Location: Germany
Posts: 39
Rep Power: 16 |
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 |
|
November 26, 2011, 22:34 |
|
#5 |
Member
张德胜
Join Date: Oct 2011
Posts: 71
Rep Power: 15 |
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. |
|
December 20, 2011, 01:22 |
|
#6 |
New Member
Jacob Crabill
Join Date: Nov 2011
Posts: 1
Rep Power: 0 |
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 |
|
January 16, 2012, 10:57 |
|
#7 |
New Member
Elia Daniele
Join Date: Mar 2010
Location: Oldenburg
Posts: 21
Rep Power: 16 |
@ 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 |
|
November 19, 2015, 12:22 |
|
#8 |
Senior Member
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 145
Rep Power: 17 |
Hi,
Do you know how to specify BC at the interface patches ? thx ZMM |
|
June 27, 2017, 13:47 |
|
#9 |
New Member
Join Date: Apr 2017
Location: Germany
Posts: 5
Rep Power: 9 |
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 |
|
January 17, 2018, 23:02 |
|
#10 |
Member
Join Date: Jan 2018
Location: Malaysia
Posts: 58
Rep Power: 8 |
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 |
|
February 23, 2018, 10:42 |
|
#11 |
Member
Anurag
Join Date: Aug 2014
Location: Germany
Posts: 57
Rep Power: 12 |
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. |
|
February 23, 2018, 11:27 |
|
#12 | |
Member
Join Date: Jan 2018
Location: Malaysia
Posts: 58
Rep Power: 8 |
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. |
||
February 23, 2018, 11:53 |
|
#13 |
Member
Anurag
Join Date: Aug 2014
Location: Germany
Posts: 57
Rep Power: 12 |
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. |
|
February 23, 2018, 12:16 |
|
#14 | |
Member
Join Date: Jan 2018
Location: Malaysia
Posts: 58
Rep Power: 8 |
Quote:
Linear motion of a solid inside a fluid 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 |
||
February 23, 2018, 15:23 |
|
#15 | |
Member
Anurag
Join Date: Aug 2014
Location: Germany
Posts: 57
Rep Power: 12 |
Quote:
Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 0.001; vertices ( (-7.5 0 0) //0 (-7 0 0) //1 (-3.5 0 0) //2 (0 0 0) //3 (-7.5 1.75 0) //4 (-7 1.75 0) //5 (-3.5 2 0) //6 (0 2 0) //7 (-7.5 2.5 0) //8 (-7 2.5 0) //9 (-3.5 2.5 0) //10 (0 2.5 0) //11 (-7.5 1.75 1) //12 (-7 1.75 1) //13 (-3.5 2 1) //14 (0 2 1) //15 (-7.5 2.5 1) //16 (-7 2.5 1) //17 (-3.5 2.5 1) //18 (0 2.5 1) //19 (-7.5 0 1) //20 (-7 0 1) //21 (-3.5 0 1) //22 (0 0 1) //23 (-7 0.75 0) //24 (-7 0.75 1) //25 (-3.5 0.75 0) //26 (-3.5 0.75 1) //27 (-7.5 0.75 0) //28 (-7.5 0.75 1) //29 (0 0.75 0) //30 (0 0.75 1) //31 ); blocks ( hex (0 1 24 28 20 21 25 29) (15 20 1) simpleGrading (2 0.25 1) hex (28 24 5 4 29 25 13 12) (15 20 1) simpleGrading (2 0.25 1) hex (2 3 30 26 22 23 31 27) (20 20 1) simpleGrading (2 0.25 1) hex (26 30 7 6 27 31 15 14) (20 20 1) simpleGrading (2 0.25 1) hex (4 5 9 8 12 13 17 16) (15 20 1) simpleGrading (2 0.25 1) hex (5 6 10 9 13 14 18 17) (50 20 1) simpleGrading (2 0.25 1) hex (6 7 11 10 14 15 19 18) (20 20 1) simpleGrading (2 0.25 1) hex (1 2 26 24 21 22 27 25) (50 20 1) simpleGrading (2 0.25 1) ); edges ( ); boundary ( movingWall { type wall; faces ( (24 5 13 25) (5 6 14 13) (26 6 14 27) (24 26 27 25) ); } farFieldMoving { type patch; faces ( (9 17 18 10) (1 21 22 2) ); } fixedWall { type wall; faces ( (3 30 31 23) (30 7 15 31) (7 11 19 15) ); } axis { type empty; faces ( //(0 1 1 0) //(2 3 3 2) ); } left { type patch; faces ( (0 20 29 28) (28 29 12 4) (4 12 16 8) ); } farField { type patch; faces ( (8 16 17 9) (0 20 21 1) (10 18 19 11) (2 22 23 3) ); } back { type empty; faces ( (0 28 24 1) (28 4 5 24) (2 26 30 3) (26 6 7 30) (4 8 9 5) (5 9 10 6) (6 10 11 7) ); } front { type empty; faces ( (20 21 25 29) (29 25 13 12) (22 23 31 27) (27 31 15 14) (12 13 17 16) (13 14 18 17) (14 15 19 18) ); } ); mergePatchPairs ( ); // ************************************************************************* // |
||
February 23, 2018, 21:21 |
|
#16 | |
Member
Join Date: Jan 2018
Location: Malaysia
Posts: 58
Rep Power: 8 |
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 |
||
May 4, 2021, 07:48 |
|
#17 |
Member
Bushra Rasheed
Join Date: Dec 2020
Posts: 97
Rep Power: 6 |
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.
|
|
May 4, 2021, 11:32 |
|
#18 | |
Member
Julian
Join Date: Sep 2019
Posts: 32
Rep Power: 7 |
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:
... boundary ( ... bottomWall { type patch; faces ( (12 13 15 14) ); } ... solidInterface { type patch; faces ( (16 18 19 17) ); } ... ); mergePatchPairs ( (bottomWall solidInterface) ); |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[blockMesh] blockMesh | MergePatchPairs | snappyHexMesh |Different number of cells in divisions | pythag0ra5 | OpenFOAM Meshing & Mesh Conversion | 1 | September 19, 2020 15:38 |
[mesh manipulation] mergePatchPairs after running blockMesh | ashishmagar600 | OpenFOAM Meshing & Mesh Conversion | 2 | March 8, 2019 05:15 |
[blockMesh] mergePatchPairs reducing a face to less than 3 points | aow | OpenFOAM Meshing & Mesh Conversion | 2 | June 1, 2018 18:37 |
[blockMesh] Error running blockMesh with mergePatchPairs on OF2.4.0 | deepbandivadekar | OpenFOAM Meshing & Mesh Conversion | 1 | November 25, 2017 15:50 |
[blockMesh] BlockMesh documentation User Guide clearance of mergePatchPairs proposals | benru | OpenFOAM Meshing & Mesh Conversion | 0 | June 9, 2008 03:22 |