CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Special Topics > Mesh Generation & Pre-Processing

Snappyhexmesh does not use the stl file

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 26, 2024, 08:13
Default Snappyhexmesh does not use the stl file
  #1
New Member
 
Tale Egeberg Aasland
Join Date: Aug 2024
Posts: 3
Rep Power: 2
tale_aasland is on a distinguished road
Hi everyone,


I'm just getting started with openFoam, and currently, I'm trying to sort out snappyhexmesh, in order to mesh a 3D cylinder. The issue is that snappyhexmesh does not seem to do anything, although there are no actual error messages. The geometry is an stl file in ascii format. Blockmesh works, and the stl is placed within the background mesh (I checked using paraview), but no refinement occurs. The log says things like:


Marked for refinement due to explicit features : 0 cells.
Determined cells to refine in = 2.40163 s
Selected for feature refinement : 0 cells (out of 225000)
Stopping refining since too few cells selected.


I would very much appreciate some feedback on this. Here's my snappyhex dict file:


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


castellatedMesh true;
snap true;
addLayers false;

geometry
{
cylinder
{
type triSurfaceMesh;
file "cylinder.stl";
}

};

castellatedMeshControls
{
maxLocalCells 100000;
maxGlobalCells 2000000;
minRefinementCells 0;
nCellsBetweenLevels 1;

features
(
{
file "cylinder.eMesh";
level 0;
}
);


refinmentSurfaces
{
cylinder
{
level (3 3);
}

}


resolveFeatureAngle 30;

allowFreeStandingZoneFaces true;
insidePoint (-5 -2 0);
};


snapControls
{
nSmoothPatch 3;
tolerance 1;
nSolveIter 100;
nRelaxIter 5;

// Feature snapping
nFeatureSnapIter 10;
implicitFeatureSnap false;
explicitFeatureSnap true;
multiRegionFeatureSnap true;
};

meshQualityControls
{
maxNonOrtho 75;
maxBoundarySkewness 20;
maxInternalSkewness 4;
maxConcave 80;

minVol 1.00E-13;
minTetQuality 1e15;

minArea -1;
minTwist 0.02;
minDeterminant 0.001;
minFaceWeight 0.05;
minVolRatio 0.01;
minTriangleTwist -1;
minFlatness 0.5;
nSmoothScale 4;

errorReduction 0.75;
};

mergeTolerance 1e-6;
tale_aasland is offline   Reply With Quote

Old   August 26, 2024, 11:26
Default
  #2
Senior Member
 
M
Join Date: Dec 2017
Posts: 703
Rep Power: 13
AtoHM is on a distinguished road
An image might help.

Does your cylinder contain at least one cell of the background mesh (blockMesh) completely? Give the eMesh of the cylinder level 3 as well, that might help, too.


I see you have a typo in "refinmentSurfaces" - did that not give you an error message?
AtoHM is offline   Reply With Quote

Old   August 27, 2024, 03:18
Default It was the typo
  #3
New Member
 
Tale Egeberg Aasland
Join Date: Aug 2024
Posts: 3
Rep Power: 2
tale_aasland is on a distinguished road
Hi,


Thanks for your quick reply. The problem was the typo. It did not give an error message, strangely, but apparently it caused refinement commands to be disregarded.



Thank you so much!


Tale
tale_aasland is offline   Reply With Quote

Reply

Tags
snappyhexmesh 3d, stl file


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] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 04:30
OpenFoam "Permission denied" and "command not found" problems. iyidaniel@yahoo.co.uk OpenFOAM Running, Solving & CFD 11 January 2, 2018 07:47
polynomial BC srv537 OpenFOAM Pre-Processing 4 December 3, 2016 10:07
SparceImage v1.7.x Issue on MAC OS X rcarmi OpenFOAM Installation 4 August 14, 2014 07:42
ParaView Compilation jakaranda OpenFOAM Installation 3 October 27, 2008 12:46


All times are GMT -4. The time now is 09:16.