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

[snappyHexMesh] How to define to right point for locationInMesh

Register Blogs Community New Posts Updated Threads Search

Like Tree10Likes
  • 2 Post By wyldckat
  • 8 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 10, 2013, 02:13
Default How to define to right point for locationInMesh
  #1
Member
 
Amin
Join Date: May 2013
Posts: 76
Rep Power: 13
Mirage12 is on a distinguished road
Hello everybody

I am new OpenFOAM user and i would like to know, how to mesh external geometry using snappyHexMesh.

I took a simple Geometry #cylinder# as a first case.

I read the OpenFOAM tutorial, but i tried to follow the same instructions, but unlikely i did not know to specify correctly the point of the locationInMesh in snappyHexMeshDict.

I took the point inside the block but outside the cylinder, but it is not working...

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

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

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


// 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
{

   cylinder.stl
    {
        type triSurfaceMesh;
        name cylinder;
    }
box
{
type searchableBox;
min (-2 -2 -12);
max (2 2 12);
}


};



// 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 100000;

    // 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 0;

    // Allow a certain level of imbalance during refining
    // (since balancing is quite expensive)
    // Expressed as fraction of perfect balance (= overall number of cells /
    // nProcs). 0=balance always.
    maxLoadUnbalance 0.10;


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



    // 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
    {
        cylinder
        {
            // Surface-wise min and max refinement level
            level (2 2);

        }
    }

    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
    {

        //cylinder
        //{
          //  mode inside;
          //  levels ((6 6));
        //}

        
        
    }


    // 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 -1 -10);


    // 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
    {
        cylinder
        {
            nSurfaceLayers 1;

        }
        
    }

    // Expansion factor for layer mesh
    expansionRatio 1.0;


    // Wanted thickness of final added cell layer. If multiple layers
    // is the thickness of the layer furthest away from the wall.
    // See relativeSizes parameter.
    finalLayerThickness 0.3;

    // Minimum thickness of cell layer. If for any reason layer
    // cannot be above minThickness do not add 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.
    // Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x)
    nGrow 0;


    // Advanced settings

    // When not to extrude surface. 0 is flat surface, 90 is when two faces
    // are perpendicular
    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;

    // Max number of iterations after which relaxed meshQuality controls
    // get used. Up to nRelaxIter it uses the settings in meshQualityControls,
    // after nRelaxIter it uses the values in meshQualityControls::relaxed.
    nRelaxedIter 20;
}



