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

[snappyHexMesh] Need Tutorial for using snappyHexMesh with STL

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By morkman

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 18, 2017, 04:50
Default Need Tutorial for using snappyHexMesh with STL
  #1
New Member
 
CA
Join Date: Nov 2017
Posts: 1
Rep Power: 0
morkman is on a distinguished road
I have created a vehicle and output a STL file. First I want to use snappyHexMesh to convert the STL file to the proper format for OpenFOAM. Then I want to run a few airflow simulations

I am using OpenFOAM's 5.x and my case directory is here: https://github.com/anujgoyal/openfoam

Slide 13 of this presentation: http://openfoamwiki.net/images/f/f0/...SlidesOFW7.pdf says that 5 requirements are needed:
  • Geometry data (stl, nas, obj) in constant/triSurface/Simple Car CFD.STL [DONE]
  • Dictionary file system/snappyHexMeshDict [DONE, don't know if it is correct]
  • Hexahedral base mesh (decomposed if running in parallel) [?, don't know where to start]
  • Dictionary file system/decomposeParDict for parallel runs [?, I have a large Xeon system so I would like to use parallel runs]
  • All system dictionaries (e.g controlDict, fvSchemes, fvSolutions) [?, don't know what the minimal set of parameters are]

I am having some trouble understanding what values should be in the Hexahedral base mesh, controlDict, fvSchemes and fvSolutions - does anyone have any recommendations? or could you point me to some detailed tutorials that they recommend?



I have also cross-referenced it on stackoverflow.com
https://stackoverflow.com/questions/...le-in-openfoam
y_jiang likes this.

Last edited by morkman; November 19, 2017 at 21:30. Reason: added image, added url
morkman is offline   Reply With Quote

Old   November 21, 2017, 07:21
Default
  #2
New Member
 
Join Date: Oct 2017
Location: Germany
Posts: 26
Rep Power: 9
rajan19us is on a distinguished road
You can use Helyx-OS (on Linux) to mesh, setup the case and run it.
The base mesh sizing depends upon the size of your model.
Tutorials you can find in the OpenFoam/tutorials directory.
I hope it helps a bit.
rajan19us is offline   Reply With Quote

Old   November 21, 2017, 08:02
Default
  #3
Member
 
Anders Utnes
Join Date: May 2017
Location: Norway
Posts: 34
Rep Power: 9
Alasir is on a distinguished road
Hex base mesh:
Snappyhexmesh basically works by using a large cubic mesh (base mesh) that surrounds your car, and removes all cells that are inside your car, and then gives you the remaining mesh. Exactly HOW you create this base mesh is irrelevant, but blockMesh is usually a good option.

snappyHexMeshDict:
This describes how exact the car is removed. If the end result is not awesome, then modify this until it is. You will most certainly have to do this quite a few times.

For parallell runs of multiple processors:
You will basically have to divide the mesh into multiple equal parts, and then each processor takes one part. Then reconstruct the mesh once the simulation is done. The decomposeParDict defines how the mesh should be split.

fvSolutions:
This defines how accurate the calculation needs to be. If you have converge problems, look here. If you have to strict requirements, your calculation gets much slower than it needs to be.

fvSchemes:
This defines what mathematical functions Openfoam should use to calculate your solution.

controlDict:
This is the main control document for the simulation. Note especially the timesteps and write interval.


I suggest going to the tutorial cases, and trying to find a case simular to your own, then adapt it to fit your needs. I imagine examining <incompressible/pisofoam/les/motorbike> would be interesting to you.
Alasir is offline   Reply With Quote

Old   November 21, 2017, 08:05
Default
  #4
Member
 
Anders Utnes
Join Date: May 2017
Location: Norway
Posts: 34
Rep Power: 9
Alasir is on a distinguished road
I belive there also is a good youtube tutorial available.
Alasir is offline   Reply With Quote

Old   November 30, 2017, 03:45
Default
  #5
Member
 
hulli graemer
Join Date: Oct 2014
Posts: 48
Rep Power: 12
hulli is on a distinguished road
https://openfoamwiki.net/images/f/f0...SlidesOFW7.pdf
hulli is offline   Reply With Quote

Old   March 13, 2019, 11:01
Default
  #6
New Member
 
emre
Join Date: Jul 2015
Posts: 12
Rep Power: 11
emregungor is on a distinguished road
Quote:
Originally Posted by morkman View Post
I have created a vehicle and output a STL file. First I want to use snappyHexMesh to convert the STL file to the proper format for OpenFOAM. Then I want to run a few airflow simulations

I am using OpenFOAM's 5.x and my case directory is here: https://github.com/anujgoyal/openfoam

Slide 13 of this presentation: http://openfoamwiki.net/images/f/f0/...SlidesOFW7.pdf says that 5 requirements are needed:
  • Geometry data (stl, nas, obj) in constant/triSurface/Simple Car CFD.STL [DONE]
  • Dictionary file system/snappyHexMeshDict [DONE, don't know if it is correct]
  • Hexahedral base mesh (decomposed if running in parallel) [?, don't know where to start]
  • Dictionary file system/decomposeParDict for parallel runs [?, I have a large Xeon system so I would like to use parallel runs]
  • All system dictionaries (e.g controlDict, fvSchemes, fvSolutions) [?, don't know what the minimal set of parameters are]

I am having some trouble understanding what values should be in the Hexahedral base mesh, controlDict, fvSchemes and fvSolutions - does anyone have any recommendations? or could you point me to some detailed tutorials that they recommend?



I have also cross-referenced it on stackoverflow.com
https://stackoverflow.com/questions/...le-in-openfoam

Hello morkman,

I have been trying similar study like your case. Did you manage this problem? If you did this case, would you describe for me (step by step) that how can I modify/replace my Car.stl file instead of the motorBike case? Thanks,
emregungor 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
Error with snappyHexMesh when using another propeller in propeller tutorial quarkz OpenFOAM Running, Solving & CFD 4 May 24, 2021 16:59
[snappyHexMesh] snappyHexMesh is not using the stl file a_habib OpenFOAM Meshing & Mesh Conversion 9 June 12, 2020 18:36
[snappyHexMesh] snappyHexMesh - different patch names from stl file cptlddd OpenFOAM Meshing & Mesh Conversion 6 November 22, 2017 07:54
[snappyHexMesh] Creating stl file for snappyHexMesh from xyz coordinates Vignesh2508 OpenFOAM Meshing & Mesh Conversion 2 April 25, 2017 09:43
[snappyHexMesh] Problem with the turbineSiting tutorial and snappyHexMesh Thaemos OpenFOAM Meshing & Mesh Conversion 0 June 28, 2013 05:32


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