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

[snappyHexMesh] sHM makes bumps and does not resolve the edge

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 12, 2020, 12:25
Default sHM makes bumps and does not resolve the edge
  #1
New Member
 
Leegunho
Join Date: Jul 2019
Posts: 11
Rep Power: 2
kim4545 is on a distinguished road
Hi, Foamer!

I'm trying to do CFD on supersonic intake to measure the performance of the inlet

I extracted STL files of each patch with Salome and used SurfaceFeatureExtract.

However, the sHM does not resolve sharp edges and makes bumps on the surface.

Here is my snappyHexMeshDict.

Any advise would be a great help, THANKS!

Quote:
/*--------------------------------*- 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 false; // decide to add viscous layers ?


geometry // Load in STL files here
{
inlet.stl {type triSurfaceMesh; name inlet;}
outlet.stl {type triSurfaceMesh; name outlet;}
freestream.stl {type triSurfaceMesh; name freestream;}
wall.stl {type triSurfaceMesh; name wall;}
//volume.stl {type triSurfaceMesh; name volume;}
};

castellatedMeshControls
{
maxLocalCells 5000000; //max cells per CPU core
maxGlobalCells 7000000; //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 "inlet.eMesh"; level 3;}
{file "outlet.eMesh"; level 3;}
{file "wall.eMesh"; level 3;}
{file "freestream.eMesh"; level 3;}
);

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

refinementSurfaces // Surface-wise min and max refinement level
{
inlet {level (2 2); patchInfo { type patch; } }
outlet {level (2 2); patchInfo { type patch; } }
freestream {level (3 5); patchInfo { type patch; } }
wall {level (3 5); patchInfo { type wall; } }
}


resolveFeatureAngle 50; // Resolve sharp angles // Default 30
refinementRegions // In descending levels of fine-ness
{

/* volume
{
mode inside;
levels ((1E15 2));
}*/


} // was ((0.001 4) (0.003 3) (0.01 2))
locationInMesh (0 0.01 -0.005); //to decide which side of mesh to keep **
allowFreeStandingZoneFaces true;
}


