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

[snappyHexMesh] Create cylinder around snappyHexMesh for MRF/rotating

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By linnemann

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 12, 2009, 04:22
Default Create cylinder around snappyHexMesh for MRF/rotating
  #1
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 555
Rep Power: 27
linnemann will become famous soon enough
Hi Community

I have a question regarding creating a mesh with SnappyHexMesh (SHM) which is to be used with either moving mesh or MRF solver.

The geometry in mind is a ships propeller/hull, after creating the SHM mesh I would like to create a cylinder around the propeller and split the mesh into two parts, rotating and stationary. As far as I've learned SHM do not support meshing multiple bodies and thus the reason tor creating the cylinder afterward, splitting the mesh.

Do you have any ideas if this is possible using only OpenFOAM tools since I'm not interested in using any commercial software for creating the mesh. I know it could be possible to use CellSet and FaceSet commands, but as far as I know these commands need some sort of body to operate on.

Any hints for this would be most helpfull. An example of the geometry can be seen in the attached picture created in Star CCM+.

Regards Linneman

Attached Images
File Type: jpg Screenshot.jpg (96.0 KB, 1145 views)
Tobi likes this.

Last edited by linnemann; May 12, 2009 at 06:55.
linnemann is offline   Reply With Quote

Old   November 23, 2009, 07:19
Default
  #2
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 555
Rep Power: 27
linnemann will become famous soon enough
To answer my own question the 1.6 version of OpenFOAM has the possibility to use a cylinder shape for the cellSet command.

The interface/outside of the cylinder must have a well defined plane or instability in the flow can occur.

another approach is to create a mesh around the propeller which is a cylinder and have this cut from the bigger domain and use the ggi (general grid interface) features for OpenFOAM-1.5-dev.

I've created such a geometry using a combination of Salome for the geometry and Netgen for the mesh, export the mesh from Netgen to two different case folders and use the mergeMeshes command to combine the meshes. The MRF or dynamic features can then be used depending on quasi-steady or transient analysis.

Best
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Old   January 7, 2010, 00:09
Default
  #3
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
Hi,

Just to add to the post above............

I have been trying to generate a mesh for stirred tank with a mrf region using snappyHexMesh.
The procedure I adopted goes as:
- define a cylindrical refinement zone (option available in OF-1.6) and use this as a refinement region. This would lead a good enough surface of revolution. (not sure about this, working on it !)
- the using cellSet its possible to extract this as a cellzone and use it as MRF zone.

Please correct me if I am wrong. !!!

-- Amol
amgode is offline   Reply With Quote

Old   January 8, 2010, 00:18
Default
  #4
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
Another option:

- using ggi and snappyHexMesh
I am presently trying to figure this one out......

Create two different regions mrf region and the tank without the mrf region and then merge the meshes. GGI can then be used at the interface......To obtain a good correspondence between the surfaces I am trying the possibility of using the featureEdge option now available with OF-1.6.........Don't know how far I can get with this approach........

Any comments on the approach are welcome !!!!!!!!!!1


-- Amol
amgode is offline   Reply With Quote

Old   January 8, 2010, 06:09
Default
  #5
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 555
Rep Power: 27
linnemann will become famous soon enough
Quote:
Originally Posted by amgode View Post
Another option:

- using ggi and snappyHexMesh
I am presently trying to figure this one out......

Create two different regions mrf region and the tank without the mrf region and then merge the meshes. GGI can then be used at the interface......To obtain a good correspondence between the surfaces I am trying the possibility of using the featureEdge option now available with OF-1.6.........Don't know how far I can get with this approach........

Any comments on the approach are welcome !!!!!!!!!!1


-- Amol
This is the approach I'm currently using although I don't use snappy since the featureEdge option is still not present in 1.6 (told at the Barcelona conference in november). And thus snappy fails at capturing circular edges sufficiently.

I use a combo of Salome and Netgen to produce meshes with skewness less than 0.8 and the do as Amol proposed above. Merge meshes and employ ggi and cyclicGgi from the 1.5-dev version.
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Old   May 29, 2014, 06:40
Default
  #6
Senior Member
 
M. Montero
Join Date: Mar 2009
Location: Madrid
Posts: 153
Rep Power: 17
be_inspired is on a distinguished road
Dear Niels,