// 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 quality of the tet formed by the face-centre
    //  and variable base point minimum decomposition triangles and
    //  the cell centre.  Set to very negative number (e.g. -1E30) to
    //  disable.
    //     <0 = inside out tet,
    //      0 = flat tet
    //      1 = regular tet
    minTetQuality 1e-30;

    //- 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;

    //- if >0 : preserve single cells with all points on the surface if the
    //  resulting volume after snapping (by approximation) is larger than
    //  minVolCollapseRatio times old volume (i.e. not collapsed to flat cell).
    //  If <0 : delete always.
    //minVolCollapseRatio 0.5;


    // Advanced

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



    // Optional : some meshing phases allow usage of relaxed rules.
    // See e.g. addLayersControls::nRelaxedIter.
    relaxed
    {
        //- Maximum non-orthogonality allowed. Set to 180 to disable.
        maxNonOrtho 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;


// ************************************************************************* //
and here is my blockMeshDict :


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

convertToMeters 1;

vertices
(
    (-60 -50 -20)
    (60 -50 -20)
    (-60 -50 20)
    (60 -50 20)
    (-60 50 20)
    (60 50 20)
    (60 50 -20)
    (-60 50 -20)

);

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

edges
(
);

boundary
(
   
);

mergePatchPairs
(
);


// ************************************************************************* //
in the attachement please find my cylinder.stl file.

Could you please help to solve the problem ??

I need your support

Thanks
Attached Files
File Type: gz cylinder.stl.tar.gz (5.9 KB, 26 views)
Mirage12 is offline   Reply With Quote

Old   July 10, 2013, 02:17
Default
  #2
Member
 
Amin
Join Date: May 2013
Posts: 76
Rep Power: 13
Mirage12 is on a distinguished road
here is a part of the output of snappyHexMesh :

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.2.0-b363e8d14789
Exec   : snappyHexMesh
Date   : Jul 10 2013
Time   : 10:38:21
Host   : "BMH301562"
PID    : 5572
Case   : /home/abm5kor/snappy
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

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

Create mesh for time = 0

Read mesh in = 0.13 s

Overall mesh bounding box  : (-60 -50 -20) (60 50 20)
Relative tolerance         : 1e-06
Absolute matching distance : 0.000161245

Reading refinement surfaces.
Read refinement surfaces in = 0 s

Reading refinement shells.
Read refinement shells in = 0 s

Setting refinement level of surface to be consistent with shells.
Checked shell refinement in = 0 s

Reading features.
Read features in = 0 s


Determining initial surface intersections
-----------------------------------------

Edge intersection testing:
    Number of edges             : 56100
    Number of edges to retest   : 56100
    Number of intersected edges : 0
Calculated surface intersections in = 0.14 s

Initial mesh : cells:18000  faces:56100  points:20181
Cells per refinement level:
    0    18000

Adding patches for surface regions
----------------------------------

Patch    Type    Region
-----    ----    ------
cylinder:

1    wall    cylinder_CYLINDER

Added patches in = 0.01 s

Selecting decompositionMethod none

Refinement phase
----------------

--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 24425, 4(8881 8912 9873 9842), produces a valid tet decomposition.
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 24426, 4(8911 9872 9873 8912), produces a valid tet decomposition.
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 24427, 4(9841 9842 9873 9872), produces a valid tet decomposition.
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 21787, 4(8880 8881 8912 8911), produces a valid tet decomposition.

--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 54420, 4(4 35 36 5), produces a valid tet decomposition.
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 9, 4(4 35 996 965), produces a valid tet decomposition.
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 15, 4(6 37 998 967), produces a valid tet decomposition.
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 16, 4(36 997 998 37), produces a valid tet decomposition.

--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 20, 4(967 968 999 998), produces a valid tet decomposition.
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 53220, 4(6 7 968 967), produces a valid tet decomposition.
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 54480, 4(6 37 38 7), produces a valid tet decomposition.
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 15, 4(6 37 998 967), produces a valid tet decomposition.

--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 37, 4(43 1004 1005 44), produces a valid tet decomposition.
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 38, 4(973 974 1005 1004), produces a valid tet decomposition.
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 53340, 4(12 13 974 973), produces a valid tet decomposition.
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 54660, 4(12 43 44 13), produces a valid tet decomposition.
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 33, 4(12 43 1004 973), produces a valid tet decomposition.
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 39, 4(14 45 1006 975), produces a valid tet decomposition.
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 40, 4(44 1005 1006 45), produces a valid tet decomposition.
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 41, 4(974 975 1006 1005), produces a valid tet decomposition.
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 53360, 4(13 14 975 974), produces a valid tet decomposition.
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 54690, 4(13 44 45 14), produces a valid tet decomposition.
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 36, 4(13 44 1005 974), produces a valid tet decomposition.
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 42, 4(15 46 1007 976), produces a valid tet decomposition.
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 43, 4(45 1006 1007 46), produces a valid tet decomposition.
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 44, 4(975 976 1007 1006), produces a valid tet decomposition.
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 53380, 4(14 15 976 975), produces a valid tet decomposition.
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 54720, 4(14 45 46 15), produces a valid tet decomposition.
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 39, 4(14 45 1006 975), produces a valid tet decomposition.
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 45, 4(16 47 1008 977), produces a valid tet decomposition.
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 46, 4(46 1007 1008 47), produces a valid tet decomposition.
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 47, 4(976 977 1008 1007), produces a valid tet decomposition.
--> FOAM Warning : 
    From function Foam::List<Foam::tetIndices>  Foam::polyMeshTetDecomposition::faceTetIndices(const polyMesh&,  label, label)
    in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
    No base point for face 53400, 4(15 16 977 976), produces a valid tet decomposition.
--> FOAM Warning : Suppressing any further warnings.


--> FOAM FATAL ERROR: 
Point (-1 -1 -10) is not inside the mesh or on a face or edge.
Bounding box of the mesh:(-60 -50 -20) (60 50 20)

    From function refinementParameters::findCells(const polyMesh&) const
    in file autoHexMesh/autoHexMeshDriver/refinementParameters/refinementParameters.C at line 110.

FOAM exiting
Mirage12 is offline   Reply With Quote

Old   July 10, 2013, 07:21
Default
  #3
Member
 
Amin
Join Date: May 2013
Posts: 76
Rep Power: 13
Mirage12 is on a distinguished road
any idea ?

Last edited by Mirage12; July 15, 2013 at 05:41.
Mirage12 is offline   Reply With Quote

Old   July 21, 2013, 05:48
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Amin,

You could have posted the complete case ready for testing, instead of just attaching the STL file
In case you don't know, the following command:
Code:
foamCleanTutorials
can clean up a simulation case.

OK, first the "blockMeshDict": The order of the vertices was incorrect. You can run:
Code:
paraFoam -block
to see where in space the vertices are. The simplest strategy is to follow the same order as in the very first tutorial case that the OpenFOAM User Guide tells us about, namely "incompressible/icoFoam/cavity".

Then... then are a few problems:
  1. The base mesh does not have enough resolution where the cylinder is located. Therefore, snappyHexMesh is not able to see the cylinder properly.
  2. You've defined a "box" in the "geometry" section of "snappyHexMeshDict", but you're not using it anywhere else. If you had given it additional refinement, this would allow snappyHexMesh to see the cylinder properly.
  3. The location in mesh is located in the same cell as the cylinder, even though it's outside of the cylinder. This doesn't help, because snappyHexMesh is not able to tell the two apart, given that the base mesh does not have enough resolution.
Attached is the repaired "blockMeshDict", inside a ready to test case. I did not fix the rest, because I want you to learn for yourself

Best regards,
Bruno
Attached Files
File Type: gz cyl_test_case.tar.gz (11.5 KB, 53 views)
Ellie and Sparta like this.
__________________
wyldckat is offline   Reply With Quote

Old   April 10, 2014, 11:12
Default
  #5
New Member
 
Cheng Jie
Join Date: Nov 2011
Posts: 8
Rep Power: 14
jiec827 is on a distinguished road
the Hex(in blockMeshDict) must starts with the face at minX then the face at maxX

http://www.cfd-online.com/Forums/ope...-mesh-but.html

I have tried and succeed!
Good Luck
jiec827 is offline   Reply With Quote

Old   March 8, 2016, 08:53
Default locationInMesh insnappyHexMesh
  #6
New Member
 
Subhasree
Join Date: Mar 2014
Location: IIT Bombay, India
Posts: 25
Rep Power: 12
Subhasree is on a distinguished road
Hi Everyone,

I am using a basic rectangular box .stl file in snappyHexMesh but I am having some problem regarding the locationInMesh. I am attaching the case file. Can anyone tell me how do I proceed to find locationInMesh and also whats wrong with my case file?

Thanks in advance
Attached Files
File Type: gz box.tar.gz (5.5 KB, 11 views)

Last edited by Subhasree; March 8, 2016 at 08:54. Reason: missing attachment
Subhasree is offline   Reply With Quote

Old   March 8, 2016, 09:21
Default
  #7
New Member
 
Subhasree
Join Date: Mar 2014
Location: IIT Bombay, India
Posts: 25
Rep Power: 12
Subhasree is on a distinguished road
Hi Everyone!

There was some error in the snappyHexMesh file..I have corrected it and its working fine now. But I would still like to know how do we usually choose the locationInMesh...
Subhasree is offline   Reply With Quote

Old   March 13, 2016, 15:07
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by Subhasree View Post
But I would still like to know how do we usually choose the locationInMesh...
Quick answer:
  1. Open the STL geometry(ies) in ParaView.
  2. Then go to the menu "Sources -> Sphere".
  3. Hit the "Apply" button.
  4. Hit the "Zoom All" button (I can't remember the exact name).
  5. Move the 3D sphere into a location that is either inside or outside of your geometry, depending on which side you want to mesh.
  6. The "center" position of the sphere is the position you should then define in "snappyHexMeshDict".
__________________
wyldckat 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
metal hydride reactor simulation srj007 Fluent UDF and Scheme Programming 0 August 28, 2017 03:28
Define rotating point MichelD FLUENT 0 October 1, 2014 06:39
block-structured mesh for t-junction Robert@cfd ANSYS Meshing & Geometry 20 November 11, 2011 05:59
UDF carbon conversion papteo Fluent UDF and Scheme Programming 1 August 18, 2011 08:32
Missing math.h header Travis FLUENT 4 January 15, 2009 12:48


All times are GMT -4. The time now is 12:21.