CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Meshing & Mesh Conversion

Generating 3-D axisymmetric mesh using extrudeMesh

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By Nucleophobe

Reply
 
LinkBack Thread Tools Display Modes
Old   August 2, 2012, 09:13
Question Generating 3-D axisymmetric mesh using extrudeMesh
  #1
Member
 
Hugh Ingham
Join Date: Aug 2012
Posts: 35
Rep Power: 5
martyn88 is on a distinguished road
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
martyn88 is offline   Reply With Quote

Old   August 3, 2012, 11:19
Default
  #2
Member
 
Ken
Join Date: Aug 2012
Posts: 65
Blog Entries: 1
Rep Power: 5
Nucleophobe is on a distinguished road
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
Sud09463 likes this.
Nucleophobe is offline   Reply With Quote

Old   Yesterday, 01:41
Default
  #3
New Member
 
sudhakar singh
Join Date: Jun 2016
Posts: 2
Rep Power: 0
Sud09463 is on a distinguished road
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
(
);

// ************************************************** *********************** //
Sud09463 is offline   Reply With Quote

Old   Today, 06:20
Post
  #4
New Member
 
Join Date: Mar 2016
Posts: 14
Rep Power: 2
RomainBou is on a distinguished road
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;

vertices
(
    (20 0   0)
    (65 0   0)
    (64.9901001852  1.1344064184  0)
    (19.9969539031  0.3490481287  0)

    (20  0   40)
    (65  0   40)
    (64.9901001852  1.1344064184  40)
    (19.9969539031  0.3490481287  40)
);

edges
(
    line    0 1
    line    3 2
    line    7 6
    line    4 5

    arc 0 3 (19.9992384613 0.17453071 0)
    arc 1 2 (64.9975249992 0.5672248074 0)
    arc 5 6 (64.9975249992 0.5672248074 40)
    arc 4 7 (19.9992384613 0.17453071 40)

    line    0 4
    line    1 5
    line    2 6
    line    3 7
);

blocks
(
    hex (0 1 2 3 4 5 6 7)
    (18 1 18)
    simpleGrading
    (
        (                   //X dir
            (0.2 0.3 4)
            (0.6 0.4 1)
            (0.2 0.3 0.25)
        )
        1                   //Ydir
        (                   //Z dir
            (0.2 0.3 4)
            (0.6 0.4 1)
            (0.2 0.3 0.25)
        )
    )
);

boundary
(
    inlet
    {
        type            cyclic;
        neighbourPatch  outlet;
        faces           ((0 1 5 4));
    }
    outlet
    {
        type            cyclic;
        neighbourPatch  inlet;
        faces           ((3 7 6 2));
    }
    bottom
    {
        type    wall;
        faces   ((0 3 2 1));
    }
    top
    {
        type    patch;  //(or wall)
        faces   ((4 5 6 7));
    }
    ext_wall
    {
        type    wall;
        faces   ((0 4 7 3));
    }
    inner_wall
    {
        type    wall;
        faces   ((6 5 1 2));
    }
);
I also made a LibreOffice Calc spreadsheet to calculate the coordinates that you need to put in the blockmeshDict wich is attached to this post. So it calculates the rotation of 5 degrees of your primary rectangle (with an axis of symmetry being to the left of the left edge pf the rectangle).
Attached Files
File Type: zip coordinates.ods.zip (13.6 KB, 1 views)
RomainBou is offline   Reply With Quote

Reply

Tags
axisymmetric mesh, extrudemesh

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mesh motion with Translation & Rotation Doginal CFX 2 January 12, 2014 07:21
Doxygen documentation Tanay OpenFOAM Installation 9 September 23, 2011 11:40
ParaView and Qt 4.3.5 on Mac OS X 10.6 Adrian OpenFOAM 3 August 8, 2010 03:16
Icemcfd 11: Loss of mesh from surface mesh option? Joe CFX 2 March 26, 2007 18:10
Generating a Non-Uniform 2-D Axisymmetric Mesh anindya CD-adapco 0 December 13, 2001 02:52


All times are GMT -4. The time now is 17:59.