// Settings for the snapping.
snapControls
{
nSmoothPatch 20;
tolerance 4.0;
nSolveIter 50;
nRelaxIter 25;
nFeatureSnapIter 20; // 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
{
wall {nSurfaceLayers 5;} // was 3

freestream {nSurfaceLayers 5;} // was 3

}


expansionRatio 1.3;
finalLayerThickness 0.00005; //was 0.00016
minThickness 0.00001; //was 0.00008
nGrow 0; // was 1


// Advanced settings

featureAngle 60; // was 70 //- When not to extrude surface. 0 is flat, 90 is right angle.
nRelaxIter 3; //- Max# of snapping relaxation iter. Should stop before upon reaching a correct mesh.
nSmoothSurfaceNormals 1; // Number of smoothing iterations of surface normals
nSmoothNormals 15; // 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
nBufferCellsNoExtrude 0; // Create buffer region for new layer terminations
nLayerIter 100; // 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-21;
minTetQuality 1e-30 ;
minArea -1;
minTwist 0.03;
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;


// ************************************************** *********************** //
Attached Images
File Type: jpg Domain.jpg (23.4 KB, 7 views)
File Type: png Mesh.PNG (128.5 KB, 8 views)
kim4545 is offline   Reply With Quote

Old   May 12, 2020, 17:07
Default
  #2
HPE
Senior Member
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 583
Rep Power: 5
HPE is on a distinguished road
Hi,

- Would you mind to visualise the STL surface meshes, please?
- Would you please attach "surfaceCheck" results on these STL surface meshes as well?
- If it is fast, would you turn off the mesh quality checks, and run snappy?
- Would refining the background blockMesh be possible for you?
- For surface bumps, I'm surprised. snappy can handle this for sure. There should be a problem somewhere.
- May be increasing the tolerane for the skewness metrics (boundary) may help.
- Please see detailed settings of snappy: https://www.openfoam.com/documentati...pyhexmesh.html
- Do you use OF 2.2? If so, please do consider to update to a more recent version - assuming you do use .org variant, OF-7 is available.

Hope these help.
HPE is offline   Reply With Quote

Old   May 13, 2020, 01:26
Default Bump issue solved, Diverging problem arises
  #3
New Member
 
Leegunho
Join Date: Jul 2019
Posts: 11
Rep Power: 2
kim4545 is on a distinguished road
Quote:
Originally Posted by HPE View Post
Hi,

- Would you mind to visualise the STL surface meshes, please?
- Would you please attach "surfaceCheck" results on these STL surface meshes as well?
- If it is fast, would you turn off the mesh quality checks, and run snappy?
- Would refining the background blockMesh be possible for you?
- For surface bumps, I'm surprised. snappy can handle this for sure. There should be a problem somewhere.
- May be increasing the tolerane for the skewness metrics (boundary) may help.
- Please see detailed settings of snappy: https://www.openfoam.com/documentati...pyhexmesh.html
- Do you use OF 2.2? If so, please do consider to update to a more recent version - assuming you do use .org variant, OF-7 is available.

Hope these help.

Thank you for your reply!!

I solved my problem by refining blockMesh and surfaceRefinement

I'm not that satisfied with resolution of the intersection, but i think it might be OK.

Actually i'm facing another problem.

rhoCentralFoam and rhoSimpleFoam diverges and i have no idea why.

Could you plz check my boundary condition looks OK?

It is supersonic aircraft intake with inlet M = 4.5, T = 60K, P = 1100Pa

Inviscid simulation(slip on the wall) makes no errors but laminar simulation(noSlip on the wall) makes Floating point exception error.

i attached my boundary condition files.

Patch name 'freestream' is same with 'outflow' on the picture above.

I tried several meshes but none of them sovled the issue.

It might not be a problem of the mesh i think.

Again, THANK YOU for your reply!!

Quote:
P

dimensions [1 -1 -2 0 0 0 0];

internalField uniform 1100;

boundaryField
{
inlet
{
type fixedValue;
value uniform 1100;
}
outlet
{
type waveTransmissive;
field p;
psi thermosi;
gamma 1.4;
fieldInf 1100;
lInf 1;
value uniform 1100;
}

wall { type zeroGradient; }

freestream { type zeroGradient; }
}
Quote:
T

dimensions [0 0 0 1 0 0 0];

internalField uniform 60;

boundaryField
{
inlet
{
type fixedValue;
value uniform 60;
}
outlet
{
type zeroGradient;
}
wall
{
type zeroGradient;
}
freestream
{
type zeroGradient;
}
}
Quote:
U

dimensions [0 1 -1 0 0 0 0];

internalField uniform (698.98 0 0);

boundaryField
{
inlet
{
type fixedValue;
value uniform (698.98 0 0);
}
outlet
{
type zeroGradient;
}
wall
{
type noSlip;
}
freestream
{
type zeroGradient;
}
}
kim4545 is offline   Reply With Quote

Old   May 13, 2020, 01:28
Default Pictures
  #4
New Member
 
Leegunho
Join Date: Jul 2019
Posts: 11
Rep Power: 2
kim4545 is on a distinguished road
Quote:
Originally Posted by HPE View Post
Hi,

- Would you mind to visualise the STL surface meshes, please?
- Would you please attach "surfaceCheck" results on these STL surface meshes as well?
- If it is fast, would you turn off the mesh quality checks, and run snappy?
- Would refining the background blockMesh be possible for you?
- For surface bumps, I'm surprised. snappy can handle this for sure. There should be a problem somewhere.
- May be increasing the tolerane for the skewness metrics (boundary) may help.
- Please see detailed settings of snappy: https://www.openfoam.com/documentati...pyhexmesh.html
- Do you use OF 2.2? If so, please do consider to update to a more recent version - assuming you do use .org variant, OF-7 is available.

Hope these help.

I forgot to attach the image files

here are my domain and resolved mesh image.
Attached Images
File Type: png boundary.PNG (36.3 KB, 5 views)
File Type: jpg Domain.jpg (23.4 KB, 3 views)
kim4545 is offline   Reply With Quote

Old   May 13, 2020, 16:16
Default
  #5
HPE
Senior Member
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 583
Rep Power: 5
HPE is on a distinguished road
Hi

- Could you please check the mesh quality in terms of mesh metrics by executing `checkMesh -allGeometry -allTopology -latestTime`?
HPE 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



All times are GMT -4. The time now is 07:20.