|
[Sponsors] |
September 19, 2010, 21:29 |
.stl to OF Problems
|
#1 |
Senior Member
jeff osborne
Join Date: Mar 2010
Posts: 108
Rep Power: 16 |
Hello all,
I'm just trying to figure out how to import solid models from a modelling program (in my case solidworks) in openfoam. The particular case I'm looking at is a simple 2D airfoil. I created the shape in SW, saved it as a .stl file. At the moment I'm trying to use enGrid to import into OF, but if someone has a different suggestions I'd be happy to hear it. My issue is really that I have no idea how to use it, how do I define my BCs around the airfoil that I will use in OF? I did the tutorial for engrid (valve model) but that was internal flow and I'm really confused about external flow. If anyone has any suggestions for documentation that I can read or if they know of a simpler way to do it I would really appreciate that. Thanks - J |
|
September 20, 2010, 02:03 |
|
#2 |
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 18 |
Hi ozzy,
try to use snappyHexMesh. Together with blockMesh and snappyHexMesh you have two preinstalled tools in OF that you can use for implementing your .stl file in OF. As tutorial use the motorBike tutorial in OF ( /tutorials/incompressible/simpleFoam/motorBike ) and also in the documentation under chapter 5 meshing you find a section dealing with snappyHexMesh I hope I could help you regards Colin |
|
September 20, 2010, 02:12 |
|
#3 |
Senior Member
|
Hello,
what about going http://engits.eu/phpBB3/ to ENGRID discussion boardforum, there should be experienced users like Oliver Gloth it`s originator maybe as a start reading http://engits.eu/phpBB3/viewtopic.php?f=2&t=106 and post your questions there just my 2 cents elvis |
|
September 20, 2010, 20:13 |
|
#4 |
Senior Member
jeff osborne
Join Date: Mar 2010
Posts: 108
Rep Power: 16 |
Hey,
I'm trying now to just use snappyHexMesh to import my shape in (an airfoil that I'm trying to make into a 2D simulation). I have my .stl file in the triSurface subdictionary, the snappyHexMeshDict file in the system directory and I created the hex mesh using blockMeshDict. Here is a printout of what my snappyHexMeshDict file looks like. I'm just trying to get it working right now so I tried making it as simple as possible: castellatedMesh true; snap true; addLayers true; mergeTolerance 1e-06; debug 0; geometry { NACA0010.stl { type triSurfaceMesh; name NACA0010; } }; castellatedMeshControls { locationInMesh (0 0 0.0005); maxLocalCells 1000000; maxGlobalCells 2000000; minRefinementCells 0; nCellsBetweenLevels 1; resolveFeatureAngle 30; features ( ); refinementSurfaces { NACA0010.stl { level (2 2); } } } snapControls { nSmoothPatch 3; tolerance 4.0; nSolveIter 30; nRelaxIter 5; } addLayersControls { relativeSizes true; layers { airfoil { nSurfaceLayers 1; }pected int found on line 37 the do } expansionRatio 1.0; finalLayerThickness 0.3; minThickness 0.25; nGrow 1; featureAngle 60; nRelaxIter 5; nSmoothSurfaceNormals 1; nSmoothNormals 3; nSmoothThickness 10; maxFaceThicknessRatio 0.5; maxThicknessToMedialRatio 0.3; minMedianAxisAngle 130; nBufferCellsNoExtrude 0; nLayerIter 50; } meshQualityControls { maxNonOrtho 65; maxBoundarySkewness 20; maxInternalSkewness 4; maxConcave 80; minFlatness 0.5; minVol 1e-13; minArea -1; minTwist 0.05; minDeterminant 0.001; minFaceWeight 0.05; minVolRatio 0.01; minTriangleTwist -1; nSmoothScale 4; errorReduction 0.75; } It compiles fine but when I try to view it in paraview, I don't get anything, it just looks like a grid with no shape in it (see picture attached). Does anyone have any suggestions for this? Thanks a million -J |
|
September 21, 2010, 03:29 |
|
#5 |
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 18 |
Hi I had the same problem that I stated already here and some other questions on sHM.
But the more I think of it I get the impression that paraFoam is just printing the blockMesh part of the mesh (well obviously it does as seen on the picture, but I mean that it doesn't print anything created by sHM at all and only refers to the results of blockMesh) But any help on this topic is appreciated as well as on my other questions I stated in the previous mentioned topic best regards Colin |
|
September 21, 2010, 12:34 |
|
#6 |
Senior Member
jeff osborne
Join Date: Mar 2010
Posts: 108
Rep Power: 16 |
apparently the error was that instead of just calling "snappyHexMesh" I needed to call "snappyHexMesh -overwrite" without the quotes. It seems that when you do that it puts the new information in the polyMesh file which then paraView reads from.
|
|
September 21, 2010, 12:43 |
|
#7 |
Senior Member
jeff osborne
Join Date: Mar 2010
Posts: 108
Rep Power: 16 |
Okay, now I have a new question about this problem. I do have it working now, but the meshing isn't as accurate as I would like it to be. Here is a printout of my snappyHexMeshDict file:
castellatedMesh true; snap true; addLayers true; mergeTolerance 1e-06; debug 0; geometry { NACA0010.stl { type triSurfaceMesh; name NACA0010; } refinementBox { type searchableBox; min (-0.25 -0.1 0); max ( 0.75 0.1 0.001); } }; castellatedMeshControls { locationInMesh (-0.25 0 0.0005); maxLocalCells 1000000; maxGlobalCells 2000000; minRefinementCells 0; nCellsBetweenLevels 1; resolveFeatureAngle 30; refinementRegions { refinementBox { mode inside; levels ((1E15 5)); } } features ( ); refinementSurfaces { NACA0010 { level (4 5); } } } snapControls { nSmoothPatch 3; tolerance 4.0; nSolveIter 30; nRelaxIter 5; } addLayersControls { relativeSizes true; layers { airfoil { nSurfaceLayers 1; } } expansionRatio 1.0; finalLayerThickness 0.3; minThickness 0.25; nGrow 1; featureAngle 45; nRelaxIter 8; nSmoothSurfaceNormals 3; nSmoothNormals 3; nSmoothThickness 10; maxFaceThicknessRatio 0.5; maxThicknessToMedialRatio 0.3; minMedianAxisAngle 130; nBufferCellsNoExtrude 0; nLayerIter 50; } meshQualityControls { maxNonOrtho 65; maxBoundarySkewness 20; maxInternalSkewness 4; maxConcave 80; minFlatness 0.5; minVol 1e-13; minArea -1; minTwist 0.05; minDeterminant 0.001; minFaceWeight 0.05; minVolRatio 0.01; minTriangleTwist -1; nSmoothScale 4; errorReduction 0.75; } And attached I have some pictures of my shape. You can see in the pictures that the airfoil shape looks wavy which will definitely mess up my results. Any suggestions for how I can get rid of that? Thanks -J |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ICEM] Problems with coedge curves and surfaces | tommymoose | ANSYS Meshing & Geometry | 6 | December 1, 2020 11:12 |
[snappyHexMesh] SnappyHexMesh .stl | Jochem | OpenFOAM Meshing & Mesh Conversion | 10 | September 23, 2016 04:26 |
[cfMesh] CFMesh: feature definition or extraction in the .stl file | Gio Baila | OpenFOAM Community Contributions | 11 | December 17, 2014 04:28 |
Complex .stl data for volume meshing in ICEM CFD | Nils_H | ANSYS Meshing & Geometry | 5 | September 2, 2011 08:39 |
Needed Benchmark Problems for FSI | Mechstud | Main CFD Forum | 4 | July 26, 2011 12:13 |