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

[snappyHexMesh] Workflow including Solidworks and SnappyHesMesh

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By kera

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 14, 2017, 05:30
Default Workflow including Solidworks and SnappyHesMesh
  #1
New Member
 
Graham Cottrell
Join Date: Mar 2017
Posts: 3
Rep Power: 9
Tesseractic is on a distinguished road
From my reading I have decided that I want a hexahedral mesh, so SnappyHexMesh would seem to be desirable, except that SnappyHexMesh seems to require that one first run BlockMesh, which requires a BlockMeshDict file containing a description of the geometry to be meshed.

My problem is this: how do I get from Solidworks model to BlockMeshDict?

To complicate matters somewhat, I am not the one running Solidworks; that's someone else in the same city.


Thanks in advance, Graham.

Last edited by Tesseractic; March 15, 2017 at 00:59. Reason: typo
Tesseractic is offline   Reply With Quote

Old   March 15, 2017, 17:32
Default
  #2
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21
jherb is on a distinguished road
Your blockmesh can be a cube with just one cell (or 8) which is larger than you final flow domain. SnappyHexMesh will use this as starting mesh but will do all the refinements necessary and cut out all space outside the boundaries.

(see all the tutorials, e.g. motorbike, which use snappyHexMesh)
jherb is offline   Reply With Quote

Old   March 16, 2017, 03:56
Default
  #3
Member
 
Ricky
Join Date: Jul 2014
Location: Germany
Posts: 78
Rep Power: 11
kera is on a distinguished road
Quote:
Originally Posted by Tesseractic View Post
From my reading I have decided that I want a hexahedral mesh, so SnappyHexMesh would seem to be desirable, except that SnappyHexMesh seems to require that one first run BlockMesh, which requires a BlockMeshDict file containing a description of the geometry to be meshed.

My problem is this: how do I get from Solidworks model to BlockMeshDict?

To complicate matters somewhat, I am not the one running Solidworks; that's someone else in the same city.


Thanks in advance, Graham.
Hey,

These are the steps I usually follow to bring a geometry in the OpenFOAM environment for meshing:

Step 1: Save your Geometry in IGS/STP format.
Step 2: Import the geometry in a thrid party software where you can organize your components for say, Inlet, outlet, walls etc... and save it in STL format
Step 3: Place the STL file in your constant/triMesh
Step 4: In order to use snappyHexMesh you need a base mesh, which is usually a block incorporating your whole geometry.
Step 5: Choose a random point (x,y,z) within your geometry as this is one of the parameter required by the snappyHexMeshDict, to say which mesh to keep.

From here you can follow an excellent youTube tutorial whereall the steps are explained in detail, here is the link.

some more tutorials for snappyHexMesh can be easily found in the tutorials folder as Joachim mentioned.

in the command prompt after sourcing the OpenFoam version hit the following commands.

Code:
tut 

grep -r "snappyHexMesh" .
hope this helps!

Regards,
Ricky
daylen likes this.
__________________
If it is easy, then something is fishy!
kera is offline   Reply With Quote

Old   March 20, 2017, 01:25
Default
  #4
New Member
 
Graham Cottrell
Join Date: Mar 2017
Posts: 3
Rep Power: 9
Tesseractic is on a distinguished road
Quote:
Originally Posted by jherb View Post
Your blockmesh can be a cube with just one cell (or 8) which is larger than you final flow domain. SnappyHexMesh will use this as starting mesh but will do all the refinements necessary and cut out all space outside the boundaries.

(see all the tutorials, e.g. motorbike, which use snappyHexMesh)
Actually, the problem involves a pipe (actually a cyclone) with 2 output ends plus another pipe branching off the middle for an inlet, so I don't think this particular piece of advice will be helpful. Somehow I have to get into BlockMeshDict format the geometry that is currently (after being output from Solidworks) in STL format. The point is that BlockMeshDict seems to require a representation of the model, but nothing seems to write a BlockMeshDict file.

How do I create a BlockMeshDict from the STL file, or any other format that Solidworks can output?


Regards, Graham.
Tesseractic is offline   Reply With Quote

Old   March 20, 2017, 01:43
Default
  #5
New Member
 
Graham Cottrell
Join Date: Mar 2017
Posts: 3
Rep Power: 9
Tesseractic is on a distinguished road
Quote:
Originally Posted by kera View Post
Hey,

These are the steps I usually follow to bring a geometry in the OpenFOAM environment for meshing:

Step 1: Save your Geometry in IGS/STP format.
Step 2: Import the geometry in a thrid party software where you can organize your components for say, Inlet, outlet, walls etc... and save it in STL format
Step 3: Place the STL file in your constant/triMesh
Step 4: In order to use snappyHexMesh you need a base mesh, which is usually a block incorporating your whole geometry.
Step 5: Choose a random point (x,y,z) within your geometry as this is one of the parameter required by the snappyHexMeshDict, to say which mesh to keep.

From here you can follow an excellent youTube tutorial whereall the steps are explained in detail, here is the link.

some more tutorials for snappyHexMesh can be easily found in the tutorials folder as Joachim mentioned.

in the command prompt after sourcing the OpenFoam version hit the following commands.

Code:
tut 

grep -r "snappyHexMesh" .
hope this helps!

Regards,
Ricky
Thanks Ricky, I followed most of that. I have a problem with step 2, though. Which 3rd party tools can be used here and how does one actually specify the walls, inlets and outlets?

Regards, Graham.
Tesseractic is offline   Reply With Quote

Old   March 20, 2017, 07:42
Default
  #6
Member
 
Ricky
Join Date: Jul 2014
Location: Germany
Posts: 78
Rep Power: 11
kera is on a distinguished road
Quote:
Originally Posted by Tesseractic View Post
Thanks Ricky, I followed most of that. I have a problem with step 2, though. Which 3rd party tools can be used here and how does one actually specify the walls, inlets and outlets?

Regards, Graham.

you can use SALOME for that, a good tutorial is given by Tobias Holzmann, which you can find here.

Regards,
Ricky
__________________
If it is easy, then something is fishy!
kera is offline   Reply With Quote

Reply

Tags
blockmeshdict, solidworks


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 04:51.