|
[Sponsors] |
July 10, 2012, 17:13 |
3-D Mesh in a cylinder
|
#1 |
Member
Nikunj Raithatha
Join Date: Jul 2012
Location: Washington DC
Posts: 47
Rep Power: 14 |
Hello!
I am trying to mesh entire volume covered by a cylinder or for simplicity, a quarter of a cylinder. The cylinder is oriented such that its axis is z-axis (x=y=0) and radius is 5 m. The mesh is generated using blockMesh without any error. However, when i examine the mesh in paraView, I see cells only at top and bottom layers (z=0 and z=10), and on the side of the cylinder. I donot get any cells in the space covered by the cylinder. In order to check if this is the case with other 3-Dimensional tutorial cases, I examined the meshing of hotRoom heat transfer tutorial "buoyanBoussinesqSimpleFoam". And that indeed was the case in this cuboidal geometry. It had cells only on the six faces. the volume of this geometery didnot have any cell. Please help me with generating mesh/ cells in the volume of a geometry apart from that in faces. Thanks, -Nikunj. |
|
July 10, 2012, 17:56 |
|
#2 |
Senior Member
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 22 |
Hi Nikunj,
you should post your blockMeshDict so that we can help, Martin |
|
July 11, 2012, 05:19 |
|
#3 |
Member
|
Hi Nikunj,
just found something that might help: https://sites.google.com/site/snappy.../cylinder-case
__________________
~~~_/)~~~ |
|
July 11, 2012, 10:09 |
|
#4 |
Member
Nikunj Raithatha
Join Date: Jul 2012
Location: Washington DC
Posts: 47
Rep Power: 14 |
Thanks for your swift reply Martin. Here is my meshing file:
FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 1; vertices ( (0 0 0) (1.09 0 0) (1.2 -0.11 0) (1.2 -1.2 0) (2.4 0 0) (1.31 0 0) (1.2 0.11 0) (1.2 1.2 0) (0 0 0.8) (1.09 0 0.8) (1.2 -0.11 0.8) (1.2 -1.2 0.8) (2.4 0 0.8) (1.31 0 0.8) (1.2 0.11 0.8) (1.2 1.2 0.8) (0 0 4.4) (1.09 0 4.4) (1.2 -0.11 4.4) (1.2 -1.2 4.4) (2.4 0 4.4) (1.31 0 4.4) (1.2 0.11 4.4) (1.2 1.2 4.4) ); blocks ( hex (0 3 2 1 8 11 10 9) (4 4 4) simpleGrading (1 1 1) hex (3 4 5 2 11 12 13 10) (4 4 4) simpleGrading (1 1 1) hex (4 7 6 5 12 15 14 13) (4 4 4) simpleGrading (1 1 1) hex (7 0 1 6 15 8 9 14) (4 4 4) simpleGrading (1 1 1) hex (8 11 10 9 16 19 18 17) (4 4 4) simpleGrading (1 1 1) hex (11 12 13 10 19 20 21 18) (4 4 4) simpleGrading (1 1 1) hex (12 15 14 13 20 23 22 21) (4 4 4) simpleGrading (1 1 1) hex (15 8 9 14 23 16 17 22) (4 4 4) simpleGrading (1 1 1) ); edges ( arc 0 3 (0.35147 -0.84853 0) arc 3 4 (2 -0.89443 0) arc 4 7 (2 0.89443 0) arc 7 0 (0.35147 0.84853 0) arc 1 2 (1.122 -0.0778 0) arc 2 5 (1.2778 -0.0778 0) arc 5 6 (1.2778 0.0778 0) arc 6 1 (1.122 0.0778 0) arc 8 11 (0.35147 -0.84853 0.8) arc 11 12 (2 -0.89443 0.8) arc 12 15 (2 0.89443 0.8) arc 15 8 (0.35147 0.84853 0.8) arc 9 10 (1.122 -0.0778 0.8) arc 10 13 (1.2778 -0.0778 0.8) arc 13 14 (1.2778 0.0778 0.8) arc 14 9 (1.122 0.0778 0.8) arc 16 19 (0.35147 -0.84853 4.4) arc 19 20 (2 -0.89443 4.4) arc 20 23 (2 0.89443 4.4) arc 23 16 (0.35147 0.84853 4.4) arc 17 18 (1.122 -0.0778 4.4) arc 18 21 (1.2778 -0.0778 4.4) arc 21 22 (1.2778 0.0778 4.4) arc 22 17 (1.122 0.0778 4.4) ); boundary ( top { type wall; faces ( (17 16 19 18) (18 19 20 21) (21 20 23 22) (16 17 22 23) ); } side { type wall; faces ( (3 11 8 0) (4 12 11 3) (7 15 12 4) (0 8 15 7) (11 19 16 8) (12 20 19 11) (15 23 20 12) (8 16 23 15) ); } bottom { type wall; faces ( (0 1 2 3) (3 2 5 4) (4 5 6 7) (1 0 7 6) ); } bottom_innerc { type wall; faces ( (9 10 2 1) (10 13 5 2) (13 14 6 5) (14 9 1 6) ); } top_innerc { type wall; faces ( (17 18 10 9) (18 21 13 10) (21 22 14 13) (22 17 9 14) ); } ); mergePatchPairs ( ); // ************************************************** *********************** // |
|
July 11, 2012, 10:11 |
|
#5 |
Member
Nikunj Raithatha
Join Date: Jul 2012
Location: Washington DC
Posts: 47
Rep Power: 14 |
Please note that this file is for concentric cylinders.
|
|
July 11, 2012, 10:13 |
|
#6 |
Member
Nikunj Raithatha
Join Date: Jul 2012
Location: Washington DC
Posts: 47
Rep Power: 14 |
Thanks Jan for sharing it. Learning snappymesh for meshing this cylinder was going to be my next step .
|
|
July 11, 2012, 10:44 |
|
#7 |
Senior Member
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 22 |
Hi Nikunj,
your blockMeshDict works fine for me... There are cells in the volume, as you can see in the screenshot. I think I do not understand your problem correctly. Do you want to have cells in the center of the cylinder, too? Regards Martin |
|
July 11, 2012, 11:56 |
|
#8 |
Member
Nikunj Raithatha
Join Date: Jul 2012
Location: Washington DC
Posts: 47
Rep Power: 14 |
ohhk, probably then there is an error in the way I am viewing the mesh. Will try running it in paraFoam again.
Thanks a lot for your replies Martin! -Nikunj. |
|
July 11, 2012, 12:45 |
|
#9 |
Member
Nikunj Raithatha
Join Date: Jul 2012
Location: Washington DC
Posts: 47
Rep Power: 14 |
Hello Martin!
As you correctly pointed out in previous reply, now, I wanna have cells in the center of the cylinder too. As of now I am just considering the bottom part. Despite repeated trials, I am getting error, "face 0 in patch 2 does not have neighbour cell face: 4(7 2 3 8)" would you please help me with this. Thanks, Nikunj. Here is the meshing file: /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.0.1 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 1; vertices ( (0 0 0) (0.11 0 0) (1.2 0 0) (0 1.2 0) (0 0.11 0) (0 0 0.8) (0.11 0 0.8) (1.2 0 0.8) (0 1.2 0.8) (0 0.11 0.8) ); blocks ( hex (0 1 4 0 5 6 9 5) (4 4 4) simpleGrading (1 1 1) hex (4 1 2 3 6 7 8 9) (4 4 4) simpleGrading (1 1 1) ); edges ( arc 1 4 (0.078 0.078 0) arc 2 3 (0.848 0.848 0) arc 6 9 (0.078 0.078 0.88) arc 7 8 (0.848 0.848 0.88) ); boundary ( top { type wall; faces ( (5 6 9 5) (6 7 8 9) ); } bottom { type wall; faces ( (2 1 4 3) (1 0 4 1) ); } lateral { type wall; faces ( (7 2 3 8) ); } bottom_innerc { type patch; faces ( (1 4 9 6) ); } sides { type wall; faces ( (1 2 7 6) (0 1 6 5) (9 8 3 4) (5 9 4 0) ); } ); mergePatchPairs ( ); // ************************************************** *********************** // |
|
July 11, 2012, 13:03 |
|
#10 |
Senior Member
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 22 |
Hi,
this version works fine: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.0.1 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 1; vertices ( (0 0 0) (0.11 0 0) (1.2 0 0) (0 1.2 0) (0 0.11 0) (0 0 0.8) (0.11 0 0.8) (1.2 0 0.8) (0 1.2 0.8) (0 0.11 0.8) ); blocks ( hex (0 1 4 0 5 6 9 5) (4 4 4) simpleGrading (1 1 1) hex (4 1 2 3 9 6 7 8) (4 4 4) simpleGrading (1 1 1) ); edges ( arc 1 4 (0.078 0.078 0) arc 2 3 (0.848 0.848 0) arc 6 9 (0.078 0.078 0.8) arc 7 8 (0.848 0.848 0.8) ); boundary ( top { type wall; faces ( (5 6 9 5) (6 7 8 9) ); } bottom { type wall; faces ( (2 1 4 3) (1 0 4 1) ); } lateral { type wall; faces ( (7 2 3 8) ); } /*bottom_innerc { type patch; faces ( (1 4 9 6) ); } */ sides { type wall; faces ( (1 2 7 6) (0 1 6 5) (9 8 3 4) (5 9 4 0) ); } ); mergePatchPairs ( ); // ************************************************************************* // If you have pyFoam installed, try the pyFoamDisplayBlockMesh utility for debugging. Or you can use "paraFoam -block" and play with the "wireframe" and "surface with edges" visualization. Martin |
|
July 11, 2012, 15:15 |
|
#11 |
Member
Nikunj Raithatha
Join Date: Jul 2012
Location: Washington DC
Posts: 47
Rep Power: 14 |
Ohh, that helps a lot! Thanks a lot Martin!
-Nikunj. |
|
July 12, 2012, 11:28 |
|
#12 |
Member
Nikunj Raithatha
Join Date: Jul 2012
Location: Washington DC
Posts: 47
Rep Power: 14 |
Martin, in order to simulate full cylindrical geometry, I am trying to implement symmetry condition on the "sides" boundary, after separating them to side 1 and side 2 as shown in the file below. BlockMesh isnt showing any error for this file but I am getting the following error when I am running the buoyantboussinesPimpleFoam solver on it.
"#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #2 Uninterpreted: #3 Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #4 Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libfiniteVolume.so" #5 Foam::fvMatrix<double>::solve() in "/opt/openfoam211/platforms/linuxGccDPOpt/bin/buoyantBoussinesqPimpleFoam" #6 Foam::incompressible::RASModels::kEpsilon::correct () in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so" #7 in "/opt/openfoam211/platforms/linuxGccDPOpt/bin/buoyantBoussinesqPimpleFoam" #8 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6" #9 in "/opt/openfoam211/platforms/linuxGccDPOpt/bin/buoyantBoussinesqPimpleFoam" Floating point exception (core dumped)" Would you please tell me, whether this error is due to improper use of symmetryPlane or something else. Thanks a lot! -Nikunj. FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 1; vertices ( (0 0 0) (0.11 0 0) (1.2 0 0) (0 1.2 0) (0 0.11 0) (0 0 0.8) (0.11 0 0.8) (1.2 0 0.8) (0 1.2 0.8) (0 0.11 0.8) (0.11 0 4.4) (1.2 0 4.4) (0 1.2 4.4) (0 0.11 4.4) ); blocks ( hex (0 1 4 0 5 6 9 5) (10 10 4) simpleGrading (1 1 1) hex (4 1 2 3 9 6 7 8) (10 10 4) simpleGrading (1 1 1) hex (9 6 7 8 13 10 11 12) (10 10 9) simpleGrading (1 1 1) ); edges ( arc 1 4 (0.078 0.078 0) arc 2 3 (0.848 0.848 0) arc 6 9 (0.078 0.078 0.8) arc 7 8 (0.848 0.848 0.8) arc 10 13 (0.078 0.078 4.4) arc 11 12 (0.848 0.848 4.4) ); boundary ( top_innerc { type wall; faces ( (6 10 13 9) ); |
|
July 12, 2012, 11:40 |
|
#13 |
Senior Member
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 22 |
Hi Nikunj,
the blockMeshDict is incomplete. You may want to upload the complete case as tar.gz file. Or you can disable turbulence and try if it is running laminar, first. Martin |
|
July 12, 2012, 11:46 |
|
#14 |
Member
Nikunj Raithatha
Join Date: Jul 2012
Location: Washington DC
Posts: 47
Rep Power: 14 |
Ohh, my bad.
Here is the attached copy of the entire directory. |
|
July 12, 2012, 12:15 |
|
#15 |
Senior Member
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 22 |
Hi Nikunj,
your blockMeshDict is fine. The problems come from the other settings. Attached you can find a version that runs for a bit longer, although it still crashes at some point of time. You should play around with mesh resolution, eventually fvSchemes, max time step and maxCo, nOuterCorrectors etc. Good luck Martin |
|
July 12, 2012, 17:01 |
|
#16 |
Member
Nikunj Raithatha
Join Date: Jul 2012
Location: Washington DC
Posts: 47
Rep Power: 14 |
Thanks a lot Martin! It works for quite long, and I am able to see the desired results too.
Thanks again1 |
|
July 16, 2012, 18:06 |
|
#17 |
Member
Nikunj Raithatha
Join Date: Jul 2012
Location: Washington DC
Posts: 47
Rep Power: 14 |
Hello Martin!
I have posted this querry in another section, I was wondering if you could help me with the same. I am trying to implement the trubulent heat flux temperature BC in my model. I think, I have successfully recompiled the BuoyanBoussinesqPimpleFoam solver to be able to use the above BC (as described in this discussion: HeatFlux in buoyantBoussinesq). When running a test case with the recompiled solver, I am getting following error. FOAM FATAL IO ERROR: wrong token type - expected Scalar, found on line 36 the word 'Cp0' file: /home/eri/OpenFOAM/eri-2.1.1/run/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/FullCylinderWater/constant/transportProperties::Cp0 at line 36. From function operator>>(Istream&, Scalar&) in file lnInclude/Scalar.C at line 91. FOAM exiting Attached below are the files i used. Any help will be greatly appreciated. Thanks, Nikunj. |
|
September 17, 2012, 12:23 |
|
#18 | |
New Member
Prashant Gupta
Join Date: Mar 2011
Location: Edinburgh
Posts: 29
Rep Power: 15 |
Hi Martin,
I tried the file you attached here, in a search of how to produce cylidrical mesh. I got this message when i issued blockMesh from main case directory. Creating block mesh from "/home/university/OpenFOAM/university-1.7.1/run/Cylinder/constant/polyMesh/blockMeshDict" Creating blockCorners Creating curved edges Creating blocks Creating patches --> FOAM FATAL IO ERROR: keyword patches is undefined in dictionary "/home/university/OpenFOAM/university-1.7.1/run/Cylinder/constant/polyMesh/blockMeshDict" file: /home/university/OpenFOAM/university-1.7.1/run/Cylinder/constant/polyMesh/blockMeshDict from line 17 to line 102. From function dictionary::lookupEntry(const word&, bool, bool) const in file db/dictionary/dictionary.C at line 395. FOAM exiting Thanks Prashant Quote:
|
||
September 17, 2012, 12:30 |
|
#19 |
Senior Member
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 22 |
Hi Prashant,
the posted blockMeshDict is for OpenFOAM version 2.0.0 or greater. You must adjust the syntax around the patch definitions to meet the requirements for OpenFOAM-1.7.1. Martin |
|
September 17, 2012, 12:49 |
|
#20 |
New Member
Prashant Gupta
Join Date: Mar 2011
Location: Edinburgh
Posts: 29
Rep Power: 15 |
Hi Martin,
Thanks for your reply, but I am not sure, when you say "adjust the syntax around the patch definitions to meet the requirements for OpenFOAM-1.7.1." Please help. do i need to define patches in 1.7.1 ? Best wishes Prashant |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[blockMesh] Cylinder mesh using blockMesh with m4 macro | Lewis Liang | OpenFOAM Meshing & Mesh Conversion | 2 | November 21, 2017 03:28 |
[mesh manipulation] Importing Multiple Meshes | thomasnwalshiii | OpenFOAM Meshing & Mesh Conversion | 18 | December 19, 2015 19:57 |
[snappyHexMesh] No layers in a small gap | bobburnquist | OpenFOAM Meshing & Mesh Conversion | 6 | August 26, 2015 10:38 |
[snappyHexMesh] Layers:problem with curvature | giulio.topazio | OpenFOAM Meshing & Mesh Conversion | 10 | August 22, 2012 10:03 |
rotating cylinder using sliding mesh | Tim Daly | FLUENT | 1 | November 10, 2008 00:02 |