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

[blockMesh] Axisymmetric pipe expansion flow

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 24, 2015, 14:18
Default Axisymmetric pipe expansion flow
  #1
New Member
 
Daniel Madeira de Almeida
Join Date: Jun 2015
Posts: 4
Rep Power: 10
daniel.almeida is on a distinguished road
Hello everybody,

I am trying to simulate the axisymmetric expansion flow in a pipe but I am having trouble to select the boundaries for my blockMeshDict and to set the conditions for such boundaries. Especially the faces at the expansion. Can anyone help me? I am uploading the blockMeshDict, p and U at 0. Without the boundary I was talking about.

convertToMeters 1;

vertices
(
(0 0 0) //vertex number 0
(8 0 0) //vertex number 1
(0 -0.0043619 0.099905) //vertex number 2
(8 -0.0043619 0.099905) //vertex number 3
(8 0.0043619 0.099905) //vertex number 4
(0 0.0043619 0.099905) //vertex number 5
(8 -0.0087238 0.19981) //vertex number 6
(16 -0.0087238 0.19981) //vertex number 7
(16 0.0087238 0.19981) //vertex number 8
(8 0.0087238 0.19981) //vertex number 9
(16 0 0) //vertex number 10


);

blocks
(
hex (0 1 1 0 2 3 4 5) (100 1 20) simpleGrading (1 1 1)
hex (1 10 10 1 6 7 8 9) (100 1 40) simpleGrading (1 1 1)
);

edges
(
arc 2 5 (0 0 0.1)n
arc 3 4 (8 0 0.1)
arc 6 9 (8 0 0.2)
arc 7 8 (16 0 0.2)
);

patches
(
patch
inlet
(
(0 2 5 0)
)

patch
outlet
(
(10 7 8 10)
)

wedge -f
(
(0 1 3 2)
(1 10 7 6)
)

wedge
(
(0 1 4 5)
(1 10 8 9)
)

wall
wall
(
(2 3 4 5)
(6 7 8 9)

)
);

mergePatchPairs
(
);

p:
internalField uniform 0;

boundaryField
{
inlet
{
type zeroGradient;
}

outlet
{
type fixedValue;
value uniform 0;
}

wall
{
type zeroGradient;
}

axi_symm-f
{
type wedge;
}

axi_symm-r
{
type wedge;
}
}


U:

internalField uniform (0 0 0);

boundaryField
{
inlet
{
type fixedValue;
value uniform (0.5 0 0); //uniform incoming flow of 1m/s
}

outlet
{
type zeroGradient;
}

wall
{
type fixedValue;
value uniform (0 0 0); //no slip condition, 0m/s velocity
}

axi_symm-f
{
type wedge;
}

axi_symm-r
{
type wedge;
}
}
daniel.almeida is offline   Reply With Quote

Old   June 26, 2015, 06:41
Default
  #2
Member
 
Alexander Bartel
Join Date: Feb 2015
Location: Germany
Posts: 97
Rep Power: 11
alexB is on a distinguished road
Hi Daniel,

can you draw a little sketch how it should look like and post your error message?

regards
Alex
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
alexB is offline   Reply With Quote

Old   June 26, 2015, 10:11
Default
  #3
New Member
 
Daniel Madeira de Almeida
Join Date: Jun 2015
Posts: 4
Rep Power: 10
daniel.almeida is on a distinguished road
Hello Alex,

Thanks for your attention!

I was trying to make something like in the image.

When I run the blockMesh with the code I first uploaded it works, but when I try to declare the face (3 6 9 4) as a wall it gives me the following error message:

--> FOAM FATAL ERROR:
face 2 in patch 4 does not have neighbour cell face: 4(3 6 9 4)

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

FOAM aborting

#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::error::abort() at ??:?
#2 Foam:olyMesh::facePatchFaceCells(Foam::List<Foam ::face> const&, Foam::List<Foam::List<int> > const&, Foam::List<Foam::List<Foam::face> > const&, int) const at ??:?
#3 Foam:olyMesh::setTopology(Foam::List<Foam::cellS hape> const&, Foam::List<Foam::List<Foam::face> > const&, Foam::List<Foam::word> const&, Foam::List<int>&, Foam::List<int>&, int&, int&, Foam::List<Foam::cell>&) at ??:?
#4 Foam:olyMesh:olyMesh(Foam::IOobject const&, Foam::Xfer<Foam::Field<Foam::Vector<double> > > const&, Foam::List<Foam::cellShape> const&, Foam::List<Foam::List<Foam::face> > const&, Foam::List<Foam::word> const&, Foam::PtrList<Foam::dictionary> const&, Foam::word const&, Foam::word const&, bool) at ??:?
#5 Foam::blockMesh::createTopology(Foam::IOdictionary const&, Foam::word const&) at ??:?
#6 Foam::blockMesh::blockMesh(Foam::IOdictionary const&, Foam::word const&) at ??:?
#7
at ??:?
#8 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#9
at ??:?
Aborted

