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

[snappyHexMesh] Dimension or scale is incorrect

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 7, 2022, 01:44
Default Dimension or scale is incorrect
  #1
New Member
 
Anis Hanani
Join Date: May 2022
Posts: 6
Rep Power: 4
Anis Hanani is on a distinguished road
Greetings everyone!

I am currently doing a project that needs me to mesh a 0.4mx0.1mx0.4m model. The stl file I created was correct with the dimensions but after conducting snappyHexMesh, the model was much bigger than intended.

Is there any settings that I may have messed up in snappyHexMeshDict perhaps?

Thank you in advance!
Anis Hanani is offline   Reply With Quote

Old   June 7, 2022, 04:10
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Hi Anis,

CAD software usually works with millimeters while OpenFOAM uses meters.
As a result, the STL file often has coordinates written in mm but it is interpreted as m by OpenFOAM, which leads to a geometry being 1000 times larger than intended.

You can fix this in OpenFOAM using the surfaceTransformPoints utility to scale down your STL file by a factor 0.001.
The other way around is to do the scaling in the CAD software, or if possible, to change the units from mm to m when exporting the STL file.

Cheers,
Yann
Yann is offline   Reply With Quote

Old   June 8, 2022, 02:20
Default
  #3
New Member
 
Anis Hanani
Join Date: May 2022
Posts: 6
Rep Power: 4
Anis Hanani is on a distinguished road
Dear Yann,

Thank you for the reply.But it seems like the problem here is not the conversion of units.
The lenght of the model in the stl file is 1.46 inches but when meshed using sHM, the length became 1.46 metres.

Is there a way I can make it to be 0.4 metres?

Thank you in advance!
Anis Hanani is offline   Reply With Quote

Old   June 8, 2022, 04:09
Default
  #4
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Sounds like a units conversion problem to me. Your STL is 1.46 inches but OpenFOAM does not know 1.46 is supposed to be inches. It uses meters by default, this is why you get 1.46m.

You can still use surfaceTransformPoints to fix this by using the proper scaling factor to convert inches to meters.

Cheers,
Yann
Yann is offline   Reply With Quote

Reply

Tags
blockmesh, snappyhesmeshdict


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
Turbulence length scale and integral length scale rizhang CFX 2 April 22, 2016 08:22
Modelled Length Scale in SAS-SST Simulation jego Main CFD Forum 0 January 16, 2016 07:45
How to find a good time scale strategy? StefanG CFX 19 June 8, 2012 09:41
advection time scale Tanveer ahmad Rubani CFX 1 February 24, 2009 17:16
Dimension problem with operation scale booz OpenFOAM Pre-Processing 0 October 10, 2008 04:57


All times are GMT -4. The time now is 04:47.