CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Problem with building geometry - concentric cylinders

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 15, 2014, 10:13
Default Problem with building geometry - concentric cylinders
  #1
New Member
 
Rhoddwen
Join Date: Dec 2014
Posts: 9
Rep Power: 12
Rhoddwen is on a distinguished road
Hello everyone,

I am trying to simulate the flow between two concentric cylinders. The inner one rotating (R = 25), the outer one fixed (R=30). Moreover, the inner cylinder should be connected at the upper wall which rotates with-it. My problem is that I have tried everything but I cannot build my geometry....I am not using anything else but open foam.I was wondering if enyone can help me figure this out.The dimensions of inner and outer cylinders have no relevance..the geometry shape is important.

So..my case is a multiphase case, I use interFoam solver.

My geometry is build-ed as axi-simmetric wedge. I don't know if it is correct, cause I cannot manage to obtain the ''in-between of cylinders'' flow domain. It builds every time the block relying the inner cylinder to the axis (the cone - see also attached piks).
I tried everything:
- defining all blocks and set "empty" boundaries on the 'hex' that normally does not belong to the flow domain; but than open foam build it anyway, and fills it with air;
- not defing the 'cone' relying my flow domain to the axis; but then 'blockMesh' and 'check mesh' failed...as wedge is not recognized, even if I used a small angle;

I am sending you all the data...the log, the mesh file, set fields, alpha.org...

Please answer me these questions..if you know.. :
1. How do I build a geometry consisting within 2 concentric cylinders in openF.

2. How do I change the coordinate system from Cartesian to Cylindrical;

3. How do I set a precise volume of "water" within my flow domain - the gap between 2 concentric cylinders.

I hope that anyone can help me...
Thank you.
---------------------------------------------------------------------------------------------------------------------------
LOG FILE
---------------------------------------------------------------------------------------------------------------------------
BLOCK MESH LOG
-----------------------------------------------------------------------------------------

Creating block mesh from
"/home/FOAM_RUN/DC/interFoam/laminar/pocheGR/constant/polyMesh/blockMeshDict"
Creating curved edges
Creating topology blocks
Creating topology patches

Creating block mesh topology

Check topology

Basic statistics
Number of internal faces : 5
Number of boundary faces : 20
Number of defined boundary faces : 20
Number of undefined boundary faces : 0
Checking patch -> block consistency

Creating block offsets
Creating merge list .

Creating polyMesh from blockMesh
Creating patches
Creating cells
Creating points with scale 1
Block 0 cell size :
i : 0.0333333 .. 0.0333333
j : 0.416667 .. 0.416667
k : 0 .. 0

Block 1 cell size :
i : 0.0166667 .. 0.0166667
j : 0.416667 .. 0.416667
k : 0 .. 0

Block 2 cell size :
i : 0.0333333 .. 0.0333333
j : 0.0333333 .. 0.0333333
k : 2.49896 .. 2.49896

Block 3 cell size :
i : 0.0166667 .. 0.0166667
j : 0.0333333 .. 0.0333333
k : 2.49896 .. 2.49896

Block 4 cell size :
i : 0.0333333 .. 0.0333333
j : 0.0666667 .. 0.0666667
k : 2.69888 .. 2.69888


Writing polyMesh
----------------
Mesh Information
----------------
boundingBox: (0 0 -1.54935) (3 30.9613 1.54935)
nPoints: 36481
nCells: 18000
nFaces: 72180
nInternalFaces: 35700
----------------
Patches
----------------
patch 0 (start: 35700 size: 120) name: leftWall
patch 1 (start: 35820 size: 120) name: rightWall
patch 2 (start: 35940 size: 120) name: sides
patch 3 (start: 36060 size: 0) name: axis
patch 4 (start: 36060 size: 60) name: atmosphere
patch 5 (start: 36120 size: 60) name: upperWall
patch 6 (start: 36180 size: 18000) name: back
patch 7 (start: 54180 size: 18000) name: front

End

-----------------------------------------------------------------------------------------
CHECK MESH LOG
-----------------------------------------------------------------------------------------


Create polyMesh for time = 0

Time = 0

Mesh stats
points: 36481
internal points: 0
faces: 72180
internal faces: 35700
cells: 18000
faces per cell: 5.99333
boundary patches: 8
point zones: 0
face zones: 0
cell zones: 0

Overall number of cells of each type:
hexahedra: 17880
prisms: 120
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 0
polyhedra: 0

