CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[OpenFOAM] snappyHexMesh - can't open mesh in ParaView

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 11, 2015, 20:05
Default snappyHexMesh - can't open mesh in ParaView
  #1
New Member
 
Tiago Figueiró
Join Date: Mar 2015
Location: Porto, Portugal
Posts: 4
Rep Power: 11
tfigueiro is on a distinguished road
EDIT: This is now solved, I had a problem with paraview's pipeline options.

Hi,

I am trying to build a mesh with snappyHexMesh for the first time and I have been having a hard time. Right now I can't visualize the mesh in ParaView. I have attached a print screen so you can see what is happening.

Here's 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;    // make basic mesh ?
snap            true;    // decide to snap back to surface ?
addLayers       true;   // decide to add viscous layers ?


geometry // Load in STL files here
{
	caraMetros.stl {type triSurfaceMesh; name cara;}
	cabecaMetros.stl {type triSurfaceMesh; name cabeca;}
	portatilMetros.stl {type triSurfaceMesh; name portatil;}
	lampadaMetros.stl {type triSurfaceMesh; name lampada;}
	horizontalMetros.stl {type triSurfaceMesh; name horizontal;}
	extractorMetros.stl {type triSurfaceMesh; name extractor;}
	total1267Metros.stl {type triSurfaceMesh; name total1267;}
	refinementBox {type searchableBox; min (-0.1 0 0); max (5.1 4 3.1);}
};

castellatedMeshControls
{
    maxLocalCells 1000000;  //max cells per CPU core
    maxGlobalCells 2000000; //max cells to use before mesh deletion step
    minRefinementCells 10;  //was 0 - zero means no bad cells are allowed during refinement stages
    maxLoadUnbalance 0.10;
    nCellsBetweenLevels 1;  // expansion factor between each high & low refinement zone

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

    features // taken from STL from each .eMesh file created by "SurfaceFeatureExtract" command
    (
        {file "caraMetros.eMesh"; level 2;} 
        {file "cabecaMetros.eMesh"; level 2;} 
        {file "portatilMetros.eMesh"; level 2;} 
        {file "lampadaMetros.eMesh"; level 3;} 
        {file "horizontalMetros.eMesh"; level 3;}
        {file "extractorMetros.eMesh"; level 3;} 
        {file "total1267Metros.eMesh"; level 1;}
        
    );

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

    refinementSurfaces // Surface-wise min and max refinement level
    {
	total1267 {level (0 2);}
        portatil {level (1 3);}
	lampada {level (1 4);} 
	cabeca {level (1 2);}
	cara {level (1 2);}  
	horizontal {level (1 3);} // was 4 4
	extractor {level (1 3);} // was 4 4
    }  


    resolveFeatureAngle 30;  // Resolve sharp angles // Default 30
    refinementRegions        // In descending levels of fine-ness
    {
        cara {mode distance; levels ((0.05 2) (0.3 1));}
        cabeca {mode distance; levels ((0.1 1));}
        portatil {mode distance; levels ((0.1 1));}
        lampada {mode distance; levels ((0.05 2) (0.2 1));}
        horizontal {mode distance; levels ((0.05 2) (0.2 1));}
        extractor {mode distance; levels ((0.05 2) (0.2 1));}
    } // was ((0.001 4) (0.003 3) (0.01 2))
    locationInMesh (2 0.1 0.1);  //to decide which side of mesh to keep **
    allowFreeStandingZoneFaces true;
}


// Settings for the snapping.
snapControls
{
    nSmoothPatch 3;
    tolerance 5;
    nSolveIter 15;
    nRelaxIter 5;
    //nFeatureSnapIter 15; // default is 10
    
// New settings from openfoam 2.2 onwards for SHMesh

implicitFeatureSnap false; // default is false - detects without doing surfaceFeatureExtract
explicitFeatureSnap true; // default is true
multiRegionFeatureSnap false; // deafault is false - detects features between multiple surfaces

}



