Hey Martin
1 Attachment(s)
Hello Martin. Is it possible to mesh such a geometry as that prescribed in my blockMeshdict with facemerging? It is just a flat plate.
Cheers Deji |
1 Attachment(s)
Hi Deji,
does the attached blockMeshDict fit your intention? It uses mergePatchPairs to connect the two blocks with different numbers of elements. Martin |
Hi Martin. I will check it. Thanks.
|
Hello Martin. I was able to get it work, thanks much. Now the purpose that I asked if that was possible in OpenFOAM is because I would like to use snappyHexMesh utility on this mesh. Thus far, it isn't working and the code doesn't like it. How do you think one can refine the mesh with a tool such as snappyHexMesh?
Cheers, Deji |
Hi Deji,
here I must give up, I'm no regular snappy user ;-) May be one of the others foamers can give advice here? Martin |
Hallo Deji,
could you figure out what kind of refinement zone do you need? I mean, you need a box, a cylinder a sphere or something else, since with snappyHex you can also use an stl file to set a refinement zone. Having these details maybe I can help, Cheers, Elia |
Hello again. It is a box refinement zone that I actually need. Now, I do know how to use snappyHexmesh, the issue is that I used mergePatchPairs when I ran blockMesh. And the mesh is not fully hexes, a part of the mesh looked somewhat unstructured. The blockMeshDict that Martin posted has the file, please take a look at it and tell me if snappyHexMesh can be used for it.
|
3 Attachment(s)
Hello Deji,
I've made several tests. I've seen that after using merging PatchPairs you can normally use snappyHexMesh but only for refining regions that not cross the merged patches. I've attached a figure with paraFoam of what happens when one refines before and after the merged zone. Attachment 10384 Attachment 10385 Of course when I use a cylinder refinement region that cross the merged patches it doesn't work. I've also tried by not using mergePatchPairs and directly using snappyHexMesh after blockMesh. The result is, at least for me, that after using snappy it will left you only the region belonging to the master patch, whatever I try, it replies me always the same. I've attached also a figure with this situation. Attachment 10386 Hope it can helps you, Cheers, Elia |
Thanks much Elia. I did try that and did see as well that snappyHexMesh doesn't allow one to refine the mesh if the region across the merged patch was prescribed. :confused: So there is no way around this? I wish this was possible in OpenFOAM, otherwise I will have to construct such a mesh with gmsh. Thanks again Elia.
Cheers, Deji |
Quote:
Anyway you could also try to build two refiniement zone just before and after the merged regions with some boxes, and see if it fullfills your requirements, since maybe the non hexahedral cells built within the merging process will disturb the solution more than this refined-not refined-refined again passing through the merged patch. Good luck, Elia |
Insertion of a Cylinder
1 Attachment(s)
Dear Martin, as you may see in the included file, I'm trying to expand the geometry you should know, by making it cylindrical through the arc edge. No problem occurs until I insert a small pipe, because it generates an undesired mesh. How could I solve this problem? I thank you in advance for any consideration that you will give to this post.
Paolo |
Hi Paolo,
blockMesh is definitely not the primary choice to create a 3D mesh for your geometry. Is there any special reason that you don't use Salome or another free mesh generator? Martin |
No Martin, there's not a reason, I just thought I could do that directly on blockMesh.
I'll try this Salome you talk about, and I'll let you know. Thanks :) |
3D mesh solved
Hi Martin, I succeed in generating a 3D mesh with blockMesh, I just redefined my strategy in the block construction and everything worked fine, even checkMesh didn't find any error in the mesh. Simulations run well too, if you are interested in it, I'll post the blockMeshDict file.
Paolo |
Hi Paolo,
yes, I am interested... always eager to learn more about blockMesh strategies ;-) Martin |
1 Attachment(s)
Here is the file!
|
Congratulations ;-)
CU and thanks for posting... Martin |
Error in executing blockMesh in axisymmetric case
1 Attachment(s)
Dear Martin,
I am trying to simulate an axisymmetric case. When I execute the blockMesh in OpenFOAM 2.1.1, I get this error: Date : Feb 03 2014 Time : 18:46:49 Host : "mountaineer" PID : 23677 Case : /auto/scratch/mdinc/drop_case3b_2D nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Disallowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Creating block mesh from "/auto/scratch/mdinc/drop_case3b_2D/constant/polyMesh/blockMeshDict" Creating curved edges Creating topology blocks Creating topology patches Creating block mesh topology #0 Foam::error::printStack(Foam::Ostream&) in "/users/mdinc/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #1 Foam::sigFpe::sigHandler(int) in "/users/mdinc/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #2 at sigaction.c:0 #3 Foam::wedgePolyPatch::initTransforms() in "/users/mdinc/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #4 Foam::wedgePolyPatch::wedgePolyPatch(Foam::word const&, Foam::dictionary const&, int, Foam::polyBoundaryMesh const&) in "/users/mdinc/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #5 Foam::polyPatch::adddictionaryConstructorToTable<F oam::wedgePolyPatch>::New(Foam::word const&, Foam::dictionary const&, int, Foam::polyBoundaryMesh const&) in "/users/mdinc/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #6 Foam::polyPatch::New(Foam::word const&, Foam::dictionary const&, int, Foam::polyBoundaryMesh const&) in "/users/mdinc/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #7 Foam::polyMesh::polyMesh(Foam::IOobject const&, Foam::Xfer<Foam::Field<Foam::Vector<double> > > const&, Foam::List<Foam::cellShape> const&, Foam::List<Foam::List<Foam::face> > const&, Foam::List<Foam::word> const&, Foam::PtrList<Foam::dictionary> const&, Foam::word const&, Foam::word const&, bool) in "/users/mdinc/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #8 Foam::blockMesh::createTopology(Foam::IOdictionary const&, Foam::word const&) in "/users/mdinc/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libblockMesh.so" #9 Foam::blockMesh::blockMesh(Foam::IOdictionary const&, Foam::word const&) in "/users/mdinc/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libblockMesh.so" #10 in "/users/mdinc/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/bin/blockMesh" #11 __libc_start_main in "/lib64/libc.so.6" #12 in "/users/mdinc/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/bin/blockMesh" Floating point exception (core dumped) I cant understand what is the error but I could understand is that the error is due to wedgepolypatch. I am attaching my blockMeshDict for reference please find it. Awaiting a reply sir. Thanks in advance. |
Debuging errors blockMesh
Hello everybody...
I've got the following blockMesh file, I've followed the user guide indication about the right handed system but it doesnt work with my intend to create a suitable mesh, I'm going to post the error looking forward to something can catch the error, I'd appreciate it so much, thanks guys Create time Creating block mesh from "/home/ecopetrol/OpenFOAM/OpenFOAM_simulations/coimbra_cluster_ext/constant/polyMesh/blockMeshDict" Creating curved edges Creating topology blocks Creating topology patches Reading patches section Creating block mesh topology --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.85 for face 0 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.85 for face 1 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.7 for face 2 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -1 for face 3 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.85 for face 4 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.85 for face 5 --> FOAM Warning : From function blockMesh::createTopology(IOdictionary&) in file blockMesh/blockMeshTopology.C at line 255 negative volume block : 0, probably defined inside-out --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.825 for face 0 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.825 for face 1 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.75 for face 2 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.9 for face 3 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.825 for face 4 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.825 for face 5 --> FOAM Warning : From function blockMesh::createTopology(IOdictionary&) in file blockMesh/blockMeshTopology.C at line 255 negative volume block : 1, probably defined inside-out --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.666667 for face 0 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.666667 for face 1 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.666667 for face 2 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.666667 for face 3 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.666667 for face 4 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.666667 for face 5 --> FOAM Warning : From function blockMesh::createTopology(IOdictionary&) in file blockMesh/blockMeshTopology.C at line 255 negative volume block : 2, probably defined inside-out --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.0666667 for face 0 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.0666667 for face 1 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.0666667 for face 2 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.0666667 for face 3 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.0666667 for face 4 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.0666667 for face 5 --> FOAM Warning : From function blockMesh::createTopology(IOdictionary&) in file blockMesh/blockMeshTopology.C at line 255 negative volume block : 3, probably defined inside-out --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.6 for face 0 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.6 for face 1 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.6 for face 2 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.6 for face 3 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.6 for face 4 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.6 for face 5 --> FOAM Warning : From function blockMesh::createTopology(IOdictionary&) in file blockMesh/blockMeshTopology.C at line 255 negative volume block : 4, probably defined inside-out Reading physicalType from existing boundary file Default patch type set to empty Check topology Basic statistics Number of internal faces : 4 Number of boundary faces : 22 Number of defined boundary faces : 22 Number of undefined boundary faces : 0 Checking patch -> block consistency Creating block offsets Creating merge list . Creating polyMesh from blockMesh Creating patches Creating cells Creating points with scale 1 Writing polyMesh ---------------- Mesh Information ---------------- boundingBox: (-8 0 0) (32 0.5 1) nPoints: 619842 nCells: 308000 nFaces: 1233920 nInternalFaces: 614080 ---------------- Patches ---------------- patch 0 (start: 614080 size: 200) name: inlet patch 1 (start: 614280 size: 1840) name: bottom patch 2 (start: 616120 size: 200) name: outlet patch 3 (start: 616320 size: 1600) name: atmosphere patch 4 (start: 617920 size: 616000) name: frontBack and this is the blockMesh file convertToMeters 1; vertices ( ( -8 0 1 ) //0 ( 6 0 1 ) //1 ( 17 0 1 ) //2 ( 32 0 1 ) //3 ( -8 0.3 1 ) //4 ( 12 0.3 1 ) //5 ( 14 0.3 1 ) //6 ( 32 0.3 1 ) //7 ( -8 0.5 1 ) //8 ( 12 0.5 1 ) //9 ( 14 0.5 1 ) //10 ( 32 0.5 1 ) //11 ( -8 0 0 ) //12 ( 6 0 0 ) //13 ( 17 0 0 ) //14 ( 32 0 0 ) //15 ( -8 0.3 0 ) //16 ( 12 0.3 0 ) //17 ( 14 0.3 0 ) //18 ( 32 0.3 0 ) //19 ( -8 0.5 0 ) //20 ( 12 0.5 0 ) //21 ( 14 0.5 0 ) //22 ( 32 0.5 0 ) //23 ); blocks ( hex (0 1 5 4 12 13 17 16) ( 600 120 1 ) simpleGrading (1 1 1) //block0 hex (2 3 7 6 14 15 19 18) ( 900 120 1 ) simpleGrading (1 1 1) //block1 hex (4 5 9 8 16 17 21 20) ( 600 80 1 ) simpleGrading (1 1 1) //block2 hex (5 6 10 9 17 18 22 21) ( 100 80 1 ) simpleGrading (1 1 1) //block3 hex (6 7 11 10 18 19 23 22) ( 900 80 1 ) simpleGrading (1 1 1) //block4 ); edges ( ); patches ( patch inlet ( (0 12 16 4) (4 16 20 8) ) wall bottom ( (0 1 13 12) (1 5 17 13) (5 6 18 17) (6 2 14 18) (2 3 15 14) ) patch outlet ( (7 19 15 3) (11 23 19 7) ) patch atmosphere ( (8 20 21 9) (9 21 22 10) (10 22 23 11) ) empty frontBack ( (0 4 5 1) (2 6 7 3) (4 8 9 5) (5 9 10 6) (6 10 11 7) (12 13 17 16) (14 15 19 18) (16 17 21 20) (17 18 22 21) (18 19 23 22) ) ); mergePatchPairs ( ); |
Hallo Luigi,
try to change the way you define the blocks in your blockMeshDict. This negative volume warning is due to an incorrect definition for block number 0, 1, 2, 3 ,4 and 5. Look at the orderering of the vertices that define each of these blocks. Hope it helps, Elia |
All times are GMT -4. The time now is 15:27. |