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

[Other] Meshing a weird pipe

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 24, 2011, 16:44
Default Meshing a weird pipe
  #1
New Member
 
lazersos@gmail.com
Join Date: Apr 2011
Posts: 11
Rep Power: 14
lazersos is on a distinguished road
I'd like to explore flow through a twisted pipe. Now I can readily output the coordinates of a series of nested surfaces in the pipe. I'd like to generate a 3D mesh for this coordinate system. I've thought about just constructing the points, faces, owners, boundary and neighbors files in my pre-processor but I got to the owners/neighbors part and realized that it was going to be a bit of a headache. Additionally, my deffinition of a pipe has an axial gridpoint which I believe could stand to be converted into a more cartesian mesh. Has anyone dealt with this problem. Thanks, I'm an openFOAM newbie.

PS- I've attached a plot of the points and the radial surfaces, there are ~100 radial surfaces, I've only chosen a few. Oh and I plan to have flow in one end and out the other.
Attached Images
File Type: jpg points.jpg (34.1 KB, 19 views)
File Type: jpg surfaces.jpg (25.1 KB, 28 views)
lazersos is offline   Reply With Quote

Old   May 25, 2011, 12:47
Default Update
  #2
New Member
 
lazersos@gmail.com
Join Date: Apr 2011
Posts: 11
Rep Power: 14
lazersos is on a distinguished road
Ok so I figured it would be simplest to create a blockMeshDict file and let blockMesh take it from there. I tried to define my problem by specifying the points on the outboard, top, inboard and bottom of the shape then defining the edges using a polyMesh. Unfortuantely this doesn't seem to be working:

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 


convertToMeters    1.000000;


vertices
(
// Inlet (nv=0)
(4.124254 0.000000 0.000000)
(3.697167 0.000000 0.904083)
(3.357811 0.000000 0.277534)
(3.697167 0.000000 -0.904083)
// Outlet (nv=8)
(3.336592 2.424176 0.000000)
(2.991071 2.173140 0.904083)
(2.716526 1.973672 0.277534)
(2.991071 2.173140 -0.904083)
);


blocks
(
hex ( 0 1 2 3 4 5 6 7 ) ( 30 30 30 ) simpleGrading (10 10 10)
);


edges
(
// Inlet (nv=0)
polySpline 0 1 
(
     ( 4.098676 0.000000 0.272565 )
     ( 4.027965 0.000000 0.519575 )
     ( 3.927305 0.000000 0.713843 )
     ( 3.812816 0.000000 0.845920 )
)
polySpline 1 2 
(
     ( 3.591181 0.000000 0.864608 )
     ( 3.499359 0.000000 0.729783 )
     ( 3.419496 0.000000 0.527036 )
)
polySpline 2 3 
(
     ( 3.333465 0.000000 0.000000 )
     ( 3.357811 0.000000 -0.277534 )
     ( 3.419496 0.000000 -0.527036 )
     ( 3.499359 0.000000 -0.729783 )
     ( 3.591181 0.000000 -0.864608 )
)
polySpline 3 0 
(
     ( 3.812816 0.000000 -0.845920 )
     ( 3.927305 0.000000 -0.713843 )
     ( 4.027965 0.000000 -0.519575 )
     ( 4.098676 0.000000 -0.272565 )
)
// Outlet (nv=8)
polySpline 4 5 
(
     ( 3.315899 2.409141 0.272565 )
     ( 3.258692 2.367579 0.519575 )
     ( 3.177257 2.308412 0.713843 )
     ( 3.084633 2.241117 0.845920 )
)
polySpline 5 6 
(
     ( 2.905327 2.110843 0.864608 )
     ( 2.831041 2.056872 0.729783 )
     ( 2.766431 2.009929 0.527036 )
)
polySpline 6 7 
(
     ( 2.696830 1.959361 0.000000 )
     ( 2.716526 1.973672 -0.277534 )
     ( 2.766431 2.009929 -0.527036 )
     ( 2.831041 2.056872 -0.729783 )
     ( 2.905327 2.110843 -0.864608 )
)
polySpline 7 4 
(
     ( 3.084633 2.241117 -0.845920 )
     ( 3.177257 2.308412 -0.713843 )
     ( 3.258692 2.367579 -0.519575 )
     ( 3.315899 2.409141 -0.272565 )
)
// Outboard (nu=1)
polySpline 0 4 
(
     ( 4.124254 0.000000 0.000000 )
     ( 4.175213 0.375776 -0.174579 )
     ( 4.277976 0.776338 -0.207229 )
     ( 4.330820 1.195230 -0.098508 )
     ( 4.206246 1.578631 0.098508 )
     ( 3.917275 1.886460 0.207229 )
     ( 3.598694 2.150119 0.174579 )
     ( 3.336592 2.424176 0.000000 )
)
// Top (nu=6)
polySpline 1 5 
(
     ( 3.697167 0.000000 0.904083 )
     ( 3.498043 0.314830 0.809446 )
     ( 3.397586 0.616571 0.617582 )
     ( 3.430537 0.946768 0.450487 )
     ( 3.474680 1.304069 0.408822 )
     ( 3.485515 1.678536 0.527167 )
     ( 3.323857 1.985912 0.758950 )
     ( 2.991071 2.173140 0.904083 )
)
// Inboard (nu=10)
polySpline 2 6 
(
     ( 3.357811 0.000000 0.277534 )
     ( 3.182222 0.286405 0.499018 )
     ( 2.882962 0.523181 0.477973 )
     ( 2.690070 0.742412 0.255634 )
     ( 2.673719 1.003464 -0.012463 )
     ( 2.770921 1.334405 -0.123277 )
     ( 2.828113 1.689719 -0.006381 )
     ( 2.716526 1.973672 0.277534 )
)
// Bottom (nu=16)
polySpline 3 7 
(
     ( 3.697167 0.000000 -0.904083 )
     ( 3.856346 0.347077 -0.758950 )
     ( 3.806460 0.690771 -0.527167 )
     ( 3.577588 0.987351 -0.408822 )
     ( 3.331859 1.250467 -0.450487 )
     ( 3.111116 1.498235 -0.617582 )
     ( 3.015028 1.801395 -0.809446 )
     ( 2.991071 2.173140 -0.904083 )
)
);


