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

[snappyHexMesh] SnappyHexMesh for internal Flow

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

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 15, 2009, 22:53
Question SnappyHexMesh for internal Flow
  #1
Member
 
vishwanath somashekar
Join Date: Apr 2009
Posts: 41
Rep Power: 16
vishwa is on a distinguished road
Hi all,
I have taken a look at the tutorial in OF user's guide...I managed to run it without any issues.

My model is a pipe of diameter D. I made the cylinder using a CAD program in this case, SolidWorks. I then exported the model as a STL file.

I have a question here.. How do I name the inlet and outlet of the pipe for using them as boundaries later in OF?

Now, I need to make a box using blockMesh with encloses the pipe geometry. Which I something I have no trouble doing. The next thing is the user guide is written for an external flow. If I understand the guide correctly, to mesh the inside of the pipe in my case, the locationInMesh should be point inside the pipe. Am I right?

Best Regards,
Vishwa
vishwa is offline   Reply With Quote

Old   November 16, 2009, 21:18
Default
  #2
Member
 
vishwanath somashekar
Join Date: Apr 2009
Posts: 41
Rep Power: 16
vishwa is on a distinguished road
Hi,
I hope that I will find the solution to my problem using snappyhexmesh. To make a test run, I made a cube of dimension 1mm center at the origin. I saved this as a stl file and then in the blockMeshDict, I made the mesh for 2mm cube centered around the origin. for the locationInmesh, I gave 0,0,0 as i want the mesh for the inner cube.

When I run the snappyhexmesh tool after the blockmesh, i don't get any errors, but i get a message saying

Marked for refinement due to refinement shells : 0 cells.

I am not sure what is it that I am missing.

Any help would be helpful.

Regards,
vishwa
vishwa is offline   Reply With Quote

Old   November 16, 2009, 22:44
Default
  #3
Member
 
Stephen
Join Date: Mar 2009
Posts: 40
Rep Power: 17
basilwatson is on a distinguished road
Vishwa

CAELINUX has a tutorial about flow in a Y shaped pipe it doesnt use SnappyHexmesh but may be of some help

Let me know if you cant find it ,,,I have it somewhere

Stephen
basilwatson is offline   Reply With Quote

Old   November 16, 2009, 22:55
Default
  #4
Member
 
vishwanath somashekar
Join Date: Apr 2009
Posts: 41
Rep Power: 16
vishwa is on a distinguished road
Hi Stephen,
I did look at the tutorial and i didn't have any problems making the 3D object.

I then followed tutorial where you can pick the faces that you want to use may be like boundaries and use the explode command.

All this went well. I exported it as an stl. I had no control over how many triangles it uses for the given geometry, nevertheless, i was able to export.

I then made the outbox using blockMesh and it surrounded the the geometry that i made in SALOME.

Now when i pick the locationInMesh like 0,0,0 which is the center of the cube that I made in SALOME, i get the message says no cells selected. I am sure this must be something simple that I have missed up..but can't figure out what that is..

If it helps, I can just paste the stl files, blockMesh and the snappyhexMeshdict here..

Regards,
vishwa
vishwa is offline   Reply With Quote

Old   November 16, 2009, 23:12
Default
  #5
Member
 
vishwanath somashekar
Join Date: Apr 2009
Posts: 41
Rep Power: 16
vishwa is on a distinguished road
Hi, here is the posting of blockMesh, snappyhexmeshdict and the log file when i ran snappy

BlockMeshDict
Quote:
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/

FoamFile
{
version 2.0;
format ascii;

root "";
case "";
instance "";
local "";

class dictionary;
object blockMeshDict;
}

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


convertToMeters 0.001;

vertices
(

(-1 -1 -1)
( 1 -1 -1)
( 1 1 -1)
(-1 1 -1)
(-1 -1 1)
( 1 -1 1)
( 1 1 1)
(-1 1 1)
);

blocks
(
hex (0 1 2 3 4 5 6 7) (21 11 9) simpleGrading (1 1 1)
);

edges
(
);

patches
(

);

// ************************************************** *********************** //
BlockMeshLog

Quote:
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 1.6.x-5a9d3db7b7f0
Exec : blockMesh
Date : Nov 16 2009
Time : 21:05:40
Host : olivegarden
PID : 23082
Case : /home/dagarshali/Desktop/untitled
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

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


