Generating 3-D axisymmetric mesh using extrudeMesh
Hi guys,
I am modelling an axisymmetric jet and would like to use extrudeMesh to convert a 2-D mesh into 3-D. I created a 2-D mesh in Fluent then used fluentMeshToFoam to convert it. I would now like to revolve this 2-D mesh 45 degrees about a symmetry axis, effectively making a 1/8th section. The problem is I can't get extrudeMesh to work. It comes up with the following message: --> FOAM FATAL IO ERROR: cannot open file file: /home/hugh/OpenFOAM/hugh-2.1.0/3d/jet_3d_extrude/system/extrudeMeshDict at line 0. From function regIOobject::readStream() in file db/regIOobject/regIOobjectRead.C at line 87. I have looked at other threads and they say to run extrudeMesh from a separate directory to that which your 2-D mesh is stored and then call the 2-D directory in your extrudeMeshDict. I have done this but it still doesn't work. Could someone please help me! Thanks Hugh |
It looks like it can't find or open your extrudeMeshDict at all. What directory are you executing extrudeMesh from?
If your extrudeMeshDict is located at: /home/hugh/OpenFOAM/hugh-2.1.0/3d/jet_3d_extrude/system/extrudeMeshDict then you should be able to run extrudeMesh from /home/hugh/OpenFOAM/hugh-2.1.0/3d/jet_3d_extrude/ Otherwise you might have file ownership properties. Maybe try chmod 700 extrudeMeshDict |
hello,
i also wanna to generate 3D axisymmetry mesh using extrudeMesh utility but it is showing error. i am able to generate 2D wedge shape but cann't 3d axisymmetry. This is the error message: --> FOAM FATAL ERROR: wedge front plane aligns with a coordinate plane. The wedge plane should make a small angle (~2.5deg) with the coordinate plane and the the pair of wedge planes should be symmetric about the coordinate plane. Normal of wedge plane is (5.93255206084e-34 1 -6.12323399574e-17) , implied coordinate plane direction is (0 1 -0) From function virtual void Foam::wedgePolyPatch::calcGeometry(Foam::PstreamBu ffers&) in file meshes/polyMesh/polyPatches/constraint/wedge/wedgePolyPatch.C at line 109. My exrudeMeshdict file is: /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object extrudeProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // constructFrom patch; sourceCase "$FOAM_CASE"; sourcePatches (front); exposedPatchName back; extrudeModel wedge; sectorCoeffs { axisPt (0 0 0); axis (1 0 0); angle 180; } flipNormals false; mergeFaces true; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // blockMeshdict file: /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // backgroundMesh { length 25; rA 0.5; // radius of inlet patch rB 4; // outer radius lengthCells 250; rAcells 10; rBcells 50; } convertToMeters 1; vertices ( ( 0 0 -1) ($:backgroundMesh.length 0 -1) ( 0 $:backgroundMesh.rA -1) ($:backgroundMesh.length $:backgroundMesh.rA -1) ( 0 $:backgroundMesh.rB -1) ($:backgroundMesh.length $:backgroundMesh.rB -1) ( 0 0 0) ($:backgroundMesh.length 0 0) ( 0 $:backgroundMesh.rA 0) ($:backgroundMesh.length $:backgroundMesh.rA 0) ( 0 $:backgroundMesh.rB 0) ($:backgroundMesh.length $:backgroundMesh.rB 0) ); blocks ( hex (0 1 3 2 6 7 9 8) ($:backgroundMesh.lengthCells $:backgroundMesh.rAcells 1) simpleGrading (1 1 1) hex (2 3 5 4 8 9 11 10) ($:backgroundMesh.lengthCells $:backgroundMesh.rBcells 1) simpleGrading (1 1 1) ); edges ( ); boundary ( inlet { type patch; faces ( (0 6 8 2) ); } front { type symmetry; faces ( (6 7 9 8) (8 9 11 10) ); } back { type symmetry; faces ( (0 1 3 2) (2 3 5 4) ); } atmosphere { type patch; faces ( (2 8 10 4) (4 5 11 10) (5 3 9 11) (3 1 7 9) ); } ); mergePatchPairs ( ); // ************************************************** *********************** // |
1 Attachment(s)
hi Sud,
The "wedge" functionnality only works for a wedge angle of 5 degrees. Is your geometry respecting that? Here is a blockmeshDict that works correctly and produces an axisymmetric simple rectangle : Code:
convertToMeters 0.001; |
Negative face area and Max Skewness error
Hello All,
I tried creating a 3D mesh by revolving the 2D mesh generated using blockMesh. For this, i followed the steps listed here. I modified the blockMesh in plateHole tutorial which is given below Code:
/*--------------------------------*- C++ -*----------------------------------*\ Code:
/*--------------------------------*- C++ -*----------------------------------*\ Code:
|
Hi,
In extrude mesh there is an option "mergeFace" ... You have false. Change it to true. By the way, if you want to make a 360 extrusion, ou do not need to use stitch Mesh |
1 Attachment(s)
Hi Tobi,
Thanks for responding, I tried with mergeMesh set to true also before and also now. I get this error Code:
***Zero or negative face area detected. Minimum area: 0 I am attaching the setup in case if you want to have a look !! |
Hi,
I checked your geometry but I do not get the point.
|
Hi Tobi,
Thanks for taking time to look into the mesh !! I wanted to create a sphere inside a cylinder. I followed the steps listed in this link. It says, that we need a 2d mesh one cell thick with both front and back faces labelled as separate patches. Yes the mesh is not optimal :D ... i am working on it now :) |
|
2 Attachment(s)
I tied your method with FOAM 4.x (case is attached). The problem with that one:
Code:
***Zero or negative face area detected. Minimum area: 0 Summary You did everything correct but the centerline makes problems. |
Quote:
Hi Tobi, Thanks once again. Initially i thought using SHM for this case might result in polyhedral cells close to the sphere !! But i will try the tutorials you have it in your website. |
Hi Vignesh,
This may be too late, but for future reference: after extrudeMesh, you can run collapseEdges to fix the cell faces on the centerline -- it collapses the hex cells into the appropriate shape. |
Hi aeroeng,
Good to know ... Never used that tool. Sent from my HTC One mini using CFD Online Forum mobile app |
Hello,
Just curiosity, with this method, i.e. rotating the 2D mesh slice to get the 3D cylindrical mesh, will we get the singular axis? Because in that axis in 2D mesh slide is always axis. Thanks. |
Hello All,
I tried the case in the following link, which is from OpenFOAM 2.3.x: https://github.com/OpenFOAM/OpenFOAM...xisymmetricJet In that case, the slab mesh is first generated, and then the command extrudeMesh can be used to generated a 5 degree wedge. In this case, the angle is 1 degree. If I change it to 180 or 360, I will not get the half cylinder or full cylinder. Is there any parameter that should be changed in extrudeMeshDict? Thanks! |
Quote:
I'm not sure I follow your first post. As for your second post: if you want to generate a 3D mesh, you need to change the settings in the extrudeMeshDict: https://github.com/OpenFOAM/OpenFOAM...xtrudeMeshDict For extrudeModel, you should use sector. If you do a full 360 extrusion, consider using "mergeFaces true;". For a full 360 extrusion with mergeFaces true, as far as I remember, extrudeMesh automatically fixes the zero face areas that are generated if you have cells in the 2D mesh that lie on the axis of rotation. If not, you can use the collapseEdges utility, which will change the cell shape from hex to whatever shape results from collapsing zero-length edges and zero-area faces. I hope this helps. |
Dear Marius-Corne,
Thank you for your suggestions. I solver this problems. I am running a test case - an axisymmetric jet flow, to see if there is any problem. ======update====== The results are reasonable, at least qualitatively. But Iam curious how OpenFOAM does the numerical discretization for the cells sharing the centerline axis? |
All times are GMT -4. The time now is 07:45. |