patches
(
wall pipe_edge (
( 0 4 5 6)
( 1 5 6 2)
( 2 6 7 3)
( 3 7 4 0)
)

patch inlet (
( 0 1 2 3)
)

patch outlet (
( 4 5 6 7)
)

);
Which gives me:

Code:
:3409 blockMesh -case test
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.7.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 1.7.1-03e7e056c215
Exec   : blockMesh -case test
Date   : May 25 2011
Time   : 12:42:49
Host   : sunfire20.pppl.gov
PID    : 5270
Case   : ./test
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time


Creating block mesh from
    "./test/constant/polyMesh/blockMeshDict"


Creating blockCorners

Creating curved edges

Creating blocks

Creating patches

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.303366 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.205269 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.257956 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.246229 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.25246 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.252461 for face 5
--> FOAM Warning : 
    From function blockMesh::createTopology(IOdictionary&)
    in file createTopology.C at line 397
    negative volume block : 0, probably defined inside-out

Default patch type set to empty


--> FOAM FATAL ERROR: 
face 0 in patch 0 does not have neighbour cell face: 4(0 4 5 6)

    From function polyMesh::facePatchFaceCells(const faceList& patchFaces,const labelListList& pointCells,const faceListList& cellsFaceShapes,const label patchID)
    in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 124.

FOAM aborting
lazersos is offline   Reply With Quote

Old   May 25, 2011, 13:29
Default
  #3
New Member
 
lazersos@gmail.com
Join Date: Apr 2011
Posts: 11
Rep Power: 14
lazersos is on a distinguished road
OK fixed it. First my ordering of the initial gridpoints was wrong. I was ordering them in a counterclockwise fashion and that needed to be switch to clockwise (along with fixing an error in the points themselves). Then one of my wall patches was wrong. Now I just need to get paraview compiled on system to see if the resulting grid looks anything like what I want.
lazersos is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ICEM] ICEM "U" shaped pipe meshing mshaux ANSYS Meshing & Geometry 2 April 12, 2016 09:06
[ICEM] Hexa meshing branched pipe with different angles about its perimeter fascinatedbyCFD ANSYS Meshing & Geometry 1 November 19, 2015 10:11
[ICEM] Pipe 90 elbow joint meshing issue sihaqqi ANSYS Meshing & Geometry 25 April 17, 2015 04:59
[GAMBIT] GAMBIT Meshing of Pipe with Holes Perpendiculer to Flow Stream rocketman1151 ANSYS Meshing & Geometry 7 November 30, 2011 02:39
Meshing of circular pipe in CFX-mesh Fatnes CFX 3 March 27, 2009 06:29


All times are GMT -4. The time now is 02:52.