|
[Sponsors] |
[snappyHexMesh] stl and snappyHexMesh dimensions mismatch |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 6, 2009, 05:00 |
stl and snappyHexMesh dimensions mismatch
|
#1 |
Senior Member
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 21 |
Hej,
I have a problem with the stl fileformat and the snappyHexMesh tool. The dimensions in the stl file format are as always given in mm, because all 3D cad programs (SolidEdge V20 in my case) export the original ISO dimensions. The problem now is that snappyHexMesh uses m as input, is there any way to define a scaling factor for snappyHexMesh? |
|
August 6, 2009, 06:26 |
|
#2 |
New Member
Join Date: Mar 2009
Posts: 20
Rep Power: 17 |
Hi Roman,
You can use the following command: transformPoints -scale '(1e-3 1e-3 1e-3)' I hope it works. Best regards, Xabi |
|
August 6, 2009, 07:23 |
|
#3 |
Member
Johan Spång
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 35
Rep Power: 17 |
Or you can scale the stl files with surfaceConvert when you clean them
surfaceConvert in.stl out.stl -clean -scale 0.001 |
|
August 6, 2009, 08:03 |
|
#4 | |
Senior Member
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 21 |
Quote:
I will try it as soon as I have my model ready. Thank you Worked perfectly. Thanks again Last edited by romant; August 10, 2009 at 04:50. |
||
June 30, 2014, 05:09 |
stl scaling in snappyHexMesh
|
#5 |
Senior Member
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18 |
Hi
I know that this is an old thread. However, it might be interesting for some of you, that one does not have to scale stl files before using them as input in snappyHexMesh. Nor does one have to mesh in mm units and scale the total mesh with transformPoints after meshing. SnappyHexMesh offers a scaling option for geometry and features: Code:
geometry { cube.stl { type triSurfaceMesh; scale 0.001; name cube; } }; Code:
features ( { file "cube.eMesh"; scale 0.001; level 7; } ); Cheers Fabian |
|
August 28, 2014, 11:56 |
|
#6 |
Member
Jason G.
Join Date: Sep 2009
Location: St. Louis, IL
Posts: 89
Rep Power: 17 |
Am I correct in assuming that the units are only relative? If I have an stl that is in inches and I wish to ultimately solve a case within OpenFOAM in inches, then there should be no converting required correct?
|
|
August 28, 2014, 20:57 |
|
#7 |
Senior Member
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 18 |
Hi Jason,
You can't make that assumption. All of OF is in metric units which also includes material parameters [K, mu, etc..] and flow dimensions [p, U, T, etc..]. You really just have to do everything in metric and in meters. Cheers, Kyle |
|
August 28, 2014, 21:16 |
|
#8 |
Member
Jason G.
Join Date: Sep 2009
Location: St. Louis, IL
Posts: 89
Rep Power: 17 |
Hi Kyle,
I have always understood the unit system to be relative, meaning you only need to make certain the dimension vector for a given parameter agrees with the unit system for the mesh and other parameters utilized. I have been using USCS units with inches for steady-steady incompressible flow models. I believe section 4.2.6 of the following link addresses this. http://www.openfoam.org/docs/user/ba...18-1000004.2.6 -Jason |
|
August 28, 2014, 21:22 |
|
#9 |
Senior Member
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 18 |
Hi Jason,
Its true you can operate outside of metric if you change all of the constants and material properties. I was under the impression you were planning on switching only your lengths from metric to US while leaving things like viscosity and the other constants in metric. Its impressive though! I've never heard of anyone actually running OF in a non-metric mode. Cheers, Kyle |
|
August 28, 2014, 21:31 |
|
#10 |
Member
Jason G.
Join Date: Sep 2009
Location: St. Louis, IL
Posts: 89
Rep Power: 17 |
I resisted as much as I could to not use it, the largest pain with USCS is wrapping your head around slugs and super-slugs when dealing with converting the viscosity and density.
I doubt the aerospace industry in the US will ever convert to a proper system Getting my viscous layers to properly form in snappyhexmesh is proving to be more of a challenge, currently. |
|
April 30, 2015, 09:32 |
Scaling features not working
|
#11 | |
New Member
Tom
Join Date: Oct 2014
Posts: 1
Rep Power: 0 |
Hallo Fabian,
Quote:
Thomas |
||
May 4, 2015, 10:44 |
|
#12 |
Senior Member
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18 |
You are absolutely right. I tried with a simple STL where the feature is at (0, 0) and thus stays there even without scaling. So I posted my findings here. After proceeding with a more complex geometry I recognized what you posted but simply forgot posting the correct answer here.
So thank you for correcting the wrong info in the thread. For those who still want to use the scaling there are two methods to go on: 1. Scale the eMesh files manual 2. Change snappyHexMesh code to use scaling as I posted Cheers Fabian |
|
Tags |
dimension, snappyhexmesh, stl, units |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] snappyHexMesh is not using the stl file | a_habib | OpenFOAM Meshing & Mesh Conversion | 9 | June 12, 2020 18:36 |
[CAD formats] Creating waterproof STL using snappyHexMesh or salome | Tobi | OpenFOAM Meshing & Mesh Conversion | 58 | May 13, 2020 07:01 |
[snappyHexMesh] What types of stl files are needed in snappyhexmesh? | phandy | OpenFOAM Meshing & Mesh Conversion | 1 | February 19, 2015 06:36 |
[snappyHexMesh] Experimentally obtained STL file for internal Flow SnappyHexMesh | Irish09 | OpenFOAM Meshing & Mesh Conversion | 9 | April 7, 2012 09:50 |
[snappyHexMesh] Patch Names in STL file for snappyHexMesh | Kattie | OpenFOAM Meshing & Mesh Conversion | 11 | October 18, 2011 12:05 |