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

[snappyHexMesh] About snappyHexMesh

Register Blogs Community New Posts Updated Threads Search

Like Tree22Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 24, 2023, 05:01
Default
  #41
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Hi Hossein,

Adding layers in multiregion cases is pretty straightforward in recent OpenCFD branch (openfoam.com), it's a bit trickier in the foundation branch (openfoam.org).

AFAIK, you need to mesh in 2 steps: running snappyHexMesh once without layers, then create baffles and run snappy a 2nd time only for the layers addition phase.

Have a look at the shellAndTubeHeatExchanger tutorial, especially the Allmesh.layers script which, I think, does what you are trying to achieve: https://github.com/OpenFOAM/OpenFOAM...eHeatExchanger

Hope this helps,
Yann
AtoHM and H_SheikhShoaie like this.
Yann is offline   Reply With Quote

Old   August 10, 2023, 04:22
Default
  #42
New Member
 
Hossein Sheikhshoaie
Join Date: Sep 2022
Posts: 6
Rep Power: 4
H_SheikhShoaie is on a distinguished road
Hey Yann,

I really appreciate your guidance. Well I completely redefined my case, I have tried different methods , different stl files (created by salome and solidworks with various meshes).
Now there is a little problem, a few number (very low in compare to the whole number) of faces on an interface are named different from created interface's name (they get the name of their stl file and has been shown in attached picture), however there are in the correct region means there is no extra regions.

In my opinion this can be addressed can by defining BCs as same as interface for these faces. I had an unsuccessful effort to solve this problem by adjusting snappyHexMesh parameters but this arises from stl files (I've already changed all snappy's parameters). In addition It doesn't show a linear behavior by increasing or decreasing the resolution of slt's mesh. Unfortunately, it is weakly related to some mesh parameters too.

The snappyHexMesh containment has been brought below. In addition the faces has been illustrated in attached picture. surprisingly There is no problem with the more complex pipe which has five 180 degree bends.

I'm pressed for time to finish this project, I was wondering if you let me know how this faces can interfere the mesh quality and numerical solution. Because, My geometries will becoming more complicated. In addition, I will be grateful if I can have your Email address.

Regards,

Hossein



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

castellatedMesh off;

snap off;

addLayers on;



geometry
{
burner
{
type triSurfaceMesh;
file "burner.stl";
regions
{
burnerinlet
{
name burnerinlet;
}
burneroutlet
{
name burneroutlet;
}
burnerwall
{
name burnerwall;
}
}
}
gas
{
type triSurfaceMesh;
file "gas.stl";
regions
{
gasinlet
{
name gasinlet;
}
gasoutlet
{
name gasoutlet;
}
gaswall
{
name gaswall;
}
}
}
shell
{
type triSurfaceMesh;
file "shell.stl";
regions
{
shellwall
{
name shellwall;
}
}
}
}

castellatedMeshControls
{
maxLocalCells 100000;
maxGlobalCells 100000000;
minRefinementCells 10;
maxLoadUnbalance 0.1;
nCellsBetweenLevels 1;
resolveFeatureAngle 15;
allowFreeStandingZoneFaces true;
features ( { file "shell.eMesh" ; level 2 ; } );
refinementSurfaces
{
burner
{
level ( 1 1 );
regions
{
burnerinlet
{
level ( 1 1 );
patchInfo
{
type patch;
}
}
burneroutlet
{
level ( 1 1 );
patchInfo
{
type patch;
}
}
burnerwall
{
level ( 1 1 );
patchInfo
{
type wall;
}
}
}
}
gas
{
level ( 1 1 );
regions
{
gasinlet
{
level ( 1 1 );
patchInfo
{
type patch;
}
}
gasoutlet
{
level ( 1 1 );
patchInfo
{
type patch;
}
}
gaswall
{
level ( 1 1 );
patchInfo
{
type wall;
}
}
}
}
shell
{
level ( 0 0 );
regions
{
shellwall
{
level ( 0 0 );
patchInfo
{
type wall;
}
}
}
}
}
refinementRegions
{
}
locationsInMesh ( ( ( 1 0.008 0.015 ) region1 ) ( ( 2.5 0.23 0.3 ) cellZone2 ) ( ( 1 -0.369 0.2 ) cellZone1 ) );
}

snapControls
{
nSmoothPatch 3;
tolerance 2;
nSolveIter 100;
nRelaxIter 5;
nFeatureSnapIter 10;
explicitFeatureSnap false;
multiRegionFeatureSnap false;
implicitFeatureSnap true;
}

addLayersControls
{
featureAngle 100;
slipFeatureAngle 30;
nLayerIter 50;
nRelaxedIter 20;
nRelaxIter 5;
nGrow 0;
nSmoothSurfaceNormals 1;
nSmoothNormals 3;
nSmoothThickness 10;
maxFaceThicknessRatio 0.5;
maxThicknessToMedialRatio 0.3;
minMedialAxisAngle 90;
nMedialAxisIter 10;
nBufferCellsNoExtrude 0;
additionalReporting false;
layers
{
}
relativeSizes true;
expansionRatio 1.2;
finalLayerThickness 0.5;
minThickness 0.2;
}

meshQualityControls
{
maxNonOrtho 65;
maxBoundarySkewness 20;
maxInternalSkewness 4;
maxConcave 80;
minVol 1e-13;
minTetQuality -1;
minArea -1;
minTwist 0.02;
minDeterminant 0.001;
minFaceWeight 0.05;
minVolRatio 0.01;
minTriangleTwist -1;
nSmoothScale 4;
errorReduction 0.75;
relaxed
{
}
}

debug 0;

mergeTolerance 1e-06;
Attached Images
File Type: jpg Screenshot from 2023-08-10 10-20-40.jpg (159.5 KB, 33 views)
H_SheikhShoaie 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
[CAD formats] Creating waterproof STL using snappyHexMesh or salome Tobi OpenFOAM Meshing & Mesh Conversion 58 May 13, 2020 07:01
[snappyHexMesh] Running snappyHexMesh in parallel - optimizing peterhess OpenFOAM Meshing & Mesh Conversion 2 January 3, 2018 03:54
[snappyHexMesh] Tutorial crashes: snappyHexMesh floating point exception. jasv OpenFOAM Meshing & Mesh Conversion 4 May 10, 2016 03:55
[snappyHexMesh] snappyhexmesh doesn't creat mesh in parallel issue? klausb OpenFOAM Meshing & Mesh Conversion 1 March 7, 2015 12:55
[snappyHexMesh] stitchMesh and snappyHexMesh gdbaldw OpenFOAM Meshing & Mesh Conversion 0 December 23, 2009 03:09


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