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

[CAD formats] How to scale the stl when importing from salome or any cad tool to openfoam

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By LeeRuns
  • 1 Post By Eko

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 1, 2018, 01:16
Default How to scale the stl when importing from salome or any cad tool to openfoam
  #1
New Member
 
Vishal sharma
Join Date: Dec 2016
Posts: 2
Rep Power: 0
vishalsharma is on a distinguished road
Hey, there i am very new to openfoam,
i just want to ask if i create a model using salome and export the stl file to be used for snappyhexmesh.
How to scale the geometry or mesh in openfoam.

Like i have created a sphere and channel in salome, my default unit display in salome is in meters, so if keep the diameter as 20 it will take it as 20m.
but in openfoam i want the sphere of 20mm.
how can i do that.
please help me in this.
vishalsharma is offline   Reply With Quote

Old   February 1, 2018, 18:52
Default
  #2
Member
 
Join Date: Feb 2016
Posts: 41
Rep Power: 10
LeeRuns is on a distinguished road
So Salome writes in mm by default. Therefore if you want to export a sphere just keep the default units of mm.....stl files store the dimension with the file so it should know what the proper dimension is in snappy hexmesh.(as far as I know)..
I usually just make my mesh in Salome. So i compute mesh
Export the .unv

Then run transformPoints -scale (0.001 0.001 0.001)
Liangyuan likes this.
LeeRuns is offline   Reply With Quote

Old   February 1, 2018, 20:26
Default
  #3
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 15
Antimony is on a distinguished road
Hi,

You can use transformPoints like LeeRuns has mentioned - but this is works on your mesh mainly.

If you have only the surface files for example, you can use the surfaceTransformPoints utility - does the same thing as transformPoints except that this operates on surfaces.

Hope this helps.

Cheers,
Antimony
Antimony is offline   Reply With Quote

Old   February 2, 2018, 04:20
Default
  #4
Eko
Member
 
Join Date: Dec 2017
Location: Germany
Posts: 48
Rep Power: 8
Eko is on a distinguished road
Another way would probably be scaling the geometry in sHMDict file.
This should work

Code:
geometry
{
    sphere.stl
    {
        type triSurfaceMesh;
        name sphere;
	scale 0.001;
    }
Liangyuan likes this.
Eko is offline   Reply With Quote

Reply

Tags
preprocessing, salome meca, snappyhexmesh 3d


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
Frequently Asked Questions about Installing OpenFOAM wyldckat OpenFOAM Installation 3 November 14, 2023 11:58
[CAD formats] Importing CAD Meshes in OpenFOAM vanmaercke OpenFOAM Meshing & Mesh Conversion 14 December 14, 2017 16:30
How to contribute to the community of OpenFOAM users and to the OpenFOAM technology wyldckat OpenFOAM 17 November 10, 2017 15:54
OpenFOAM Training, London, Chicago, Munich, Houston 2016-2017 cfd.direct OpenFOAM Announcements from Other Sources 0 September 14, 2016 03:19
[Salome] Mesh conversion Salome to OpenFOAM VMartinez OpenFOAM Meshing & Mesh Conversion 11 April 21, 2014 02:54


All times are GMT -4. The time now is 16:48.