// Settings for the layer addition.
addLayersControls //add the PATCH names from inside the STL file so STLpatchName_insideSTLName 
{
    relativeSizes false; // was true
    layers
    {
	cara
         	{nSurfaceLayers 1;} // was 3
	cabeca 
		{nSurfaceLayers 1;} // was 3
	portatil
		{nSurfaceLayers 1;} // was 3
	lampada
		{nSurfaceLayers 1;} // was 3
	horizontal
		{nSurfaceLayers 1;} // was 3
	extractor
		{nSurfaceLayers 1;} // was 3
    }

    expansionRatio 3;
    finalLayerThickness 0.1; //was 0.00016
    minThickness 0.02; //was 0.00008
    nGrow 0; // was 1 


    // Advanced settings

    featureAngle 80; // was 70 //- When not to extrude surface. 0 is flat, 90 is right angle.
    nRelaxIter 8;  //- Max# of snapping relaxation iter. Should stop before upon reaching a correct mesh.
    nSmoothSurfaceNormals 30;  // Number of smoothing iterations of surface normals
    nSmoothNormals 30; // Number of smoothing iterations of interior mesh movement direction
    nSmoothThickness 10;  // Smooth layer thickness over surface patches
    maxFaceThicknessRatio 0.5; // Stop layer growth on highly warped cells
    maxThicknessToMedialRatio 0.3; // Reduce layer growth where ratio thickness to medial distance is large
    minMedianAxisAngle 90;  // Angle used to pick up medial axis points. Was 130
    nBufferCellsNoExtrude 0;   // Create buffer region for new layer terminations
    nLayerIter 30; // Overall max number of layer addition iterations
}



// Generic mesh quality settings. At any undoable phase these determine
// where to undo.
meshQualityControls
{
    maxNonOrtho 65;
    maxBoundarySkewness 20;
    maxInternalSkewness 4;
    maxConcave 80;
    minFlatness 0.5;
    minVol 1e-10;
    minTetQuality 1e-9;
    minArea -1;
    minTwist 0.02;
    minDeterminant 0.001;
    minFaceWeight 0.02;
    minVolRatio 0.01;
    minTriangleTwist -1;

    // Advanced

    nSmoothScale 4;
    errorReduction 0.75;
}

// Advanced

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;


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

Here is a checkMesh:

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.3.1-262087cdf8db
Exec   : checkMesh
Date   : Jun 11 2015
Time   : 23:59:51
Host   : "tiago-SATELLITE-L50-B"
PID    : 4858
Case   : /home/tiago/OpenFOAM/OpenFOAM-2.3.1/run/mesh2-scheme1-simple
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 polyMesh for time = 0

Time = 0

Mesh stats
    points:           267121
    faces:            640842
    internal faces:   571295
    cells:            187774
    faces per cell:   6.4553
    boundary patches: 8
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     135573
    prisms:        13326
    wedges:        20
    pyramids:      0
    tet wedges:    153
    tetrahedra:    2
    polyhedra:     38700
    Breakdown of polyhedra by number of faces:
        faces   number of cells
            4   102
            5   723
            6   11536
            7   376
            8   416
            9   18689
           10   8
           11   161
           12   6111
           14   49
           15   483
           16   1
           17   11
           18   34

Checking topology...
    Boundary definition OK.
    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
                    zMin    14333    15131  ok (non-closed singly connected)
                    cara       42       56  ok (non-closed singly connected)
                  cabeca      190      216  ok (non-closed singly connected)
                portatil      184      232  ok (non-closed singly connected)
                 lampada     2668     3159  ok (non-closed singly connected)
              horizontal       87      126  ok (non-closed singly connected)
               extractor       86      124  ok (non-closed singly connected)
               total1267    51957    54368  ok (non-closed singly connected)

Checking geometry...
    Overall domain bounding box (-0.100011 -0.000417249 -2.59386e-05) (5.10024 4.00042 3.10024)
    Mesh (non-empty, non-wedge) directions (1 1 1)
    Mesh (non-empty) directions (1 1 1)
    Boundary openness (-2.98601e-16 -4.3793e-16 3.72026e-16) OK.
    Max cell openness = 3.51616e-16 OK.
    Max aspect ratio = 4.83178 OK.
    Minimum face area = 1.65398e-05. Maximum face area = 0.0123264.  Face area magnitudes OK.
    Min volume = 4.15624e-08. Max volume = 0.00117145.  Total volume = 62.3149.  Cell volumes OK.
    Mesh non-orthogonality Max: 64.0876 average: 12.9123
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 2.62111 OK.
    Coupled point location match (average 0) OK.

Mesh OK.

End
Here is a link for my STL files:
https://www.dropbox.com/s/ifub0jl0z1...es.tar.gz?dl=0


Could someone please tell me wether there is something obviously wrong with what I am doing?

Thank you so much in advance for your time and attention.

Tiago Figueiró
Attached Images
File Type: jpg Screenshot from 2015-06-11 23:57:27.jpg (38.5 KB, 31 views)

Last edited by tfigueiro; June 12, 2015 at 05:48.
tfigueiro 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
[swak4Foam] swak4foam for OpenFOAM 4.0 mnikku OpenFOAM Community Contributions 80 May 17, 2022 09:06
[swak4Foam] Installation Problem with OF 6 version Aurel OpenFOAM Community Contributions 14 November 18, 2020 17:18
[foam-extend.org] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 ordinary OpenFOAM Installation 19 September 3, 2019 19:13
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 10:38
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55


All times are GMT -4. The time now is 13:45.