Checking topology...
Boundary definition OK.
***Total number of faces on empty patches is not divisible by the number of cells in the mesh. Hence this mesh is not 1D or 2D.
Cell to face addressing OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
Patch Faces Points Surface topology
leftWall 120 242 ok (non-closed singly connected)
rightWall 120 244 ok (non-closed singly connected)
sides 120 242 ok (non-closed singly connected)
axis 0 0 ok (empty)
atmosphere 60 122 ok (non-closed singly connected)
upperWall 60 122 ok (non-closed singly connected)
back 18000 18301 ok (non-closed singly connected)
front 18000 18301 ok (non-closed singly connected)

Checking geometry...
Overall domain bounding box (0 0 -1.54935) (3 30.9613 1.54935)
Mesh (non-empty, non-wedge) directions (1 1 0)
Mesh (non-empty) directions (0 1 1)
Wedge back with angle 2.86479 degrees
Wedge front with angle 2.86479 degrees
All edges aligned with or perpendicular to non-empty directions.
Boundary openness (1.66689e-17 -5.15476e-15 5.04149e-15) OK.
Max cell openness = 1.65719e-16 OK.
Max aspect ratio = 24.7607 OK.
Minimum face area = 0.000555555. Maximum face area = 1.03127. Face area magnitudes OK.
Min volume = 0.000144435. Max volume = 0.0343755. Total volume = 132.329. Cell volumes OK.
Mesh non-orthogonality Max: 0 average: 0
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 0.330003 OK.
Coupled point location match (average 0) OK.

Mesh OK.

End

-----------------------------------------------------------------------------------------
SET FIELDS LOG
-----------------------------------------------------------------------------------------

Create time

Create mesh for time = 0

Reading setFieldsDict

Setting field default values
Setting internal values of volScalarField alpha.water

Setting field region values
Adding cells with centre within cylinder, with p1 = (0.2 25 -1), p2 = (0.2 26 1) and radius = 26
Setting internal values of volScalarField alpha.water

End

-------------------------------------------------------------------------------------------------------------------------
MESH FILE
----------------------------------------------------------------------------------------------------------------------
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;
//puncte aranjate pe verticala//
vertices
(
(0 0 0)//p0//
(2 0 0)//p1//
(3 0 0)//p2//
(0 24.96875650987 -1.24947923177)//p3//
(2 24.96875650987 -1.24947923177)//p4//
(3 24.96875650987 -1.24947923177)//p5//
(3 26.96625703066 -1.34943757031)//p6//
(2 26.96625703066 -1.34943757031)//p7//
(0 26.96625703066 -1.34943757031)//p8//
(0 30.96125807224 -1.54935424739)//p9//
(2 30.96125807224 -1.54935424739)//p10//
(0 24.96875650987 1.24947923177)//p11//
(2 24.96875650987 1.24947923177)//p12//
(3 24.96875650987 1.24947923177)//p13//
(3 26.96625703066 1.34943757031)//p14//
(2 26.96625703066 1.34943757031)//p15//
(0 26.96625703066 1.34943757031)//p16//
(0 30.96125807224 1.54935424739)//p17//
(2 30.96125807224 1.54935424739)//p18//
);

blocks
(
hex (0 1 4 3 0 1 12 11) (60 60 1) simpleGrading (1 1 1)
hex (1 2 5 4 1 2 13 12) (60 60 1) simpleGrading (1 1 1)
hex (3 4 7 8 11 12 15 16) (60 60 1) simpleGrading (1 1 1)
hex (4 5 6 7 12 13 14 15) (60 60 1) simpleGrading (1 1 1)
hex (8 7 10 9 16 15 18 17) (60 60 1) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
leftWall
{
type walls;
faces
(
(3 8 16 11)
(8 9 17 16)
);
}
rightWall
{
type wall;
faces
(
(5 6 14 13)
(7 10 18 15)
);
}
sides
{
type empty;
faces
(
(0 3 11 0)
(2 5 13 2)
);
}
axis
{
type empty;
faces
(
(0 1 1 0)
(1 2 2 1)
);
}
atmosphere
{
type wall;//patch;
faces
(
(9 10 18 17)
);
}
upperWall
{
type wall;
faces
(
(7 6 14 15) // (10 9 17 18)//
);
}
back
{
type wedge;
faces
(
(0 1 4 3)
(1 2 5 4)
(3 4 7 8)
(4 5 6 7)
(8 7 10 9)
);
}
front
{
type wedge;
faces
(
(0 1 12 11)
(1 2 13 12)
(11 12 15 16)
(12 13 14 15)
(16 15 18 17)
);
}
);

mergePatchPairs
(
);

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

--------------------------------------------------------------------------------------------------------------------------
BOUNDARY CONDITIONS FILE
-------------------------------------------------------------------------------------------------------------------------
FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