I do not know if you still follow this topic.
The point is that I am trying to follow the same approach but for a different target.
Using a reference mesh of a wind farm ( fine mesh for ABL simulation but coarse mesh for rotorDiskSource model and wake simulation), I want to use snappy and a cylinder (STL) to obtain a hole in my reference mesh. That hole will be filled by a new refined mesh (mergeMeshes) with a cylindrical shape
Then, ggi interface would be used for making the magic.

I have done the snappy step using featureEdge option ( with no luck).
GGi interface is not clear for me. I am using OF2.3.0.

Thank you very much
Marcelino
Attached Images
File Type: jpg image1.jpg (85.9 KB, 114 views)
File Type: jpg image2.jpg (97.7 KB, 108 views)
be_inspired is offline   Reply With Quote

Old   October 19, 2014, 23:19
Default
  #7
New Member
 
sd
Join Date: May 2014
Posts: 14
Rep Power: 11
OvGU is on a distinguished road
I am strugling with a cylinder of 2 radius.I creat a layer but failed to remove badsector. It's only problem on surface, when Im looking inside, it's quite good .......... I can send u case file if u have little bit time

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


geometry // Load in STL files here
{
inlet_1.stl {type triSurfaceMesh; name inlet_1;}
outlet.stl {type triSurfaceMesh; name outlet;}
inlet_2.stl {type triSurfaceMesh; name inlet_2;}
inlet_3.stl {type triSurfaceMesh; name inlet_3;}
wall.stl {type triSurfaceMesh; name wall;}
//cylinder.stl {type triSurfaceMesh; name volume;}
refineCylinder {type searchableCylinder; point1 (0 0 0); point2 (0 0 2); radius 0.14;}
//refinementBox {type searchableBox; min (-0.5 -0.5 -0.5); max ( 0.5 0.5 0.5);}
};

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 "inlet_1.eMesh"; level 2;}
{file "outlet.eMesh"; level 2;}
{file "wall.eMesh"; level 2;}
{file "inlet_2.eMesh"; level 2;}
{file "inlet_3.eMesh"; level 2;}
);

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

refinementSurfaces // Surface-wise min and max refinement level
{
inlet_1 {level (2 2);}
outlet {level (2 2);}
wall {level (2 2);}
inlet_2 {level (2 2);} // was 4 4
inlet_3 {level (2 2);} // was 4 4
}


resolveFeatureAngle 80; // Resolve sharp angles // Default 30
refinementRegions // In descending levels of fine-ness
{refineCylinder {mode distance; levels ((1E15 2));}} // (0.002 3) (0.01 2));}} // was ((0.001 4) (0.003 3) (0.01 2))
locationInMesh (0.01 0.01 0.01); //to decide which side of mesh to keep **
allowFreeStandingZoneFaces true;
}


// Settings for the snapping.
snapControls
{
nSmoothPatch 3;
tolerance 4.0;
nSolveIter 30;
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 true; // was true
layers
{
wall
{nSurfaceLayers 3;} // was 3
//visc_refine_1
// {nSurfaceLayers 3;} // was 3
//visc_refine_2
// {nSurfaceLayers 3;} // was 3
}

expansionRatio 1.0;//1.3;
finalLayerThickness 0.00016; //was 0.00016
minThickness 0.00008; //was 0.00008
nGrow 1; // was 1


// Advanced settings

featureAngle 80; // 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 3; // 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 130; // Angle used to pick up medial axis points
nBufferCellsNoExtrude 0; // Create buffer region for new layer terminations
nLayerIter 50; // 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-13;
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;


// ************************************************** *********************** //
OvGU 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
[snappyHexMesh] snappyHexMesh on slice of cylinder Loekatoni OpenFOAM Meshing & Mesh Conversion 2 November 14, 2018 05:53
[snappyHexMesh] snappyHexMesh - cylinder appears as a square! chia87 OpenFOAM Meshing & Mesh Conversion 1 October 23, 2018 21:41
[mesh manipulation] How to create patch after snappyHexMesh hsieh OpenFOAM Meshing & Mesh Conversion 33 July 17, 2017 08:15
[Workbench] How to create solid cylinder with helical groove on its surface. jenny_kapoor ANSYS Meshing & Geometry 3 April 29, 2016 02:12
[blockMesh] Include list of points Hikachu OpenFOAM Meshing & Mesh Conversion 0 June 20, 2011 09:03


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