The new code I tried declaring the wall is this:

[CODE]

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.2 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;

vertices
(
(0 0 0) //vertex number 0
(8 0 0) //vertex number 1
(0 -0.0043619 0.099905) //vertex number 2
(8 -0.0043619 0.099905) //vertex number 3
(8 0.0043619 0.099905) //vertex number 4
(0 0.0043619 0.099905) //vertex number 5
(8 -0.0087238 0.19981) //vertex number 6
(16 -0.0087238 0.19981) //vertex number 7
(16 0.0087238 0.19981) //vertex number 8
(8 0.0087238 0.19981) //vertex number 9
(16 0 0) //vertex number 10


);

blocks
(
hex (0 1 1 0 2 3 4 5) //vertex number, using 5 vertices creating a wedge (slice)
(100 1 20) //number of cells in each direction, 1 element in y because it's a 2D flow
simpleGrading (1 1 1) //cell expansion ratio, stands for the ratio of the size of the last and first element iin that direction, in this case all of them have the same size
hex (1 10 10 1 6 7 8 9) (100 1 40) simpleGrading (1 1 1)
);

edges
(
arc 2 5 (0 0 0.1) //connects vertices 2 and 5 through the interpolation point given
arc 3 4 (8 0 0.1) //connects vertices 3 and 4 through the interpolation point given
arc 6 9 (8 0 0.2)
arc 7 8 (16 0 0.2)
);

patches
(
patch //type of boundary, patch is the most generic type
inlet //name of the patch
(
(0 2 5 0) //block face in the patch
)

patch
outlet
(
(10 7 8 10)
)

wedge //used for front and back of the wedge in an axi-symetric geometry
axi_symm-f
(
(0 1 3 2)
(1 10 7 6)
)

wedge //used for front and back of the wedge in an axi-symetric geometry
axi_symm-r
(
(0 1 4 5)
(1 10 8 9)
)

wall //used when wall needs to be identified (sometimes in turbulent flows)
wall
(
(2 3 4 5)
(6 7 8 9)
(3 6 9 4)
)



);

mergePatchPairs //merge faces from patches created
(
);


// ************************************************** *********************** //



Thanks in advance
Attached Images
File Type: jpg IMG_2199.jpg (45.9 KB, 71 views)
daniel.almeida is offline   Reply With Quote

Old   June 27, 2015, 17:43
Default
  #4
Member
 
Alexander Bartel
Join Date: Feb 2015
Location: Germany
Posts: 97
Rep Power: 11
alexB is on a distinguished road
Hi Daniel,

thats an easy problem...
Its just the same like here: http://www.cfd-online.com/Forums/ope...ace-block.html

you have to define another block, so that blocks which touch each other have the same faces and grading.

I hope that helps... I am to tired to show it in your sketch.

good night and regards
Alex
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
alexB is offline   Reply With Quote

Old   June 29, 2015, 10:00
Default
  #5
New Member
 
Daniel Madeira de Almeida
Join Date: Jun 2015
Posts: 4
Rep Power: 10
daniel.almeida is on a distinguished road
Thanks very much for the help! I think I got it! I defined more blocks and the results look good!
daniel.almeida is offline   Reply With Quote

Old   July 1, 2015, 08:10
Default
  #6
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17
cedric_duprat is on a distinguished road
Daniel,

I think you'll find the following website also interesting.
You'll find automatic routine to generate blockMesh file for axisymetric diffuser.
You'll have to adapt the m4 routines to your case but they are really convenient to play with.

http://openfoamwiki.net/index.php/Si...nical_diffuser

http://sourceforge.net/p/openfoam-ex...iffuser/cases/

I hope this will help you to generate meshes for your configuration,

regards,

Cedric
cedric_duprat 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
Axisymmetric flow problem in constricted pipe kozden OpenFOAM Running, Solving & CFD 26 August 16, 2023 10:28
Axisymmetric pipe flow example Gowingeng SU2 7 March 29, 2017 04:27
DPM in 2D axisymmetric turbulent pipe flow Robb13 FLUENT 0 May 8, 2015 05:22
sonicFoam - pressure driven pipe: flow continuity violation and waveTransmissive BC Endel OpenFOAM Running, Solving & CFD 3 September 11, 2014 16:29
Disturbed flow field at outlet boundary (Multiphase flow through pipe) Michiel CFX 17 April 21, 2010 10:14


All times are GMT -4. The time now is 22:53.