Creating block mesh from
"/home/dagarshali/Desktop/untitled/constant/polyMesh/blockMeshDict"


Creating blockCorners

Creating curved edges

Creating blocks

Creating patches

Creating block mesh topology

Default patch type set to empty
--> FOAM Warning :
From function polyMesh:olyMesh(... construct from shapes...)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 577
Found 6 undefined faces in mesh; adding to default patch.

Check block mesh topology

Basic statistics
Number of internal faces : 0
Number of boundary faces : 6
Number of defined boundary faces : 6
Number of undefined boundary faces : 0

Checking patch -> block consistency

Creating block offsets

Creating merge list .

Creating points with scale 0.001

Creating cells

Creating patches

Creating mesh from block mesh

Default patch type set to empty

There are no merge patch pairs edges

Writing polyMesh

End

SnappyhexmeshDict


Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://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
{
cube.stl
{
type triSurfaceMesh;
name cube;
}


};



// Settings for the castellatedMesh generation.
castellatedMeshControls
{

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

// While refining maximum number of cells per processor. This is basically
// the number of cells that fit on a processor. If you choose this too small
// it will do just more refinement iterations to obtain a similar mesh.
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 10;

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



// 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
(
//{
// file "someLine.eMesh";
// level 2;
//}
);



// 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
{
cube
{
// Surface-wise min and max refinement level
level (5 6);
}


}

// Resolve sharp angles
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 4));
}*/
}


// 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 (0.00025 0.00001 0.00012);
// locationInMesh (3 3 0.43);
}



