CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

How to import single STL file to openfoam in Windows 10

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 10, 2019, 08:08
Default How to import single STL file to openfoam in Windows 10
  #1
Member
 
Joe lee
Join Date: Nov 2018
Posts: 59
Rep Power: 3
Jinjolee is on a distinguished road
I am a Windows 10 user and have never used Linux before. Currently I am working on a final year project, which needs to generate a fluid flow simulation of track cycling. I have created a cyclist and bike model in SolidWorks, and I would like to export the model and use in OpenFOAM. I have installed OpenFOAM on my Windows 10 using Ubuntu. I followed the guide from https://openfoam.org/download/windows/ . By the way, I am a completely newbie in OpenFOAM and Ubuntu.

I first export the SolidWorks model to .stl file with in ASCII. And it is in a single file, namely Model.STL. And now I would like to do meshing on this STL model using SnappyHexMesh. However, I do not know how to import the STL file using OpenFOAM. I tried to find tutorial of this, but I couldn't find any using a single STL model.

Could anyone help me to figure out what should I do? Thanks in advanced.
Jinjolee is offline   Reply With Quote

Old   April 10, 2019, 09:52
Default
  #2
New Member
 
Join Date: Mar 2019
Posts: 2
Rep Power: 0
Saamu is on a distinguished road
You have to put the stl file in the constant/triSurface-folder. SnappyHexMesh will then be able to read this stl file
Saamu is offline   Reply With Quote

Old   April 10, 2019, 11:04
Default
  #3
Member
 
Joe lee
Join Date: Nov 2018
Posts: 59
Rep Power: 3
Jinjolee is on a distinguished road
Quote:
Originally Posted by Saamu View Post
You have to put the stl file in the constant/triSurface-folder. SnappyHexMesh will then be able to read this stl file
Thanks for replying. After I moved the stl file into triSurface folder, what should I do? I tried to run SnappyHexMesh by typing "snappyHexMesh", but it said
-->FOAM FATAL ERROR
cannot find file "/home/<username>/OpenFOAM/<username>-dev/run/system/controlDict"

Thanks a lot.
Jinjolee is offline   Reply With Quote

Old   April 10, 2019, 18:46
Default
  #4
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 529
Rep Power: 15
jherb is on a distinguished road
As shown in the output, you need a controlDict file in the systems folder. You could start with one of the files in the $FOAM_TUTORIALS subfolders which use snappyHexMesh, e.g. the motorBike tutorial:
https://github.com/OpenFOAM/OpenFOAM...Foam/motorBike
jherb is offline   Reply With Quote

Old   April 11, 2019, 01:03
Default
  #5
Member
 
Joe lee
Join Date: Nov 2018
Posts: 59
Rep Power: 3
Jinjolee is on a distinguished road
Quote:
Originally Posted by jherb View Post
As shown in the output, you need a controlDict file in the systems folder. You could start with one of the files in the $FOAM_TUTORIALS subfolders which use snappyHexMesh, e.g. the motorBike tutorial:
https://github.com/OpenFOAM/OpenFOAM...Foam/motorBike
Thanks a lot! I would try this out.
Jinjolee is offline   Reply With Quote

Old   April 11, 2019, 03:48
Default
  #6
Member
 
Joe lee
Join Date: Nov 2018
Posts: 59
Rep Power: 3
Jinjolee is on a distinguished road
Quote:
Originally Posted by jherb View Post
As shown in the output, you need a controlDict file in the systems folder. You could start with one of the files in the $FOAM_TUTORIALS subfolders which use snappyHexMesh, e.g. the motorBike tutorial:
https://github.com/OpenFOAM/OpenFOAM...Foam/motorBike
Is it true that surfaceFeatureExtract function only takes stl file with .stl.gz extension? My file is in .stl format and it cannot be read by the surfaceFeatures and surfaceFeatureExtract function. I checked that flange is in .stl.gz. So I am wondering if the stl file has to be in .stl.gz.

If the above is true, how should I turn .stl into .stl.gz? Thanks.

EDIT
Nevermind. I put the wrong file in the triSurface folder.
Jinjolee is offline   Reply With Quote

Reply

Tags
import cad, snappyhexmesh 3d, ubuntu 14.04 lts, windows 10

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[foam-extend.org] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 ordinary OpenFOAM Installation 19 September 3, 2019 19:13
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 keepfit ParaView 60 September 18, 2013 04:23
[swak4Foam] Error bulding swak4Foam sfigato OpenFOAM Community Contributions 18 August 22, 2013 13:41
2.0.x on Mac OSX niklas OpenFOAM Installation 74 March 28, 2012 17:46
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 02:24


All times are GMT -4. The time now is 19:36.