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

[snappyHexMesh] Scaling issues with STL file and snappy hex mesh .

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 28, 2018, 19:25
Default Scaling issues with STL file and snappy hex mesh .
  #1
New Member
 
Join Date: Jun 2018
Location: Canada
Posts: 10
Rep Power: 7
pradyumnsingh is on a distinguished road
I am very new to OpenFoam
I am trying to put a stl file in domain space created by blockMesh utility.
However , snapping isn't really happening . The mesh generated after snapping dosent really have my model from the stl file. I have scaled both blockMesh and Snappy Hex Dict to 0.001 as mentioned below to mm .
The domain space was very carefully made , i suspect that I am having a scaling issue.

I am also attaching the files. Thanks for taking time to help me out

BloxkMeshDict

backgroundMesh
{
xMin -260; //
xMax 26;
yMin -5; //
yMax 66;
zMin -5;
zMax 37;
xCells 286;
yCells 71;
zCells 10;
}

convertToMeters 0.001; // for mm 0.001

SnappyHexMeshDict


geometry
{
hemisphere.stl
{
type triSurfaceMesh;
scale 0.001;
name hemisphere;
}
//refinementBox
//{
//type searchableBox;
//min (-0.5 -0.2 -0.5);
//max (2.5 0.5 2.5);
//}

};

castellatedMeshControls
{
maxLocalCells 1000000;
maxGlobalCells 2000000;
minRefinementCells 100;
resolveFeatureAngle 42;
nCellsBetweenLevels 10;
features
(
{
file "hemisphere.eMesh";
scale 0.001;
level 1;

}
);
refinementSurfaces
{
hemisphere
{
// Surface-wise min and max refinement level
level (1 1);
}
//
}
Attached Files
File Type: gz Flowaroundhemisphere.tar.gz (28.8 KB, 2 views)
pradyumnsingh is offline   Reply With Quote

Old   July 17, 2018, 11:52
Default
  #2
New Member
 
Otavio Duarte Aires Heckler
Join Date: Oct 2016
Location: Brazil
Posts: 6
Rep Power: 9
OtavioDuarte is on a distinguished road
Quote:
Originally Posted by pradyumnsingh View Post
I am very new to OpenFoam
I am trying to put a stl file in domain space created by blockMesh utility.
However , snapping isn't really happening . The mesh generated after snapping dosent really have my model from the stl file. I have scaled both blockMesh and Snappy Hex Dict to 0.001 as mentioned below to mm .
The domain space was very carefully made , i suspect that I am having a scaling issue.

I am also attaching the files. Thanks for taking time to help me out

BloxkMeshDict

backgroundMesh
{
xMin -260; //
xMax 26;
yMin -5; //
yMax 66;
zMin -5;
zMax 37;
xCells 286;
yCells 71;
zCells 10;
}

convertToMeters 0.001; // for mm 0.001

SnappyHexMeshDict


geometry
{
hemisphere.stl
{
type triSurfaceMesh;
scale 0.001;
name hemisphere;
}
//refinementBox
//{
//type searchableBox;
//min (-0.5 -0.2 -0.5);
//max (2.5 0.5 2.5);
//}

};

castellatedMeshControls
{
maxLocalCells 1000000;
maxGlobalCells 2000000;
minRefinementCells 100;
resolveFeatureAngle 42;
nCellsBetweenLevels 10;
features
(
{
file "hemisphere.eMesh";
scale 0.001;
level 1;

}
);
refinementSurfaces
{
hemisphere
{
// Surface-wise min and max refinement level
level (1 1);
}
//
}
OpenFoam works in meters, be careful with that. In addition, to generate the mesh you need some care, the geometry used must be inside the cube generated by BlockMesh, as close as possible to their faces to be able to converge. Another error is your stl file in binaries, but in snappyHexMesh it is ascii, convert your file to ascii.
OtavioDuarte is offline   Reply With Quote

Old   July 18, 2018, 16:17
Default
  #3
New Member
 
Join Date: Jun 2018
Location: Canada
Posts: 10
Rep Power: 7
pradyumnsingh is on a distinguished road
Quote:
Originally Posted by OtavioDuarte View Post
OpenFoam works in meters, be careful with that. In addition, to generate the mesh you need some care, the geometry used must be inside the cube generated by BlockMesh, as close as possible to their faces to be able to converge. Another error is your stl file in binaries, but in snappyHexMesh it is ascii, convert your file to ascii.
Thanks for your reply !

I did figure out the issue a while ago and it was exactly as you said. The stl file was in binaries and I needed to convert it into ASCII . It works like a charm now.
pradyumnsingh 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] Error snappyhexmesh - Multiple outside loops avinashjagdale OpenFOAM Meshing & Mesh Conversion 53 March 8, 2019 09:42
[snappyHexMesh] Snappy Hex Mesh - issue with smoothness of the model edges olek.warc OpenFOAM Meshing & Mesh Conversion 1 August 31, 2018 11:31
[snappyHexMesh] snappy hex mesh error kd55 OpenFOAM Meshing & Mesh Conversion 14 July 17, 2018 02:13
[snappyHexMesh] SnappyHexMesh for internal Flow vishwa OpenFOAM Meshing & Mesh Conversion 24 June 27, 2016 08:54
[snappyHexMesh] Snappy Hex Mesh Generation: error preventing the .eMesh file generation. Mariana Garcia OpenFOAM Meshing & Mesh Conversion 1 January 7, 2016 04:24


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