8
(
leftWall
{
type walls;
nFaces 120;
startFace 35700;
faces ( ( 3 8 16 11 ) ( 8 9 17 16 ) );
}
rightWall
{
type wall;
inGroups 1(wall);
nFaces 120;
startFace 35820;
}
sides
{
type empty;
inGroups 1(empty);
nFaces 120;
startFace 35940;
}
axis
{
type empty;
inGroups 1(empty);
nFaces 0;
startFace 36060;
}
atmosphere
{
type wall;
inGroups 1(wall);
nFaces 60;
startFace 36060;
}
upperWall
{
type wall;
inGroups 1(wall);
nFaces 60;
startFace 36120;
}
back
{
type wedge;
inGroups 1(wedge);
nFaces 18000;
startFace 36180;
}
front
{
type wedge;
inGroups 1(wedge);
nFaces 18000;
startFace 54180;
}
)
-----------------------------------------------------------------------------------------------------------------------
SET FIELDS FILE
------------------------------------------------------------------------------------------------------------------------
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

defaultFieldValues
(
volScalarFieldValue alpha.water 0
);

regions
(
cylinderToCell //boxToCell //box (3 0 -1.34947923177) (3 26.96625703066 1.34943757031);
{
p1 (0.2 25 -1); //Min
p2 (0.2 26 1); //Max
radius 26;
// radius 26;

fieldValues
(
volScalarFieldValue alpha.water 1
);
}
);

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

-----------------------------------------------------------------------------------------------------------------------
ALPHA WATER FILE

FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 0 0 0 0 0];

internalField uniform 0;

boundaryField
{
leftWall
{
type zeroGradient;
}

rightWall
{
type zeroGradient;
}

axis
{
type empty;
}

upperWall
{
type zeroGradient;
}

front
{
type wedge;
}

back
{
type wedge;
}

atmosphere
{
type zeroGradient;//type inletOutlet;
//inletValue uniform 0;
//value uniform 0;
}

defaultFaces
{
type empty;
}
}

// ************************************************** *********************** //
---------------------------------------------------------------------------------------------------------------------------
Attached Files
File Type: gz Piks.tar.gz (80.5 KB, 13 views)
Rhoddwen is offline   Reply With Quote

Old   December 16, 2014, 05:06
Default no one?
  #2
New Member
 
Rhoddwen
Join Date: Dec 2014
Posts: 9
Rep Power: 12
Rhoddwen is on a distinguished road
please help....
Rhoddwen is offline   Reply With Quote

Old   December 17, 2014, 05:37
Default
  #3
Senior Member
 
Jens Höpken
Join Date: Apr 2009
Location: Duisburg, Germany
Posts: 159
Rep Power: 17
jhoepken is on a distinguished road
Send a message via Skype™ to jhoepken
  • There is a variety of possibilities . I would go for meshing a 90 degrees in blockMesh and then use mirrorMesh to mirror it twice, which will then give you the complete 2 concentric cylinders.
  • What for do you need the cylindrical coordinates? The code is not formulated in cylindrical manner.
  • Please have a look at the interFoam tutorials (setFields) is a good starting point.
__________________
Blog: sourceflux.de/blog
"The OpenFOAM Technology Primer": sourceflux.de/book
Twitter: @sourceflux_de
Interested in courses on OpenFOAM?
jhoepken is offline   Reply With Quote

Old   December 17, 2014, 05:52
Default hy
  #4
New Member
 