// 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
{
relativeSizes true;

// Per final patch (so not geometry!) the layer information
layers
{
minZ
{
nSurfaceLayers 1;
}
motorBike_frt-fairing:001%1
{
nSurfaceLayers 1;
}
motorBike_windshield:002%2
{
nSurfaceLayers 1;
}
motorBike_rr-wh-rim:005%5
{
nSurfaceLayers 1;
}
motorBike_rr-wh-rim:010%10
{
nSurfaceLayers 1;
}
motorBike_fr-wh-rim:011%11
{
nSurfaceLayers 1;
}
motorBike_fr-wh-brake-disk:012%12
{
nSurfaceLayers 1;
}
motorBike_frame:016-shadow%13
{
nSurfaceLayers 1;
}
motorBike_rear-susp:014%14
{
nSurfaceLayers 1;
}
motorBike_rear-susp:014-shadow%15
{
nSurfaceLayers 1;
}
motorBike_frame:016%16
{
nSurfaceLayers 1;
}
motorBike_rr-wh-rim:005-shadow%17
{
nSurfaceLayers 1;
}
motorBike_rr-wh-chain-hub:022%22
{
nSurfaceLayers 1;
}
motorBike_rearseat%24
{
nSurfaceLayers 1;
}
motorBike_frt-fairing%25
{
nSurfaceLayers 1;
}
motorBike_windshield%26
{
nSurfaceLayers 1;
}
motorBike_headlights%27
{
nSurfaceLayers 1;
}
motorBike_driversseat%28
{
nSurfaceLayers 1;
}
motorBike_rear-body%29
{
nSurfaceLayers 1;
}
motorBike_fuel-tank%30
{
nSurfaceLayers 1;
}
motorBike_exhaust%31
{
nSurfaceLayers 1;
}
motorBike_rr-wh-rim%32
{
nSurfaceLayers 1;
}
motorBike_fr-mud-guard%33
{
nSurfaceLayers 1;
}
motorBike_fr-wh-rim%34
{
nSurfaceLayers 1;
}
motorBike_fr-wh-brake-disk%35
{
nSurfaceLayers 1;
}
motorBike_fr-brake-caliper%36
{
nSurfaceLayers 1;
}
motorBike_fr-wh-tyre%37
{
nSurfaceLayers 1;
}
motorBike_hbars%38
{
nSurfaceLayers 1;
}
motorBike_fr-forks%39
{
nSurfaceLayers 1;
}
motorBike_chain%40
{
nSurfaceLayers 1;
}
motorBike_rr-wh-tyre%41
{
nSurfaceLayers 1;
}
motorBike_square-dial%42
{
nSurfaceLayers 1;
}
motorBike_round-dial%43
{
nSurfaceLayers 1;
}
motorBike_dial-holder%44
{
nSurfaceLayers 1;
}
motorBike_rear-susp%45
{
nSurfaceLayers 1;
}
motorBike_rear-brake-lights%46
{
nSurfaceLayers 1;
}
motorBike_rear-light-bracket%47
{
nSurfaceLayers 1;
}
motorBike_frame%48
{
nSurfaceLayers 1;
}
motorBike_rear-mud-guard%49
{
nSurfaceLayers 1;
}
motorBike_rear-susp-spring-damp%50
{
nSurfaceLayers 1;
}
motorBike_fairing-inner-plate%51
{
nSurfaceLayers 1;
}
motorBike_clutch-housing%52
{
nSurfaceLayers 1;
}
motorBike_radiator%53
{
nSurfaceLayers 1;
}
motorBike_water-pipe%54
{
nSurfaceLayers 1;
}
motorBike_water-pump%55
{
nSurfaceLayers 1;
}
motorBike_engine%56
{
nSurfaceLayers 1;
}
motorBike_rear-shock-link%57
{
nSurfaceLayers 1;
}
motorBike_rear-brake-fluid-pot-bracket%58
{
nSurfaceLayers 1;
}
motorBike_rear-brake-fluid-pot%59
{
nSurfaceLayers 1;
}
motorBike_footpeg%60
{
nSurfaceLayers 1;
}
motorBike_rr-wh-chain-hub%61
{
nSurfaceLayers 1;
}
motorBike_rear-brake-caliper%62
{
nSurfaceLayers 1;
}
motorBike_rider-helmet%65
{
nSurfaceLayers 1;
}
motorBike_rider-visor%66
{
nSurfaceLayers 1;
}
motorBike_rider-boots%67
{
nSurfaceLayers 1;
}
motorBike_rider-gloves%68
{
nSurfaceLayers 1;
}
motorBike_rider-body%69
{
nSurfaceLayers 1;
}
motorBike_frame:0%70
{
nSurfaceLayers 1;
}
motorBike_frt-fairing:001-shadow%74
{
nSurfaceLayers 1;
}
motorBike_windshield-shadow%75
{
nSurfaceLayers 1;
}
motorBike_fr-mud-guard-shadow%81
{
nSurfaceLayers 1;
}
motorBike_fr-wh-brake-disk-shadow%83
{
nSurfaceLayers 1;
}
motorBike_rear-mud-guard-shadow%84
{
nSurfaceLayers 1;
}
motorBike_rear-susp-spring-damp-shadow%85
{
nSurfaceLayers 1;
}
motorBike_radiator-shadow%86
{
nSurfaceLayers 1;
}
motorBike_rear-shock-link-shadow%87
{
nSurfaceLayers 1;
}
motorBike_rear-brake-fluid-pot-bracket-shadow%88
{
nSurfaceLayers 1;
}
motorBike_rr-wh-chain-hub-shadow%89
{
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.
// Relative to undistorted size of cell outside layer.
finalLayerThickness 0.3;

//- 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.
minThickness 0.1;

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


// Advanced settings

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

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

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

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

// Overall max number of layer addition iterations
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 projected area v.s. actual area. Set to -1 to disable.
minFlatness 0.5;

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

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

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

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

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

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


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


// ************************************************** *********************** //
Best Regards,
Vishwa
vishwa is offline   Reply With Quote

Old   November 16, 2009, 23:12
Default part2 containing snappy log and stl file
  #6
Member
 
vishwanath somashekar
Join Date: Apr 2009
Posts: 41
Rep Power: 16
vishwa is on a distinguished road
SnappyHexmesh log
Quote:
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 1.6.x-5a9d3db7b7f0
Exec : snappyHexMesh
Date : Nov 16 2009
Time : 21:06:22
Host : olivegarden
PID : 23099
Case : /home/dagarshali/Desktop/untitled
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

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

Create mesh for time = 0

Read mesh in = 0.04 s

Overall mesh bounding box : (-0.001 -0.001 -0.001) (0.001 0.001 0.001)
Relative tolerance : 1e-06
Absolute matching distance : 3.4641e-09

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


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

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

Initial mesh : cells:2079 faces:6756 points:2640
Cells per refinement level:
0 2079

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

Patch Region
----- ------
cube:

1 cube_solid

Added patches in = 0 s

Selecting decompositionMethod hierarchical

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

Found point (0.00025 1e-05 0.00012) in cell 1273 on processor 0
Reading external feature lines.
Read feature lines in = 0 s


Surface refinement iteration 0
------------------------------

Marked for refinement due to surface intersection : 0 cells.
Marked for refinement due to curvature/regions : 0 cells.
Determined cells to refine in = 0 s
Selected for refinement : 0 cells (out of 2079)
Stopping refining since too few cells selected.


Removing mesh beyond surface intersections
------------------------------------------

Found point (0.00025 1e-05 0.00012) in cell 1273 in global region 0 out of 1 regions.
Keeping all cells in region 0 containing point (0.00025 1e-05 0.00012)
Selected for keeping : 2079 cells.
Edge intersection testing:
Number of edges : 6756
Number of edges to retest : 0
Number of intersected edges : 0

Shell refinement iteration 0
----------------------------

Marked for refinement due to refinement shells : 0 cells.
Determined cells to refine in = 0.02 s
Selected for internal refinement : 0 cells (out of 2079)
Stopping refining since too few cells selected.


Splitting mesh at surface intersections
---------------------------------------

Introducing baffles for 0 faces that are intersected by the surface.

Edge intersection testing:
Number of edges : 6756
Number of edges to retest : 0
Number of intersected edges : 0
Created baffles in = 0.01 s


After introducing baffles : cells:2079 faces:6756 points:2640
Cells per refinement level:
0 2079

Introducing baffles to block off problem cells
----------------------------------------------

markFacesOnProblemCells : marked 0 additional internal faces to be converted into baffles.
Analyzed problem cells in = 0.01 s


Introducing baffles to delete problem cells.

Edge intersection testing:
Number of edges : 6756
Number of edges to retest : 0
Number of intersected edges : 0
Created baffles in = 0.01 s


After introducing baffles : cells:2079 faces:6756 points:2640
Cells per refinement level:
0 2079

Remove unreachable sections of mesh
-----------------------------------

Keeping all cells in region 0 containing point (0.00025 1e-05 0.00012)
Selected for keeping : 2079 cells.
Edge intersection testing:
Number of edges : 6756
Number of edges to retest : 0
Number of intersected edges : 0
Split mesh in = 0.01 s


After subsetting : cells:2079 faces:6756 points:2640
Cells per refinement level:
0 2079

Handling cells with snap problems
---------------------------------

Introducing baffles for 0 faces that are intersected by the surface.

Edge intersection testing:
Number of edges : 6756
Number of edges to retest : 0
Number of intersected edges : 0
Created baffles in = 0.01 s


After introducing baffles : cells:2079 faces:6756 points:2640
Cells per refinement level:
0 2079

Introducing baffles to block off problem cells
----------------------------------------------

markFacesOnProblemCells : marked 0 additional internal faces to be converted into baffles.
Analyzed problem cells in = 0.01 s


Introducing baffles to delete problem cells.

Edge intersection testing:
Number of edges : 6756
Number of edges to retest : 0
Number of intersected edges : 0
Created baffles in = 0.01 s


After introducing baffles : cells:2079 faces:6756 points:2640
Cells per refinement level:
0 2079

Remove unreachable sections of mesh
-----------------------------------

Keeping all cells in region 0 containing point (0.00025 1e-05 0.00012)
Selected for keeping : 2079 cells.
Edge intersection testing:
Number of edges : 6756
Number of edges to retest : 0
Number of intersected edges : 0
Split mesh in = 0.01 s


After subsetting : cells:2079 faces:6756 points:2640
Cells per refinement level:
0 2079
dupNonManifoldPoints : Found : 0 non-manifold points (out of 2640)
Edge intersection testing:
Number of edges : 6756
Number of edges to retest : 0
Number of intersected edges : 0
getDuplicateFaces : found 0 pairs of duplicate faces.

Detected unsplittable baffles : 0

Merge refined boundary faces
----------------------------

mergePatchFaces : Merging 0 sets of faces.
Removing 0 straight edge points.
Refined mesh : cells:2079 faces:6756 points:2640
Cells per refinement level:
0 2079
Writing mesh to time 1
Written mesh in = 0.08 s.
Mesh refined in = 0.18 s.

Morphing phase
--------------

Constructing mesh displacer ...
Using mesh parameters
{
maxNonOrtho 65;
maxBoundarySkewness 20;
maxInternalSkewness 4;
maxConcave 80;
minFlatness 0.5;
minVol 1e-13;
minArea -1;
minTwist 0.02;
minDeterminant 0.001;
minFaceWeight 0.02;
minVolRatio 0.01;
minTriangleTwist -1;
nSmoothScale 4;
errorReduction 0.75;
}


Checking initial mesh ...
Checking faces in error :
non-orthogonality > 65 degrees : 0
faces with face pyramid volume < 1e-13 : 0
faces with concavity > 80 degrees : 0
faces with skewness > 4 (internal) or 20 (boundary) : 0
faces with interpolation weights (0..1) < 0.02 : 0
faces with volume ratio of neighbour cells < 0.01 : 0
faces with face twist < 0.02 : 0
faces on cells with determinant < 0.001 : 0
Detected 0 illegal faces (concave, zero area or negative cell pyramid volume)
Checked initial mesh in = 0.01 s


Smoothing patch points ...
Smoothing iteration 0
Found 0 non-mainfold point(s).

Scaling iteration 0
Moving mesh using diplacement scaling : min:1 max:1
Checking faces in error :
non-orthogonality > 65 degrees : 0
faces with face pyramid volume < 1e-13 : 0
faces with concavity > 80 degrees : 0
faces with skewness > 4 (internal) or 20 (boundary) : 0
faces with interpolation weights (0..1) < 0.02 : 0
faces with volume ratio of neighbour cells < 0.01 : 0
faces with face twist < 0.02 : 0
faces on cells with determinant < 0.001 : 0
Successfully moved mesh

Smoothing iteration 1
Found 0 non-mainfold point(s).

Scaling iteration 0
Moving mesh using diplacement scaling : min:1 max:1
Checking faces in error :
non-orthogonality > 65 degrees : 0
faces with face pyramid volume < 1e-13 : 0
faces with concavity > 80 degrees : 0
faces with skewness > 4 (internal) or 20 (boundary) : 0
faces with interpolation weights (0..1) < 0.02 : 0
faces with volume ratio of neighbour cells < 0.01 : 0
faces with face twist < 0.02 : 0
faces on cells with determinant < 0.001 : 0
Successfully moved mesh

Smoothing iteration 2
Found 0 non-mainfold point(s).

Scaling iteration 0
Moving mesh using diplacement scaling : min:1 max:1
Checking faces in error :
non-orthogonality > 65 degrees : 0
faces with face pyramid volume < 1e-13 : 0
faces with concavity > 80 degrees : 0
faces with skewness > 4 (internal) or 20 (boundary) : 0
faces with interpolation weights (0..1) < 0.02 : 0
faces with volume ratio of neighbour cells < 0.01 : 0
faces with face twist < 0.02 : 0
faces on cells with determinant < 0.001 : 0
Successfully moved mesh

Patch points smoothed in = 0.05 s


Calculating patchDisplacement as distance to nearest surface point ...
Calculated surface displacement in = 0 s


Smoothing displacement ...
Iteration 0
Iteration 10
Iteration 20
Displacement smoothed in = 0.01 s


Moving mesh ...

Iteration 0
Moving mesh using diplacement scaling : min:1 max:1
Checking faces in error :
non-orthogonality > 65 degrees : 0
faces with face pyramid volume < 1e-13 : 0
faces with concavity > 80 degrees : 0
faces with skewness > 4 (internal) or 20 (boundary) : 0
faces with interpolation weights (0..1) < 0.02 : 0
faces with volume ratio of neighbour cells < 0.01 : 0
faces with face twist < 0.02 : 0
faces on cells with determinant < 0.001 : 0
Successfully moved mesh
Moved mesh in = 0.02 s


Repatching faces according to nearest surface ...
Repatched 0 faces in = 0 s


Edge intersection testing:
Number of edges : 6756
Number of edges to retest : 3532
Number of intersected edges : 0
Snapped mesh : cells:2079 faces:6756 points:2640
Cells per refinement level:
0 2079
Writing mesh to time 2
Written mesh in = 0.06 s.
Mesh snapped in = 0.15 s.
Finished meshing in = 0.41 s.
End
STL file

solid
facet normal -1.000000e+00 -0.000000e+00 -0.000000e+00
outer loop
vertex -5.000000e-01 5.000000e-01 5.000000e-01
vertex -5.000000e-01 5.000000e-01 -5.000000e-01
vertex -5.000000e-01 -5.000000e-01 -5.000000e-01
endloop
endfacet
facet normal -1.000000e+00 0.000000e+00 0.000000e+00
outer loop
vertex -5.000000e-01 -5.000000e-01 -5.000000e-01
vertex -5.000000e-01 -5.000000e-01 5.000000e-01
vertex -5.000000e-01 5.000000e-01 5.000000e-01
endloop
endfacet
facet normal 1.000000e+00 0.000000e+00 0.000000e+00
outer loop
vertex 5.000000e-01 -5.000000e-01 -5.000000e-01
vertex 5.000000e-01 5.000000e-01 -5.000000e-01
vertex 5.000000e-01 5.000000e-01 5.000000e-01
endloop
endfacet
facet normal 1.000000e+00 0.000000e+00 0.000000e+00
outer loop
vertex 5.000000e-01 5.000000e-01 5.000000e-01
vertex 5.000000e-01 -5.000000e-01 5.000000e-01
vertex 5.000000e-01 -5.000000e-01 -5.000000e-01
endloop
endfacet
facet normal 0.000000e+00 -1.000000e+00 0.000000e+00
outer loop
vertex -5.000000e-01 -5.000000e-01 5.000000e-01
vertex -5.000000e-01 -5.000000e-01 -5.000000e-01
vertex 5.000000e-01 -5.000000e-01 -5.000000e-01
endloop
endfacet
facet normal 0.000000e+00 -1.000000e+00 0.000000e+00
outer loop
vertex 5.000000e-01 -5.000000e-01 -5.000000e-01
vertex 5.000000e-01 -5.000000e-01 5.000000e-01
vertex -5.000000e-01 -5.000000e-01 5.000000e-01
endloop
endfacet
facet normal 0.000000e+00 1.000000e+00 -0.000000e+00
outer loop
vertex 5.000000e-01 5.000000e-01 -5.000000e-01
vertex -5.000000e-01 5.000000e-01 -5.000000e-01
vertex -5.000000e-01 5.000000e-01 5.000000e-01
endloop
endfacet
facet normal -0.000000e+00 1.000000e+00 0.000000e+00
outer loop
vertex -5.000000e-01 5.000000e-01 5.000000e-01
vertex 5.000000e-01 5.000000e-01 5.000000e-01
vertex 5.000000e-01 5.000000e-01 -5.000000e-01
endloop
endfacet
facet normal 0.000000e+00 0.000000e+00 -1.000000e+00
outer loop
vertex 5.000000e-01 -5.000000e-01 -5.000000e-01
vertex -5.000000e-01 -5.000000e-01 -5.000000e-01
vertex -5.000000e-01 5.000000e-01 -5.000000e-01
endloop
endfacet
facet normal 0.000000e+00 0.000000e+00 -1.000000e+00
outer loop
vertex -5.000000e-01 5.000000e-01 -5.000000e-01
vertex 5.000000e-01 5.000000e-01 -5.000000e-01
vertex 5.000000e-01 -5.000000e-01 -5.000000e-01
endloop
endfacet
facet normal -0.000000e+00 0.000000e+00 1.000000e+00
outer loop
vertex -5.000000e-01 5.000000e-01 5.000000e-01
vertex -5.000000e-01 -5.000000e-01 5.000000e-01
vertex 5.000000e-01 -5.000000e-01 5.000000e-01
endloop
endfacet
facet normal 0.000000e+00 -0.000000e+00 1.000000e+00
outer loop
vertex 5.000000e-01 -5.000000e-01 5.000000e-01
vertex 5.000000e-01 5.000000e-01 5.000000e-01
vertex -5.000000e-01 5.000000e-01 5.000000e-01
endloop
endfacet
endsolid

Sorry for the really long post..

Regards,
Vishwa
vishwa is offline   Reply With Quote

Old   November 19, 2009, 15:21
Default
  #7
Senior Member
 
Elvis
Join Date: Mar 2009
Location: Sindelfingen, Germany
Posts: 620
Blog Entries: 6
Rep Power: 24
elvis will become famous soon enough
Dear Vishwa,

I have no experiance with snappyhex for meshing an internal flow,
but at the last Stammtisch in Stuttgart there was an engrid presentation
http://78.140.120.226/cms/index.php?id=4 or http://sourceforge.net/projects/engrid/
it is opensource with some funding by esa.

It uses STL as CAD source as well. You have sometimes to use Blender (or it makes meshing easier using blender to select Inlets/outlets etc.). But it is quite powerful as the developer pointet out. Maybe you can ask for the presentation (to evalueate capabilaties) from the stuttgart stammtisch if you ask => info[at]engits.com

Or just install via script see more http://78.140.120.226/phpBB3/viewtopic.php?f=2&t=62

hope this helps

elvis
elvis is offline   Reply With Quote

Old   January 12, 2010, 10:10
Default
  #8
Senior Member
 
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 17
idrama is on a distinguished road
Hello Vishwa,

I found your posts because I am facing the same problem. I want to ask if you have made it to get snappyHexMesh for internal flows going. If so, I want to please you if you could send me or post your snappyHexMeshDict. I want to learn from it.

Thanks a lot in advance!

Claus
idrama is offline   Reply With Quote

Old   January 12, 2010, 21:00
Default
  #9
Senior Member
 
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 17
idrama is on a distinguished road
Hey folks! Is me again!

Should anybody how to mesh a inter flow, e.g. pipe, with snappyHexMesh please post the procedure to follow. I have the problem: When I have meshed with snappy a pipe then the pipe is meshed, but also the environment. What did I wrong?

Cheers,

Claus
idrama is offline   Reply With Quote

Old   January 13, 2010, 14:17
Default
  #10
Senior Member
 
Francesco Del Citto
Join Date: Mar 2009
Location: Zürich Area, Switzerland
Posts: 237
Rep Power: 18
fra76 is on a distinguished road
snappyHexMesh keeps everything that is connected to the point you specify. If the pipe is opened, then it keeps everything.
Close the pipe with two surfaces (STL) and you should get only the internal mesh.

Francesco
linda Li likes this.
fra76 is offline   Reply With Quote

Old   January 13, 2010, 19:30
Default
  #11
Senior Member
 
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 17
idrama is on a distinguished road
I do not understand!

I generated a pipe (cylinder) in SALOME an exported it via STL to OpenFOAM. In the blockMeshDict I specified a box just around the cylinder. In the snappyHexMeshDict I set locationInMesh to a point which is definitly in the cylinder. After running the snappyHexMesh -overwrite proceuder I obtain the mesh cylinder sourrounded by the box specefied in blockMeshDict which was also totally meshed. Have I properly set the box around the cylinder (pipe) wrong?

Cheers,

Claus
idrama is offline   Reply With Quote

Old   January 14, 2010, 01:15
Default
  #12
New Member
 
amgode's Avatar
 
Amol
Join Date: Jul 2009
Location: Limerick, Ireland
Posts: 24
Blog Entries: 2
Rep Power: 16
amgode is on a distinguished road
@ Claus Meister

I think
Francesco answered your question..........

Just to rephrase
If the surfaces to me meshed form a closed region then you won't get the mesh outside the cylinder, assuming that locationInMesh is a point inside the cylinder....



-- Amol

amgode is offline   Reply With Quote

Old   January 14, 2010, 04:07
Default
  #13
Senior Member
 
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 17
idrama is on a distinguished road
Hey folks!

I fixed the problem. I reduced in my blockMeshDict the numbers of cells for each direction in the box then I ran snappy again and I had my desired result. More precisely at first I had:

hex (0 1 2 3 4 5 6 7) (40 40 80) simpleGrading (1 1 1)

end now:

hex (0 1 2 3 4 5 6 7) (10 10 10) simpleGrading (1 1 1)


Cheers,

Claus
idrama is offline   Reply With Quote

Old   January 14, 2010, 14:57
Default
  #14
Senior Member
 
Francesco Del Citto
Join Date: Mar 2009
Location: Zürich Area, Switzerland
Posts: 237
Rep Power: 18
fra76 is on a distinguished road
I guess you have a gap (even a tiny gap) between the STL of your cylinder side and the caps at the two ends of it. Or you did not have the caps at all!

But at least you have your mesh now, if you are happy with it...

Francesco
fra76 is offline   Reply With Quote

Old   January 15, 2010, 15:17
Default
  #15
Senior Member
 
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 17
idrama is on a distinguished road
Not total!

Whats left to do is to assign the patches at the right places. That's gonna be the next level to make it.

Cheers,

Claus
idrama is offline   Reply With Quote

Old   January 15, 2010, 17:57
Default
  #16
Senior Member
 
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 17
idrama is on a distinguished road
Hey folks!

Could anybody explain how I can delete the patches for bounding box which was defined via blockMeshDict. If not, you can I handle it?

Kinda regards

Claus
idrama is offline   Reply With Quote

Old   January 16, 2010, 04:21
Default
  #17
Senior Member
 
Francesco Del Citto
Join Date: Mar 2009
Location: Zürich Area, Switzerland
Posts: 237
Rep Power: 18
fra76 is on a distinguished road
If they are empty (0 faces in them), a possible solution is to edit polyMesh/boundary file and delete the entries (do not forget to update the number of the patches at the top of the list).

Francesco
fra76 is offline   Reply With Quote

Old   January 16, 2010, 05:15
Default
  #18
Senior Member
 
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 17
idrama is on a distinguished road
Hello Francesco,

I did so, but the next problem was that I got an error message by using of decomposePar. It said something like: "for patch xxx is no ...". Anyway, I solved the problem by specifying that the bounding box is wall and so I extended all entries in 0-Folder with zeroGradient at the that wall. I know; It is a DIRTY SOLUTION, but should someone have a more elegante please post!

kinda regards

Claus
idrama is offline   Reply With Quote

Old   February 5, 2010, 05:15
Default
  #19
Member
 
Wolfram Kretzschmar
Join Date: Dec 2009
Posts: 71
Rep Power: 16
Wolle is on a distinguished road
Hi everybody,

Quote:
Originally Posted by fra76 View Post
snappyHexMesh keeps everything that is connected to the point you specify. If the pipe is opened, then it keeps everything.
Close the pipe with two surfaces (STL) and you should get only the internal mesh.
I completely understand this point. However, I have a question related to this.

My geometry is exported from CAD (outer surfaces), imported in CAD again (as faces only) and merged as a solid volume, then exported again. Imported in Salome and split up into faces. So I assume, the faces should make a closed volume. The faces are then exported to STL and preprocessed in order to work with snappy.

With small geometries this works very well. Now, I'm processing a rather large geometry and running out of virtual memory. This is why I try to set the refinement levels low and start working with refinement boxes in oder to keep the cell number small.

The locationInMesh is located in the internal mesh. I checked the vertice orders in blockMeshDict and this seems to be ok. However snappy finds the point inside the mesh and eventually keeps ALL cells, i.e. inside and outside.

Now my question: Could snappyHexMesh itself produce gaps between faces (i.e. a non-closed volume) due to cell removement in a mesh of low refinement level?

Cheers
Wolle
__________________
CAELinux 2010 -- OpenFOAM 1.7
Wolle is offline   Reply With Quote

Old   February 7, 2010, 05:45
Default
  #20
Senior Member
 
Francesco Del Citto
Join Date: Mar 2009
Location: Zürich Area, Switzerland
Posts: 237
Rep Power: 18
fra76 is on a distinguished road
The answer to your question is "no", i.e., in my experience every time I had the mesh where I didn't expect it, I had a leakage somewhere in the surface STL mesh. Sometimes is very hard to find those gaps and they could be related to the triangulation the CAD software (Salome in your case) does before exporting. Just as an example, if a curved line is shared by two surfaces but they are considered not connected by the cad, the number of point, or simply their position, used to represent that curved edge when exporting the two surfaces might be different, and this may be enough to find an unexpected hole.
Usually, if you go finer with your mesh, you have more chances that any possible imperfection creates a leakage.
A while ago (I don't remember when nor with which version of the code, unfortunately) there was a bug in the code and the mesh was refined on the wrong side, when using refinement boxes. That bug has been fixed and many new features and enhancements have been added to snappyHexMesh recently.
I suggest you to download the latest 1.6.x version from the git repository (there's a big update of this mesher released no more than a week ago) and try again with it. If this doesn't work, check your STL geometry carefully. I use Ansa for it, which is not bad in this task, even if I know better software for STL handling.
I use snappyHexMesh on big and complex models almost every day. It works, once you get used with it!

Hope this helps,
Francesco
fra76 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
transient, impregnating flow problem fgommer FLUENT 0 February 29, 2012 17:10
[snappyHexMesh] Pipe flow / Internal fluid dynamics with SnappyHexMesh denner OpenFOAM Meshing & Mesh Conversion 3 October 13, 2011 10:24
Flow meter Design CD adapco Group Marketing Siemens 3 June 21, 2011 09:33
potential flow vs. Euler flow curious ... Main CFD Forum 23 July 21, 2006 08:40
Plug Flow Franck Main CFD Forum 3 September 4, 2003 06:57


All times are GMT -4. The time now is 00:41.