|
[Sponsors] |
July 12, 2012, 03:10 |
Hex mesh
|
#1 |
Member
Join Date: Feb 2012
Posts: 57
Rep Power: 14 |
I want to create a hexahedral mesh of a channel with a parabolic profile..
Any suggestions on how to do this? Salome geometry of this profile and extrusion is generated in two ways, spline for parabolic profile and also a number of vertices lying on the parabola joined by straight lines to approximate the profile. I have been working on this for the last 2 weeks and have not figured out how to do it yet!!!!! |
|
July 12, 2012, 03:38 |
|
#2 |
Senior Member
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27 |
Please make a sketch of what you are trying to do, it will help us to help you.
__________________
Linnemann PS. I do not do personal support, so please post in the forums. |
|
July 12, 2012, 21:27 |
|
#3 |
Member
Join Date: Feb 2012
Posts: 57
Rep Power: 14 |
Hi Niels, thank you very much for your reply!
I have attached 2 screenshots of the geometry basically im trying to mesh a 3D extrusion of this profile.. I have tried different ways of generating the profile; using a series of points connected by straight lines, or using a spline through all of those points to create the parabolic shape. |
|
July 13, 2012, 02:31 |
|
#4 |
Senior Member
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27 |
If you upload the hdf I can do that for you and give you the hdf back, so you can see what have been done.
__________________
Linnemann PS. I do not do personal support, so please post in the forums. |
|
July 13, 2012, 03:16 |
|
#5 |
Member
Join Date: Feb 2012
Posts: 57
Rep Power: 14 |
I will post the hdf as soon as I can.
I have meshed this geometry in hexahedral cells using the body fitting algorithm + create boundary faces, hex (i,j,k) + quadrangle mapping, also automatic hexahedralisation methods of meshing. The problem I have is that I need to export to unv and then convert using unvToFoam.. The problem is that the export to export from Salome to unv doesn't handle certain type of cells; or the conversion from unv to openfoam does not work it give an error message as follows: ideasUnvToFoam:*ideasUnvToFoam.C:881: int main(int, char**): Assertion `nrFaceCells[faceI] == 1 || nrFaceCells[faceI] == 2' failed. Aborted |
|
July 13, 2012, 13:50 |
|
#6 |
Member
Join Date: Feb 2012
Posts: 57
Rep Power: 14 |
Hi Niels,
I have attached a dump of the hdf file. Kind Regards, Matthew Skaras |
|
July 15, 2012, 06:46 |
|
#7 |
Senior Member
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27 |
Hello
It was not that difficult, see the attached dump and a little teaser screen. The only thing missing was to split every face into something that has only 4 edges. I can then create a 2D sketch and make segments of blocks that has 6 faces like a cube. Then in the mesh you can use hypothesis automatic hex mesh. Best
__________________
Linnemann PS. I do not do personal support, so please post in the forums. |
|
July 15, 2012, 07:31 |
|
#8 |
Member
Join Date: Feb 2012
Posts: 57
Rep Power: 14 |
Hello Niels,
Thank you for your help, I have tried this method also, the problem is I need further refinement in some areas in order to control the aspect ratio of the cells. The problem here is in the conversion process- I can convert the mesh to openfoam and view it in paraview but when I run checkMesh I get a long series of the following errors: Checking topology... Boundary definition OK. --> FOAM Serious Error : From function bool zone::checkDefinition(const label maxSize, const bool report) const in file meshes/polyMesh/zones/zone/zone.C at line 207 Zone cellZone_0 contains invalid index label 32000 Valid index labels are 0..31999 --> FOAM Serious Error : From function bool zone::checkDefinition(const label maxSize, const bool report) const in file meshes/polyMesh/zones/zone/zone.C at line 207 Zone cellZone_0 contains invalid index label 32001 Valid index labels are 0..31999 and ends as follows: --> FOAM Serious Error : --> FOAM FATAL ERROR: Too many errors From function messageStream:perator OSstream&() in file lnInclude/messageStream.C at line 200. FOAM aborting I want to run cyclic patches and I cannot because of these errors I believe Kind Regards, Matt |
|
July 16, 2012, 03:43 |
|
#9 |
Senior Member
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27 |
I think you need to give a sketch or something of what and where you want to refine.
You can create groups of edges in Salome Geo and use those to create submeshes of the overall mesh. This is how I usually do it when making graded hex mesh in Salome.
__________________
Linnemann PS. I do not do personal support, so please post in the forums. |
|
July 16, 2012, 09:02 |
|
#10 |
Member
Join Date: Feb 2012
Posts: 57
Rep Power: 14 |
First of all thank you very much for your help so far! It is much appreciated.
Sorry I think I may have been a bit unclear. I am not having trouble in creating submeshes for refinement.. The issue I have is when I do create submeshes (and export to unv then convert to OF) I get errors with cell zone references (see error message above) when running checkMesh. The same mesh exported to unv prior to creation of submeshes converts from unv to OF and running checkMesh gives no errors. I am wondering if you could perhaps explain why this may be happening? |
|
July 17, 2012, 03:03 |
|
#11 |
Senior Member
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27 |
Can you post the py dump of the whole shebang with mesh?
__________________
Linnemann PS. I do not do personal support, so please post in the forums. |
|
July 17, 2012, 04:59 |
|
#12 |
Member
Join Date: Feb 2012
Posts: 57
Rep Power: 14 |
Attached is a dump of the hdf,
Cheers Matt |
|
July 17, 2012, 05:43 |
|
#13 |
Member
Join Date: Feb 2012
Posts: 57
Rep Power: 14 |
The steps I then take are to export the mesh to unv format then run ideasUnvToFoam <filename>.unv
Running checkMesh gives the above mentioned output. Also note I have not named any of the boundary faces as I generated this mesh purely to test if it converted to OF without any errors. For the actual mesh I would use I would create groups of faces in the mesh (create group and select using selection filter, leaving the walls along the z-axis undefined and renaming the defaultFaces patch to walls) and then export as above. Kind Regards Matt |
|
July 17, 2012, 06:22 |
|
#14 |
Senior Member
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27 |
Hi
I get no problems at all. Could you try and delete your constant/polyMesh folder before converting. If that does not fix it something must be wrong in your OF install. Here is the two output files.
__________________
Linnemann PS. I do not do personal support, so please post in the forums. Last edited by linnemann; July 17, 2012 at 06:30. Reason: Added files |
|
July 17, 2012, 07:00 |
|
#15 |
Member
Join Date: Feb 2012
Posts: 57
Rep Power: 14 |
Thank you for such a quick response!
I also get no errors after deleting constant/polyMesh- my output look the same as what you posted. However after converting and changing constant/polyMesh/boundary to add cyclic patches and wall patches and rename defaultFaces patch I get the following output when running setFields and checkMesh: matt@matt-desktop:~/Desktop/parabolicHex3D$ setFields /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.0.1 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 2.0.1-51f1de99a4bc Exec : setFields Date : Jul 17 2012 Time : 19:55:35 Host : matt-desktop PID : 3581 Case : /home/matt/Desktop/parabolicHex3D 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 Create mesh for time = 0 --> FOAM FATAL ERROR: face 0 area does not match neighbour by 91.7559% -- possible face ordering problem. patch:front my area:0.000244545 neighbour area:0.000659134 matching tolerance:0.001 Mesh face:143500 fc-1.09222 0.697452 0.15) Neighbour fc-0.28762 1.34188 0) If you are certain your matching is correct you can increase the 'matchTolerance' setting in the patch dictionary in the boundary file. Rerun with cyclic debug flag set for more information. From function cyclicPolyPatch::calcTransforms() in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at line 220. FOAM exiting matt@matt-desktop:~/Desktop/parabolicHex3D$ checkMesh /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.0.1 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 2.0.1-51f1de99a4bc Exec : checkMesh Date : Jul 17 2012 Time : 19:55:46 Host : matt-desktop PID : 3583 Case : /home/matt/Desktop/parabolicHex3D 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 Create polyMesh for time = 0 --> FOAM FATAL ERROR: face 0 area does not match neighbour by 91.7559% -- possible face ordering problem. patch:front my area:0.000244545 neighbour area:0.000659134 matching tolerance:0.001 Mesh face:143500 fc-1.09222 0.697452 0.15) Neighbour fc-0.28762 1.34188 0) If you are certain your matching is correct you can increase the 'matchTolerance' setting in the patch dictionary in the boundary file. Rerun with cyclic debug flag set for more information. From function cyclicPolyPatch::calcTransforms() in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at line 220. FOAM exiting I cannot figure out why this error is occuring!!! |
|
July 17, 2012, 07:12 |
|
#16 |
Senior Member
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27 |
Can you give med the case without the mesh and then a list of commands/edits you go through to obtain your final mesh now?
I think its in your general setup some minor thing is preventing it from working properly.
__________________
Linnemann PS. I do not do personal support, so please post in the forums. |
|
July 17, 2012, 07:15 |
|
#17 |
Member
Join Date: Feb 2012
Posts: 57
Rep Power: 14 |
Attached is my case (below)
To convert to the final mesh I first run ideasUnvToFoam I then run checkMesh- no errors I then view with paraFoam I then edit to constant/polyMesh/boundary file to what is given in the case I then run setFields and get the error above So I re-run checkMesh and get the error above again I also tried changing the matchTolerance to 1 and it worked however the initial field is not correct.. Thank you for all your help so far! Kind Regards Matt Last edited by matt.mech.eng; July 17, 2012 at 07:25. Reason: added whole case instead of only boundary file |
|
July 17, 2012, 07:30 |
|
#18 |
Senior Member
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27 |
Hi
I see no files
__________________
Linnemann PS. I do not do personal support, so please post in the forums. |
|
July 17, 2012, 07:31 |
|
#19 |
Member
Join Date: Feb 2012
Posts: 57
Rep Power: 14 |
Attached is the case directory
removed the polyMesh directory since it was too large cheers |
|
July 17, 2012, 07:34 |
|
#20 |
Member
Join Date: Feb 2012
Posts: 57
Rep Power: 14 |
here is the boundary file again
/*--------------------------------*- 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 polyBoundaryMesh; location "constant/polyMesh"; object boundary; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 5 ( front { type cyclic; nFaces 5000; startFace 143500; matchTolerance 1e-3; neighbourPatch back; } back { type cyclic; nFaces 5000; startFace 148500; matchTolerance 1e-3; neighbourPatch front; } outlet { type patch; nFaces 1000; startFace 153500; } inlet { type patch; nFaces 4; startFace 154500; } walls { type wall; nFaces 1996; startFace 154504; } ) // ************************************************** *********************** // i JUst realised that you might need this cheers |
|
Tags |
hex mesh, hexahedral mesh, meshing 3d |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to set periodic boundary conditions | Ganesh | FLUENT | 15 | November 18, 2020 07:09 |
[blockMesh] --> FOAM FATAL ERROR: Trying to specify a boundary face | A.A. | OpenFOAM Meshing & Mesh Conversion | 41 | June 26, 2020 08:06 |
[snappyHexMesh] Snappy Hex Mesh External Domain | willindsey | OpenFOAM Meshing & Mesh Conversion | 2 | June 9, 2017 23:03 |
Mesh motion with Translation & Rotation | Doginal | CFX | 2 | January 12, 2014 07:21 |
Icemcfd 11: Loss of mesh from surface mesh option? | Joe | CFX | 2 | March 26, 2007 19:10 |