Rhoddwen
Join Date: Dec 2014
Posts: 9
Rep Power: 12
Rhoddwen is on a distinguished road
Hello, and thank you for your post.
So...if I build the mesh as you say..it will be a 3D case...not a wedge. (I have a 3d geometry already...I'm still stuck with the 'water box').

Now...i have another question...can I set a VOF (multiphase or inter-foam) without having a wall declared as atmosphere? (I mean, have a closed box, or geometry, with some water in it....) I am asking you that, cause it asks me a point or a reference location for pressure field..when I am trying to define a closed (wall-wall-wall-wall geometry).

And second question...how do I set a rpm...a rotating wall....

Here is my new 3D geometry. I am trying to put a 'water phase' and a 'rotating wall' ...and I am successfully failing.....
Attached Images
File Type: jpg geo1.jpg (14.4 KB, 74 views)
File Type: jpg geo2.jpg (14.8 KB, 54 views)
Rhoddwen is offline   Reply With Quote

Old   December 17, 2014, 05:55
Default and....
  #5
New Member
 
Rhoddwen
Join Date: Dec 2014
Posts: 9
Rep Power: 12
Rhoddwen is on a distinguished road
I have already checked out interFoam and Multiphase tutorials...I have even tried to set up something else..not a box-to-cell volume of water....but a cylinder-to-cell or point to face...
I just....I'm not used with writing codes...
Rhoddwen is offline   Reply With Quote

Old   December 17, 2014, 06:00
Default
  #6
Senior Member
 
Jens Höpken
Join Date: Apr 2009
Location: Duisburg, Germany
Posts: 159
Rep Power: 17
jhoepken is on a distinguished road
Send a message via Skype™ to jhoepken
Do yourself a favor and read about the implementation of interFoam, when you start using it ( http://www.sourceflux.de/blog/101-th...ting-openfoam/ ). As it is based on the pressure gradient, rather than the absolute pressure, a reference pressure needs to be specified somewhere, otherwise the pressure values will increase or decrease until machine tolerance is reached. If you don't have a pressure value defined on a boundary, you have to do it in fvSolution.

If you would like to work with OpenFOAM, you have to get used to writing codes. Ah and get used to not using "...." after each of your sentences .
__________________
Blog: sourceflux.de/blog
"The OpenFOAM Technology Primer": sourceflux.de/book
Twitter: @sourceflux_de
Interested in courses on OpenFOAM?
jhoepken is offline   Reply With Quote

Old   December 17, 2014, 07:16
Default I set it here?
  #7
New Member
 
Rhoddwen
Join Date: Dec 2014
Posts: 9
Rep Power: 12
Rhoddwen is on a distinguished road
solvers
{
"alpha.water.*"
{
nAlphaCorr 2;
nAlphaSubCycles 1;
alphaOuterCorrectors yes;
cAlpha 1;

MULESCorr yes;
nLimiterIter 3;

solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-8;
relTol 0;
}

pcorr
{
solver PCG;
preconditioner DIC;
tolerance 1e-5;
relTol 0;
}

p_rgh
{
solver PCG;
preconditioner DIC;
tolerance 1e-07;
relTol 0.05;
}
SO I SHOULD SET IT HERE, BUT HOW? I JUST set p_rgh = value???
p_rghFinal
{
$p_rgh;
relTol 0;
}

U
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-06;
relTol 0;
}
}

PIMPLE
{
momentumPredictor no;
nOuterCorrectors 1;
nCorrectors 3;
nNonOrthogonalCorrectors 0;
}

relaxationFactors
{
fields
{
}
equations
{
".*" 1;
}
}
Rhoddwen is offline   Reply With Quote

Old   December 17, 2014, 07:50
Default
  #8
Senior Member
 
Jens Höpken
Join Date: Apr 2009
Location: Duisburg, Germany
Posts: 159
Rep Power: 17
jhoepken is on a distinguished road
Send a message via Skype™ to jhoepken
Defining the alpha field is usually done by setFields. Please, read the User's Guide and other literature about OpenFOAM, you do yourself a big favor .
__________________
Blog: sourceflux.de/blog
"The OpenFOAM Technology Primer": sourceflux.de/book
Twitter: @sourceflux_de
Interested in courses on OpenFOAM?
jhoepken is offline   Reply With Quote

Old   December 17, 2014, 10:48
Default
  #9
New Member
 
Rhoddwen
Join Date: Dec 2014
Posts: 9
Rep Power: 12
Rhoddwen is on a distinguished road
Pfff, tnx for nothing.
I have already looked at both users guide and programmers guide (before you told me to).
I have already made all tutorials.
I have already looked on different PhD thesis and similar documentations.
The syntax I've sent you up here was FVSOLUTION.
NOT SET FIELDS. NOT ALPHA ORG.
Rhoddwen is offline   Reply With Quote

Old   December 17, 2014, 11:02
Unhappy cylindrical coordinates
  #10
New Member
 
Rhoddwen
Join Date: Dec 2014
Posts: 9
Rep Power: 12
Rhoddwen is on a distinguished road
and if OF does not use cylindrical coordinates why are there some files called "cylindrical coordinates" within OF folders?
Attached Images
File Type: jpg Screenshot from 2014-12-17 16:59:05.jpg (23.7 KB, 30 views)
Rhoddwen 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
(AutoGRID 5) Problem in Geometry definition of propeller venkat_aero2007 Fidelity CFD 14 July 31, 2012 15:05
[Gmsh] Problem with geometry. Andrea_85 OpenFOAM Meshing & Mesh Conversion 1 January 6, 2011 09:34
Problem in k-eps turbulence code in complex geometry sontukaku Main CFD Forum 2 December 28, 2010 01:44
ParaView 3.8.0 problem on debian Unseen OpenFOAM Installation 4 August 16, 2010 11:26
problem geometry in 2-d thanos FLUENT 0 November 24, 2009 13:22


All times are GMT -4. The time now is 11:27.