CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [CAD formats] STL file conversion (https://www.cfd-online.com/Forums/openfoam-meshing/145391-stl-file-conversion.html)

dinolsky December 4, 2014 07:37

STL file conversion
 
Hello guys,

I am new to this awesome forum. Currently i am doing my masters and started with my student project in OpenFOAM. I am using snappyHexMesh for the grid generation. I have converted my CAD model into a stl file. since my CAD model deals with mm i assume that i should also convert my surface points in the stl file to meters. What i am doing is right? or Can any one comment on this please.
note: I am setting up my problems in meter.

with regards,
Dinesh

qwert December 4, 2014 08:11

Hi Dinesh,
i guess its surfaceTransformPoints -scale you are searching for:
[CODE]
surfaceTransformPoints -scale '(x.xx y.yy z.zz)'
[CODE]
For example from mm to m the scalefactors '(x y z)' are '(0.001 0.001 0.001)'. right?
Aloha!
Good luck to your Thesis!!

qwert

dinolsky December 4, 2014 08:56

Hi qwert,

thanks for your reply. I meant that since my stl file are in 'mm'. I should convert them to meters in order use them for meshing? What i am doing is correct?. Or should i use the original stl file with 'mm'.

with regards,
Dinesh

qwert December 4, 2014 10:33

Hi,
maybe i didn't get the point. However, if you have a stl-File with your triangles in mm and you want that file to convert in meters, since your calculation will use a metric system, you can use the surfaceTransform: (im my opinion you always should have a metric system for your calculation, if that was the point)
1. Go in the directory where you have the original stl-file (in mm)
2. use:

Quote:

surfaceTransformPoints -scale '(x.xx y.yy z.zz)' <nameofnew.stl>
Then you will have a new .stl in meters (:

Best regards,
qwert


All times are GMT -4. The time now is 13:18.