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

forces function VS patchIntegrate

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 5, 2010, 16:46
Default forces function VS patchIntegrate
  #1
Senior Member
 
Andrea Pasquali
Join Date: Sep 2009
Location: Germany
Posts: 142
Rep Power: 7
andrea.pasquali is on a distinguished road
Hello,
I'm tried to calculate the Fx, Fy, Fz on a patch.
My run is simpleFoam.
With the forces function, during the calculation, for example my Fz was Fz = 13,57 kN (pressure + viscous).
At the end of the run, I tried with patchIntegrate and I obtained F = 6,36 kN along a vector (912 778 5540). So Fz is Fz = 6,28 kN.
This is strange! There is a 2.16 factor!
Am I wronging something?

Thank you for any help

Andrea
__________________
Andrea Pasquali
andrea.pasquali is offline   Reply With Quote

Old   June 6, 2010, 10:14
Default
  #2
Member
 
Rickard Hidefjäll
Join Date: Jun 2009
Location: Uppsala, Sweden
Posts: 39
Rep Power: 8
SkunkWorks is on a distinguished road
Maybe I`ve got the same problem.
see:

3D simulation with blended wingbody. Lift a 1/3 of what it shuld be. Any wrong?

Regards / Rickard
SkunkWorks is offline   Reply With Quote

Old   June 6, 2010, 10:30
Default
  #3
Senior Member
 
Andrea Pasquali
Join Date: Sep 2009
Location: Germany
Posts: 142
Rep Power: 7
andrea.pasquali is on a distinguished road
Hi Rickard,
I already saw you post!
My problem is that I used well forces function to calculate lift and drag coefficients in car analysis; but now with an ulma airplane I'm thinking the value I obtained is too much! Instead with patchIntegrate is too low!
Therefore I know the pressure dimension in simpleFoam is p/rho.
It could be related to our problem?
Do you know if and where I could find a NACA profile to test?

Thanks

Andrea
__________________
Andrea Pasquali
andrea.pasquali is offline   Reply With Quote

Old   June 6, 2010, 13:19
Default
  #4
Member
 
Rickard Hidefjäll
Join Date: Jun 2009
Location: Uppsala, Sweden
Posts: 39
Rep Power: 8
SkunkWorks is on a distinguished road
Hi Andrea.

"Do you know if and where I could find a NACA profile to test?"

The equation for Naca 0009, is;
9/10*(5*(.29690*( (y)^.5)-.12600*y-.35160*((y)^2)+.28430*((y)^3)-.10150*((y)^4) ) )

A good site for wing profile is http://airfoils.worldofkrauss.com/foils

for Naca 0009 http://airfoils.worldofkrauss.com/foils/1744

Regards / Rickard
SkunkWorks is offline   Reply With Quote

Old   June 6, 2010, 14:17
Default
  #5
Member
 
Rickard Hidefjäll
Join Date: Jun 2009
Location: Uppsala, Sweden
Posts: 39
Rep Power: 8
SkunkWorks is on a distinguished road
You can use one of my scripts if you like. see permissions in beginning of file

Itś at elliptic wing with ability to change angle of attack and twist of wing tip.

You could use my wing channel. You had to put the WindChannel34.geo in the same directory as 20100520_2_Exp15.geo

http://www.tooslow.net/rattus/CFD_Pi...dChannel34.geo
http://www.tooslow.net/rattus/CFD_Pi...20_2_Exp15.geo

You open 20100520_2_Exp15.geo in gmsh and do a 2D mesh then you import the saved mesh in enGrid to make a complete OpenFOAM case

Good luck Regards / Rickard

Last edited by SkunkWorks; June 6, 2010 at 15:29. Reason: wrong adress
SkunkWorks is offline   Reply With Quote

Old   June 10, 2010, 17:21
Default
  #6
Member
 
Rickard Hidefjäll
Join Date: Jun 2009
Location: Uppsala, Sweden
Posts: 39
Rep Power: 8
SkunkWorks is on a distinguished road
Hi see my new post on 3D simulation with blended wingbody. Lift a 1/3 of what it shuld be. Any wrong?

I came up with a factor 2,43

Regards Rickard
SkunkWorks is offline   Reply With Quote

Old   April 12, 2011, 10:17
Default
  #7
New Member
 
Join Date: Mar 2011
Posts: 17
Rep Power: 6
nicolarre is on a distinguished road
I've been having problems with an ahmed body simulation. i ran the case in Komega, Kepsilo, KomegaSST and SpalartAllmaras and in all cases i get a Cd thats somewhere between 2 and 3 times what it should be.

Maybe these problems are related..
nicolarre is offline   Reply With Quote

Old   April 13, 2011, 20:28
Default
  #8
New Member
 
Alexandre Rubel
Join Date: Dec 2010
Location: Launceston, Tasmania AUSTRALIA
Posts: 28
Rep Power: 6
alex_rubel is on a distinguished road
I ran simultaion in both steadystate and Transcient simulation for an AUV with the different basic turbulence model. After lots of simulation to find the better scheme i reduce to 200 or 300 % of error for the Cd to 25%. But it's still high. The pressure distribution around the hull seems very good as the other variables.
Do you think that the libForces.so library may have errors ?
alex_rubel is offline   Reply With Quote

Old   August 16, 2011, 03:45
Default
  #9
New Member
 
Caleb Miles
Join Date: Jun 2011
Posts: 13
Rep Power: 6
calebamiles is on a distinguished road
Hello

Was anyone able to resolve this issue. I recently posted some other strange force calculation results in another post

Strange Results With snappyHexMesh

where my force calculations differ by orders of magnitude depending on whether I use a mesh generated by blockMesh or snappyHexMesh. Any insight would be greatly appreciated.

Caleb
calebamiles is offline   Reply With Quote

Old   August 16, 2011, 11:07
Default
  #10
New Member
 
Join Date: Mar 2011
Posts: 17
Rep Power: 6
nicolarre is on a distinguished road
I had similar problems but finally fixed them by choosing better div() schemes:

{Note: This was for primarily pressure drag, for viscous drag i had a lot of trouble and could never really get a good result}

[check this thread, post #6: http://www.cfd-online.com/Forums/ope...fficients.html ]

i switched my div(phi,u) scheme from "upwind" to "Gauss linearUpwindV cellMDLimited Gauss linear 1" and it worked. Reduced my drag error from about 120% to 10%. In that thread you can also see the dependency between the result and the mesh quality.
nicolarre is offline   Reply With Quote

Old   August 16, 2011, 16:19
Default
  #11
New Member
 
Caleb Miles
Join Date: Jun 2011
Posts: 13
Rep Power: 6
calebamiles is on a distinguished road
Thanks for the quick reply nicolarre, but even after making your suggested change, I had already been using "Gauss linear corrected" for that term, my results are the same. I fear that something much stranger is occuring because as can be seen from the report produced by checkMesh for the mesh produced by snappyHexMesh

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  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.x-4bbf33160caf
Exec   : checkMesh
Date   : Aug 15 2011
Time   : 20:26:19
Host   : calebspc
PID    : 25574
Case   : /home/caleb/full_cylinder_flow_snappyHexMesh
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

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

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:           61304
    internal points:  0
    faces:            119164
    internal faces:   59088
    cells:            29504
    boundary patches: 6
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     27888
    prisms:        372
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:     1244

Checking topology...
    Boundary definition 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                  
    topAndBottom        80       164      ok (non-closed singly connected)  
    inlet               40       82       ok (non-closed singly connected)  
    outlet              40       82       ok (non-closed singly connected)  
    front               29504    30652    ok (non-closed singly connected)  
    back                29504    30652    ok (non-closed singly connected)  
    circle              908      1816     ok (non-closed singly connected)  

Checking geometry...
    Overall domain bounding box (-2 -2 0.1) (2 2 0.15)
    Mesh (non-empty, non-wedge) directions (1 1 0)
    Mesh (non-empty) directions (1 1 0)
    All edges aligned with or perpendicular to non-empty directions.
    Boundary openness (9.8838e-19 5.74288e-19 -4.82611e-16) OK.
    Max cell openness = 1.74029e-16 OK.
    Max aspect ratio = 3.18563 OK.
    Minumum face area = 2.35607e-06. Maximum face area = 0.00998599.  Face area magnitudes OK.
    Min volume = 1.17804e-07. Max volume = 0.0004993.  Total volume = 0.760734.  Cell volumes OK.
    Mesh non-orthogonality Max: 21.7302 average: 4.688
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 0.342234 OK.

Mesh OK.

End
versus the mesh produced by blockMesh

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  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.x-4bbf33160caf
Exec   : checkMesh
Date   : Aug 15 2011
Time   : 20:26:25
Host   : calebspc
PID    : 25576
Case   : /home/caleb/half_cylinder_flow_blockMesh
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

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

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:           4222
    internal points:  0
    faces:            8110
    internal faces:   3890
    cells:            2000
    boundary patches: 6
    point zones:      0
    face zones:       0
    cell zones:       0

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

Checking topology...
    Boundary definition 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                  
    down                60       124      ok (non-closed singly connected)  
    right               30       62       ok (non-closed singly connected)  
    up                  60       122      ok (non-closed singly connected)  
    left                30       62       ok (non-closed singly connected)  
    cylinder            40       82       ok (non-closed singly connected)  
    defaultFaces        4000     4222     ok (non-closed singly connected)  

Checking geometry...
    Overall domain bounding box (-2 0 -0.5) (2 2 0.5)
    Mesh (non-empty, non-wedge) directions (1 1 0)
    Mesh (non-empty) directions (1 1 0)
    All edges aligned with or perpendicular to non-empty directions.
    Boundary openness (9.98912e-19 1.03887e-16 -1.88857e-18) OK.
    Max cell openness = 1.942e-16 OK.
    Max aspect ratio = 1.97696 OK.
    Minumum face area = 0.00205955. Maximum face area = 0.0785197.  Face area magnitudes OK.
    Min volume = 0.00205955. Max volume = 0.00445575.  Total volume = 7.60771.  Cell volumes OK.
    Mesh non-orthogonality Max: 41.2645 average: 10.0965
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 0.422837 OK.

Mesh OK.

End
The mesh produced by snappyHexMesh seems to be of higher quality in every regard except for a higher aspect ratio and a much smaller minimum cell volume, so I'm really at a loss for what could be going on. I'm not very familiar with snappyHexMesh so I'm not really sure how to reduce the maximum aspect ratio to come in line with blockMesh. If you have any suggestions, however, I would greatly appreciate them.

Caleb
calebamiles is offline   Reply With Quote

Old   August 17, 2011, 09:19
Default
  #12
New Member
 
Join Date: Mar 2011
Posts: 17
Rep Power: 6
nicolarre is on a distinguished road
Could you attach/upload the blockMeshDict and the snappyHexMeshDict?
nicolarre is offline   Reply With Quote

Old   August 17, 2011, 12:42
Default
  #13
New Member
 
Caleb Miles
Join Date: Jun 2011
Posts: 13
Rep Power: 6
calebamiles is on a distinguished road
Hello nicolarre,

Here are the snappyHexMesh case files, the original 3D and the extruded 2D:

http://dl.dropbox.com/u/21019547/sna..._circle.tar.gz
http://dl.dropbox.com/u/21019547/sna..._circle.tar.gz

I just used the half cylinder case from the basic/potential tutorial but the full case I used is here:

http://dl.dropbox.com/u/21019547/hal...ockMesh.tar.gz

while the full case for the snappyHexMesh is here:

http://dl.dropbox.com/u/21019547/ful...HexMesh.tar.gz

The snappyHexMeshDict is reproduced below

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

// Which of the steps to run
castellatedMesh true;
snap            true;
addLayers       true;


// Geometry. Definition of all surfaces. All surfaces are of class
// searchableSurface.
// Surfaces are used
// - to specify refinement for any mesh cell intersecting it
// - to specify refinement for any mesh cell inside/outside/near
// - to 'snap' the mesh boundary to the surface
geometry
{
    circle.stl
    {
        type triSurfaceMesh;
    }

    refinementBox
    {
        type searchableBox;
        min (-1.5 -1.5 -0.1);
        max ( 1.5  1.5  0.1);
    }
    
    
};



// Settings for the castellatedMesh generation.
castellatedMeshControls
{

    // Refinement parameters
    // ~~~~~~~~~~~~~~~~~~~~~

    // If local number of cells is >= maxLocalCells on any processor
    // switches from from refinement followed by balancing
    // (current method) to (weighted) balancing before refinement.
    maxLocalCells 1000000;

    // Overall cell limit (approximately). Refinement will stop immediately
    // upon reaching this number so a refinement level might not complete.
    // Note that this is the number of cells before removing the part which
    // is not 'visible' from the keepPoint. The final number of cells might
    // actually be a lot less.
    maxGlobalCells 2000000;

    // The surface refinement loop might spend lots of iterations refining just a
    // few cells. This setting will cause refinement to stop if <= minimumRefine
    // are selected for refinement. Note: it will at least do one iteration
    // (unless the number of cells to refine is 0)
    minRefinementCells 100;

    // Number of buffer layers between different levels.
    // 1 means normal 2:1 refinement restriction, larger means slower
    // refinement.
    nCellsBetweenLevels 6;



    // Explicit feature edge refinement
    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    // Specifies a level for any cell intersected by its edges.
    // This is a featureEdgeMesh, read from constant/triSurface for now.
    features ();



    // Surface based refinement
    // ~~~~~~~~~~~~~~~~~~~~~~~~

    // Specifies two levels for every surface. The first is the minimum level,
    // every cell intersecting a surface gets refined up to the minimum level.
    // The second level is the maximum level. Cells that 'see' multiple
    // intersections where the intersections make an
    // angle > resolveFeatureAngle get refined up to the maximum level.

    refinementSurfaces
    {
        circle.stl
        {
                // Surface-wise min and max refinement level
                level (6 6);
        }
    }

    // Resolve sharp angles on fridges
    resolveFeatureAngle 30;


    // Region-wise refinement
    // ~~~~~~~~~~~~~~~~~~~~~~

    // Specifies refinement level for cells in relation to a surface. One of
    // three modes
    // - distance. 'levels' specifies per distance to the surface the
    //   wanted refinement level. The distances need to be specified in
    //   descending order.
    // - inside. 'levels' is only one entry and only the level is used. All
    //   cells inside the surface get refined up to the level. The surface
    //   needs to be closed for this to be possible.
    // - outside. Same but cells outside.

    refinementRegions
    {
        refinementBox
        {
                mode inside;
                levels ((1e15 3));
        }
        
    
    }


    // Mesh selection
    // ~~~~~~~~~~~~~~

    // After refinement patches get added for all refinementSurfaces and
    // all cells intersecting the surfaces get put into these patches. The
    // section reachable from the locationInMesh is kept.
    // NOTE: This point should never be on a face, always inside a cell, even
    // after refinement.
    locationInMesh (-1.7 -1.7 0);


    // Whether any faceZones (as specified in the refinementSurfaces)
    // are only on the boundary of corresponding cellZones or also allow
    // free-standing zone faces. Not used if there are no faceZones.
    allowFreeStandingZoneFaces true;
}



// Settings for the snapping.
snapControls
{
    //- Number of patch smoothing iterations before finding correspondence
    //  to surface
    nSmoothPatch 3;

    //- Relative distance for points to be attracted by surface feature point
    //  or edge. True distance is this factor times local
    //  maximum edge length.
    tolerance 4.0;

    //- Number of mesh displacement relaxation iterations.
    nSolveIter 30;

    //- Maximum number of snapping relaxation iterations. Should stop
    //  before upon reaching a correct mesh.
    nRelaxIter 5;
}



// Settings for the layer addition.
addLayersControls
{
    // Are the thickness parameters below relative to the undistorted
    // size of the refined cell outside layer (true) or absolute sizes (false).
    relativeSizes true;

    // Per final patch (so not geometry!) the layer information
    layers
    {
        "circle.*"
        {
                nSurfaceLayers 4;
        }
    }

    // Expansion factor for layer mesh
    expansionRatio 1.3;

    //- Wanted thickness of final added cell layer. If multiple layers
    //  is the
    //  thickness of the layer furthest away from the wall.
    //  Relative to undistorted size of cell outside layer.
    //  is the thickness of the layer furthest away from the wall.
    //  See relativeSizes parameter.
    finalLayerThickness 0.7;

    //- Minimum thickness of cell layer. If for any reason layer
    //  cannot be above minThickness do not add layer.
    //  Relative to undistorted size of cell outside layer.
    //  See relativeSizes parameter.
    minThickness 0.25;

    //- If points get not extruded do nGrow layers of connected faces that are
    //  also not grown. This helps convergence of the layer addition process
    //  close to features.
    nGrow 0;


    // Advanced settings

    //- When not to extrude surface. 0 is flat surface, 90 is when two faces
    //  make straight angle.
    featureAngle 60;

    //- Maximum number of snapping relaxation iterations. Should stop
    //  before upon reaching a correct mesh.
    nRelaxIter 5;

    // Number of smoothing iterations of surface normals
    nSmoothSurfaceNormals 1;

    // Number of smoothing iterations of interior mesh movement direction
    nSmoothNormals 3;

    // Smooth layer thickness over surface patches
    nSmoothThickness 10;

    // Stop layer growth on highly warped cells
    maxFaceThicknessRatio 0.5;

    // Reduce layer growth where ratio thickness to medial
    // distance is large
    maxThicknessToMedialRatio 0.3;

    // Angle used to pick up medial axis points
    // Note: changed(corrected) w.r.t 16x! 90 degrees corresponds to 130 in 16x.
    minMedianAxisAngle 90;

    // Create buffer region for new layer terminations
    nBufferCellsNoExtrude 0;


    // Overall max number of layer addition iterations. The mesher will exit
    // if it reaches this number of iterations; possibly with an illegal
    // mesh.
    nLayerIter 50;
}



// Generic mesh quality settings. At any undoable phase these determine
// where to undo.
meshQualityControls
{
    //- Maximum non-orthogonality allowed. Set to 180 to disable.
    maxNonOrtho 65;

    //- Max skewness allowed. Set to <0 to disable.
    maxBoundarySkewness 20;
    maxInternalSkewness 4;

    //- Max concaveness allowed. Is angle (in degrees) below which concavity
    //  is allowed. 0 is straight face, <0 would be convex face.
    //  Set to 180 to disable.
    maxConcave 80;

    //- Minimum pyramid volume. Is absolute volume of cell pyramid.
    //  Set to a sensible fraction of the smallest cell volume expected.
    //  Set to very negative number (e.g. -1E30) to disable.
    minVol 1e-13;

    //- Minimum tet volume. Is absolute volume of the tet formed by the
    //  face-centre decomposition triangle and the cell centre.
    //  Set to a sensible fraction of the smallest cell volume expected.
    //  Set to very negative number (e.g. -1E30) to disable.
    minTetVol 1e-20;

    //- Minimum face area. Set to <0 to disable.
    minArea -1;

    //- Minimum face twist. Set to <-1 to disable. dot product of face normal
    //- and face centre triangles normal
    minTwist 0.05;

    //- minimum normalised cell determinant
    //- 1 = hex, <= 0 = folded or flattened illegal cell
    minDeterminant 0.001;

    //- minFaceWeight (0 -> 0.5)
    minFaceWeight 0.05;

    //- minVolRatio (0 -> 1)
    minVolRatio 0.01;

    //must be >0 for Fluent compatibility
    minTriangleTwist -1;

    minTetQuality 1e-9;
    // Advanced

    //- Number of error distribution iterations
    nSmoothScale 4;
    //- amount to scale back displacement at error points
    errorReduction 0.75;
}


// Advanced

// Flags for optional output
// 0 : only write final meshes
// 1 : write intermediate meshes
// 2 : write volScalarField with cellLevel for postprocessing
// 4 : write current intersections as .obj files
debug 0;


// Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this.
mergeTolerance 1E-6;


// ************************************************************************* //
The blockMeshDict for the half-cylinder that was taken from the tutorial cases is below
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.7.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;

vertices        
(
    (0.5 0 -0.5)
    (1 0 -0.5)
    (2 0 -0.5)
    (2 0.707107 -0.5)
    (0.707107 0.707107 -0.5)
    (0.353553 0.353553 -0.5)
    (2 2 -0.5)
    (0.707107 2 -0.5)
    (0 2 -0.5)
    (0 1 -0.5)
    (0 0.5 -0.5)
    (-0.5 0 -0.5)
    (-1 0 -0.5)
    (-2 0 -0.5)
    (-2 0.707107 -0.5)
    (-0.707107 0.707107 -0.5)
    (-0.353553 0.353553 -0.5)
    (-2 2 -0.5)
    (-0.707107 2 -0.5)
    (0.5 0 0.5)
    (1 0 0.5)
    (2 0 0.5)
    (2 0.707107 0.5)
    (0.707107 0.707107 0.5)
    (0.353553 0.353553 0.5)
    (2 2 0.5)
    (0.707107 2 0.5)
    (0 2 0.5)
    (0 1 0.5)
    (0 0.5 0.5)
    (-0.5 0 0.5)
    (-1 0 0.5)
    (-2 0 0.5)
    (-2 0.707107 0.5)
    (-0.707107 0.707107 0.5)
    (-0.353553 0.353553 0.5)
    (-2 2 0.5)
    (-0.707107 2 0.5)
);

blocks          
(
    hex (5 4 9 10 24 23 28 29) (10 10 1) simpleGrading (1 1 1)
    hex (0 1 4 5 19 20 23 24) (10 10 1) simpleGrading (1 1 1)
    hex (1 2 3 4 20 21 22 23) (20 10 1) simpleGrading (1 1 1)
    hex (4 3 6 7 23 22 25 26) (20 20 1) simpleGrading (1 1 1)
    hex (9 4 7 8 28 23 26 27) (10 20 1) simpleGrading (1 1 1)
    hex (15 16 10 9 34 35 29 28) (10 10 1) simpleGrading (1 1 1)
    hex (12 11 16 15 31 30 35 34) (10 10 1) simpleGrading (1 1 1)
    hex (13 12 15 14 32 31 34 33) (20 10 1) simpleGrading (1 1 1)
    hex (14 15 18 17 33 34 37 36) (20 20 1) simpleGrading (1 1 1)
    hex (15 9 8 18 34 28 27 37) (10 20 1) simpleGrading (1 1 1)
);

edges           
(
    arc 0 5 (0.469846 0.17101 -0.5)
    arc 5 10 (0.17101 0.469846 -0.5)
    arc 1 4 (0.939693 0.34202 -0.5)
    arc 4 9 (0.34202 0.939693 -0.5)
    arc 19 24 (0.469846 0.17101 0.5)
    arc 24 29 (0.17101 0.469846 0.5)
    arc 20 23 (0.939693 0.34202 0.5)
    arc 23 28 (0.34202 0.939693 0.5)
    arc 11 16 (-0.469846 0.17101 -0.5)
    arc 16 10 (-0.17101 0.469846 -0.5)
    arc 12 15 (-0.939693 0.34202 -0.5)
    arc 15 9 (-0.34202 0.939693 -0.5)
    arc 30 35 (-0.469846 0.17101 0.5)
    arc 35 29 (-0.17101 0.469846 0.5)
    arc 31 34 (-0.939693 0.34202 0.5)
    arc 34 28 (-0.34202 0.939693 0.5)
);

patches         
(
    symmetryPlane down 
    (
        (0 1 20 19)
        (1 2 21 20)
        (12 11 30 31)
        (13 12 31 32)
    )
    patch right 
    (
        (2 3 22 21)
        (3 6 25 22)
    )
    symmetryPlane up 
    (
        (7 8 27 26)
        (6 7 26 25)
        (8 18 37 27)
        (18 17 36 37)
    )
    patch left 
    (
        (14 13 32 33)
        (17 14 33 36)
    )
    symmetryPlane cylinder 
    (
        (10 5 24 29)
        (5 0 19 24)
        (16 10 29 35)
        (11 16 35 30)
    )
);

mergePatchPairs
(
);

// ************************************************************************* //
Once I install pyFoam I'll make another go at meshing the full cylinder because I had some difficulties with vertex numbering. Thanks so much for your time.

Caleb

Last edited by calebamiles; August 18, 2011 at 11:39.
calebamiles is offline   Reply With Quote

Old   August 18, 2011, 16:41
Default
  #14
New Member
 
Join Date: Mar 2011
Posts: 17
Rep Power: 6
nicolarre is on a distinguished road
Im' fairly new to openFoam myself, so i may or may not be of much help,

Right off the top of my head (because im not at a computer with access to openFoam) you might want to look at the aspect ratio of your blockmesh.

If i recall correctly (i think its in the user manual, somewhere) snappyHexMesh dissaproves of blockmeshes with aspect ratio that aren't close to 1. The closer the blockmesh is to aspect ratio 1, the better the snappy mesh result.

Speaking of aspect ratio (and taking into account i didn't get the chance to check your case yet) i see you are adding boundary layers to your snappyhexmesh. Those will usually increase your aspect ratio since they are slim.

You may also want to look into your case's y+. See if its near your model's requirement. Depending on the type of simulation, viscous friction may or may not be an important factor. For my ahmed's body case, where viscous drag was low compared to preasurre drag i didn't really had much y+ restrictions. On some Airfoil cases i ran however, i had to make sure my y+ was in the right range.
nicolarre is offline   Reply With Quote

Reply

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
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 09:31
BlockMesh FOAM warning gaottino OpenFOAM Native Meshers: blockMesh 7 July 19, 2010 14:11
latest OpenFOAM-1.6.x from git failed to compile phsieh2005 OpenFOAM Bugs 25 February 9, 2010 05:37
Error with Wmake skabilan OpenFOAM Installation 3 July 28, 2009 00:35
Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Native Meshers: blockMesh 10 April 2, 2007 14:00


All times are GMT -4. The time now is 15:24.